# `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 ```
AuraLiquidity.exit exerciseWrite your code inside the AuraLiquidity contract
This exercise is design for you to gain experience removing liquidity from Aura.
Withdraw BPT from Aura
Withdraw BPT from Aura by calling rewardPool.withdrawAndUnwrap.
Check that withdrawAndUnwrap returns true.
Get BPT balance
Get BPT balance of this contract.
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.
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
Stay in the loop with the latest Rocket Pool updates and connect with over 5,000 developers in the community.
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 November 7, 2025
Duration: 5min
Duration: 48min
Duration: 58min
Duration: 31min
Duration: 7min
Duration: 24min
Duration: 7min
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 November 7, 2025