Vaults / Vault Fundamentals
Simple Vault Deposit and Withdrawal
Practice the basic Vault lifecycle by writing Foundry tests for a complete deposit and withdrawal flow.
Public Lab briefing
What you will practice
- Deploy MockUSDC and SimpleVault in the Foundry test setup.
- Mint 100 USDC to Alice.
- Approve the Vault to transfer Alice's USDC.
- Deposit 100 USDC into the Vault.
- Verify totalAssets, totalSupply, Alice's share balance, and the relevant USDC balances after the deposit.
- Withdraw Alice's complete Vault position.
- Verify that Alice receives her USDC back and that her share balance, totalAssets, and totalSupply return to zero.
Preparation and completion
Review the associated Learn before starting.
Successful completion means the server independently verifies the exercise outcome through the isolated Runner. This public briefing does not reveal tests, verifier rules, or a solution.