Open c4-bot-1 opened 8 months ago
0xEVom marked the issue as sufficient quality report
0xEVom marked the issue as duplicate of #281
jhsagd76 changed the severity to QA (Quality Assurance)
jhsagd76 marked the issue as grade-b
This previously downgraded issue has been upgraded by jhsagd76
jhsagd76 changed the severity to QA (Quality Assurance)
Lines of code
https://github.com/code-423n4/2024-03-revert-lend/blob/main/src/V3Vault.sol#L372-L375 https://github.com/code-423n4/2024-03-revert-lend/blob/main/src/V3Vault.sol#L378-L381 https://github.com/code-423n4/2024-03-revert-lend/blob/main/src/V3Vault.sol#L1175-L1179
Vulnerability details
Impact
The
lendExchangeRateX96
is dependent upon the utilization rate of debt in the Vault.Due to unfavorable timing, this rate can change after a user has called
redeem
orwithdraw
but prior to the transaction being confirmed. Since the Vault is lacking any slippage checks, the user may receive fewer assets or burn more shares than expected.Proof of Concept
Withdraw and redeem functions contain no slippage checks.
Tools Used
Manual Review
Recommended Mitigation Steps
Both withdraw/redeem functions should include slippage protection parameters provided by the users (either minimum amount out for redeem function or maximum shares in for withdraw function).
Assessed type
Context