Root cause is in “transfer” function. When transfer token to uniswap pair, balance of uniswap pair is automatically decreased and “sync” is called.
If someone transfers many Fire tokens to uniswap pair, balance of uniswap pair gets smaller and reserve value also gets smaller.
Hacker exchanged 20 eth to Fire, about 200 Fire tokens remaining in pair. Then, he transferred the same amount of Fire to uniswap pair, reserve value for Fire token got much smaller.
After that, he called “swap” of uniswap pair, he could get much more tokens because of decreased reserve value.
He repeated this several times, gained about $20k.
Leave a Reply