Closed code423n4 closed 2 years ago
Jujic
The require statement in the `cancelPromotion()' method can be placed earlier to reduce gas usage on revert
https://github.com/pooltogether/v4-periphery/blob/b520faea26bcf60371012f6cb246aa149abd3c7d/contracts/TwabRewards.sol#L128
L128: can be placed at the very top of the function
Relocate the said require statement
Duplicate of https://github.com/code-423n4/2021-12-pooltogether-findings/issues/35
Handle
Jujic
Vulnerability details
Impact
The require statement in the `cancelPromotion()' method can be placed earlier to reduce gas usage on revert
Proof of Concept
https://github.com/pooltogether/v4-periphery/blob/b520faea26bcf60371012f6cb246aa149abd3c7d/contracts/TwabRewards.sol#L128
L128: can be placed at the very top of the function
Tools Used
Recommended Mitigation Steps
Relocate the said require statement