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

0 stars 0 forks source link

withdraw timelock can be circumvented #91

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

cmichel

Vulnerability details

One can withdraw the entire PrizePool deposit by circumventing the timelock. Assume the user has no credits for ease of computation:

Impact

Users don't need to wait for their deposit to contribute their fair share to the prize pool. They can join before the awards and leave right after without a penalty which leads to significant issues for the protocol. It's the superior strategy but it leads to no investments in the strategy to earn the actual interest.

Recommended Mitigation Steps

The unlock timestamp should be increased by duration each time, instead of being reset to the duration.

asselstine commented 3 years ago

Mitigation:

If a user's timelock balance is non-zero, the prize strategy rejects the ticket burn.