safeTransfer()
can make user miss rewards đĸInconsistent usage of transfer()
and safeTransfer()
trhoughout the codebase can lead to user missing rewards.
When dealing with the whitelisted assets (those the team has deemed as valid collateral) they sometimes use safeTransfer()
and other just transfer()
. For example when dealing with collateral removal opearations they use the safe version but when users claim rewards they use the traditional transfer.
Transfer is used in another function but the main problem resides here: claimRewards()
in LiquidationPool
. The way this function is programmed makes it so if the tx sending the rewards fails silently then the user wont be able to claim them again as the state that tracks them would be deleted.
Follow the numbers 1ī¸âŖ in the code for a clearer explanation.
âšī¸ Note đ:
forwardRemainingRewards()
inLiquidationPoolManager
also usestransfer()
. But here I didn't see any problem some tx failing momentarily should not be a problem as rewards can be forwarded next time a liquidation occures.
Manual review.
Use safeTransfer()
for at least the claimRewards()
function in the LiquidationPool
contract.
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.