Submitted by max10afternoon, also found by 0xhacksmithh, ge6a, btk, anarcheuz, adriro, Aymen0909, Pechenite, 0xMilenov, turvy_fuzz, ck (1, 2), hals (1, 2), Daniel526, Shaheen, PENGUN, glcanvas, 0xbrett8571, 0xmystery, and Bauer (1, 2)
The depositAsset function of the LRTDepositPool contract, enables users to deposit assets into the protocol, getting RSETH tokens in return. The function doesnt have any type of slippage control; this is relevant in the context of the depositAsset function, since the amount of tokens received by the user is determined by an interaction with an oracle, meaning that the amount received in return may vary indefinitely while the request is waiting to be executed.
Also the users will have no defense against price manipulations attacks, if they where to be found after the protocols deployment.
As can be observed by looking at its parameters and implementation, the depositAsset function of the LRTDepositPool contract, doesnt have any type of slippage protection:
Meaning that users have no control over how many RSETH tokens they will get in return for depositing in the contract.
The amount of tokens to be minted, with respect to the deposited amount, is determined by the getRsETHAmountToMint function of the same contract (inside of _mintRsETH):
As can be observed, this function uses two oracle interactions to determine how many tokens to mint, getAssetPrice and getRSETHPrice (with getRSETHPrice internally calling getAssetPrice as well).
The getAssetPrice function queries the external oracle for the asset price:
Meaning that the user has no way to predict how many RSETH they will get back at the moment of minting, as the price could be updated while the request is in the mempool.
Here is a very simple foundry script that shows that an oracle price modification, can largely impact the amount of tokens received in return by the user (implying that the depositAsset function has no protection against it).
An additional parameter could be added to the depositAsset function, to let users decide the minimum amount of tokens to be received, with a relative check after minting.
gus (Kelp) confirmed
manoj9april (Kelp) disagreed with severity and commented:
0xDjango (judge) commented:
For this audit, 125 reports were submitted by wardens detailing low risk and non-critical issues. The report highlighted below by m_Rassska received the top score from the judge.
The following wardens also submitted reports: CatsSecurity, Pechenite, hals, 0xepley, 0xffchain, btk, hunter_w3b, turvy_fuzz, adriro, anarcheuz, Madalad, spark, ge6a, shealtielanz, _thanos1, 0xAadi, phoenixV110, rouhsamad, poneta, 0xvj, Udsen, SandNallani, gesha17, Topmark, dipp, adeolu, leegh, tallo, osmanozdemir1, cartlex_, RaoulSchaffranek, Matin, ZanyBonzy, cheatc0d3, Tumelo_Crypto, GREY-HAWK-REACH, twcctop, bronze_pickaxe, Yanchuan, gumgumzum, 0xHelium, Amithuddar, Inspecktor, sakshamguruji, jasonxiale, joaovwfreire, 0xblackskull, 0xLeveler, baice, SBSecurity, xAriextz, niser93, ro1sharkm, hihen, Phantasmagoria, McToady, bareli, 0x1337, Aamir, almurhasan, eeshenggoh, seerether, zhaojie, Bauchibred, Soul22, ayden, lsaudit, deepkin, chaduke, AerialRaider, Shaheen, Cryptor, boredpukar, TeamSS, alexfilippov314, Draiakoo, Daniel526, amaechieth, zach, squeaky_cactus, crack-the-kelp, King_, MatricksDeCoder, Noro, circlelooper, wisdomn_, 0xrugpull_detector, pep7siup, Juntao, paritomarrr, soliditytaker, ziyou-, codynhat, passion, catellatech, supersizer0x, stackachu, evmboi32, TheSchnilch, taner2344, glcanvas, marchev, Stormreckson, rvierdiiev, Eigenvectors, PENGUN, ElCid, ke1caM, 0xluckhu, desaperh, debo, merlinboii, ABAIKUNANBAEV, pipidu83, LinKenji, 0xbrett8571, 0xmystery, zhaojohnson, critical-or-high, MaslarovK, T1MOH, ubl4nk, Bauer, and Tadev.
