Overview
V2 Cellar function calls are subject to one of three levels of permissions:
- User functions - functions that end users call to manage their own deposits into cellars. These functions are mostly derived from the ERC4626 spec.
- Strategist functions - functions that the cellar’s strategist calls to “do things” with the assets deposited to cellars: for instance, swap one asset for another, claim farming rewards, etc.
- Governance functions - functions that only Sommelier on-chain governance can call, which modify the parameters of a cellar. For instance, governance can update fee amounts, trust new adapters, or perform emergency operations.
On the smart contract level, both strategist and governance functions are gated by onlyOwner
modifiers. The owner of all cellars is the Gravity Bridge, and both strategist and governance function calls are forwarded through the bridge. Therefore, delineation of permissions between strategist and governance happens on the Sommelier chain.
Permission Reference
User
transfer
(ERC20)
transferFrom
(ERC20)
deposit
(ERC4626)
mint
(ERC20/ERC4626)
withdraw
(ERC4626)
redeem
(ERC4626)
Strategist