This repository has been archived by the owner on Sep 8, 2024. It is now read-only.
mstpr-brainbot - EigenLayer's StrategyManager thirdPartyTransfersForbidden
setting can block the withdrawals
#237
Labels
Excluded
Excluded by the judge without consulting the protocol or the senior
Non-Reward
This issue will not receive a payout
mstpr-brainbot
medium
EigenLayer's StrategyManager
thirdPartyTransfersForbidden
setting can block the withdrawalsSummary
EigenLayer strategy manager has a setting
thirdPartyTransfersForbidden
which is used to not accept withdrawals to an address that is different than the initiator. In such cases if that's set to true by EigenLayer, the Rio's contracts will fail to deliver all types of withdrawals, operator exit and user exit.Vulnerability Detail
When users exit:
OperatorDelegator contract initiates withdrawal in EigenLayer DelegationManager contract to withdrawal queue contract
When operator exit by admin:
OperatorDelegator contract initiates withdrawal in EigenLayer DelegationManager contract to deposit pool contract
So, in both withdrawal types the withdrawer (OperatorDelegator) is not the receiver (deposit pool / withdrawal queue).
In the StrategyManager contract of EigenLayer, we can see the usage of
thirdPartyTransfersForbidden
setting:As seen above, if the EigenLayer governance decides to add a strategy to
thirdPartyTransfersForbidden = true
then all type of withdrawals will be impossible for Rio because of this check:Coded PoC:
Impact
Withdrawals are completely broken.
Code Snippet
https://github.com/Layr-Labs/eigenlayer-contracts/blob/6de01c6c16d6df44af15f0b06809dc160eac0ebf/src/contracts/core/StrategyManager.sol#L211-L223
https://github.com/Layr-Labs/eigenlayer-contracts/blob/6de01c6c16d6df44af15f0b06809dc160eac0ebf/src/contracts/core/DelegationManager.sol#L267-L289
https://github.com/Layr-Labs/eigenlayer-contracts/blob/6de01c6c16d6df44af15f0b06809dc160eac0ebf/src/contracts/core/DelegationManager.sol#L704-L709
https://github.com/sherlock-audit/2024-02-rio-network-core-protocol/blob/4f01e065c1ed346875cf5b05d2b43e0bcdb4c849/rio-sherlock-audit/contracts/restaking/RioLRTOperatorDelegator.sol#L213-L218
https://github.com/sherlock-audit/2024-02-rio-network-core-protocol/blob/4f01e065c1ed346875cf5b05d2b43e0bcdb4c849/rio-sherlock-audit/contracts/restaking/RioLRTOperatorDelegator.sol#L253-L258
Tool used
Manual Review
Recommendation
The text was updated successfully, but these errors were encountered: