The attack on the LULA token on the BNB Smart Chain is not a typical exchange hack. The attacker did not exploit vulnerabilities in PancakeSwap, but cleverly deceived the protocol itself by using a flaw in the token's code. The result: approximately $578,000 drained from the liquidity pool without a single DEX hack.

The incident, reported simultaneously by several X investors, revealed a new class of threats: reserve manipulation through internal smart contract functions. LULA was trading in a liquidity pool on PancakeSwap, and the problem lay not in the exchange itself, but in the token's code.

How the reserve manipulation worked

At the core of the attack was the recycle() function. It granted the Rental contract two critical permissions:

  • To withdraw LULA directly from the PancakeSwap V2 pair;
  • To call the sync() function, which adjusted the pair's recorded reserves to match the new, already distorted balances.

Imagine the pool as a scale: on one side is USDT, on the other is LULA. The price is determined by the ratio of volumes. An ordinary trader can only move coins from one side to the other through swaps. recycle(), however, allowed tokens to be removed from one side externally, while sync() forced the scale to recognize the new position as fair.

The sequence of actions, as described by BlockSec Phalcon, was as follows:

  • A large swap of USDT for LULA, which inflated the USDT reserve in the pair;
  • Multiple calls to recycle(), reducing the LULA reserve;
  • A reverse swap of a small amount of LULA, which drained the pool's liquidity.

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

операции мошенников
Part of the attacker's operations.

Preparation over 12 days

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

For the main stage, a flash loan of approximately $237 million was used. A flash loan works like money borrowed for a few seconds on good faith: the borrower must repay the amount within the same transaction, otherwise it is entirely reversed. No personal capital is needed, making this tool 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.

My expert commentary: This case is a stark reminder that the security of a DeFi project is not limited to auditing liquidity pools. The token's own code is the first line of defense. Investors should more carefully study contract functionality, especially the presence of "admin" functions that can manipulate reserves. The market does not forgive negligence in code.