Submitted by jonah1005
Pool allows users to burn lp tokens without withdrawing the tokens. This allows the hacker to mutate the pools rate to a point that no one can get any lp token anymore (even if depositing token).
The liquidity tokens are calculated at Utils:calcLiquidityUnits
where P stands for totalSupply of current Pool. If P is too small (e.g, 1) then all the units would be rounding to 0.
Since any person can create a Pool at PoolFactory, hackers can create a Pool and burn his lp and set totalSupply to 1. He will be the only person who owns the Pools lp from now on. Pools burn logic and Utils lp token formula.
Heres a script of a user depositing 1M token to a pool where totalSupply equals 1
Output:
Recommend removing burn or restrict it to privileged users only.
verifyfirst (Spartan) confirmed:
