A major attack on the LULA token on the BNB Smart Chain resulted in the theft of approximately $578,000 from the liquidity pool of the decentralized exchange PancakeSwap. The incident is notable because the attacker did not need to hack the exchange itself — the vulnerability was embedded directly in the token's code.

How Reserve Manipulation Works

The key element of the attack was the recycle() function. It granted the Rental contract two critical rights: directly withdrawing LULA tokens from the PancakeSwap V2 pair and calling the sync() function, which synchronizes the pair's accounting reserves with its actual, already distorted balances.

The mechanism of a liquidity pool on a DEX can be imagined as a scale with two pans: one holds USDT, the other holds LULA. The price is determined by the ratio of volumes. An ordinary trader can only move coins from one pan to the other through swaps. However, the recycle() function allowed removing tokens from one pan, while sync() forced the "scale" to recognize the new position as fair.

Specialists from BlockSec Phalcon describe the sequence of actions as follows: a large swap of USDT for LULA, inflating the USDT reserve in the pair; repeated calls to recycle(), reducing the LULA reserve; and a reverse swap of a small amount of LULA, which literally drains the pool's liquidity.

The essence of the maneuver is that the fewer tokens remain on one pan of the scale, the more expensive each of them becomes. By artificially compressing the volume of LULA in the pair, the attacker exchanged a small number of tokens at a fictitiously inflated rate.

Preparation Over 12 Days

The attack was not spontaneous. 12 days before the exploit, the hacker deployed auxiliary contracts to accumulate referral and team rewards. The pre-prepared right to payouts became the entry point: the claimReward() → recycle() chain allowed maximizing the deflationary effect — compressing the number of tokens in circulation.

For the main stage, a flash loan of approximately $237 million was used. A flash loan is a tool that works like money borrowed for a few seconds on trust: the borrower must repay the amount within the same transaction, otherwise it is entirely reversed. No personal capital is needed for this, so such a tool is often used to amplify price manipulations. The borrowed funds were used to withdraw LULA from the DEX pool, enhancing the effect of the recycle() calls.

Expert opinion: This case is yet another reminder that in DeFi, a project's security is determined not only by the reliability of the exchange but also by the quality of the token's own code. Investors should be extremely cautious about projects with non-trivial tokenomics and functions that affect the balance of liquidity pools.