Closed c4-submissions closed 11 months ago
raymondfam marked the issue as sufficient quality report
raymondfam marked the issue as duplicate of #42
fatherGoose1 marked the issue as satisfactory
Dear @fatherGoose1,
I appreciate your judgment. I believe that the proof of concept and recommendations I provided are superior to the selected report. please review my report again for selecting as a selected report.
Thank you for your attention to this matter.
@0xmahdirostami This report and the one selected for the report both excel in explaining the issue and offering recommended steps to mitigate. No changes will be made.
Lines of code
https://github.com/code-423n4/2023-11-kelp/blob/c5fdc2e62c5e1d78769f44d6e34a6fb9e40c00f0/src/LRTDepositPool.sol#L109 https://github.com/code-423n4/2023-11-kelp/blob/c5fdc2e62c5e1d78769f44d6e34a6fb9e40c00f0/src/LRTOracle.sol#L52-L79
Vulnerability details
Summary
The attack vector and impact is the same as TOB-YEARN-003, where users may not receive shares in exchange for their deposits if the total asset amount has been manipulated through a large “donation”.
Impact
The attacker can profit from future users' deposits. While the late users will lose their funds to the attacker.
POC
for simpility add the follownig code in LRTDepositPool.sol:
and modify getRsETHAmountToMint function to call above function instead of orcale.getRSETHPrice function:
the following test will show the vulnerability:
output:
Tools Used
Manual review
Recommendations
To address this vulnerability, several mitigation strategies can be implemented:
By implementing these measures, the contract can secure itself against share manipulation, ensuring a fair distribution of shares to all users.
Assessed type
Other