Protocol Architecture

The protocol is comprised of four smart contracts:

(1) The hq contract which

  • stores all settings includng setter and getter functions

  • defines all roles (i.e. admin, trader)

(2) The core contract which

  • stores all epoch specific information in the epoch-info map

  • contains logic for buying option contracts with a fixed portion (i.e. 1% per month) of the funds in vault

  • contains logic to determine the value of an expired option, receive payment and settle

(3) The vault contract which

  • holds all of the protocol funds

  • allows for deposits and withdrawals

  • contains logic to issue claims against deposits and withdrawals

  • contains logic to claim the vault token representing deposits and/or underlying for withdrawals

(4) The token contract which

  • is a sip-010 compatible token representing vault deposits

  • contains logic to transfer, mint and burn the token

Additionally there is the pnl-calculator, an upgradable helper contract for determining the option profit & loss (pnl).

Last updated