The onlyNativeEthRestakeAdmin may never receive gas refunds from OperatorDelegator as anyone may forward the rewards to receive() #148
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
grade-b
primary issue
Highest quality submission among a set of duplicates
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
🤖_36_group
AI based duplicate group recommendation
satisfactory
satisfies C4 submission criteria; eligible for awards
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
sufficient quality report
This report is of sufficient quality
Lines of code
https://github.com/code-423n4/2024-04-renzo/blob/main/contracts/Delegation/OperatorDelegator.sol#L509-L516
https://github.com/Layr-Labs/eigenlayer-contracts/blob/dev/src/contracts/pods/DelayedWithdrawalRouter.sol#L100-L105
Vulnerability details
Impact
Admin never receives gas refunds as users abuse the fact that they may call
DelayedWithdrawalRouter::claimDelayedWithdrawals()
, not refunding the adminProof of Concept
Withdrawals are created in
EigenPod::verifyAndProcessWithdrawals()
. After the time delay, they may be claimed in the router viaDelayedWithdrawalRouter::claimDelayedWithdrawals()
, as it is not permissioned.OperatorDelegator::receive()
claims the gas refund to the admin whenever it matches thetx.origin
. However, if the tx is initiated by another user, no gas will be found in the mapping and the admin will not receive any refund.Users are incentivized to do this because the gas refund discounts their tvl.
Tools Used
Vscode
Recommended Mitigation Steps
The gas refund should just go to the trusted admin instead of
tx.origin
.Assessed type
Other
The text was updated successfully, but these errors were encountered: