Hermetica
Search
K
Comment on page

Smart Contact Design

The Dapp is comprised of two smart contracts:
(1) The vault contract which
  • holds all of the user's funds
  • keeps an internal ledger tracking each principal's balance
  • allows for deposits and withdrawals
(2) The comptroller contract which contains
  • a function to receive Redstone price data which used to settle outstanding options and process deposits and withdrawals
  • a mechanism to trade option contracts with a fixed portion (1% per month) of the funds in vault
  • logic to determine the value of an expired option and settle the PnL