This repository has been archived by the owner on Sep 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
mstpr-brainbot - Requested withdrawal can be impossible to settle due to EigenLayer shares value appreciate when there are idle funds in deposit pool #109
Labels
Has Duplicates
A valid issue with 1+ other issues describing the same vulnerability
High
A valid High severity issue
Reward
A payout will be made for this issue
Sponsor Confirmed
The sponsor acknowledged this issue is valid
Will Fix
The sponsor confirmed this issue will be fixed
Comments
github-actions
bot
added
Medium
A valid Medium severity issue
Has Duplicates
A valid issue with 1+ other issues describing the same vulnerability
labels
Mar 16, 2024
This was referenced Mar 16, 2024
Closed
This was referenced Mar 22, 2024
Open
Seems unlikely to have a meaningful effect while rebasing tokens are not supported. |
This was referenced Mar 25, 2024
Closed
sherlock-admin2
changed the title
Obedient Carbon Leopard - Requested withdrawal can be impossible to settle due to EigenLayer shares value appreciate when there are idle funds in deposit pool
mstpr-brainbot - Requested withdrawal can be impossible to settle due to EigenLayer shares value appreciate when there are idle funds in deposit pool
Mar 26, 2024
This was referenced Mar 28, 2024
sherlock-admin2
added
the
Sponsor Confirmed
The sponsor acknowledged this issue is valid
label
Mar 31, 2024
The protocol team fixed this issue in the following PRs/commits: |
For a more severe impact, see #112. |
Fixed |
The Lead Senior Watson signed off on the fix. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Has Duplicates
A valid issue with 1+ other issues describing the same vulnerability
High
A valid High severity issue
Reward
A payout will be made for this issue
Sponsor Confirmed
The sponsor acknowledged this issue is valid
Will Fix
The sponsor confirmed this issue will be fixed
mstpr-brainbot
high
Requested withdrawal can be impossible to settle due to EigenLayer shares value appreciate when there are idle funds in deposit pool
Summary
When users request a withdrawal, the EigenLayer shares equivalent to their LRT's value are recorded. During settlement, these EigenLayer shares must be deducted to finalize the withdrawal epoch. However, in certain scenarios, the requested EigenLayer shares may be impossible to unwind due to funds idling in the deposit pool.
Vulnerability Detail
Let's assume that 1 LRT equals 1 EigenLayer-cbETH, which equals 1 cbETH initially.
Alice deposits 5e18 cbETH, and her deposits are allocated to operators after rebalancing. Now, Rio holds 5 EigenLayer-cbETH, which is worth 5 cbETH.
After some time, Bob deposits 100e18 cbETH to Rio and immediately withdraws it. At the time Bob requests this withdrawal, 100 cbETH is worth 100 EigenLayer-cbETH, so the shares owed are 100 EigenLayer-cbETH. At settlement, 100 EigenLayer-cbETH worth of cbETH has to be sent to the withdrawal queue to settle this epoch.
Now, assume that the value of EigenLayer-cbETH increases, meaning that 1 EigenLayer-cbETH is now worth more cbETH. This is an expected behavior because EigenLayer-cbETH is similar to an ERC4626 vault, and we expect its value to increase over time.
Let's say 1 EigenLayer-cbETH is now worth 1.1 cbETH.
Now, 100 cbETH sits idle in the deposit pool, and there are 5 EigenLayer-cbETH in the operators, which means there are a total of 90.9 + 5 = 95.9 EigenLayer-cbETH worth of cbETH in Rio. However, Bob's withdrawal request is for 100 EigenLayer-cbETH.
This would mean that Bob's withdrawal request will not be settled, and the entire withdrawal flow will be stuck because this epoch can't be settled.
Coded PoC:
Impact
High since the further and current withdrawals are not possible.
Code Snippet
https://github.com/sherlock-audit/2024-02-rio-network-core-protocol/blob/4f01e065c1ed346875cf5b05d2b43e0bcdb4c849/rio-sherlock-audit/contracts/restaking/RioLRTCoordinator.sol#L99-L151
https://github.com/sherlock-audit/2024-02-rio-network-core-protocol/blob/4f01e065c1ed346875cf5b05d2b43e0bcdb4c849/rio-sherlock-audit/contracts/utils/OperatorOperations.sol#L113-L134
Tool used
Manual Review
Recommendation
The text was updated successfully, but these errors were encountered: