Renzo - golu's results

A protocol that abstracts all staking complexity from the end-user and enables easy collaboration with EigenLayer node operators and a Validated Services (AVSs).

General Information

Platform: Code4rena

Start Date: 30/04/2024

Pot Size: $112,500 USDC

Total HM: 22

Participants: 122

Period: 8 days

Judge: alcueca

Total Solo HM: 1

Id: 372

League: ETH

Renzo

Findings Distribution

Researcher Performance

Rank: 47/122

Findings: 1

Award: $18.20

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

Awards

18.1958 USDC - $18.20

Labels

bug
2 (Med Risk)
downgraded by judge
satisfactory
sufficient quality report
:robot:_28_group
duplicate-103

External Links

Lines of code

https://github.com/code-423n4/2024-04-renzo/blob/519e518f2d8dec9acf6482b84a181e403070d22d/contracts/RestakeManager.sol#L244

Vulnerability details

Impact

Loss of user Funds.

/// @dev Allows restake manager to remove a collateral token function removeCollateralToken( IERC20 _collateralTokenToRemove ) external onlyRestakeManagerAdmin { // Remove it from the list uint256 tokenLength = collateralTokens.length; for (uint256 i = 0; i < tokenLength; ) { if (address(collateralTokens[i]) == address(_collateralTokenToRemove)) { collateralTokens[i] = collateralTokens[collateralTokens.length - 1]; collateralTokens.pop(); emit CollateralTokenRemoved(_collateralTokenToRemove); return; } unchecked { ++i; } } // If the item was not found, throw an error revert NotFound(); }

Detail

In the protocol, the admin has the power to add and remove collateral tokens. Here, the crucial part is to remove the collateral token. Using removeCollateralToken function, the admin removes the addresses that have funds invested by users. This function doesn't check the current available balance of the protocol.

Here is the steps how it may accure :

  • Users deposit in RestakeManager.sol using the deposit function.

  • After a large chunk of money exists in the protocol, the admin removes the collateral address.

  • The user requests to withdraw collateral using the withdraw function.

  • The fund is in a cooling period. After the cooling period, the user calls the claim function, but it doesn't exist at that point. 

check the current balance when remove

Assessed type

Other

#0 - c4-judge

2024-05-17T13:59:26Z

alcueca marked the issue as not a duplicate

#1 - c4-judge

2024-05-17T13:59:42Z

alcueca marked the issue as duplicate of #271

#2 - c4-judge

2024-05-17T14:04:31Z

alcueca marked the issue as duplicate of #97

#3 - c4-judge

2024-05-17T14:05:46Z

alcueca marked the issue as unsatisfactory: Invalid

#4 - c4-judge

2024-05-20T04:34:14Z

alcueca changed the severity to 2 (Med Risk)

#5 - c4-judge

2024-05-20T04:41:21Z

alcueca marked the issue as satisfactory

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter