RsETHAdapter::_stake() does not have any checks on the amount of RSETH minted during depositETH call
Summary
RsETHAdapter::_stake() only ensures that the amount of RSETH minted is not 0, however no other checks are in place to ensure that an appropriate amount of RSETH was minted for the deposit amount. The amount is not returned during the call, and no upstream calls check this amount either.
rsETHPrice is based off of the asset price of all currently utilised assets, meaning that all of these asset prices directly affect RSETH price. Currently there are 3 supported tokens that determine the price:
0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84 = Lido: stETH0xA35b1B31Ce002FBF2058D22F30f95D405200A15b = Stader ETHx0xac3E018457B222d93114458476f3E3416Abbe38F Frax sfrxETH
The fact that 3 of these LST tokens determine the price of RSETH means that RSETH price will be directly affected (proportionally to holdings) of any fluctuations of the price of these tokens.
Impact
When any of the LST tokens outlined have a price spike due to demand, it will cause the price of RSETH to increase leading to a worse minting price for the protocol, which can lead to losses.
BiasedMerc
medium
RsETHAdapter::_stake() does not have any checks on the amount of RSETH minted during depositETH call
Summary
RsETHAdapter::_stake()
only ensures that the amount ofRSETH
minted is not 0, however no other checks are in place to ensure that an appropriate amount ofRSETH
was minted for the deposit amount. The amount is not returned during the call, and no upstream calls check this amount either.Vulnerability Detail
RsETHAdapter::_stake()
When calling
RSETH_DEPOSIT_POOL.depositETH
, 0 amount is passed as the minimumRSETH
expected: LRTDepositPool::depositETH()LRTDepositPool::getRsETHAmountToMint()
The amount of
RSETH
minted during the call if based on the current exchange rate fetched from the lrtOracle::rsETHPrice()rsETHPrice
is based off of the asset price of all currently utilised assets, meaning that all of these asset prices directly affectRSETH
price. Currently there are 3 supported tokens that determine the price:0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84 = Lido: stETH
0xA35b1B31Ce002FBF2058D22F30f95D405200A15b = Stader ETHx
0xac3E018457B222d93114458476f3E3416Abbe38F Frax sfrxETH
The fact that 3 of these LST tokens determine the price ofRSETH
means thatRSETH
price will be directly affected (proportionally to holdings) of any fluctuations of the price of these tokens.Impact
When any of the LST tokens outlined have a price spike due to demand, it will cause the price of
RSETH
to increase leading to a worse minting price for the protocol, which can lead to losses.Code Snippet
RsETHAdapter::_stake() LRTDepositPool::depositETH() LRTDepositPool::getRsETHAmountToMint() lrtOracle::rsETHPrice()
Tool used
Manual Review
Recommendation
Ensure a minimum value of non-zero is passed to LRTDepositPool::depositETH() to ensure the protocol does not mint at unfavourable prices.
Duplicate of #26