-
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
getRSETHPrice
can return wrong price and let users mint at a different rate
.
#223
Comments
raymondfam marked the issue as sufficient quality report |
raymondfam marked the issue as duplicate of #32 |
raymondfam marked the issue as insufficient quality report |
raymondfam marked the issue as not a duplicate |
raymondfam marked the issue as duplicate of #34 |
raymondfam marked the issue as sufficient quality report |
raymondfam marked the issue as not a duplicate |
raymondfam marked the issue as duplicate of #215 |
fatherGoose1 marked the issue as unsatisfactory: |
fatherGoose1 changed the severity to QA (Quality Assurance) |
Lines of code
https://github.com/code-423n4/2023-11-kelp/blob/f751d7594051c0766c7ecd1e68daeb0661e43ee3/src/LRTOracle.sol#L52-L79
https://github.com/code-423n4/2023-11-kelp/blob/f751d7594051c0766c7ecd1e68daeb0661e43ee3/src/LRTOracle.sol#L46
Vulnerability details
Impact
getRSETHPrice
can return wrong price and let users mint at adifferent rate
.Proof of Concept
getRSETHPrice
functioncbETH
,stETH
andrETH
.supportedAssests
(which equals 3) and calculates the value of each asset based on the currentER
for the asset and the amount of the assets deposits.10 ETH
deposited for each asset,10 for cbETH
,10 for stETH
and10 for rETH
.totalETHInPool
should result in30
assuming theassetER
retruns1
.assetER
returns 0 for one asset due to oracle failure?cbETH
. ThentotalETHInPool
will be equal to20 instead of 30
.return totalETHInPool / rsEthSupply;
rsEthSupply
should be30
as we deposited the30 eth
and the resulting price would be20 / 30 ~= 0.666666 ETH
which is obviously wrong. (it should be 1 or very close to 1)Tools Used
VS Code
Recommended Mitigation Steps
Make sure to check that oracle call didn't fail and that the
exchange rate
is not 0Assessed type
Invalid Validation
The text was updated successfully, but these errors were encountered: