Translator:DeGate
1. Order book vs. AMM
The above diagram shows a typical order book used by a Centralized Exchange (CEX) to determine the fair price of an asset. A person responsible for placing orders is called a market maker, who buys when there is a surplus of the market to sell and sells when there is a surplus of the market to buy, thus providing liquidity. Professional institutions generally play this role.
However, there are two significant drawbacks to the Decentralized Exchange (DEX) order book mechanism: firstly, the order book follows the “highest bidder wins (in the case of buy orders), first-come, first-served” ordering rule, but the power of ordering on the blockchain is in the hands of miners, who can place pending orders in their favor (i.e., the risk of jumping the gun); Secondly, market-making by professional institutions tends to lead to over-centralization of the network, while market making by individual investors will lead to insufficient liquidity and impossible transactions. For the sake of transaction depth, the degree of decentralization can only be sacrificed. After all, the transaction volume of DEX under the order book mechanism can challenge CEX.
The false start risk can be circumvented to some extent by reducing the block production time, but this can easily lead to forks unless monopolized by a centralized node, which then faces the same problems as the second defect. Therefore, if DEX adopts the order book mechanism, it may have to sacrifice the degree of decentralization for the sake of trading depth. After all, it could challenge CEX in terms of volume, which is all that matters to an exchange. Indeed, this is the approach taken by dYdX, a feature of which will be analyzed later.
AMM, also known as an automated market maker, is the most effective mechanism in the DeFi field through user-provided liquidity (LP). For details, see the article “Understanding the Rising Hot Category of Ethereum DeFi: Automated Market Maker.” Because there are no pending orders, AMMs do not need to make a market and can be traded regardless of market liquidity. But two frictional costs come with it: slippage and erratic losses. Slippage is also a problem with CEXs, but it is higher with DEXs, while impermanence loss is unique to DEXs. Apart from improving its market-making function, the best way to reduce these two frictional costs is for users to provide sufficient LPs, which is why we always measure the value of a DeFi project in terms of Lock Position Volume.
However, as LPs are paid for by transaction fees, the more money you provide LPs, the less you get paid; Conversely, the higher the slippage, the worse the trading experience. Slippage essentially protects the interests of the LP at the expense of the trader, while impermanent loss protects the interests of the trader at the expense of the LP. The result of this game is that the DEX is not as liquid as the CEX.
To sum up, the advantage of the order book is trading volume, while the advantage of AMM is decentralization.
2. Order book leader — dYdX
dYdX adopts an order book mechanism, which allows users to place limit and stop orders in addition to market orders. It also enables the view of data such as depth chart, position count, leverage, realized profit/loss, unrealized profit/loss, and forced price. All of this makes the trading experience almost identical to that of CEX. dYdX’s perpetual trading has been relocated to layer2 Starkware on Ethereum. And users only need to report to CEX when transferring funds in or out. A user only needs to send proof confirmation to the Ethereum mainnet when funds are moved in and out. Data does not need to be linked to the transaction. As a result, Gas fees are only required for deposits and withdrawals, which is one of the reasons why the dYdX transaction experience is so good. Currently, dYdX is available up to 25x on BTC and ETH, and up to 10x on others.
At the beginning of August, dYdX saw a sharp rise in average daily trading volume after the start of trading mining, which at one point exceeded $2 billion. dYdX dropped off at the beginning of September because epoch0 ended, and there are 59 epochs left to be mined for trading for the next five years (an average of one per month). Therefore, the trading volume will spike at the end of each month and fall back at the beginning of each month, but the overall trend is on the rise at the beginning and currently accounts for more than 80% of the whole market. As for the subsequent trading volume- it depends on the natural growth of the perpetual contract market and the development of the project itself. As the order book mechanism is adopted, ordinary users cannot temporarily obtain long-term benefits as LP (although the project side also sets liquidity incentives, but must reach more than 5% of the total liquidity will be awarded, more suitable for professional market makers).
Trading mining reminds us of Fcoin, which was once very popular. In the beginning, Fcoin only set the total limit of mining rewards but did not limit each short period of mining rewards. So the larger the trading volume, the more Fcoins would be paid back and eventually collapsed due to excessive selling pressure. dYdX’s economic model is different: the token rewards for investors and the founding team are unlocked after 18 months and released over five years. The only tokens that are not locked are airdrops and trade mines, with airdrops accounting for 7.5% and trade mines totaling 25%, released over five years at an average of 0.42% per month, so less than 8% of tokens are released initially, and the sell-off is not significant. According to dYdX’s circulation diagram, for the next five years, there will be a massive unlocking 18 months after release, after which the release rules will be similar to those of Uniswap, depending on the development of the project itself.
The dYdX airdrop is intriguing, as the team had previously claimed that no token would be issued, let alone an airdrop. But in early August, it was suddenly announced that early traders would be rewarded, and the size of the reward was mind-boggling. The initial UNI airdrop had over 250,000 addresses, with an average return of around $1,500 per address; dYdX ended up showing just over 60,000 active addresses (bearing in mind that the amount of money involved in trading contracts on CEX is several times that of spot trading). Based on the closing price on launch day, the average return per address was nearly $18,000, matching the lowest trading rewards ($1-$1000 for 1163.5 dyDXes), which would be around $17,500 in Fiat Money), the most cost-effective airdrop in this range. In other words, almost all of the addresses that participated in the early deals went for the airdrop, which is hard not to think of the 180-degree change in an official attitude of dYdX at the beginning of August. After all, while UNI rewards to project parties were released evenly and the team received a good deal of reward in the early days, dYdX rewards were not released until 18 months later, and project parties had reason to gain in other ways.
Beyond the above doubts about the benefits, one thing remains unclear — what is the value of tokens in the overall network? How does the token from mining capture the value of dYdX since there is no transaction fee (transfer costs ETH)? After all, tokens were decided to be released “on the fly” by the team and naturally could not be incorporated into the entire model.
These problems overlap with the biggest drawback of the order book mentioned above: centralization risk (false start risk can be reduced by increasing block generation efficiency. Currently, the official target block generation time is 80 ms; the shorter the block generation time, the harder order is to be done). The official plan for 2022 is also for the project to continue to be decentralized, with specific plans to be followed.
For derivatives DEX, is it more important to have efficient trading or decentralization (which is the impossible triangle)? I think that perhaps trading efficiency is more important while ensuring the safety of capital, which is why I wrote about it in my article “Is Layer2 Season Coming. Understanding its Classification and Future” that Layer2 Validium, known for its high TPS, is the most suitable for HIGH-FREQUENCY trading. DYdX’s tier 2 platform, Starkware, uses Validium technology (L2Beat classifies it as ZK-rollup, but dYdX is only linked up for transfers, not transactions).
In summary, the dYdX two-layer network is suitable for transactions. Still, its token needs to be carefully scrutinized (it is not just overly centralized, BSC is also centralized but performs well, the key is to capture the value of the network).
3. AMM Improvements
At present, the development of a permanent DEX contract is still in the early stage, and dYdX accounts for more than 80% of the trading volume in the whole market. Therefore, DEX under the AMM mechanism has not yet formed a dominant situation. The weakness of AMM, as mentioned earlier, is that it is challenging to combine slippage with volatile losses. At present, sAMM and vAMM have improved the original AMM mechanism in the field of derivative DEX.
The Perpetual V1 version adopted vAMM (Virtual Automated Market Maker) and eliminated the liquidity pool so that traders’ margin is not stored in vAMM, but in a vault. As a result, the liquidity of vAMM comes from the trade itself, without the need for other liquidity providers, and there is naturally no contingent loss. However, the drawback is that the fixed value K in the market-making function is challenging to determine. V1 has been attacked due to improper setting through manual setting. Perpetual has also abandoned the vAMM mechanism in its V2 version in favor of the Uniswap AMM mechanism.
Perpetual V2 version is set up on the layer 2 networks Arbitrum, reintroducing the market maker's role; users can obtain profits by providing LP. In addition, V2 adds the cross-margin mechanism so that users can open multiple positions in multiple markets at the same time to achieve full-position trading. At present, Perpetual V2 is not officially online. The trading interface of V1 is as follows:
All the underlying contracts have a maximum leverage of 10 times, which is a lot less functional than the order book. As there is no pending order mechanism, users can only issue market price orders but cannot limit price opening or stop-loss closing, so the trading experience is naturally not comparable to CEX or dYdX. To solve the problem of high AMM slippage, the interface added the setting of the allowable slippage value. The smart contract will automatically cancel the transaction when the slippage is too high, but the resulting handling fee is not refundable. In addition, the transaction data under the Arbitrum protocol needs to be on the chain, so users need to authorize transactions in the network at the first layer. Other data such as positions, leverage ratio, realized profit and loss, unrealized profit and loss, the strong flat price can be viewed, and the strong flat price is set according to the data provided by the predictor. The prognosticator is used hourly to correct the price difference between Perpetual and the other agreements.
Perpetual was number one in trading volumes until dYdX opened trading in August. This is somewhat counterintuitive. In theory, the volume of transactions under AMM should not exceed the order book, especially if Perpetual came online later than dYdX. Therefore, there is reason to doubt the authenticity of the data.
Comparing the two charts above: The first chart shows that the number of HIGH-frequency traders is the least, especially not more than 30 per day before the middle of May. However, the second chart shows that the high-frequency trading volume accounts for more than 90%, while the low-frequency trading volume representing retail investors accounts for less than 4%. So it can be concluded that a small number of trading robots contributes to Perpetual’s high trading volume. This is the case with Perpetual, which has been online for almost a year, and the rest of the AMM derivatives, DEX, which are difficult to assess through data and can only be compared from a technical point of view.
SynFutures uses sAMM (Synthetic Automated Market Maker), which has a different liquidity pool than AMMs. The liquidity provider only needs to provide liquidity in a single currency, and the sAMM will automatically synthesize half of that money into a long futures contract in another currency. For example, if the user chooses to store the USDT in the ETH/USDT pool, the full amount can be provided in USDT, without the need for the two tokens to be equal. Half of the total assets would remain in USDT, and the other half would be used as margin for the ETH long futures. At the same time, sAMM also creates an equal amount of short futures contracts for users. In this way, for liquidity providers, no matter they increase liquidity or withdraw liquidity, there will be no loss due to price fluctuations because single currency risks are hedged.
At present, SynFutures only offers futures contracts, and the perpetuation contract will be observed until the release of V2.
4. Conclusion
However, the DEX trading experience is not only characterized by the depth of trading but also by one thing that CEX does not have — unlicensed listings. Given the natural shortcomings of DEX in terms of liquidity and depth of trading, we chose to trade on DEX in large part because it allows users to list a wide range of tokens freely, and a key factor in Uniswap becoming a leader was that it was the first to achieve a permissionless listing.
DEX Track, a sustainable contract, is still a small group, with only SynFutures, MCDEX, and DeFi Finance able to list without a license. The rest of the exchanges now use a centralized approach to decide what to list.
The market for decentralized perpetual contract trading is still in its early days, and the derivatives market as a whole is in its infancy, with most protocols currently in development or shortly after going live, without fierce competition. This is still primarily limited by a lack of technology, and how to achieve near CEX trading fluency with a degree of decentralization is the biggest hurdle in this track at the moment.
While there is a lot of click farming (perhaps a contraction in trading volume at the beginning of each month), dYdX is still the rightful leader at the moment, with a trading experience that is seamless for CEX users. It will be interesting to see how the team balances decentralization with trading fluency and how tokens capture network value in the future. At this stage, it is suitable for trading mining but invests with caution.
DEX, a derivative of the AMM mechanism, is even more promiscuous, and it is not yet possible to judge who has more potential by volume. It will be interesting to see which DEXs gain technical innovation and institutional investor interest. After all, with dYdX in the forefront, DEXs such as SynFutures, which have not yet issued tokens, may not follow.
Recently, the intensifying regulatory pressure on CEX and the approach of the layer2 explosion have created a breakthrough opportunity for this track. The latter, in particular, brings higher throughput to the entire network, reducing the risk of a race to the bottom and improving transaction fluidity. In the future, the deployment schedule of the derivative DEX in layer2 is also worth watching closely. (Header image from TechCrunch)
Follow us
Twitter: https://twitter.com/WuBlockchain
Telegram: https://t.me/wublockchainenglish