Drift Protocol's DAMM acts as the designated market maker to provide a guaranteed liqudity source for traders. To overcome latency arbitrage, adverse selection and toxic flow, a number of optimizations were made within the protocol while following particular constraints such as maximum allowable spread and minimum liquidity depth.
Drift's AMM essentially bootstraps liquidity in a perpetuals market and offers a competitive lower bound as opposed to relying fully on external liquidity providers which can freely come and go.
The auction process itself acts a speedbump against latency arbitrage of the oracle and the DAMM. This helps to improve the adverse selection faced by market makers on-chain.
Just as market makers provide active liquidity through the JIT auction process, the DAMM may also opt to participate as well in order to reduce inventory.
- Potential market imbalances;
- Live-oracle based pricing; and
- Maximum allowable spread set by the DAMM,
the unrealised P&L users can lock in from entering and exiting a trade against the DAMM is technically unbounded (e.g. if BTC goes toward infinity).
However, whilst a user can achieve this unrealised gain, it is important to note that an offsetting loss (or sufficient fees collected) is necessary before the unrealised gain can be settled in full and withdrawable as collateral.
Until the P&L pool is replenished by offsetting losses, winners may* be offered discounted margin on unrealised gains. Winners will have the ability to withdraw their portion from the P&L settlement pool as it increases. Read more about the settlement mechanism in .
*: If the unrealised P&L imbalance exceeds its per market threshold, those unrealised gains may be discounted by the margining system (initial, not maintainence) to prevent large borrows against it. This initial margin discounting would only impact new positions being opened and would not affect a user's liquidation threshold.
These rules are systemitised can be read more in .
If the inventory on the DAMM is 0, all the repeg and k increase operations have no terminal state costs.
Even so, the DAMM is still fully aware of the remaining position imbalance within the market and makes decisions on its spread size and liquidity depth based on that awareness (while following its constraints as a designated market maker).