Drift Protocol: Solana’s Largest Perpetual Futures Exchange
The evolution of Solana's largest perpetual exchange protocol
Perpetual Landscape
For perpetual trading, Centralized Exchanges (CEXs) still dominate, but it's undeniable that decentralized perpetual protocols have developed rapidly in the past two years, achieving nearly a 10X increase in total open interest.
In this context, the competition among perpetual protocols is intense. The rapid growth in volume data has led developers to view CEXs as a profitable and sustainable business. Many protocols are forks of first mover exchanges, GMX and DYDX, with ongoing innovation in minor areas such as the choice of price feeds, the structure of trading fees, and methods of incentivizing user onboarding.
Just like with DEXs, each DeFi sector features a multitude of forks. The reason the surplus of forks in the perpetual protocol arena intensifies competition is due to a simplistic business structure. Currently, there's a missed opportunity in not utilizing liquidity from perpetual protocols for creating DeFi Legos.
Introduction to Drift Protocol
Drift is building a decentralized perpetual protocol using the dynamic vAMM (DAMM) mechanism on Solana. Drift V2 was launched mid 2022 and, due to its new hybrid liquidity solution, has grown as the top 5 perp in terms of TVL. Drift stands out as it successfully operated as a protocol for 2 years without a native token. Drift protocol offers many types of derivative market including perps, spot, lending, etc.
Drift v1 and Problems
vAMM
In most cases, automated market makers (AMMs) are used for swaps, known as spot trading. Traditionally, AMMs price assets using a Constant Product x * y=k formula, in which x and y represent the reserve balances of two assets in a liquidity pool, and k represents the total liquidity available. The key concept here is that k remains constant throughout the course of trade, due to automatic rebalancing.
Perpetual Protocol, another perp exchange, building upon the foundation of AMMs, initially proposed the virtual automated market maker, or vAMM solution. Unlike traditional AMMs, transactions with vAMMs do not rely on underlying assets. Though the same x * y=k formula is used, it is important to note that k is pre-determined and fixed in a vAMM model, as all trades occur within this virtual pool.
For example, if users want to leverage 5x on SOL using 1000 USDC, they need to send 1000 USDT to a vault. In return, the protocol credits 5000 vUSDC into the vAMM for purchasing SOL and then they have corresponding SOL exposure.
Drift V1 was built on top of this concept, with two innovations: re-pegging and adjusting liquidity. Re-pegging means effectively updating the quoted assets price in accordance with the oracle price (asset price), making trades happen in the deeper liquidity region. By being in the deeper liquidity region, trades are executed better. The oracle feeds price data to the vAMM and sets it as the latest 'terminal (start) price', then the collected fees are added to the pool to meet the price adjustment, ensuring sufficient liquidity within the active price range after adjustment . In the initial vAMM model, parameter ‘k’ is set when a pool is created. However, in Drift V1, ‘k’ can be adjusted many times. Put simply, to further deepen liquidity, the accrued trading fees are injected into the vAMM pool similarly to adding liquidity to Uniswap V2, then resulting in an increase on ’k’.
The Problem
In traditional spot-AMM or Peer-to-Pool models, there is always one party acting as the passive liquidity provider (LP), with traders' profits coming from these passive LPs. However, in the case of a vAMM without passive LPs, traders act as ‘LP’ for each other, meaning that for one trader to profit, there must be another trader as the counterparty. Therefore, no one wants to be the last trader left. As a result, most people prefer to strategically open and close positions to execute arbitrage strategies, ultimately creating a player versus player (PVP) market.
If there are always a large number of traders, such a PVP market can continue to operate normally. However, the problem arises that the market may collapse when arbitrageurs are unable to obtain sufficient profits. The pre-set 'k' sets the start price. When the current price is higher than the start price, positions are net long and vice versa. In most cases, the fair price is driven by CEXs, so the vAMM pool needs to repeg using collected trading fees as the fair price deviates from the start price. But at the same time, funding fees are paid by collected trading fees. When deviation gets larger, the cost for repegging and k-adjustment will increase as well. Although the funding fee is capped, the cost of repegging & k-adjustment could drain the Insurance Fund, then arbitrageurs gain less.
Arbitrageurs are going to leave if the yield is not attractive anymore for them, most of the collected fees are used to provide a ‘better’ price for retailers. The problem is: no arbitrageurs, no volume, no fees.
Due to vAMM's asymmetric trading model, funds could be drained by price manipulation if there is poor leverage management. A manipulator can be allowed to open two high-leverage positions one after the other, pushing the price to a point where the profit from one position could cover the loss from the other; this profit is derived from the funds of other users. Furthermore, the disparity between positive and negative PnL could potentially result in insolvency.
Drift v2 Core Design
Drift V2 introduces a hybrid liquidity solution, aiming to provide more collateral and lower the risk of vAMM itself. For Drift V2, there are 3 types liquidity guarantee the best price for traders when an order is executed:
Just-in-Time (JIT) Liquidity
vAMM Liquidity
Decentralized Orderbook (DLOB) Liquidity
JIT Liquidity
When a market order is submitted by a trader, it is broadcasted to a network of market makers composed of Keepers and initiates a Dutch auction. By default, the Dutch auction lasts for 5 seconds (20 slots), and the starting price is determined by the oracle price and the inventory status of the vAMM. During this process, market makers continuously front-run in a race, with the price changing from best to worst for the taker. JIT auction gives traders the opportunity to experience zero slippage in their trading activities.
vAMM Liquidity
In Drift V2, vAMM will act as the backstop liquidity if no MMs execute market orders. Drift v2 AMM features in-built bid/ask spread and Drift Liquidity Provider (DLP). DLP is a passive liquidity provider with active functions, opening opposing positions against vAMM. Users could add liquidity to the specific pool and acquire a share of its taker fees. In-built bid/ask spread makes the Drift vAMM wider liquidity rather than just fills at current oracle price in the auction process. Through this process, the long/short imbalance with a higher cost is eased.
Regardless of if it is vAMM or oracle-based, perpetual markets are always zero-sum traders that make profit from others’ loss. This contrasts V1s, where traders have ‘real’ liquidity as their PnL, which is significant as more collateral is provided. After integrating DLP into DAMM, liquidity depth will be improved by increasing ‘k’, and the 80% trading fee will be distributed to DLP as a reward.
Drift V2 also introduces a new oracle-based pricing mechanism, which optimizes the process of repegging and the setting of spreads by considering factors such as the volatility and inventory. This ensures that arbitrageurs engage in activities to balance long and short positions efficiently. The price movement in V2 relies on oracle feeds instead of the long/short imbalance. The chart below shows that net open interest (OI) could strike a balance at some times.
Decentralized Orderbook (DLOB) Liquidity
Drift V2 provides a decentralized orderbook network. The mechanism behind it is very simple - a network of bots called Keepers are responsible for recording, storing, and matching and filling submitted limit orders. Every Keeper bot has its own off-chain orderbook. Orders are sorted by price, age, and position size. When one order meets the trigger price, the keepers will submit to trade against DAMM. In return, keepers receive a proportion of the trading fee determined by a mathematical formula, which is further explained here . It's worth noting that if there are buy and sell orders with exactly the same parameters (i.e. buy 1 SOL for 110 USDC <> sell 1 SOL for 110 USDC), Keepers can directly match them without going through vAMM, which can improve efficiency.
Overall, to address the solvency, Drift V2 decentralizes order execution to real liquidity sources such as JIT, DLP, and direct order-matching in DLOB (which also means more collateral).
Other features
Spot
Drift V2 provides spot trading and spot margin trading. In contrast to perpetual trading, all types of spot trading are based on real underlying assets. For example, the liquidity of spot trading comes from OpenBook DEX. Additionally, spot and margin trading allows users to leverage their spot by borrowing assets on Drift V2. The aim of two methods are primarily to hedge perpetual position.
Swap
Swap on Drift relies on Jupiter routing to provide the best price for users. However, the liquidity source comes from Drift V2 itself. Users are also able to leverage swap using flash loan.
Lend/Borrow
Drift lending module is similar to Aave in that it uses an overcollateral mechanism. When you deposit your assets to Drift, the assets will generate yield automatically.
Growth Catalyst
Incentive expection
Drift launched its V1 in 2021. Until now, Drift hasn't had its own native token, missing an opportunity to incentivize user onboarding for the protocol. Despite this, Drift V2 has already achieved over 5 billion in total trading volume and nearly 100,000 users.
On January 24, 2024, Drift announced that it would also become a member of the points-meta, launching its own points system for a duration of three months. Drift has a strong team and a history of rapidly iterating products. We believe that after the launch of the points system, the Drift protocol will gain a larger market share and trading volume.
Solana fundamental thesis
The resurgence of Solana in 2023 was exciting, particularly towards the end of the year.
High-quality projects such as Jito brought more liquidity to Solana.
The meme trend also saw a boom due to Solana's technical advantages, with Bonkbot earning $10M fees in December and BananaGun launching its own Solana version.
Depin and RWA narrative brought more exposure to Solana.
The increase in TVL, users, and on-chain activities brought about by the thriving Solana ecosystem will be the fundamental driving force behind the growth of the Drift protocol. Drift will have more opportunities to capture the yields generated by DeFi protocols and the launch of active assets will bring about demand for leveraged trading.
Potential opportunity
We’ve observed many perpetual DEX’s growing with different stategies. One of Drift’s biggest advantages is its leader position in Solana ecosystem. Since the meme season began, more and more long-tail assets emerged with large volume and good liquidity. If Drift could work like HyperLiquid and list more popular tokens, Drift could become a main degen hub on Solana.
The TVL of Drift V2 currently sits at $171 million, ranking 5th in the derivatives category on DeFiLlama. Out of Drift V2's TVL, DLP accounts for approximately $16 million. Market Maker Vault represents $16 million and Insurance Fund Vault $10 million. The remaining TVL is composed of depositors' assets. Drift currently serves 133k users and has facilitated over 9.4M trades, indicatig t Drift V2 has a sufficient asset and user base.
Although the daily trading volume is between $50 million to $100 million which is , it lags significantly behind competitors in other ecosystems. At the same time, there is a lack of trading intent and the yields generated by sub-products are not very attractive to users. We believe that trading will improve with the launch of Drift's incentive plan. As a series A product, it is worth noting that a higher profit growth brought by token incentives could enhance the underlying yield for depositors, thereby creating a flywheel effect.
Conclusion
From V1 to V2, we can see a very clear trend of improvement in Drift's vAMM solution, which is the continuous addition of real liquidity and the strengthening of the oracle's intervention in pricing. Although it seems to negate the original design concept of vAMM, in reality, the combination of real liquidity and vAMM can provide users with a better experience when trading long-tail assets. With its token and points system, Drift will become increasingly profitable.
However, Drift also has apparent shortcomings. Thanks to the high performance of Solana, the hybrid liquidity solution also turns the transactions on Drift into a sort of order flow mode. So Keepers and DLP, serving as liquidity providers, cannot achieve equal status in executing transactions so that the attraction of DLP is not strong enough. We believe that the upcoming token may bring more possibilities for improvements to Drift.
Reference
https://blog.perp.fi/a-deep-dive-into-our-virtual-amm-vamm-40345c522eeb
https://driftprotocol.medium.com/deep-dive-into-drifts-dynamic-vamm-part-1-3-c2121fbce3c4
https://medium.com/@ragetrade/the-perpetual-pvp-ponzi-beaff4a0c662
Not financial or tax advice. The purpose of this newsletter is purely educational and should not be considered as investment advice, legal advice, a request to buy or sell any assets, or a suggestion to make any financial decisions. It is not a substitute for tax advice. Please consult with your accountant and conduct your own research.
Disclosure. All of my posts are the authors own, not the views of their employer.