code-423n4 / 2023-11-kelp-findings

13 stars 11 forks source link

Upgraded Q -> 2 from #776 [1701456793936] #888

Closed c4-judge closed 10 months ago

c4-judge commented 10 months ago

Judge has assessed an item in Issue #776 as 2 risk. The relevant finding follows:

[Low-01] No minimum Amount(rsETH) receive parameter absent in depositAsset() Here we can see that User deposit asset via depositAsset() which take asset address and asset depositAmount as parameter Then rsethAmountMinted calculated via _mintRsETH() - where it fetch corresponding asset price from oracle - then use formula (amount * assetPrice)/rsETHPrice to calculate rsethAmountMinted

Problem here is that if something go wrong with Oracle, then fetched price is mismatched with actual value Then User may receive less amount than he intended, may be there a huge slippage.

function depositAsset( 
    address asset,
    uint256 depositAmount,

And it should be check against rsethAmountToMint in _mintRsETH() before minting

c4-judge commented 10 months ago

fatherGoose1 marked the issue as nullified

c4-judge commented 10 months ago

fatherGoose1 marked the issue as unsatisfactory: Invalid