code-423n4 / 2021-12-pooltogether-findings

0 stars 0 forks source link

A malicious ticket can drain the tokens #138

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

pauliax

Vulnerability details

Impact

Anyone can createPromotion with any arbitrary _ticket supposed it follows the proposed interface. Thus, it is possible to create a promotion with a malicious ticket that returns arbitrary values for getAverageBalanceBetween and getAverageTotalSuppliesBetween. When claiming the rewards, a malicious user can drain the contract by claiming more tokens than were transferred initially on createPromotion.

Recommended Mitigation Steps

Depending on the intentions, you can add auth checks on createPromotion, or add balance assertions that more tokens than entitled are not claimed from the promotion.

PierrickGT commented 2 years ago

Duplicate of https://github.com/code-423n4/2021-12-pooltogether-findings/issues/1