Kelp DAO | rsETH - roleengineer's results

A collective DAO designed to unlock liquidity, DeFi and higher rewards for restaked assets through liquid restaking.

General Information

Platform: Code4rena

Start Date: 10/11/2023

Pot Size: $28,000 USDC

Total HM: 5

Participants: 185

Period: 5 days

Judge: 0xDjango

Id: 305

League: ETH

Kelp DAO

Findings Distribution

Researcher Performance

Rank: 55/185

Findings: 1

Award: $76.02

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

76.0163 USDC - $76.02

Labels

bug
2 (Med Risk)
satisfactory
sufficient quality report
duplicate-197

External Links

Lines of code

https://github.com/code-423n4/2023-11-kelp/blob/main/src/LRTOracle.sol#L70

Vulnerability details

Impact

Value of totalAssetAmt could be calculated incorrectly (less than real), which produces incorrect rsETH price (less than real), which results in incorrect amount of rsETH tokens being minted (greater than real) by calling depositAsset function on LRTDepositPool. Results in real rsETH price drop.

totalAssetAmt is calculated incorrect, when asset strategy was changed by LRTConfig admin and previous strategy still holds significant amount of asset, which cannot be withdrawn due to previous strategy paused withdrawals by EigenLayer protocol.

It could happen, as option of several strategies per asset in EigenLayer protocol is ignored by current implementation: LRTConfig stores only one strategy per asset (with ability to update) and to get staked amount by NodeDelegator getAssetBalance function is used in LRTDepositPool function getAssetDistributionData.

Proof of Concept

Prerequisites:

  • NodeDelegator deposited significant amount of asset into strategy#1.
  • EigenLayer paused strategy#1 withdrawals.
  • EigenLayer whitelisted strategy#2 for the same asset.
  • LRTConfig admin updated asset strategy (replaced strategy#1 with strategy#2).

Call flow:

Tools Used

Test can be added on request.

Consider in implementation several strategies per asset or store staked amounts inside a protocol and read one slot per asset instead of external calls.

Assessed type

Context

#0 - c4-pre-sort

2023-11-16T20:38:03Z

raymondfam marked the issue as sufficient quality report

#1 - c4-pre-sort

2023-11-16T20:38:13Z

raymondfam marked the issue as duplicate of #197

#2 - c4-judge

2023-12-01T17:24:53Z

fatherGoose1 marked the issue as unsatisfactory: Invalid

#3 - c4-judge

2023-12-08T17:26:11Z

fatherGoose1 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