Drift Protocol (Formerly MoetFi)

DizzyLizzy
6 min readAug 29, 2021

--

Perpetual Futures on the Solana blockchain

Alongside Bonfida and Mango Markets, Drift is one of three protocols on Solana’s blockchain focusing on building Perpetual Futures (Perps). Like all on-chain derivatives, Perps are at an early stage of their development and the jury is still out on how best to build them.

Despite this challenge, futures represent the majority of trading volume on centralised exchanges for fat-tail assets like Bitcoin and Ethereum. Therefore, Drift and its peers have a huge opportunity to gain widespread adoption.

Courtesy of Delphi Digital and Coingecko

Why Build on Solana?

Perps are more complex products to build than simple swap functions like Uniswap v2. This means that in order to live fully on-chain, they have certain requirements that slower and more expensive blockchains can’t offer.

For example:

  • Users must have the flexibility to react quickly to market conditions in a cost-effective way
  • Oracles must provide accurate, reliable, and timely data
  • Frequent funding rate payments must be efficiently paid to users
  • Liquidations need to occur seamlessly

With around 50,000 transactions per second, fees at a fraction of a cent and sub-second finality, Solana was clearly a stand-out choice. As a cherry on top, these factors also support composability with other applications in the ecosystem as there is enough capacity on-chain without the need for rollups or scaling.

The product

Drift will offer cross-margin accounts for Perps across a wide variety of assets. Users will (initially) use USDC as collateral and this will allow them to open multiple Perp positions at up to 5x leverage.

DeFi is plagued by confusing and unattractive interfaces, so one of the team’s priorities is to create an intuitive and user-friendly UI. The image below suggests that we should expect to see exactly that.

Source: Drift Protocol

Instead of using an order book like a traditional exchange, Drift’s first Perp product will utilise a relatively new innovation, the vAMM (virtual automated market maker). This approach was pioneered by Perpetual Protocol in late 2020 and unlike typical AMMs, it simulates liquidity.

Source: Drift Protocol

Initially, Drift’s vAMM will adopt a constant product market maker (CPMM), represented by the simple formula: x*y=k, where:

  • ‘x’ is one asset (i.e. $USDT)
  • ‘y’ is the other asset (i.e $ETH)
  • ‘k’ is the cumulative total of both (USDT*ETH = the virtual pool)

This equation remains constant (hence the name), which in Drift’s case means that when one asset is longed or shorted, it becomes more or less valuable than the other and moves the price curve.

Source: Drift Protocol

Aligning prices with the broader market

As with all exchanges, it is important that the price of assets on Drift (mark price) match those of the market (index price).

To help with this, the app will have funding payments and arbitrageurs. Arbitrageurs help to align prices by collecting spreads and minimising variance across different exchanges.

Funding payments are useful and incentivise a healthy combination of both long and short positions. However, they can be tricky to get right.

Let’s say that $BTC has a very bullish outlook and most users go long. In this case, an hourly funding payment would be paid from the ‘longs’ to the ‘shorts’ as compensation (or vice versa if the majority short $BTC). This payment is based on the difference between the index and mark prices.

Even centralised exchanges have issues aligning funding rates

One issue with the CPMM (x*y=k) is that liquidity is spread evenly across a curve, meaning that the majority of capital is not put to use.

This means that if ‘k’ (the size of the virtual pool) is set low, the asset’s mark price will experience high slippage and easily fluctuate. This creates unfavourable conditions that affect funding payments and the profit and loss (P&L) of users.

Conversely, the larger it becomes, the more capital users must trade to move the protocol’s mark price in line with the broader index price.

Thanks to their virtual liquidity, Drift can adjust ‘k’ (the size of the virtual pool), however, there are challenges in doing so. One example is timing as making adjustments whilst users have outstanding positions will also affect their P&L.

How does the vAMM compare to other approaches?

When compared with other approaches, Drift’s proposed vAMM has both strengths and weaknesses. On one hand, it is ‘ready to go’ from day one and doesn’t require liquidity providers or traditional market makers to bootstrap liquidity.

This principle applies to all assets with high-quality oracle prices, meaning Drift can offer long-tail assets that other protocols would struggle with. Equally, users would not be automatically de-leveraged due to the protocol having low liquidity; a potential issue for any Perp DEX using ‘real’ liquidity.

The Drift team overwhelmed by the number of long-tail assets they can list

Drift does, however, face issues too. Firstly, the CPMM it uses is not as capital efficient as liquidity-rich central-limit order books (CLOBs). This can result in comparatively higher slippage as already discussed.

The team are fully aware of this problem and have ideas for addressing it post-launch. Two options discussed so far are:

  • a) a hybrid approach that uses an AMM to match orders onto an order book
  • b) adopting alternate price curves to better concentrate liquidity.

The advantages associated with having virtual liquidity also mean that Drift will not have liquidity providers. Whilst this makes many things easier logistically, the team will have to think creatively about how to reward and engage its community.

The absence of liquidity providers also means that the protocol itself must take on lots of early risk as its safeguard, the insurance fund, builds up.

Growth (and deterioration) of Perpetual Protocol’s Insurance fund this year (Source: @Yenwen / Dune)

MEV and being fully on-chain

As outlined earlier, Solana’s power as a blockchain will enable Drift to operate fully on-chain. This provides greater transparency, composability, and censorship resistance when compared with partially centralised solutions that use off-chain matching engines.

Another positive is that malicious forms of miner/maximum extractable value (MEV) will, in theory, be less prevalent than on many peer apps. The vAMM, lack of limit orders and fact that validators only have c.0.04 seconds to fully front-run or sandwich attack a transaction help to dramatically reduce risk when compared with elsewhere.

Of course, one downside is that Drift initially only plans to offer market orders in its initial launch.

Conclusion

Should the team be able to roll out their inaugural product without any major issues, it will provide a strong platform for building more creative iterations in the future. The fully on-chain vAMM approach has been tried and tested by Perpetual Protocol v1 (on xDAI) and Bonfida (Solana) and if they can deliver upgrades in some of the key areas as outlined above, they’ll likely see strong adoption.

Drift will, however, be entering a competitive market in the wake of dYdX’s upcoming token launch and Mango Markets’ fully on-chain CLOB Perp product. Perpetual Protocol’s v2 is also around the corner, so let’s hope that this talented team can contribute something that really adds to the space.

For further reading, you should check out:

Follow or connect with me for more amateur insights:

Disclaimer: This content is for informational purposes only and nothing highlighted should be construed as financial advice.

--

--

DizzyLizzy

A DeFi investor with interests in Solana, Ethereum and the finest haircuts money can buy.