Drift Dynamic AMM

On Drift, all trades are executed against a virtual dynamic AMM (DAMM).

A DAMM 1. reduces slippage for traders while being adaptable to the demand for trading in the market and 2. reduces the oracle and terminal price divergence over time.

See Glossary for commonly used terms on vAMMs

Virtual AMM

The Virtual AMM (vAMM) was pioneered by Perpetual Protocol. Here we briefly describe how the vAMM works.

The current implementation is a two-dimensional constant product curve is using the x * y = kinvariant.

Peg Multiplier

The market price for x in terms of y is the slope of the curve given the relative scarcity, and can be multiplied by an arbitrary constant C (essentially the magnitude of y):

price = (y/x) * C

The reason to add the peg multiplier is to ensure that prices are balanced in the center of the curve, which is where slippage is the lowest. We want to concentrate prices around the center of the curve!

In Drift's naming convention, this looks like:

mark_price = (quote_asset_reserve/base_asset_reserve) * peg_multiplier

Dynamic AMM

The Dynamic AMM provides low slippage that changes the parameters of the curve formulaically based on growing open interest (OI) of the platform as well as oracle price drifting away from the terminal price.

The Dynamic AMM has two key features, 1) curve-repegging and 2) k-adaptability. Both mechanisms use protocol fees collected from trading to ensure that traders positively benefit from the changes in the DAMM.

1) Drift Cover (Repegging the Curve)

Repegging is akin to altering the a quote asset reserves.

What does Drift Cover solve?

Over time, prices tend to drift from the market's inception/terminal price. Without a mechanism in place, trading will end up occuring of the outer ends of the curve where liquidity is not focused and slippage is higher.

How does Drift Cover work?

The repegging mechanism, Drift Cover, solves the long term price drift problem. A repeg event reduces the oracle-mark spread and rewards market participants with additional liquidity at a more accurate mark price. Additionally, trading stays closer to the center of the curve where liquidity is focused. Drift adjust's the peg multiplier to progamatically to approach the oracle price.

When do repegs occur, how big will they be?

Initially, the admin will run repegs to benefit healthy market conditions. These include ensuring a low average oracle-mark spread and diverse open interest.

The catch for repegging is the market doesn't want to deplete the fee's collected on price changes that may soon revert. Preliminary analyses indicate >10% mark-peg divergence and persistently large funding rates are a good inflection point to consider a repeg event.

Current repeg fee fraction: 50% (This fee fraction is controllable by the admin, which will eventually go under control of the DAO.) See Rebates

2) Adaptable K

Adjusting k is akin to scaling both the base and quote asset reserves in tandem.

Our goal is to monotonically increase k (reserve invariant) over time as the platform and OI grows. K is bounded by the fees collected.

A high appetite for arbitraging volume per oracle price movement encourages us to support a higher k, providing lower slippage for Traders.

Mark-exit spread goes down when k goes up, because the slippage needed to close positions is reduced.

Ex: doubling sqrt(k) => users will pay roughly half the slippage.

Current k fee fraction: 100% (This fee fraction is controllable by the admin, which will eventually go under control of the DAO.) See Rebatesο»Ώ

Who Adjusts the K

At this stage, the Drift core team manages the liquidity of the vAMM formulaically. Adding too much liquidity to the pool poses a problem for arbitrageurs as they won't have enough capital to keep the vAMM price in line with the underlying index price via funding payments.

Drift believes the game theory of trading DAMMs comes from backward induction on the terminal price. The goal of repegging / adjusting k is to keep the terminal price, mark price, and oracle price all close to one another, even over long run price drift.