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

WithdrawQueue contract cannot claim EigenLayer ecosystem rewards #468

Open
howlbot-integration bot opened this issue May 10, 2024 · 6 comments
Open
Labels
bug Something isn't working downgraded by judge Judge downgraded the risk level of this issue grade-b Q-35 QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue 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/Withdraw/WithdrawQueue.sol#L214

Vulnerability details

Impact

The WithdrawQueue is unable to claim airdrops accumulated from ezETH points, EigenLayer points, AVS points, etc.

Proof of Concept

When a user calls the withdraw function of WithdrawQueue to initiate a withdrawal, the user's ezETH will be transferred to the WithdrawQueue contract.

WithdrawQueue.sol#L206-L214

    function withdraw(uint256 _amount, address _assetOut) external nonReentrant {
        // ...
        // transfer ezETH tokens to this address
        IERC20(address(ezETH)).safeTransferFrom(msg.sender, address(this), _amount);

This means that the WithdrawQueue contract starts holding ezETH and begins accumulating points, including ezETH points, EigenLayer points, AVS points, as well as potential future project incentives, and so on.

However, WithdrawQueue lacks a flexible function to claim the corresponding token airdrop rewards when the aforementioned points mature.

Tools Used

Manual Analysis

Recommended Mitigation Steps

Add a function that allows only the WithdrawQueue admin to call it, enabling flexible invocation of arbitrary contracts. For example:

function execute(address _to, uint256 _value, bytes memory _data) external onlyWithdrawQueueAdmin {
    (bool success, ) = payable(_to).call{ value: _value }(_data);
    if (!success) revert("Execution failed");
}

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 bug Something isn't working sufficient quality report This report is of sufficient quality labels May 10, 2024
howlbot-integration bot added a commit that referenced this issue May 10, 2024
@jatinj615
Copy link

airdrops and points are accumulated offchain.

@jatinj615 jatinj615 added the sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue label May 20, 2024
@alcueca
Copy link

alcueca commented May 23, 2024

@jatinj615, the warden is stating that if the WithdrawQueue will hold tokens that might make it accumulate rewards, and often these rewards need to be claimed by the address accumulating them.

Tbh, this is QA

@c4-judge c4-judge added downgraded by judge Judge downgraded the risk level of this issue and removed 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value labels May 23, 2024
@c4-judge
Copy link
Contributor

alcueca changed the severity to QA (Quality Assurance)

@c4-judge c4-judge added the QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax label May 23, 2024
@c4-judge
Copy link
Contributor

alcueca marked the issue as grade-a

@jatinj615
Copy link

No, that is a wrong assumption as we have already proven with both renzo airdrop and EigenLayer airdrop that we exclude our contracts from accumulating any points. It has to be indexed offchain.

@c4-judge
Copy link
Contributor

alcueca marked the issue as grade-b

@c4-judge c4-judge added grade-b and removed grade-a labels May 24, 2024
@C4-Staff C4-Staff added the Q-35 label 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 Q-35 QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue sufficient quality report This report is of sufficient quality
Projects
None yet
Development

No branches or pull requests

4 participants