0/5
# `AuraLiquidity.exit` exercise Write your code inside the [`AuraLiquidity` contract](https://github.com/Cyfrin/defi-reth/blob/main/foundry/src/exercises/AuraLiquidity.sol) This exercise is design for you to gain experience removing liquidity from Aura. ```solidity function exit(uint256 shares, uint256 minRethAmountOut) external auth { // Write your code here } ``` ## Instructions 1. **Withdraw BPT from Aura** - Withdraw BPT from Aura by calling `rewardPool.withdrawAndUnwrap`. - Check that `withdrawAndUnwrap` returns `true`. 2. **Get BPT balance** - Get BPT balance of this contract. 3. **Remove liquidity from Balancer** - Withdraw liquidity all in rETH from Balancer to `msg.sender`. > **Hint:** - See exercise on Balancer to see how to prepare parameters to remove liquidity. ## Testing ```shell forge test --fork-url $FORK_URL --match-path test/exercise-aura.sol --match-test test_depositAndExit -vvv ```
A detailed guide to AuraLiquidity.exit - This lesson walks you through how to safely withdraw from Aura and Balancer. You'll learn how to withdraw BPT from Aura and how to remove liquidity from Balancer.
Previous lesson
Previous
Next lesson
Next
Give us feedback
Course Overview
About the course
Rocket Pool rETH staking, yield mechanisms, trading options, and contract architecture
How to distribute rewards and calculate rETH/ETH exchange rate
How to acquire and redeem rETH
Integrating rETH into DeFi protocols like AAVE V3
How to how to create leveraged ETH positions using rETH
How to provide rETH as liquidity to Balancer and Aura
Getting the USD price of rETH using Rocket Pool NAV oracle
Re-staking with EigenLayer
DeFi Developer
$75,000 - $200,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Blockchain Financial Analyst
$100,000 - $150,000 (avg. salary)
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Last updated on May 12, 2025
Stay in the loop with the latest Rocket Pool updates and connect with over 5,000 developers in the community.
Solidity Developer
Rocket Pool rETH IntegrationDuration: 4min
Duration: 48min
Duration: 57min
Duration: 30min
Duration: 7min
Duration: 23min
Duration: 6min
Course Overview
About the course
Rocket Pool rETH staking, yield mechanisms, trading options, and contract architecture
How to distribute rewards and calculate rETH/ETH exchange rate
How to acquire and redeem rETH
Integrating rETH into DeFi protocols like AAVE V3
How to how to create leveraged ETH positions using rETH
How to provide rETH as liquidity to Balancer and Aura
Getting the USD price of rETH using Rocket Pool NAV oracle
Re-staking with EigenLayer
DeFi Developer
$75,000 - $200,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Blockchain Financial Analyst
$100,000 - $150,000 (avg. salary)
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Last updated on May 12, 2025
Testimonials
Read what our students have to say about this course.
Chainlink
Chainlink
Gustavo Gonzalez
Solutions Engineer at OpenZeppelin
Francesco Andreoli
Lead Devrel at Metamask
Albert Hu
DeForm Founding Engineer
Radek
Senior Developer Advocate at Ceramic
Boidushya
WalletConnect
Idris
Developer Relations Engineer at Axelar