cancelPromotion() Does Not Send Promotion Tokens Back to the Creator #36
Labels
1 (Low Risk)
Assets are not at risk. State handling, function incorrect as to spec, issues with comments
bug
Something isn't working
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
Handle
Meta0xNull
Vulnerability details
Impact
@notice Cancel currently active promotion and send promotion tokens back to the creator.
The Notice Mention Token Send Back to the Creator.
_promotion.token.safeTransfer(_to, _remainingRewards);
But in the code, Token Send to _to.
Proof of Concept
https://github.com/pooltogether/v4-periphery/blob/ceadb25844f95f19f33cb856222e461ed8edf005/contracts/interfaces/ITwabRewards.sol#L56
https://github.com/pooltogether/v4-periphery/blob/b520faea26bcf60371012f6cb246aa149abd3c7d/contracts/TwabRewards.sol#L133
Tools Used
Manual Review
Recommended Mitigation Steps
Since the Creator is msg.sender, should Transfer Tokens back to msg.sender.
_promotion.token.safeTransfer(msg.sender, _remainingRewards);
In cancelPromotion(), Remove Input address _to.
The text was updated successfully, but these errors were encountered: