dYdX is a decentralized exchange designed for advanced crypto traders. The protocol is built on Ethereum and the Layer-2 scaling solution StarkEx, and is set to release the fourth version of its protocol by late 2022.
The history of dYdX and StarkEx
To avoid Ethereum’s high gas fees, dYdX was deployed on StarkEx on April 2021, a Layer-2 scaling protocol.
StarkEx is a zero-knowledge rollup developed by StarkWare, that is currently live with four applications on the Ethereum mainnet: dYdX, DiversiFi, ImmutableX and Sorare.
As of February 2022, StarkEx has US$1.1 billion in TVL, processed 106 million transactions and a cumulative trading volume of US$185 billion across all four StarkEx protocols.
dYdX is a proprietary app-specific rollup, which explains why it shows up on L2Beat‘s rankings as a scaling solution. This allowed dYdX’s developers to achieve the speed of a centralized exchange while being non-custodial.
However, its design specificity means that it lacks EVM-compatibility and therefore sacrifices on composability. The practical implications of this means that dYdX stands as its own permissioned siloed system, preventing other protocols/users to create their own perpetual swap off dYdX.
What is dYdX and a perpetual swap
Unlike its main DeFi competitors Perpetual Protocol and Futureswap which use an automated market maker (AMM) model, dYdX uses the traditional central limit order book model.
dYdX offers margin and spot trading, but is best known for its perpetual swaps, a popular synthetic trading product in crypto that was pioneered by BitMEX in 2016.
For the uninitiated, perpetual swaps are a type of synthetic futures trading product which lets traders make speculative bets on future prices of other financial assets or physical commodities (this can include anything from gold, silver, ETF indexes, crude oil or government bonds).
Unlike futures however, perpetuals have no expiry date and can be theoretically held forever without a final settlement. How then are profits and losses calculated?
Based on a reference price of the underlying asset known as the index price or oracle price (think of these as the market price), the profits and losses of traders are calculated against them depending on their long/short positions.
Suppose the price of Bitcoin is currently US$1,000. A trader who believes its price will rise to US$1,100 will buy a “long” position, or a “short” position if he thinks the price is about to drop to US$900.
If Bitcoin’s index price rises to $1100, the trader with the long position will earn a profit by taking a payment from the short trader who makes a loss (and vice versa).
This profit is calculated based on a complex algorithmic “funding rate” mechanism that is posted out every hour (for details, see here).
These payments are then credited at the start of each hour in USDC, represented as a 1-hour rate that is interpreted as the return a short/long position earns every hour.
This process equilibrates the price of the perpetual market closer to its index price, similarly to how algorithmic stablecoins like UST balances its peg to a dollar through market arbitrage. As the official website summarises:
The purpose of the funding rate is to keep the price of each perpetual market trading close to its Index Price. When the price is too high, longs pay shorts, incentivizing more traders to sell / go short, and driving the price down. When the price is too low, shorts pay longs, incentivizing more traders to buy / go long, driving the price up.
Due to the complexity of perpetuals trading, dYdX tends to be used by advanced traders.
The native DYDX token can be used for and earned by:
- Governance: Users can propose and vote on decisions in the protocol such as payouts from staking pool and including new token listings
- Staking: DYDX can be staked into a “safety pool” to earn interest in DYDX liquidity pool for market-making purposes
- Rewards: Users can earn dYdX by staking USDC into the liquidity staking pool or by simply trading
The token allocation is as follows:
Perpetuals landscape and competitors
How much trading is going on in dYdX? As of 9 February 2022, the cumulative trading volume is at an impressive $389 billion while its daily volumes are down at US$1.3 – US$3.4 billion from its all-time-highs of US$8-9 billion in September-November 2021.
Comparing dYdX to its primary competitors Perpetual Protocol and Futureswap, dYdX has the lion’s share of all perpetual swaps in DeFi.
dYdX user growth saw its sharpest growth in Q3-Q4 2021, but has since declined to a few hundred users daily into 2022.
Featured Image Credit: Coin 98 Insights