Log In
Decentralized Exchanges

dYdX - Perpetual Maxima

Nov 30, 2021 ⋅  13 min read

The following report was written by Messari Hub Analyst(s) and commissioned by dYdX Foundation, a member of Messari Hub. For additional information, please see the disclaimers following the article

Six months is all it took for dYdX’s layer 2 offering to eclipse Coinbase in daily trading volumes. It achieved this feat solely offering perpetuals for four assets (at that time), compared to a profusion of markets on Coinbase. Today, it is one of if not the most liquid exchanges in crypto. dYdX has now shut down its Layer 1 offering and is doubling down on perpetuals by expanding beyond the currently available 28 markets.

Source: Twitter

How did a non-custodial, decentralized exchange sporting only a handful of markets beat more mature, fully centralized exchanges with an abundance of markets? Isn’t DeFI supposed to be slow and clunky?

Composability-Performance Trilemma

For Ethereum scaling solutions, you have to choose two out of three desirable properties: Decentralization, Composability, or Performance (in terms of Transactions Per Second, latency, gas fees, withdrawal times). Composability requires you to be EVM-compatible - so other EVM-based Dapps can interoperate with you. Performance requires you to either reduce the number of validators (and hence decentralization), or adopt ‘ZK’ technologies, which are not EVM compatible (yet). Decentralization requires you to select rollup solutions (which use the mainnet for finality) - optimistic rollups, which are EVM compatible, or ZK rollups, which are not. Each choice therefore requires the tradeoff of one property to achieve the other.

The great scaling effort began with Binance Smart Chain (BSC), quickly followed by Polygon, xDAI and others. These platforms run Ethereum-compatible side-chains with high speeds and low gas fees, but at the cost of the kind of decentralization that makes Ethereum the highest standard of finality. Essentially, these chains use a Delegated Proof of Stake mechanism to reduce the number of validators securing the network, thereby enabling consensus to be reached more quickly. In the case of BSC, there are 21 whitelisted validators, under what they call a ‘Proof of Staked Authority’ mechanism - which is in fact a combination of Delegated Proof of Stake and Proof of Authority. Polygon utilizes 100 validators in a standard DPOS model. However, since these are EVM-compatible chains, all the major DeFi legos that depend on composability were quickly able to migrate to the new higher-speed, cheaper-gas platforms, bringing meaningful liquidity with them. BSC and Polygon traded off some decentralization to make gains in performance and keep composability.

Then came the (late) L2 summer, with the launch of Arbitrum and Optimism - layer 2s who promise ‘layer 1’ finality, AKA ‘full’ decentralization, but with some performance impact. These ‘Optimistic’ solutions offload the computation from Ethereum, perform them off-chain, and then ‘roll-up’ the data to the main chain for finality. By removing the CPU-intensive computation from Ethereum, they achieve greater scalability. TPS and gas costs are much lower than the mainnet, but still higher than BSC and Polygon, and withdrawal times to Layer 1 take around one week. However, being EVM-compatible, major DeFi projects were quick to launch on optimistic rollups as well, and the Arbitrum One general launch was highly successful, quickly moving it into the top ten by TVL. Optimistic rollups trade off some performance to enable full composability whilst retaining full decentralization.

dYdX chose performance and decentralization over composability. Powered by Starkware’s StarkEx platform, dYdX is an app-specific rollup. This means it is not a platform where multiple DeFi legos can operate as tenants of sorts, but an entire rollup dedicated to the dYdX exchange. All the code is customized to the needs of dYdX, and optimized to the extent that is possible. However, being a bonafide rollup, this means you still get full decentralization - self-custody of funds on the Ethereum mainnet (with an ‘escape hatch’) and finality at each mainnet block. To achieve this, the code has to be written in a ZK-specific language called Cairo, and could not run in an EVM environment like Optimistic rollups. The tradeoff is EVM compatibility and therefore composability. This is not crypto legoland where swarms of teams build on top of each other’s work to create new ‘protocols’, but a finely tuned, high octane performance machine.

What does this performance give you?

Basically, everything you expect from the best centralized exchanges, yet non-custodial. Apart from the incentives driven by the DYDX token (more on this below), this is the reason dYdX is exploding with liquidity and transaction volume.

What are Perpetuals?

A Perpetual Swap is a derivative product similar to a future, that is designed to track the price of an underlying asset. It is a synthetic asset, which means it does not ‘represent’ or securitize the underlying asset. Instead, it utilizes a periodic ‘funding’ schedule to tether its price to the spot price of the underlying asset. First introduced by BitMEX and based on Perpetual Futures proposed by the economist Robert Shiller, they are the most popular derivative type in crypto today.

How do they work?

The instrument is tethered to an asset/base pair synthetically

Unlike a future, which is a contract to buy or sell an asset at a particular price in the future, Perpetuals simply track the price of the asset using incentives based on price indexes. There is no need to actually fulfill the contract or hold the underlying asset.

You can take either a long or short position

Like any future contract, you can take a long/buy position, or a short/sell position. To enable you to price the instrument, dYdX displays two reference prices:

  1. An index price, aggregated from multiple exchange APIs, which is managed off-chain to prevent updation delays (the price you are presented is stale) and slippage (price changes between placing your order and execution). This price is used to trigger stop orders.
  2. A fully decentralized oracle price, which is aggregated using multiple on-chain oracles. This price is used to calculate collateralization for margins and liquidation.

Instead of expiry, there is a periodic ‘funding period’

  1. Every hour on dYdX, the prices of the longs and short are compared to the index price, and those on the wrong side of the trade pay the counterparty - this is called funding.
  2. How much do they pay?

hourly funding rate * price * position size

So every hour, those who wrongly estimate the price ‘fund’ the other party. This essentially acts as a powerful mechanism to keep the price of the perpetual in sync with the spot price, as any difference would represent an arbitrage opportunity for a trader. Go here for more details on how the funding rate is calculated, including details on interest rates and premiums.

Like futures, these instruments can be traded, with leverage

This mechanism was first proposed by Robert Shiller as a way to make illiquid markets efficient. Perpetual markets today are much more liquid and active than decentralized spot markets thanks to the volumes and speed that was possible on CEXs and now DEXs like dYdX, since they provide more server ticks per period compared to the one block every 13 seconds that Ethereum (for example) can produce. Also, since these are synthetic assets, it is possible to trade much more volume than would be afforded by the actual circulating liquidity of the underlying asset. The volume of these futures is essentially only limited by open interest. So much so, that the reference price for the underlying asset is in fact decided in the aggregate perpetual markets, rather than the spot markets today - the philosophical implications of which go beyond the scope of this article.

Example: Alice buys a long position of 1 BTC/USD at $60,000

Bob, however, thinks BTC has peaked, and locks in his profit by buying a short position of 1 BTC/USD at $62,000. In the next funding period, the price goes to $64,000. The hourly funding rate (let’s say) is 0.0025. Alice will receive, and Bob will pay out (from his account balance/collateral), according to the funding rate described above:

0.0025 * 64,000 * 1 = USD 160

The Perpetuals Landscape and dYdX

The crypto derivatives market flippened the volume of the spot markets this year, a trend which is only increasing.

In the last few weeks as of this writing, daily volumes on dYdX alone are almost reaching $5 billion.

dYdX is quickly climbing the leaderboard in terms of open interest and is the only DEX to do so. The relative open interest compared to other exchanges is indicative of its rising position. This is particularly impressive, given that dYdX currently only supports 28 markets, compared to the (for example) over 90 markets that are offered by Binance.

Who is trading Perpetuals?

Given the complex nature of Perpetuals, this is not a market for your average retail trader. Cross-margining requires sophisticated risk management, and the details of funding rates, interest rates and premiums make this a game for professionals.

dYdX has around 45,000 depositors, mostly professional traders, institutional traders and market makers. Like any liquid market, the majority of the volume is driven by active market makers. Due to the decentralized nature of an L2 rollup, we have an unexpected window into the distribution of these volumes.

As can be seen from this monthly snapshot, the majority of the volume is driven by around 10 market makers accounting for almost 90% of the volume. These are sophisticated HFT players providing liquidity for the traders on dYdX. Such competition for trades by market makers is another indication of highly liquid and efficient markets, though many top-tier exchanges may have a similar distribution - probably with the same players. Which brings us to the other reason (the first being performance) that dYdX was able to attract so much liquidity:

The DYDX token

The explosive growth of volume was catalyzed not just by the sheer performance dYdX delivered on Layer 2, but also the launch of the DYDX token.

Source: dYdX

The DYDX token was launched by the dYdX foundation, not the dYdX exchange, which is a for-profit company. The company is working towards decentralizing all aspects of the exchange and transferring complete control of the protocol to the foundation. What can you do with the DYDX token?

You can earn rewards in DYDX by staking USDC

dYdX has a liquidity pool which is utilized by community approved liquidity providers to make markets on dYdX. These makers borrow from the pool, which they must return in the event that their balance falls below their allocation every epoch. By staking USDC in these pools, users can earn DYDX. dYdX also has a USDC safety pool to act as an insurance fund, which yields DYDX tokens to stakers.

You can earn DYDX through trading rewards

Trading rewards are distributed to all traders based on a formula that rewards a combination of fees paid and open interest on the layer 2 protocol. This program is aimed at increasing usage of the layer 2 and increasing liquidity and activity.

You use DYDX to govern dYdX

DYDX holders have the right to propose and vote on proposals to change the protocol. Important proposals have already been passed, a notable one being by Zhu Su, the CEO/CIO of Three Arrows Capital. The proposal was to reduce market maker incentives in view of the growing health and liquidity in the system. More recently, another proposal was passed that allowed the restoration of the safety module, DIP 3. This proposal restored the Safety Module, which acts as an insurance against sudden black swan events, and re-enables stakers (currently ~6M DYDX are staked) to earn DYDX rewards for providing funds to this precautionary module. Both proposals were passed and the first has been enacted, showing token-holder governance at work on dYdX.

Token distribution

The initial supply of 1 billion DYDX is pre-minted, and vests over five years starting on August 3rd, 2021. 50% is allocated to the community as detailed above, 27.73% to past investors, 15.27% to founders, employees, advisors and consultants, with the remaining 7% earmarked for future employees and consultants. After the vesting period ends, there is a capped 2% inflation rate that can be enacted by a governance proposal on the protocol, if it proves to be necessary to grow the protocol further.

dYdX vs Perpetual Protocol

Built on the xDAI side chain, Perpetual Protocol is another performant, non-custodial perpetual swap trading protocol. In sharp contrast to dYdX’s Central Limit Order Book model, Perpetual utilizes what they call a vAMM - a smart contract driven trading system that does not require a counterparty for you to complete your trade, much like Uniswap’s AMM. But unlike Uniswap, since perpetuals are synthetic, there is no need for the underlying asset to be held in pools - the contract decides the funding rate using an oracle like dYdX. The design choice of vAMM also means that unlike dYdX, there is price slippage when executing trades, and throughput is a little lower in comparison to dYdX. However, there is the advantage of no auto-deleveraging when a counterparty is liquidated. Similar to dYdX, all trades settle in USDC and there are no gas fees for trading.

Essentially, where dYdX focuses on performance and parity with Centralized exchanges, Perpetual protocol focuses on guaranteed liquidity via its vAMM, without depending on market makers. This increases the use cases of Perpetuals to low-liquidity scenarios such as private markets, for example. Comparing dYdX to Perpetual mainly serves to underscore the fact that this is a large design space that is still being explored, and the numerous choices and tradeoffs involved will probably lead projects down different paths. So far, these design choices seem to have favoured dYdX, which dominates in terms of trade volume.

Still Accelerating

dYdX is riding a steep upward curve of adoption and volume as of this writing. To reach their goal of becoming the ‘biggest’ exchange in crypto, centralized or otherwise, they still have a long way to go, but it certainly looks promising. Their focus is now on increasing the number of markets whilst keeping a laser-sharp focus on perpetuals, and completing the transition to total decentralization. Currently, the orderbook is still managed off-chain, as are certain parts of the prover provided by Starkware. Ultimately, the larger story may be about the triumph of Perpetuals. Are these synthetics the key to achieving volume dominance? Time, and most likely dYdX, will tell.

Let us know what you loved about the report, what may be missing, or share any other feedback by filling out this short form. All responses are subject to our Privacy Policy and Terms of Service.

This report was commissioned by dYdX Foundation. All content was produced independently by the author(s) and does not necessarily reflect the opinions of Messari, Inc. or the organization that requested the report. The commissioning organization does not influence editorial decision or content. Author(s) may hold cryptocurrencies named in this report. This report is meant for informational purposes only. It is not meant to serve as investment advice. You should conduct your own research, and consult an independent financial, tax, or legal advisor before making any investment decisions. Past performance of any asset is not indicative of future results. Please see our Terms of Service for more information.

No part of this report may be (a) copied, photocopied, duplicated in any form by any means or (b) redistributed without the prior written consent of Messari®.

Upgrade to Messari Pro

Gain an edge over the market with professional grade tools, data and research.

Already a member? Sign in

Upgrade to Messari Pro

Gain an edge over the market with professional grade tools, data and research.

Already a member? Sign in

Mentioned in this report

Read more

Research Reports

Read more

Based on your watchlists

Create a new watchlist
Read more

Research Reports

Read more

Based on your watchlists

Create a new watchlist

About the author

Mentioned in this report