Stratax Contracts

First Flight #57
Beginner FriendlyDeFi
100 EXP
View results
Submission Details
Impact: medium
Likelihood: medium
Invalid

Return Value of `aavePool.repay` Ignored, Potentially Miscomputing Withdrawn Collateral

Return Value of aavePool.repay Ignored, Potentially Miscomputing Withdrawn Collateral

Description:
repay() returns the actual amount repaid, but the contract ignores this value and assumes _amount was fully repaid when computing collateral withdrawal.

Impact:
If the repaid amount is lower than _amount, the contract may attempt to withdraw more collateral than allowed, causing reverts or incorrect accounting.

Recommended Mitigation:

- aavePool.repay(_asset, _amount, 2, address(this));
+ uint256 repaid = aavePool.repay(_asset, _amount, 2, address(this));
+ require(repaid == _amount, "Partial repay");
Updates

Lead Judging Commences

izuman Lead Judge 16 days ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!