Submitted by cccz, also found by hyh and Czar102
In the _beforeTokenTransfer function, cooldowns will be set to 0 when the user transfers all tokens to himself.
Consider the following scenario:
Day 0: The user stakes 100 tokens and calls the cooldown function.
Day 10: the user wanted to unstake the tokens, but accidentally transferred all the tokens to himself, which caused the cooldown to be set to 0 and the user could not unstake.
HolyPaladinToken.sol#L891-L905
Kogaroshi (Paladin) confirmed, resolved, and commented:
0xean (judge) commented:
