Skip to content
bigzPubkey edited this page Aug 2, 2023 · 6 revisions

The drift-vaults program is a proof-of-concept example built atop drift protocol-v2. It's an open, permissionless program that facilitates the deposit and withdrawal of tokens into a shared pool, or "vault," managed by a single delegate. The delegate only has the power to place or cancel orders on behalf of the user pool. For their services, the vault manager may set custom terms for the arangement.

Initialization

Upon vault initialization, a vault manager can set:

  • name (unique identity for the vault)
  • management fee (after initialization, can only be lowered)
  • performance fee (after initialization, can only be lowered)
  • redemption period (after initialization, can only be shortened)
  • permissioned (optional, only vault manager can initialize new vault depositor accounts)
  • max_deposits (optional, after initialization, can go up/down, applies only for new deposit attempts)
  • min_lp_deposit (optional, after initialization, can go up/down, applies only for new deposit attempts)

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 custom 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' the particular user withdrawing when there are others still in the pool.

Fees

Fees parameters are in PERCENTAGE_PRECISION (1e6) and are annualized.

Management fees, applicable only when there are non-manager deposits, are charged across the entire vault. They compound upon action, meaning that frequent depositor actions slightly reduce the annualized fee.

Performance fees are calculated per depositor action and can be 'triggered' periodically. "Watermarks" are maintained to prevent double charging in case of performance fluctuation or drawdown. Note, this fee cannot be reclaimed once charged.

Liquidations

After requesting and waiting the redemption period, if a vault depositor's withdrawal attempt breaches the account's initial margin requirement (i.e., the vault manager's delegate is over-leveraging the account), the depositor can temporarily assume delegate control over the pooled account to close out positions in exchange enforced reduce-only mode (until they withdraw or up to 1 hour). The original delegate is then restored afterwards. Vault managers can/should monitor total outstanding withdrawal requests (conveniently stored on the vault account) to ensure their strategies don't overuse margin, and avoid depositor takeovers. The custom set redemption period can provide time for the delegate's strategies to unwind safely and prudently.

Risks

This is an experimental implementation that has not been extensively tested or audited by any third party.

This design is not completely trustless between depositors and vault managers. Without the manager's reputation or other stakes, the incentives can be misaligned. If the amount managed exceeds the manager's personal stake, there's a risk of draining the vault by placing losing trades to another account. Therefore, it is essential for depositors to trust the vault manager since there is no on-chain method for recourse.

Developers or mechanism designers with ideas for creating a more robust 'skin-in-the-game' relationship are encouraged to share in Issues

Design Space

Below are a few example use cases:

  • Pooled Market Making

single market maker wishes to run a strategy with multiple passive capital providers. Each one receives pro-rata performance. Permissioned assumes an off-chain trust/relationship. A 0% management fee, 5% performance fee, and a 3-day redemption period incentivize manager returns for the strategy.

  • Index Fund

A manager creates a vault with a 0% performance fee and 0.1% management fee, offering a crypto market-cap weighted basket. A 1-day redemption period is provided for rebalancing.

  • Leverage Lending

A manager deposits $1 and adds a -1000% manager fee, with a 0 redemption period, effectively paying depositors for providing capital. Depositors, enticed by the negative fee, give the manager access to more margin. Depositors can take over whenever they feel the manager fee isn't worth it (e.g., if the manager's stake is too low or zero).

Clone this wiki locally