Skip to content
bigzPubkey edited this page Jun 15, 2023 · 6 revisions

The drift-vaults program is a proof-of-concept example of composing on top of drift protocol-v2. It's a permissionless method for a group to deposit and withdraw into a shared pool (or "vault") managed by a single delegate. The vault's delegate is limited to only place/cancel orders on behalf of the pooled user account.

Initialization

Upon vault initialization, a vault manager can set:

  • name (unique identity for the vault)
  • management fee
  • performance fee
  • permissioned access list (optional)

Note: names and fees cannot be changed after initialization

Deposit / Withdraw

Vault depositors can choose a vault to deposit in upon withdraw receive their pro-rata share of the pool (after fees). Withdraws first require a request, followed by waiting the redemption period, then ultimately withdrawing. The value received is the worse of the before and after value, which gives the remaining depositors the best outcome and avoids the ability to 'target' or 'punish' particular users for withdrawing when there are others still in the pool.

Liquidations

In the event that a vault depositor withdraw attempt violates the account's initial margin requirement (i.e the vault manager's delegate is running the account with too much leverage), the vault depositor can temporarily take over the account and close out positions. Vault managers can track outstanding total withdraw requests to ensure their strategies don't consume too much margin to allow for take overs.

Risks

This implementation and design is not trustless between depositors and vault managers. So long as the amount managed exceeds any personal stake, the adversarial incentive is to drain the vault by placing losing trades to another account. Thus it is still important for depositors to trust the vault manager as there is no on-chain method for recourse.

If you are a developer or mechanism designer with ideas on creating stronger 'skin-the-game' relationship, please share in Issues

Clone this wiki locally