The getWstethUsdPrice()
function is being called without using the lookback
parameter if it's the WSTETH token.
The function uses a constant value of 0
for the lookback
parameter when calling LibWstethUsdOracle.getWstethUsdPrice()
.
So it always returns the current spot price for wstETH
.
It's always returning the current price instead of TWAP for wstETH
.
This could lead to inaccurate calculations in calling this getTokenPrice
for wstETH
.
Manual review
It's recommended to use the lookback
parameter instead of 0
.
uint256 wstethUsdPrice = LibWstethUsdOracle.getWstethUsdPrice(lookback);
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.