-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rETH/ETH chainlink oracle has too long of heartbeat and deviation threshold which can cause unfair minting #300
Comments
raymondfam marked the issue as sufficient quality report |
raymondfam marked the issue as duplicate of #32 |
raymondfam marked the issue as not a duplicate |
raymondfam marked the issue as duplicate of #609 |
fatherGoose1 marked the issue as unsatisfactory: |
Thanks for judging @fatherGoose1, Could you explain the thought process for judging this specific issue and #148? As stated by the sponsor,
Commented by @fatherGoose1
If the price feeds are generally stable, I don't believe slippage will be a significant issue.
Would really appreciate some clarity on the distinction between the 2 issues! Thank again! |
I agree with the points raised by @Henrychang26 and as suggested in my report, given the high price of Eth and its derivatives depending upon the amount being deposited loss within the 2% bound can be still pretty significant. Also regarding the stable exchange rate, just have a look at the stETH exchange rate, in the last 24 hours it fluctuated by .5% and also spikes in stEth exchange rate are common, look at the following chart |
fatherGoose1 marked the issue as duplicate of #584 |
fatherGoose1 marked the issue as satisfactory |
fatherGoose1 changed the severity to 3 (High Risk) |
Lines of code
https://github.com/code-423n4/2023-11-kelp/blob/main/src/LRTOracle.sol#L52
https://github.com/code-423n4/2023-11-kelp/blob/main/src/oracles/ChainlinkPriceOracle.sol#L37
Vulnerability details
Impact
The reliance on the rETH/ETH Chainlink Oracle within the
ChainlinkPriceOracle
to evaluate the current RsETH token price may lead to inaccurate minting amounts.Proof of Concept
ChainlinkPriceOracle uses the rETH/ETH chainlink oracle to calculate the current price of the RsETH token. This token valuation is used to determine the amount of RsETH to mint. This is problematic since rETH/ETH has a 24 hour heartbeat and a 2% deviation threshold. This deviation in price could easily cause loss of funds to the user.
getAssetPrice()
uses the rETH/ETH oracle to determine the price which as stated above has a 24 hour hearbeat and 2% deviation threshold, this means that the price can move up to 2% or 24 hours before a price update is triggered. The result is that the on-chain price could be much different than the true rETH price.This price is used when determining how much RsETH to mint to the user. Since the oracle can be up to 2% different from the true price.
Higher True Price: If the actual price exceeds the feed, minters receive less RsETH than they are entitled to.
Lower True Price: Conversely, if the actual price is lower than the feed, the minter receives more RsETH than they should, leading to unfairness for previous stakers and instant profit for the minter.
https://data.chain.link/ethereum/mainnet/crypto-eth/reth-eth
Tools Used
Manual Review
Recommended Mitigation Steps
Chainlink currently does not support a different rETH data feed.
Consider using other price oracle as alternative option.
Assessed type
Oracle
The text was updated successfully, but these errors were encountered: