Open code423n4 opened 2 years ago
@LilYeti : These are equivalent in the code, since before the evaluation of this function completes, sendCollateralsUnwrap is called on the redeemed collateral.
Therefore the rewards for the redeemer are ended, before they would be able to gain any rewards. Also, the existing rewards do not transfer to the new owner anyway, only new rewards from that time on do. So, this would not be a problem anyway.
Essentially, They will receive the unwrapped version anyway
Downgrading to a code clarity issue.
Handle
WatchPug
Vulnerability details
https://github.com/code-423n4/2021-12-yetifinance/blob/5f5bf61209b722ba568623d8446111b1ea5cb61c/packages/contracts/contracts/TroveManagerRedemptions.sol#L310-L312
Per the comment:
However, the current implementation will still grant rights to future rewards to the
_redeemCaller
, which we believe is a mistake.As a result, this can cause the
_redeemCaller
to be able to callWJLP.claimReward()
and claim more rewards than expected.Recommendation
Change to: