Architecture

v1 Architecture
  1. 1.
    The Governance contract manages and executes proposals made by governance token holders. It is also the owner of the Factory contract.
  2. 2.
    The Factory contract manages margin engines, vAMMs and oracles used by the protocol.
  3. 3.
    Users interact with margin engines to create, maintain and close positions.
  4. 4.
    The Margin Engine interacts with vAMM to manage user positions.
  5. 5.
    The Margin Engine escrows users collateral as initial margin on creation of new positions.
  6. 6.
    Oracles feed data into both vAMMs and margin engines for valuation of collateral.
  7. 7.
    Liquidators watch positions held by users for liquidation events or to ensure funding payments occur.
  8. 8.
    Users are able to stake their governance tokens to create, participate and execute governance actions.