Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The onlyNativeEthRestakeAdmin may never receive gas refunds from OperatorDelegator as anyone may forward the rewards to receive() #148

Closed
howlbot-integration bot opened this issue May 9, 2024 · 7 comments
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

Comments

@howlbot-integration
Copy link

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 admin

Proof of Concept

Withdrawals are created in EigenPod::verifyAndProcessWithdrawals(). After the time delay, they may be claimed in the router via DelayedWithdrawalRouter::claimDelayedWithdrawals(), as it is not permissioned. OperatorDelegator::receive() claims the gas refund to the admin whenever it matches the tx.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

@howlbot-integration howlbot-integration bot added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value 🤖_36_group AI based duplicate group recommendation bug Something isn't working sufficient quality report This report is of sufficient quality labels May 9, 2024
howlbot-integration bot added a commit that referenced this issue May 9, 2024
@c4-judge
Copy link
Contributor

alcueca marked the issue as satisfactory

@c4-judge c4-judge added satisfactory satisfies C4 submission criteria; eligible for awards and removed duplicate-149 labels May 16, 2024
@c4-judge c4-judge reopened this May 16, 2024
@c4-judge
Copy link
Contributor

alcueca marked the issue as selected for report

@c4-judge c4-judge added primary issue Highest quality submission among a set of duplicates selected for report This submission will be included/highlighted in the audit report labels May 16, 2024
@alcueca
Copy link

alcueca commented May 16, 2024

I like it when findings are clear and to the point.

@jatinj615 jatinj615 added the sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons label May 23, 2024
@c4-judge c4-judge added downgraded by judge Judge downgraded the risk level of this issue QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax and removed 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value labels May 27, 2024
@c4-judge
Copy link
Contributor

alcueca changed the severity to QA (Quality Assurance)

@c4-judge
Copy link
Contributor

alcueca marked the issue as not selected for report

@c4-judge c4-judge removed the selected for report This submission will be included/highlighted in the audit report label May 27, 2024
@c4-judge
Copy link
Contributor

alcueca marked the issue as grade-b

@alcueca
Copy link

alcueca commented May 27, 2024

The effect of gas refunds in the TVL is dust, therefore this is QA

@C4-Staff C4-Staff closed this as completed Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

5 participants