Section 17 of 18
Build
+15 LynxVault: Emergency Shutdown, Governance, and Role Hierarchy
What You Are Building
The deployable Vault contract. This is the final link in the Vault chain (Vault is VaultFees is VaultWithdraw is VaultLockedProfit is VaultReport is VaultCreditDebt is VaultAddStrategy is VaultTotalAssets is VaultDeposit is VaultShareMath is VaultShareToken is VaultStorage). It adds:
- The actual constructor.
- The emergency shutdown switch.
- The 2-step governance transfer.
- Single-step setters for
management,guardian,depositLimit. - A
sweepfunction for stuck non-tokenassets.
After this section, you have a working Yearn V2 vault you could deploy to mainnet (with a concrete strategy from the Strategy chain).
Your Code
Solution.sol
Loading editor...
Requirements
Write your implementation, then click Run Tests. Tests execute on the server.
Sign up free — keep reading + earn 15 Lynx
Zealynx Academy is free. Track your progress, earn Lynx, and climb the leaderboard.
Sign up free to continueAlready have an account? Log in