Smart Contract Architecture

The protocol is built using a modular and extensible architecture, allowing for easy implementation of new strategies. Vault contracts are separated from the Strategy contracts. Vaults manage the funding part - deposits, withdrawals etc. While the strategy contracts abstract the trading strategy part. A vault could implement multiple strategies. This is a design that is also used by Yearn Finance.

  • BaseVault - base vault contract managing deposits and withdrawals

  • OptionsVault - a generic contract for options based vaults

  • VaultRegistry - registry managing vaults lifecycle

  • Strategy - implements a trading strategy. a vault can have one or many strategies

  • VerticallCallSpreadStrategy - a specific strategy

  • OptionPriceOracle - base interface for option pricing data

Vault contracts are upgradable, using the upgradable proxy pattern: https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable . This is to avoid the need to migrate clients and their funds to new vaults if a change is needed. Every contract upgrade is controlled by the UpYield Finance DAO and its representatives.

Last updated