When a user tries to claim its rewards using the LiquidationPool::claimRewards() function, in case the token transfer fails without reverting, the user won't be able to claim it again as the storage variable responsible for keeping track of the rewards will be deleted.
https://github.com/Cyfrin/2023-12-the-standard/blob/main/contracts/LiquidationPool.sol#L175
https://github.com/Cyfrin/2023-12-the-standard/blob/main/contracts/LiquidationPool.sol#L170
This will result in a loss of funds for the user.
The function responsible for claiming the accrued awards is the following
It goes through all the _tokens allowed by the protocol and if the user accrued rewards for the current token, the entry containing these informations is first deleted then the token transfer occures.
As ERC20 implementations differ from one another, the transfer may not revert in case it fails (it could just return false, for example) but the function will still exit successfully.
Since the mapping has been deleted, the rewards will be stuck in the contract.
Manual analysis
Use the safeTransfer() function from SafeERC20.sol just like in https://github.com/Cyfrin/2023-12-the-standard/blob/main/contracts/LiquidationPool.sol#L154
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.