Submitted by Krace, also found by SBSecurity, spark, adriro, Madalad, peanuts, adam-idarrha, Phantasmagoria, Aymen0909, CatsSecurity, SandNallani, chaduke, AlexCzm, deth, bronze_pickaxe, osmanozdemir1, ast3ros, zach, m_Rassska, jasonxiale, mahyar, pep7siup, twcctop, ck, joaovwfreire, GREY-HAWK-REACH, 0xDING99YA, zhaojie, qpzm, TheSchnilch, gumgumzum, QiuhaoLi, 0xrugpull_detector, Aamir, almurhasan, ayden, wisdomn_, peter, max10afternoon, rouhsamad, SpicyMeatball, rvierdiiev, crack-the-kelp, Ruhum, ke1caM, ptsanev, mahdirostami, Banditx0x, critical-or-high, T1MOH, ubl4nk, Bauer, and btk
https://github.com/code-423n4/2023-11-kelp/blob/c5fdc2e62c5e1d78769f44d6e34a6fb9e40c00f0/src/LRTDepositPool.sol#L95-L110
https://github.com/code-423n4/2023-11-kelp/blob/c5fdc2e62c5e1d78769f44d6e34a6fb9e40c00f0/src/LRTOracle.sol#L52-L79
The first staker can potentially manipulate the price of rsETH through a donation attack, causing subsequent stakers to receive no rsETH after depositing. The first staker can exploit this method to siphon funds from other users.
The mining amount of rsETH is calculated in function getRsETHAmountToMint which directly utilizes the total value of the asset divided by the price of a single rsETH.
Subsequently, the price of rsETH is related to its totalSupply and the total value of deposited assets.
The total value of deposited assets comprises three parts: the assets in LRTDepositPool, the assets in NodeDelagator, and the assets in the eigenlayer. Anyone can directly contribute asset tokens to LRTDepositPool or NodeDelegator to augment the total value of deposited assets.
Therefore, the price of rsETH is susceptible to manipulation by the first staker, considering the following scenario:
Here is the test, add it to test/LRTDepositPoolTest.t.sol and run with forge test --match-test test_ControlPrice -vv.
For example, if Bob deposit 10000 USDC, then the rsethAmountToMint is (10000 ether * 1) / (10001)ether = 0
Moreover, there is no check on the actual amount of rsETH received by the user, and the execution continues even if this amount is zero.
It is recommended to pre-mint some rsETH tokens to prevent price manipulation or ensure that the rsethAmountToMint is greater than zero.
gus (Kelp) disagreed with severity and commented:
manoj9april (Kelp) confirmed
0xDjango (judge) commented:
manoj9april (Kelp) commented:
0xDjango (judge) commented:
gus (Kelp) confirmed and commented:
