Vault Design

Vault Architecture

Each vault (ETH++, eBERA, dgnETH, ARB++, etc.) is a standalone unit comprising two key components: the Vault and the Trader. The Vault is an ERC-4626 compatible single staking vault, which handles all deposits, withdrawals, and share accounting functions. The Trader is tasked to deploy the vault’s funds according to the vault’s designated trading strategy.

In the live production vaults, the Trading team interacts with vault funds via a smart contract and internal trading app providing an interface for safely executing the strategy within the risk parameters of the smart contracts.

Vault Process

The vault works in cycles called “epochs.” Each epoch has a funding phase, a trading phase, and a withdrawal phase. When the vault opens in the funding phase, users can deposit the vault’s underlying currency or withdraw their assets if they have a remaining balance from previous epochs. During the trading phase, users may not deposit or withdraw, and the trader may take custody of the vault’s funds. When the trader returns the vault’s funds, the epoch ends, and the vault enters a withdrawal-only state until another epoch and its associated funding window is started.

Each vault follows the same steps for each epoch:

  1. Vault opens;

  2. The user deposits the vault’s underlying token, ex. USDC, and receives share tokens representing an equivalent percentage of total vault funds;

  3. The vault closes and the trader takes custody of the funds;

  4. The experienced Investment Team executes strategies through the Trader Smart Contract. Only designated traders from the trading team can interact with the trader contract;

  5. The Trader Smart Contract restricts traders to a set of specific actions, only for whitelisted DeFi protocols;

  6. Our Trading Engine uses the locked funds to execute trades;

  7. The Trader unwinds all positions and returns the vault funds and profits/losses, less fees, t the vault;

  8. The vault is in a withdrawal-only state until the next funding window opens.

Vault Contract Structure

D2.Finance has designed its trader smart contracts on a modular basis. The strategy’s modules are selected when built and cannot be changed once deployed, assuring users that their funds can only be used as originally stated.

Initially, the strategies will have a limited selection of modules. Over time as more modules are developed and audited, more complex strategies will be possible, and the protocol will be well-positioned to take advantage of any emerging market opportunities by deploying a new Vault and Strategy with the appropriate mix of modules.

Last updated