Write your code inside the AuraLiquidity contract
This exercise is designed for you to gain experience adding liquidity to Aura.
function deposit(uint256 rethAmount) external returns (uint256 shares) {
// Write your code here
}-
Transfer rETH from msg.sender
- Transfer rETH from
msg.sender. - Approve Aura (
address(depositWrapper)) to spend rETH.
- Transfer rETH from
-
Add liquidity
- Call
depositWrapper.depositSingleto add liquidity.
Hint:
- See
IRewardPoolDepostiWrapperfor how to calldepositSingle. - See exercise on Balancer to see how to prepare parameters to add liquidity.
- Call
-
Refund
- Send any left over rETH in this contract to
msg.sender.
- Send any left over rETH in this contract to
-
Return shares
- Fetch and return the amount of shares this contract holds by calling
rewardPool.balanceOf.
- Fetch and return the amount of shares this contract holds by calling