header-langage
简体中文
繁體中文
English
Tiếng Việt
Scan to Download the APP
Partnered With:

Starkware dialog dydx: Layer2 with derivatives

Read this article in 58 Minutes
On April 22nd, we co-hosted the AMA Live with StarkWare's Ohad Barta and DyDX's Brendan Chou.
原文标题:《 Starkware x dydx 深度对话:Layer2 与衍生品 》
原文来源: Odaily 星球日报


On April 22nd, we co-hosted the AMA Live with StarkWare's Ohad Barta and DyDX's Brendan Chou. Ohad and Brendan discussed the following:


• 他们进入加密行业的背景和经验

• dYdX 为什么要迁移到 Layer 2

• dYdX 选择 StarkWare 作为合作伙伴的原因

• StarkEx 如何运作以及不同的数据可用性模式

• 所选技术架构的中心化和去中心化部分

• StarkNet 和未来计划和愿景

• Stark Key 上的细微差别及其在 Layer2 系统中的使用方式

• Layer2 上的 Oracle 性能

• ZK Rollup 与其他 Layer2 技术的对比(如 Optimistic Rollups/ ZkSync)

• 现货与衍生产品之间的关系

• 更多...


An edited transcript of the interview follows:


David (dYdX):  Thank you for your participation. I'm David Gogel. I'm part of DyDX's growth team. I'm very happy to have Ohad from StarkWare and Brendan from DyDX with us today. We are going to talk about some of the issues from the community, we are going to talk about the technical implementation of DyDX Starkex's cross margin perpetual contract supported by StarkWare. Brendan Ohad, can you share your background and how you came to join DyDX and StarkWare, respectively?


Brendan:I am a software engineer by profession. I graduated from Princeton University and worked for big software companies like Bloomberg and Google, where I learned some job skills, how to program and how to work in big companies. I'm also looking for something different. I was Antonio's roommate in college, and he went to Coinbase right after college, so I always asked him to explain to me what Bitcoin is and how it works, but I never fully understood it. I started researching more things at the peak of 2017.


I know he's setting up his own company. We had a conversation during our annual New Year get-together with all our ex-housemates, and that's when I decided to join. I was in New York at the time, and I realized that if I could take a step forward and do this crazy crypto work, it would definitely benefit me. That's how I got into the industry.


David (dYdX):  Ohad, how did you get involved with StarkWare


Ohad (StarkWare): Eli Ben-Sasson, one of StarkWare's co-founders, and I have known each other since 2011. I wrote for him part of the first version of the PCP Prover and Verifier, which are older versions of the Starks and Snark used today. Then I spent six years getting programming experience in the Israeli intelligence service. I went on to get a master's degree in cryptography from Professor Yuval Ishai, and we did a paper on cryptography last year. Later, I contacted Eli and asked him how StarkWare was doing. After seeing how mainstream the proof system has become in the last six years, I decided to join the ELI&NBSPs. .


David (dYdX): A few weeks ago, DyDX publicly released the Cross Margin perpetuity contract on Layer 2. Brendan, can you provide more background on why DyDX decided to move to Layer2 and the advantages of the new Layer2 product over the Layer1 product?  


Brendan (dYdX): There are many reasons. The most important is the order execution part. Previously, it used a single Ethereum transaction to settle each transaction on the chain. This poses some challenges. First of all, it's not instantaneous and can be jumped on. This creates some uncertainty for everyone = you have to wait for blocks to be dug up before your trade can go through.


Also, our own transactions cost a lot of gas. It's a waste of our money and it's not sustainable for us. We have to charge users higher fees or higher minimum transaction amounts and things like that. As Ethereum gets bigger or the number of users gets bigger, it doesn't help anyone. So I think that's our main motivation, the order execution part.


Another issue we saw with Layer1 was the speed at which we could get the price of the Prophet on the chain. When prices change dramatically and Gas costs rise, the price of the prognosticator is reported to Layer1 much more slowly, which introduces some additional risk to the user. Therefore, we have to punish the users being liquidated by providing a less leveraged, more aggressive clearing system that, again, consumes a lot of Gas, is slow, and contributes less to the overall security of the system. So I think that's the main factor that we're looking at, and we're moving to Layer2 for more immediate certainty, which leads to a better experience and a lower cost.  


David (dYdX):  Why did you choose StarkWare as your partner for the Layer2 system?


Brendan (dYdX): What we want is rapid development and hopefully a release in the next few months. So we want to remove more risk and work with people who have been on the mainnet for a while. Starkex has been working with Deversifi and has had great success, getting great word of mouth from the people we've spoken to. So I think those are the main factors.


David (dYdX):  Ohad, can you tell me a little bit about what Starkex is? And how does it work?


Ohad (StarkWare): Starkex is StarkWare's scaling solution for applications on Ethereum. It takes a sequence from the sequencer (in this case dYdX), runs them internally, and makes sure that everything is checked out and makes sense. It then moves the transaction to the Cairo program. Basically, the Cairo program can represent any statement (it is Turing complete).   The Cairo compiler compiles the Cairo program and our validator converts it to Stark proof. We then send the proof on this chain to the verifier for verification. If the verifier accepts the proof, the proof is valid. Therefore, we can do accurate real-time settlement.


David (dYdX): Can you describe the different models of Starkex and their trade-offs?


Ohad (StarkWare):For Validium, we don't publish them by state because the cost of doing so is very high: even if it costs only a fraction of the actual transaction executed, it is still non-negligible and increases linearly with the number of changes. Instead, we say, "Well, we have this trusted server committee." This is the approach taken by Deversifi and Immutable, which have several respected committee members. In this method, as a condition of endorsement, committee members must demonstrate that they are aware of all relevant data that users may use in the event of operator failure. In ZK-Rollup, we publish a new balance on the chain every time we update. As a result, users have more trust in the system, but it also costs more.


David (dYdX): Brendan, DyDx's Starkex implementation is ZK-Rollup, not Validium. Can you describe the thought process of why ZK-Rollup is the better model for DYDX?


Brendan (dYdX):  In fact, we don't have any strong feelings about it. I think Ohad describes the tradeoff very well there. It just makes the data available to everyone, but the cost of publishing is that doing so requires more gas. So we decided to keep it on the chain for the time being and put it all together because we felt we could afford the gas. Currently, we do not pass on the cost of Gas to our customers. So there is no Gas fee at the time of transaction. Assuming the ETH prices continued to rise or increase network utilization, then we can delete all data in the future release to that part of the chain, then maybe some additional members of the committee, please to verify that the data is stored in a number of different position, used for a number of different participants, so that the user won't lose track of chain on the actual current balance. As Ohad said, this is important. If they need to basically justify their position and quit the system.


But that's just the way to go, because if it costs too much, then, as I mentioned, if ultimately you have to pass those costs on to the users, the community and other users, that's where we can put more data down the chain and save everybody more gas.  


David (dYdX): With the transition to Layer2, people can see less data in the block browser.   Ohad, can you describe the data available for users to view on Layer1?  


Ohad (StarkWare):The data that you can look at on Layer1 is the balance of all the users, including the composite assets and the money index: this information tells you how much money we really have when the last batch is received. The transactions themselves are not posted on the chain, both to save costs and to keep the trading strategy private.


David (dYdX):How can I, as a user, be confident that the transaction data kept outside of Layer1 is actually correct? What mechanisms are in place to ensure the validity of everything that happens down the chain?


Ohad (StarkWare) :Before discussing Starkex, I said that all of this is based on the Cairo program, and that program is at the center of everything. So, what happens is that the Cairo program will get the order of the transactions. In addition to the commitment to the new status output, it adds all position balances that changed during the lot. And this output links to the proof. If you are unable to show me the transaction through the data on the chain, then this proof will not be accepted.  


David (dYdX):This answer is super helpful!   Ohad, can you provide an update on the status of Starknet and its vision?


Ohad (StarkWare) :  Maybe I'll start with Starknet, because so far we've only talked about it on Starkex.   StarkEx is cool. It does help you now, but it's not enough in the long run. The reason it's not good enough in the long run is that Starkex currently requires operators to operate, which is not good from a centralized, technical and regulatory perspective.   Starknet means to bring all Cairo programs and provers. /  The Verifier is at the center of Starkex, rather than working with a sequencer that will only build a complete side chain, where each block in the side chain will be proved by comparing it to Cairo, and then the Verifier will be proved as we proved today, even using the same verification procedure as today.


Of course, this will take some time, so we will do it step by step. So, at the end of May, we'll be publishing a demo on Starknet's Ropsten that will allow you to write custom contracts. Take the AMM contract, for example, but it does not allow Layer1 to Layer2 interaction yet. Then, a few months from there, we'll start extending StarkNet to allow interactions between contracts and between Layer1 and Layer2.


Then, the next thing we need to do is decentralize operators. So we really will have a complete miner and a side chain of everything, not just a sequencer that sorts all the smart contracts submitted by the user.    


David (dYdX) :Brendan, as part of the process on DyDX Getting Started, users connect their Ethereum wallets and make transactions. But for the first time, the user must create a Stark Key. Can you describe what Stark Key is and how it is used on DyDX?


Brendan (dYdX) :Basically, it's similar to an Ethereum private key. It is simply an encryption method to verify that everything you sign comes from your private key. You must use a different private key or a different elliptic curve to sign something that is compatible with the STARK system. I don't have too many technical details. Ohad should know better than I do. But in essence, it's just another key to keep track of everything.


We don't want the user to have to remember another complete private key. They are used to protecting their Ethereum keys. We don't want them to have to keep another thing, and if they lose it, that's bad. We came up with a system that would allow them to derive it using their existing keys. This is basically obtained by hashing their fixed signature, as long as they have the Ethereum private key. Therefore, as long as they own their own Ethereum private key, they will never lose their Stark private key.


This is really useful because, as I mentioned, they don't have to keep two things. And in the same way that you can't really forge someone's Ethereum signature or find hash conflicts, their private Stark keys are equally secure.  


David (dYdX): Do I have to protect my Stark Key like I protect my private key? If someone has access to my Stark Key, will they have access to my funds?


Brendan (dYdX) :It's a very complicated question. Yes, you should definitely keep it a secret. I'm just thinking about the worst thing that people could do, and I think in this case, they might sign the order on your behalf. However, if that's all they have, then even if they pull your funds to Layer 1, they can't remove them from the contract. They still need your Ethereum key to do that. In addition, on our side, we have API keys and secrets to prevent people from doing these things without explicit permission.


Similarly, if only your STARK key is compromised, then on the DYDX side, we still do not accept requests unless you also have the API key.   API keys are another small set of private keys, which can also be derived from your Ethereum private keys. So if you own the Ethereum private key, you can at least have those. These three secret keys are derived from Ethereum private keys. So it's not good if someone takes your Stark private key, but there are plenty of security mechanisms in place to prevent someone from wreaking havoc there.


David (dYdX):Ohad, can you describe which hardware or software wallets currently support Stark Keys?


Ohad (StarkWare):Currently, Ledger Wallet natively supports Stark Keys and StarkWare apps, as well as several other wallets. I believe that Authereum supports it, despite its recent deprecation. For any other wallet, we have a JavaScript library that requires the wallet to be signed with the Ethereum key and to derive the Stark key from that signature, as Brendan described. This is how MetaMask and all common wallets currently work. We plan to add more wallets to enable native Stark Keys support. That's what we've been pursuing. With more and more projects like yours going on, I think this will happen soon.  


David (dYdX):There's been a lot of talk in the wake of the cryptocurrency market's flash crash over the weekend. StarkWare posted a blog post about the price of the Seer at Layer 2, which seems to be a big issue on other DEXs. How does DYDX's Starkex implementation use the price of Oracle? How is it different from the Layer1Oracle?


Brendan (dYdX) :So for now we only use the Chainlink prognostics. We're also talking to a couple of other prognostics projects to see if we need some cooperation. As I said DyDX is looking to grow rapidly, and the nice thing about ChainLink is that it gives us a lot of different trading pairs and supports Layer2 keys or Stark keys.


At the moment, we only work with one project, which sends us encrypted and signed prices. We can encrypt them to tell them they came from the signer or someone whose private key we trust. Then, we add them up and use the median value to get the Layer2 price. All prices have time stamps and things like that and the name of the asset. Summarize them together and get the median of some quorum, and that's how we do it on Layer2. This is very similar to the pattern you see in many of the prognosticator projects on the Layer1 network.


In addition to not requiring every predictor to send transactions, our approach is similar to aggregating all signatures in bulk without having to package all transactions onto the Layer1 network. They can go directly to the Layer2 block and eventually be chained when the entire block is packaged for publication.  


David (dYdX):  Ohad, can you describe what happened over the weekend and how Layer2 helped DYDX maintain its pricing?


Ohad (StarkWare):Over the weekend, the price of Ethereum fell 20% in a short period of time. While & have spent DyDX's biggest advantage over other decentralized exchanges is that we constantly get all the prices from the Chainlink predictor and can react to price changes in real time, without having to wait until the transaction is accepted on the chain. Once we get the price from ChainLink and use it, we can again send subsequent transactions through that price without waiting for things to happen down the chain.


That's what makes dYdX work. We cleared over 1000 times in an hour, which is impossible on the Layer1 network because many of our competitors were also sending transactions at this time. Therefore, this is why a small delay can improve the stability of the system.


David (dYdX): Ohad, can you describe the current role of the ZK Verifier? What are the future plans for this technology stack of decentralization?


Ohad (StarkWare):  Right now, of course, StarkWare is running a verification program. The validator gets the Cairo program from the StarkEx component and generates the proof, which is then sent on the chain. I'm sure that in Starknet, the proof will be decentralized in some way, but since this is the last step Starknet will take next year, I can't really commit to what we will do.


David (dYdX): From the user's perspective, what are the risks to the present demonstrator in centralized zero-knowledge proof? Can you review my transaction? Is there any downtime for this certificate? How does this affect the stability of the whole system?  


Ohad (StarkWare): Verification should be online in real time. We use the best services that Amazon has to offer, and they run 24/7. Even if something happens and they're down for a short period of time, it doesn't affect the system.


As for the question of censorship, this has nothing to do with the fact that the witnesses are too concentrated, but with the fact that the ordering itself is centralized. As a result, deals are likely to come under scrutiny. However, users' withdrawals cannot be reviewed.



If you send a transaction through the system and for some reason see the system ignoring you, you can submit a Layer1 request and withdraw, or even trade your composite assets, so you don't have to pay a maintenance margin for the composite assets you own. With a series of such Layer1 transactions, you can shut down the system completely. Also, if the operator chooses to also review those requests that are supported by Layer1, your user review system can now go to the Layer1 smart contract and tell him: "Look, my smart contract, a few days ago the request was withdrawn, but I'm still being reviewed." And then: everything was shut down, of course, and we were never interested in doing such a thing.


David (dYdX): Brendan, how does the DyDX team think about maintaining unmanaged transactions on the Layer2 network? What tradeoffs must the team make relative to a Layer1 network?


Brendan (dYdX):  As Ohad stated, now we are basically choosing the order of transactions, which is slightly different from Layer1 networks. Typically in a Layer1 network, the miner selects the person with the highest gas fee. It's kind of like we're the miners of every block. But as Ohad mentioned, there needs to be safeguards in place so that people can withdraw money no matter what, so you can't review every transaction.


People can agree to a transaction, and then send it back to the Layer1 network, and we'll force it into a block of Layer2. If it's a withdrawal request, we have to do the same. So, as long as people can get their money back, we run into the same problems as the Layer1 network, which is still unmanaged in the sense that we can't steal money, but for now, as everything is moving into a more centralized matching engine, we can choose not to allow certain traders on the system.


Therefore, we will continue to work on thinking further on the strategic side and becoming more decentralized, especially in order execution. I think the unmanaged nature will take the lead and be more decentralized in cases where the execution of the order is very tricky.


David (dYdX):  Do you have any initial ideas for a decentralized order book and matching engine?


Brendan (dYdX): This is a difficult problem, so I won't go into it here. Often, even in traditional finance, you will see many different kinds of trading systems. We are now using an order strategy. I know that 0X and some other projects are using more of an inquiry system or request quote system where you basically ask someone to give you a quote and then agree to it. This is a little different from the way orders work.


So there may need to be more research into these types of models, and even UNISWAP could do more AMM-type models, to open up the situation. I think there are many different ways. I don't have anything particularly specific right now.


User:  My question specifically relates to the market and how to add different assets. If I remember correctly, DyDX has Link, Uniswap, Solana and Sushi trading pairs. In the future, will DyDX look for ways to involve the community in the selection of new projects? Or do you keep doing it in-house?  


Brendan (dYdX): This is definitely something we want the community to be involved in, to have more of a say in. As an exchange, the most important goal is to get people to trade what they want to trade. It's important for us to get the community involved and give people a bigger say in what they want to see. So that's definitely our top priority. I think probably in the next few months, 2021, we want to give people more say in this.


David (dYdX):  I would add that another benefit of moving to Layer2 is that we can add more trade pairs more quickly. In the last 2 weeks, we have added 4 new trade pairs. Our current goal is to add one or two trade pairs a week for the rest of the year. By the end of the year, there will be 30 to 50 perpetual contracts trading pairs. The decision-making process around it was very focused on listing the tokens that our users wanted to trade. We assume that the user wants to trade the top-level DeFi token and the top-level Layer1 token. We always value the community's comments, and if you have a particular deal you like, please feel free to share it with the administrator so that we can refer to it.  


Brendan (dYdX): As for the other part of your question, it mostly depends on who is making the decisions right now. Right now it's basically the DyDX team's decision.


David (dYdX): There has been a lot of discussion about different Layer2 solutions, and recently ZKSync released a statement about their vision for ZKPorter, which I think is very similar in some ways to StarkWare's Validium model. Ohad, what do you think of ZKSync? What is the vision of ZKSync? How does it differ from StarkWare's goal?  


Ohad (StarkWare):First, to make the ZKPorter part clear, ZKPorter is the idea of combining Validium with the ZK-Rollups approach we discussed earlier. We call this "Volition" here at StarkWare, and we even talked about it back in June 2020. We are excited to see that others in the field are adopting some of our ideas and will soon be rolling them out on many of the main networks.


Overall, I think ZKSync is somewhat close to what we're doing from a technology standpoint, and they're another company that provides a general proof of effectiveness and scalability, at least from the next release, because right now they only have transport.  


User: Sometimes I found myself with a profit margin of more than 100 per cent. If the price is too high, I will not be able to close the position because the margin will still be over 100%. Was it intentional or a mistake?  


Brendan (dYdX):  What we want in the end is that as long as you are liquidating your position, it should allow it to pass. There are multiple different verification steps in the process to allow this to happen, and we basically don't want people to open positions that exceed that limit, and even in some cases, if we allow it, it might invalidate the proof itself because we're allowing someone to take an invalid position.


But I think right now we might be overly sensitive to that, and we have some stops in the validation system. So I think we're asking people now to go back to the original margin level, but eventually we do want to allow that. I think a couple of people have sent us messages recently, so I think we might make it a priority. We do want to allow that to happen, because in particular I think people who have a lot of positions may not want to liquidate them all to get back below 100. Thank you for asking the question.  


David (dYdX): Ohad, can you move money between StarkWare's different solutions? For example, go from DeversiFi to dYdX and back?  


Ohad (StarkWare): Suppose you mean some kind of distrust or proven transfer, which we do not yet support. We intend to support it with Starknet, which will provide application communication between contacts starting at the end of this year. In this way, these deals will be easy to implement.  


David (dYdX): At some point, will users be able to transfer funds from one Layer2 application to another?


Ohad (StarkWare):If you consider the Layer2 application that StarkWare runs, you can be sure. I think in the long run we'd like to work with other Layer2 solutions as well, but that's a long time frame.  


David (dYdX): Ohad, could you describe at a high level some of the major tradeoffs between ZK rollup and Optimistic rollup?


Ohad (StarkWare): Now a brief introduction to Optimistic Rollups, as so far we have only discussed ZK rollup. In "Optimistic Rollup", we take all transactions off the chain and publish the results on the chain. However, we don't issue a certificate, so we need to check all transactions and see if they find any inconsistencies or fraud, and if so, they will submit a certificate of fraud. For optimistic Rollups, this model has several disadvantages.  


First, there is no final determinism, and you must assume that the user is monitoring the state, since it can take several hours for the user to challenge the status update. Intuitively, Optimistic Rollup can compensate for this shortcoming by being cheap because with them, you don't need to prove.  


But this is not actually true either, because for Optimistic Rollup, you have to submit all the data on the chain, i.e. all the transactions that have been completed. When using ZK-Rollups, we can prove a lot with one piece of evidence, Thousands of transactions (we will soon be able to prove thousands of transactions in a batch for DyDX). So if you compare the amortized weight of a transaction in a proof to the cost of sending it to a chain with on-chain data, ZK-Rollup is not only more secure, but also much cheaper.


For example, I think the disadvantage between StarkWare and Optimism is that Optimism is easier to use because it is compatible with EVM. When you add Optimism, you still need to modify something, but it's much less than removing Cairo. However, with the work on Starknet, we hope that this disadvantage will no longer exist in the near future.  


David (dYdX):Brendan, can you describe your build experience in Cairo?


Brendan (dYdX):  We didn't actually code for this in Cairo, because StarkWare has a lot more knowledge and expertise in how it works. We've thought about writing some Cairo contracts ourselves, but just for expediency, security and contract correctness, we basically work with them to come up with a completely new logic system that's different from our L1, because we're going to do something like cross market margin and so on. So it's basically working with them to come up with the logic that needs to be coded.


Most of the contracts were written by StarkWare. So we worked with them to look at the state of Cairo and give them some feedback on how to improve it. But in this case, it's the creation of StarkWare, so I can't comment too much.  


David (dYdX):Ohad, you are on Starkware in Cairo/Layer  2. What is the strategy for adding more projects? StarkWare is developing a stable Cairo compiler, when will it be available?  


Ohad (StarkWare): We are currently in the process of adding the project to Starkex. We've had Deversifi, DyDx, and Immutable enabled since last June, and hope to release a few more during the rest of the year. We try to make it easy to join Starknet in a number of ways. Some of them may improve Cairo. A year ago, writing in Cairo was like assembly language; now it's more like writing C, and maybe even easier.


In addition, we plan to build from Solidity to Cairo. We think this is just one of several things that will make it easier to work with Starknet, so that's yet to be determined.


User:I notice that there are index prices, forecaster prices and middle market prices. While the differences between the three have been documented, I'm still not entirely sure why an exponential price independent of the prophet price is needed. Do you have documentation or public information about the information that the two price platforms get from different exchanges or the sources of the predictors?


Brendan (dYdX):  I'm not sure exactly what's on the help page, but in essence, we've talked about how the Prophet's price performs better on Layer2, but the Prophet's price isn't accurate to the minute. Therefore, the index price is primarily managed internally by DYDX, which has two different purposes from the prophet price, mainly because it is more efficient than the prophet price.


The first is features such as triggering orders. So these are like stop loss or stop profit orders or something like that. Therefore, if you usually have a tracking stop or stop limit order, then this will trigger the index price rather than the forecaster price. As I mentioned, that's just because index prices are so much more efficient. The dYdX is basically pulling the price out of the exchange. In the case of Bitcoin, look at six or seven spot exchanges, such as Binances and Coinbase.


It is also used to determine the interest rate on funds. Interest rates are basically determined by whether the asset is trading above or below its index price. So index prices need to be very precise because you're comparing fast-moving orders on these exchanges with fast-moving spot prices. So something like index prices can be updated every second, every two seconds, but forecasters usually don't update unless there's real market volatility.


If the price changes by more than 25 points, you may see the price of the prophet updated. But index prices are updated much more frequently than that, so they provide a better experience with stop-loss orders, as well as more accurate funding rates. So, hopefully this is helpful, and I think we plan to build the help section and make all this information more accessible, as well as the exact exchange that each trade is used on.


User: Liquidation depends on the price of the forecaster, not the index price?


Brendan (dYdX):Yes & have spent


User: Why not just rely on index prices? Is it in part to prevent manipulation?


Brendan (dYdX): Predictors are more affordable. The index price is basically maintained by the dYdX itself. So, basically, it's a service that can track that price. If we're just clearing on that basis, I think that's a tradeoff. Therefore, the index price is not included in the proof or anything else. It's an off-chain activity that we track in this way to provide a better experience.


For example, we can do everything at a prophetic price. The reason clearing is not on the index price is that clearing needs to follow a specific set of rules specified in the smart contract. Even if their profit margin is not high, we can't liquidate them. All of this needs to be included in the rollup proof itself.  


User: With regard to DYDX offering two products, I would like to raise some more academic questions about the decision that ordinary traders make between using margin and using perpetuity contracts, and I'm sure you have thought about this. I know that perpetuity contracts are very popular in the cryptocurrency market, and that's one of the reasons it seems like you've actively moved to focus on perpetuity contracts, which makes sense. One of the things I would like to know is what impact the perpetual market has on the spot market and vice versa. I imagine that research has been done on this, and maybe it's no big deal to the average trader, they just want to make money. But I wonder, I imagine the market maker you're working with is in a market-neutral position, for example, if they're short and at the same time they're buying spot on the other side. What kind of research have you done on the spot market to study or analyze the differences between margin and sustainability and how they affect each other?


Brendan (dYdX):I think your theory may be right. I'll let David answer that later, but from my point of view, it's an open question. I don't know that we have a very solid idea about macro trends. Personally, I might agree with some of the arguments that if the market is over-leveraged, then the price collapse will be bigger, for the market.  


David (dYdX): This is a big problem, and I've done some research on it. My point is that if you look at the history of cryptocurrency exchanges in the Mentougou era, you see the rise of centralized exchanges. Then you really saw the rise of leveraged and margin trading on centralized exchanges with the rise of BitMEX and Bitfinex. In the past two years you have seen the rise of spot trading on decentralized exchanges led by AMMs such as Uniswap. And then our argument is that decentralized derivatives exchanges will really take off.


Ultimately, if you look at both the crypto market and the non-crypto market, the volume in the derivatives market is several orders of magnitude larger than the cash market. This has become all too common in centralised exchanges. I checked the data earlier this week. More than 300bn derivatives are traded on centralised exchanges every day, which is several times the volume of spot trading.


Much of the price discovery is actually happening in the derivatives market. This usually happens before the spot market, where a lot of retail and institutional trading takes place. So I think some people are looking at the derivatives market and what the price of derivatives is doing to the spot. I think another thing that needs to be looked at is the amount of leverage that is being used in the derivatives space. A sharp rise or fall in prices usually results in traders being liquidated or having to cover their short positions.


So I think looking at leverage in the derivatives space is usually a leading indicator of what's going to happen later in the market. And then I want to answer your question about market makers, we have a lot of more sophisticated retail users and of course a lot of market makers who see derivatives as a way of gaining neutrality in the cryptocurrency market. As a result, a popular trading strategy is to go long in the cash market and short in futures or perpetuity. Whether their underlying prices rise or fall does not affect your overall position.


Ultimately, you'll get a capital rate that, depending on the market, yields between 40 and 80 percent annually, which can be considered risk-free if you know how to properly manage your collateral. So we see a lot of big players taking the other side of the popular bet and getting paid for it. Traders look at the money rates on different exchanges and how they move in response to market movements. Many see it as a leading indicator of price movements in the spot market.


User: You mentioned derivatives exchanges, and I'm looking at all the analysis done by Dune Analytics, and it shows that about 3.5% of ETH wallets actually interact with some kind of DEFI protocol. So, a small number of individuals actually participated in DEFI. So, right now, I see DyDX doing well in the numbers, attracting new users to try out the platform itself, but there are competitors. So how does DYDX seek adaptation? Or will I focus on my own business and see how it develops? What are your long-term plans?


Brendan (dYdX):I can generalize about this question, but is there anything in particular that I can help answer or talk about?


User:  With the launch of the new derivatives exchange, users will have more choices to be able to retain the new customers you need to sign up for DyDX. So, have you given any thought to competitors launching their own platforms and how to retain users? Because the total number of users is fixed, the user's chips are limited. So how can DYDX stay ahead of the competition?


Brendan (dYdX):That's a good question. I don't know if this particularly applies to the crypto market in general. I guess you're right. To some extent, you're competing with other exchanges for a fixed user pool. But in many ways, Defi and Crypto's user numbers have been growing, especially during the bull market. But I would probably give the same answer as any other company: to acquire users, to retain users, to find the right product for the market, first to find a niche, second to outdo the competition.


I know this seems like a bit of a cop-out answer, but I think this is a really high quality, reliable product, and offers features we haven't seen before. So we have the opportunity to be the best unmanaged transaction in the world, and then try to decentralize, and I think that's going to be an even bigger paradigm shift. But at the same time, the reason why people use dYdX is because it's a good exchange to use.


We want to be the high quality exchange that users expect. Over the last few years, we've been thinking, "You guys are really good for Defi trading," but decentralized exchanges have not been seen as mainstream by users. So I think over the next few years, we're going to basically have to improve to be as good as the established exchanges, even compared to the big, centralized exchanges like Binance, Coinbase, FTX.


I think, in general, we have to treat them as competitors. As you mentioned, it's definitely a hot area right now, but I don't know what I can say more than we have a better product that is more reliable and that people prefer to use than other products.


User: What happens to Uniswap and Sushiswap in terms of code forking? My understanding is that DyDX is open source, right?


Brendan (dYdX):  A lot of our stuff is open source, and a lot of it is not. For example, we just run the matching engine on the back end as a service, which is not open source. Things like smart contracts are open source. So I think in many ways we do run a lot of services. I think in some ways it gives us a competitive advantage over Uniswap, unlike Uniswap, where you just create contracts, open source them and release them.


Brendan (dYdX): I think that makes Uniswap easier to copy. However, I think we are running more proprietary back-end systems and high-throughput systems than just relying on people reading and writing the state of the Layer1 blockchain. So, I think it's more valuable than pure open source software. That's how I see the Uniswap fork.


David (dYdX):I want to thank Brendan and Ohad for answering all the questions, and I hope that was helpful. We will review everything discussed in one article and hope there will be many more of this quality in the future. If you have any other questions, please write them down on our Discord. The team is also always there to answer questions. Thank you very much.


About dYdX


DYDX is a decentralized derivatives trading platform developed on the second layer of Ethereum. It adopts the design of "off-chain matching + on-chain settlement", which makes funds and transactions more secure and transparent, and at the same time ensures high performance and response speed. As the world's leading decentralized contract trading platform, DYDX has significant advantages: low transaction fees and no gas costs; It is extremely fast in terms of processing efficiency and can withdraw money from Layer 2 without waiting. In terms of security and privacy, StarkWare's two-layer technology improves security and privacy through zero-recognition proof. In terms of transaction processing, DyDX transactions can be executed immediately and confirmed within hours on the blockchain; In terms of margin utilization, DYDX can cross-use margin, with one account accessing positions in different trading pairs.


The original link


Welcome to join the official BlockBeats community:

Telegram Subscription Group: https://t.me/theblockbeats

Telegram Discussion Group: https://t.me/BlockBeats_App

Official Twitter Account: https://twitter.com/BlockBeatsAsia

举报 Correction/Report
Choose Library
Add Library
Cancel
Finish
Add Library
Visible to myself only
Public
Save
Correction/Report
Submit