DYDX: Deep Dive
One of the greatest revenue generating companies to come from our industry is closing in on a massive protocol upgrade, let's see how it'll impact it...
Overview
It’s no surprise why decentralized derivative and perpetual protocols have been rising overtime. While the technical challenge of creating on chain order books and matching engines has proven difficult, some teams have stood up to the task and delivered amazing products.
DYDX is a DeFi perpetual derivatives trading platform founded by Antoni Juliano in 2017, which has just recently moved from the Ethereum L2 “Starkex”. Its v4 milestone 2 (private testnet) upgrade was completed back in late November 2022. The purpose of Milestone 2 was to complete all of the basic functionality needed to run the core product of the exchange.
While the orderbook and matching engine are not yet fully decentralized, the dYdX team is working hard to release v4 in Q3 2023. This will be completely decentralized; all decisions will be made through a community vote.
How it works (liquidation process)
Based on research and design considerations, the modified fixed spread instant settlement liquidation system is likely the best solution for a liquidations system design. The fixed spread liquidation system has been market validated and proven to work for lending markets with volumes exceeding $55 billion TVL.
dYdX’s liquidation process is a bit more similar to Compound’s, but differs in that dYdX does not expose a tokenized interface to its lending protocol the way Compound does through its cToken’s.
Instead, dYdX creates a series of trading accounts for each address within its main Solo Margin contract, and tracks the credits and debts of each account on each market it supports.
Instead of having explicit function signatures like how Maker has bite and Compound has liquidateBorrow , dYdX has a single operate function that takes in different ‘action types’, where action type number 6 liquidates a borrower’s account.
The liquidator is able to purchase collateral from the borrower at 5% discount, earning the same healthy spread as Compound.
dYdX provided its own proxy contract, which allows users to liquidate borrowers while keeping their accounts within a safe collateralization ratio. This has proven massively popular, with over 90% of liquidation volume going through this proxy.
dYdX also differs from other protocols in that flash borrowing is built into the protocol, allowing liquidators to atomically borrow the required asset, liquidate, and repay the loan in one single transaction and without needing to use an external proxy contract.
(DYDX liquidation sensitivity to price decline)
In dYdX V4, each validator will run an in-memory orderbook that is never committed to consensus (i.e., off-chain). Orders placed and cancellations will be propagated through the network similar to normal blockchain transactions, ensuring that orders placed and cancellations will always make their way through the network. The order book that each validator stores is eventually consistent with one another. On a real time basis, orders will be matched together by the network. The resulting trades are then committed on-chain each block.
This permits the order book to move on the blockchain, hence increasing decentralization.
Tokenomics:
Market cap: $411M
Circulating Supply: 148M
Max Supply: 1B
FDV: $2.77B
TVL: $392M
The biggest concern was that a large unlock happened on Jan 29th, which increased the circulating supply from 20% to 60% till August ‘23, where the unlock curve steadies. This unlock has now remained locked with 99.5% of the tokens which were meant to come into circulation. This 40% increase in circulating supply is now set to be released in the following order:
(i) 30% on December 1, 2023 (the new Initial Unlock Date);
(ii) 40% in equal monthly installments on the first day of each month from January 1, 2024, to June 1, 2024;
(iii) 20% in equal monthly installments on the first day of each month from July 1, 2024, to June 1, 2025; and
(iv) 10% in equal monthly installments on the first day of each month from July 1, 2025, to June 1, 2026.
It’s extremely promising seeing the team's initiative to structure a new unlock date, showing their confidence in the product and ability to produce revenue.
(Previous supply schedule)
Valuation Metrics:
It’s quite mesmerizing to see how much real revenue DYDX has accumulated over the last two years. Its closest competitor (GMX) is currently sitting at $42.2M in revenue, which is only 11% of DYDX’s staggering $382.6M revenue.
2021 saw a total revenue generation of $239.3M.
2022 saw a total revenue generation of $127.5M, being a 53.3% annual increase.
(Cumulative revenue since Jan 2021)
Again DYDX’s trading volume still triumphs its closest competitor GMX, with GMX producing $95.2 billion during it’s platforms lifetime, only equating to 11.5% of DYDX’s $826.2 billion.
We don’t see quite a step curve with total trading volume in comparison to revenue though.
2021 saw total trading reach $323.2 billion.
2022 saw total trading volume reach $455.2 billion, being a 140.8% annual increase.
(Cumulative trading volume since Jan 2021)
Something that’s interesting to note is the disparity between trading volume and revenue. We see a rapid increase in both until January ‘22, which coincides with a fee reduction holiday, lasting for three months. Reducing fees up to 66%.
The fee reduction holiday was once again brought back a month later starting March 17th, 2022. Where trading fees were reduced up to 66% for a second time. This then transitioned into “trade with no fees” later on in August.
In August 2022, we saw DYDX implement free trading for up to $100k a month in volume per user, across all markets. This increased user activity to trend slightly faster than it previously was, whilst also contributing to a higher number of total stkDYDX holders. Which is a contributing reason to why we would have seen trading volume remain steadily increasing but revenue not keeping pace.
As the exchange matured, we most likely would have seen more institutional traders or whales using the platform, which would result in higher trading volume and less revenue as they have better fee structure.
Narratives
How dYdX fits into the bigger picture:
Personally, I can't think of a better category of DeFi that has a chance of becoming mainstream. Apart from its first mover advantage, it's easy to see why DYDX has excelled with a clean UX, minimal fees, and deep orderbooks.
Trading volume has remained steady and up towards the right for two straight years with no signs of slowing. Network upgrades should only make this more prominent with the new capabilities that tendermints consensus unlocks for transaction processing.
The fundamental problem with every L1 or L2 DYDX could develop on is that none can handle even close to the throughput needed to run a first class orderbook and matching engine. For reference, the existing dYdX product processes about 10 trades per second and 1,000 order places/cancellations per second, with the goal to scale up orders of magnitude higher.
They considered pivoting to developing another trading model, such as an AMM or RFQ system, but ultimately decided that an orderbook based protocol was critical to the trading experience pro traders and institutions demand. They also were not satisfied with existing off-chain orderbook systems that either did not include matching (huge problems with frontrunning and trade collisions) or were based on centralized matching (there can be no central systems in dYdX V4). This left them with the realization that we needed to build a decentralized off-chain network to run the orderbook.
This is where Cosmos comes in. A massive benefit of developing a blockchain dedicated to dYdX V4 is that it offers full customizability over how the blockchain itself works, as well as the jobs that validators perform.
In dYdX V4, each validator will run an in-memory orderbook that is never committed to consensus (i.e., off-chain). Orders placed and cancellations will be propagated through the network similar to normal blockchain transactions, ensuring that orders placed and cancellations will always make their way through the network. The order book that each validator stores is eventually consistent with one another. On a real time basis, orders will be matched together by the network. The resulting trades are then committed on-chain each block.
This allows dYdX V4 to have extremely high throughput for the orderbook (which requires 100x the throughput of trades) while remaining decentralized.
A final note to consider is supported wallets and their UX, if we see new solutions for better user security, we could see the adoption of derivative/perp DEX’s as users won’t be as intimidated to losing their funds.
In what conditions does dYdX excel:
DYDX has long been a hated low float governance token with no pertaining value accruing to it. dYdX is now migrating to an app chain with an already extremely large user base through product market fit, with real revenue. The only final piece it would need is to find a way to return revenue to governance holders.
Considering the team has pushed back the token unlock by a year shows their willingness to work with investors and also the concerns of the community. Combining this with solving the other issues which have previously held them back, demonstrates the teams confidence in their ability to continue their market dominance.
Once v4 comes (aiming for 3rd quarter), it’s going to fit the description of the first paragraph for the first time in our industry. It’s currently trading at roughly 7x real revenue which is unheard of in crypto. All of this revenue is going to accrue back to the token holders with the launch of v4, the vision is that once DYDX launch using Cosmo’s app chain, you’re going to be able to get DYDX token which will then be a L1 and have a L1 premium rerating.
This allows for all rewards to flow back to validators, so we’ll see a case of real yield. That’s another way to solve the regulatory issue, if you’re not turning on a fee switch, you’re just returning revenue to the stakers. This will give them the ability to bypass regulations via creating a L1. Due to the unlocking, most funds or whales were pushed away due to the large amount of incoming supply, with the postponement announcement, we saw over a 100% return in a single week.
With current stablecoins and exchanges coming under extreme regulatory heat, if dYdX can provide an alternative solution that competes on fees and latency, it’ll spread like a wild fire in a bull market.
In What Conditions Does dYdX Not Do Well:
The threat of competition can’t be ignored as we see competitors such as GMX and Gains Network quickly rising, but DYDX’s market share still gives them an enormous lead on everyone else.
Successfully launching v4 will be a large engineering feat in itself, which is still meant to be in development until later this year. Giving time for competitors to make ground. Most notably how much trading fees and order book execution will be affected by EIP-4844 on L2 scaling solutions. We’ve seen Arbitrum and Optimism explode in recent months due to better economical conditions for trading products. These scaling solutions are set to get another 20-100x cheaper in March.
Adoption of DeFi hasn’t been as fast as some may have liked, there is a real threat of regulations cracking down and banning interfaces in majoring countries, creating difficulties for on and off-ramps. We’ve already seen proposals for this which have many wondering about the effects and until we get clarity, it’ll remain a gray area.
The fact that it’s now moving to an app chain to create its own L1 gives it more flexibility in how they distribute their token. DYDX will remain a fully decentralized platform after v4, but the threat of DeFi adoption can still hinder its ability to play chase with CEX’s.
Whilst it basically had a perfect run (besides malicious NPM packages which had no funds lost), security breaches can’t be ignored. The exchange is a massive operation of smart contracts with $400 TVL at the time of writing this. We’ve seen the protocol hacks over the past couple years which have wiped billions from the smartest people and best products. We can’t turn a blind eye and make an exception just because they’ve had a clean run regarding funding lost.
dYdX’s platform is also not available to US residents, decreasing potential buyers and also trading fees from users.
Locked token models always carry risks. Slashing in the event of governance decisions and the loss of immediately liquid assets.
Opinion Zone
Where I Think dYdX Can Go Fundamentally/Price Wise:
With the completion of v4, I don't believe DYDX will be lacking in either infrastructure or user acquisition. The biggest threats to its success are a lack of DeFi adoption due to regulatory reasons or a macro headwind due to a collapse in tradfi.
At time of the FTX collapse (Nov 9th)
DYDX: $1.43
ETH: $1100
Current prices (Feb 9th)
DYDX: $2.93 (104.9% increase)
ETH: $1633 (48.6% increase)
Currently DYDX is running at a much higher beta than ETH, partially due to being in the spotlight for its unlock schedule by influencers. But with v4 approaching towards the end of year, I believe the beta will keep fairly consistent, up until roughly 3-4 months out from v4, where people start pricing in the upgrade. At the time of the upgrade, my guess is we see a small dump (sell the news) with accumulation to follow not long after.
V4 feels like DYDX’s merge. Now that governance holders get access to the revenue it’s producing, benefits of being valued with competing L1’s and transaction scaling to handle 100x the throughput, it seems like a gem in the making. It’ll be very dependent on market conditions and sentiment, but if the upgrade aligns with strong market conditions, I believe we’ll see a very large pump and more adoption from institutional traders.
Finally, with the launch of v4, I believe there will be extremely strong marketing efforts to establish its newly launched mainnet. Previously, the team has created trading competitions which always seems to fare well for decentralized derivatives/perpetuals. My guess is these competitions will be in full force and also possibly a reduction in fees to drive more users. Partnerships with new market markers to produce tighter spreads wouldn’t be surprising either.
Charts And Liquidity Overview:
Liquidity: Currently across Uniswap & Sushi pools there’s roughly $2.3 million in liquidity.
Binance and OKX which are doing 32% in DYDX’s volume, whilst trading with a 2% spread of roughly $500k each way.
Ideally if we can find support around $2.5 it would make a very strong case for continuation if the rest of the market holds up.
If we don’t capitulate on majors then I think we’ll soon see a run up to the purple box ranging $3.89-$4.5. Breaking this would probably take a little more time and consolidation.
If markets hold steady from there or continue upwards, it looks like clear skies to $6.85, then more resistance around $8.3.
These price predictions are taken into consideration that majors hold steady or slightly increase. I believe the beta will heavily outperform ETH as v4 mainnet approaches in Q3. As we move further into the bull run and ETH returns closer to ATH, my thesis is that DYDX would reach ATH before ETH does, given that we run into resistance on ETH and we have an alt season that allows revenue generating projects to flourish.
Appreciate any support <3
https://twitter.com/Cryptotrissy