Lucene search

K
code423n4Code4renaCODE423N4:2023-11-KELP-FINDINGS-ISSUES-894
HistoryDec 08, 2023 - 12:00 a.m.

Upgraded Q -> 3 from #534 [1702060375162]

2023-12-0800:00:00
Code4rena
github.com
7
upgraded q
issue 534
3 risk
steth/eth oracle
long heartbeat
2% deviation
fund loss
steth/usd oracle
decimal calculation
tokens

7.1 High

AI Score

Confidence

Low

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

[L-03] Consider use stETH/UDS oracle
Issue Description: The sponsor has confirmed their choice of Chainlink as an oracle to fetch prices. Since all other LST price feeds are 18 decimal places, they will most likely use stETH/ETH price feeds. However, this feed has a long heartbeat and a 2% deviation threshold, which could lead to fund loss. The 24-hour heartbeat and 2% deviation threshold mean the price can move up to 2% or remain unchanged for 24 hours before triggering a price update. This could result in the on-chain price being significantly different from the true stETH price, leading to incorrectly calculated rsETH to mint.

Recommendation:

Consider using the stETH/USD oracle instead, as it offers a 1-hour heartbeat and a 1% deviation threshold. To accommodate this change, also need to adjust the decimal calculation in LRTOracle::getAssetPrice to multiply by 18 ** (token.decimal - pricefeed.decimal) or a similar factor. This adjustment ensures that the price of all tokens is returned with the same decimal precision.


The text was updated successfully, but these errors were encountered:

All reactions

7.1 High

AI Score

Confidence

Low