D2.Finance
  • D2.Finance Overview
  • Links
  • Protocol
    • Architecture
    • Trading Strategies
    • Transparent Reporting
  • Token & Governance
    • Tokenomics
    • Governance
  • Security & Contracts
    • Addressing Risk
    • Security
    • Smart Contract Audits
  • Disclaimers
    • Disclaimer and Restrictions
Powered by GitBook
On this page
  1. Protocol

Architecture

PreviousLinksNextTrading Strategies

Last updated 3 days ago

Architecture Each strategy (hXXI, HYPE++, etc) is a standalone unit comprising key components: the Vault, the strategy contract, and the Trader OMS. 1) The Vault Contract (V1 & V3 Contracts) The Vault is the user facing ERC-4626 compatible single staking vault, which handles all deposits, withdrawals, and share accounting functions. When a user deposits funds in the vault, they receive a vault token representing their share in the vault. The vault facilitates simplified single-click access to the strategies in a familiar interface. 2) The Trader Contract Each vault deployment utilizes a unique trader smart contract which defines allowable trading parameters and roles including:

  • Allowed Spenders

  • Allowed Tokens

  • Enabled trading modules

  • Enabled trading function

  • Executor role

The trader contract ensures trading parameters are defined by the smart contracts according to the strategy mandates. *See Product Disclaimer: Investment risks for additional details regarding potential interaction with V0 contracts. 3) The Trader OMS (Strategy Contract) The Trader OMS serves as the interface for our trading team to actively trade according to strategy mandates. The OMS embeds traditional hedge fund risk limit parameters within its smart contracts, ensuring trading is limited within the defined smart contract parameters, direct withdraws are restricted, and no exposure to front end exploits to integrated DeFi protocols. OMS smart contracts are built on a modular (diamond / cutter) system facilitating protocol interactions and expansion. Each module can be assembled to modify or create new strategies with minimal development or security risks to quickly capture market opportunities as they arise. The OMS provides a secure and powerful interface for safely executing the strategy within the risk parameters of the smart contracts.

Strategy Flow

The strategies are deployed in cycles called “epochs.” Each epoch has a funding phase, a trading phase, and a withdraw phase. Funding Phase: When the vault opens in the funding phase, users can deposit the vault’s underlying currency. Trading Phase: During the trading phase, users may not deposit or withdraw, and the trader may take custody of the vault’s funds to run the strategy mandates. Withdraw Phase: At the conclusion of the epoch, the funds are returned to the vault +/- PNL for users to withdraw at NAV or rollover to next epoch.

Depending on position strucutre, there may be an unwinding period upon conclusion of the epoch: Flagship Strategies: Funds are returned to vault within 72 hours of expiry. Tactical Strategies: Funds may be traded upto 30 days past expiry based on market opportunities.