A few hours ago, a NEM liquidity pool on #BSC lost ~$820K in a price manipulation attack that exploited a flaw in the NEM token’s tax-settlement mechanism.
The vulnerability lay in _flushLpSellRecycle(), which calculated the burn amount using pendingLpSellRecycle and burned NEM directly from the liquidity pool’s balance. It then called sync() to update the reserves, allowing the pool’s NEM price to be manipulated.
The attack proceeded as follows: 1. Transferred NEM directly to the pool to simulate sells and increase pendingLpSellRecycle. 2. Invoked skim() to recover most of the transferred tokens, reducing the attack cost without reducing pendingLpSellRecycle. 3. Invoked flushLpSellRecycle() to burn NEM from the pool. The burn amount was calculated as 70% of the pending amount, subject to pool-balance caps. The subsequent sync() call reduced the recorded NEM reserve, increasing NEM’s price relative to USDT. 4. Repeated steps 1–3 to raise the price further, then swapped NEM for USDT to realize a profit.
Attack TX:
Link: https://t.co/rKlGXUD5Mf
