The Standard

The Standard
DeFiHardhat
20,000 USDC
View results
Submission Details
Severity: low
Invalid

The transfer of rewards is not checked in the`LiquidationPool.sol`::`claimRewards()` which leads to users losing their rewards on failure.

Summary

The transfer of rewards is not checked in theLiquidationPool.sol::claimRewards() which leads to users losing their rewards on failure.

Vulnerability Details

The ERC20 transfer function does not indicate failure by throwing an error but rather by returning false. It's good practice to check the return value of transfer and handle the failure case. transfer can return false on failure, which should be checked.

Impact

If the transfer fails but the contract proceeds as if it was successful (e.g., updating balances, deleting claims), the contract's state could be inconsistent with the actual token balances. users also will not receive their rewards.

Tools Used

Manual Review

Recommendations

this check should be added to the code

require(success, "Token transfer failed");``
Updates

Lead Judging Commences

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Known issue
Assigned finding tags:

unchecked-transfer

informational/invalid

Support

FAQs

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