ETH withdrawals from EigenLayer always fail due to OperatorDelegator ’s nonReentrant receive()
The OperatorDelegator contract's receive() function is marked nonReentrant, but it is called during completeQueuedWithdrawal() when ETH is withdrawn from EigenLayer, causing the reentrancy guard to block the legitimate callback. As a result, all withdrawals that include ETH become permanently stuck in EigenLayer and cannot be redeemed.
Submitted by LessDupes, also found by blutorque, ilchovski, 0x73696d616f, zzykxx, kennedy1030, and KupiaSec
Vulnerability details
The OperatorDelegator.completeQueuedWithdrawal() function is used by admins to finalize previously initiated withdraws of shares from EigenLayer.
We note that both this and the OperatorDelegator’s receive() functions are nonReentrant:
File: OperatorDelegator.sol
265: function completeQueuedWithdrawal(
266: IDelegationManager.Withdrawal calldata withdrawal,
267: IERC20[] calldata tokens,
268: uint256 middlewareTimesIndex
269: ) external nonReentrant onlyNativeEthRestakeAdmin {
270: uint256 gasBefore = gasleft();
271: if (tokens.length != withdrawal.strategies.length) revert MismatchedArrayLengths();
272:
273: // complete the queued withdrawal from EigenLayer with receiveAsToken set to true
274: delegationManager.completeQueuedWithdrawal(withdrawal, tokens, middlewareTimesIndex, true);
---
501: receive() external payable nonReentrant {
502: // check if sender contract is EigenPod. forward full withdrawal eth received
503: if (msg.sender == address(eigenPod)) {
504: restakeManager.depositQueue().forwardFullWithdrawalETH{ value: msg.value }();
However, the receive() function is normally called by the EigenPod in the call stack originated by the L274 completeQueuedWithdrawal() when receiveAsTokens == true like in this case. This particular instance of reentrancy is not only acceptable but also required to allow ETH redemptions from EigenLayer. However, the nonReentrant modifier prevents it.
Impact
All withdrawals that include any amount of ETH will be permanently stuck in EigenLayer and won’t be redeemable. Only amounts coming from new deposits can be redeemed and the team will have no way to fill the withdrawal queues. To unblock them, the team will necessarily have to upgrade OperatorDelegator.
Proof of Concept
To prove the concept, it’s sufficient to upgrade OperatorDelegator on a mainnet fork and initiate a withdrawal that has ETH among the withdrawn strategies.
While it would be too bulky to provide a coded PoC, you can find in this GH Gist the Foundry traces of such failed call on a mainnet fork.
Tools Used
Foundry
Recommended Mitigation Steps
Consider removing nonReentrant from OperatorDelegator’s receive, or applying the modifier only in case msg.sender != eigenPod.
Assessed type
Reentrancy
jatinj615 (Renzo) confirmed via duplicate Issue #571
Status: Mitigation confirmed. Full details in reports from 0xCiphky, grearlake, Fassi_Security, Bauchibred, and LessDupes.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The receive() function is marked nonReentrant, which prevents the legitimate callback from EigenPod during completeQueuedWithdrawal() when ETH is withdrawn.
What the attacker needed
Withdrawal includes ETH; admin initiates completeQueuedWithdrawal
The fix
The nonReentrant modifier should be removed from receive(), or applied only when msg.sender is not the EigenPod.
How it was found
- Upgrade OperatorDelegator on a mainnet fork.
- Initiate a withdrawal that includes ETH among the withdrawn strategies.
- Observe that the withdrawal fails because receive() is blocked by nonReentrant.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A smart contract can have a special function that runs automatically when it receives cryptocurrency. Here, that function was locked so it could not run while another function was still executing, but the withdrawal process needed it to run at that exact moment. Because the lock blocked the required call, the withdrawal could never finish and the funds stayed stuck.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.