Section 17 of 18

Build
+15 Lynx

Vault: 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:

  1. The actual constructor.
  2. The emergency shutdown switch.
  3. The 2-step governance transfer.
  4. Single-step setters for management, guardian, depositLimit.
  5. A sweep function for stuck non-token assets.

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
Solidity
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 continue

Already have an account? Log in