Architecture Overview
A system for securely governing on-chain yield.
Last updated
A system for securely governing on-chain yield.
Last updated
The BoringVault is a barebones contract that offloads as much functionality as possible to external contracts. The BoringVault is rebalanced using a Manager. Users enter/exit the BoringVault using a Teller. BoringVault shares can also optionally run a callback on every transfer/transferFrom
by setting a Hook.
The Manager is the contract responsible for rebalancing the BoringVault. The account that uses the Manager to rebalance is called the strategist. The Manager contract gates strategist calls to expose the minimum set of functionality required to rebalance the vault. This gating is implemented as a Merkle verification system: every rebalance call made by a strategist must additionally submit a Merkle proof verifying that the content of the call is permitted by the vault (e.g. enforcing a whitelist of DeFi protocols or assets that the vault can take exposure to). This logic has been implemented in the ManagerWithMerkleVerification. Additionally, uManagers ("Micro Managers") can be used to implement complex verification logic.
The Teller is responsible for allowing users to mint/redeem BoringVault shares. Note that in the first iteration of this architecture the Teller is responsible for both minting and redeeming. In the future this logic could be split up into two more complex contracts.
The Accountant is used by the Teller to price BoringVault shares. The accountant will have an exchange rate periodically written to it. The exchange rate is calculated off-chain and submitted on-chain. The Accountant restricts how much the exchange rate can change between updates.