BNB Chain
Accounting error

Biswap's $50.9K Loss and How Olympix Would Have Prevented It

Loss
Loss
Exploit date
November 24, 2026

A concentrated-liquidity pool keeps one number that every swap trusts: the active liquidity at the current price. Each unit of it is supposed to belong to a real position backed by real tokens. On November 24, 2026, at 20:24:58 UTC, an attacker found a way to make an old Biswap V3 pool on BNB Chain remember liquidity that nobody owned anymore, then traded against that ghost until the pool's BUSD was gone. The pool lost 50,993.98 BUSD and 0.3272 WBNB in a single transaction, about $50,936 at the hour's prices, and the attacker walked off with 50,553.92 BUSD.

TenArmor flagged the attack within hours and put the loss at about $50.6K, which matches what reached the attacker's wallet. SlowMist traced the root cause to burn(): when both withdrawal components at the current price point come out as zero, including a Y amount that rounds down to zero, the function skips decrementing active liquidity. The verified source of the pool's liquidity module confirms that reading line for line.

An Old Pool on a Winding-Down DEX

Biswap has run a DEX on BNB Chain since 2021, and its V3 exchange is what Defimon describes as an iZiSwap fork, a design where liquidity providers place tokens between price points and the pool tracks how much liquidity is live at the current one. The victim was a WBNB/BUSD pool at the BiswapPoolV3 contract, which TenArmor described as an old pool. The pool itself is thin: it holds state and forwards the real work to separate modules through delegatecall, so mint, burn and collect all run inside a contract called LiquidityModule.

In posts on X earlier this year, Biswap pointed users of its legacy V2 and V3 products to a withdrawal page and told them their assets were safe to pull out. Some liquidity stayed behind anyway. Going into the attack, this pool still held more than 50,990 BUSD, and that's what the attacker went after.

One Condition Guarding the Counter

Removing liquidity in this design touches two layers. The position's own record shrinks, and the pool's running total of active liquidity at the current point has to shrink with it. In BiswapPoolV3, that second update sits behind a condition. The burn() function in LiquidityModule, verified with an exact match on Sourcify, reads:

        if (withRet.yc > 0 || withRet.xc > 0) {
            state.liquidity = curLiquidity - liquidDelta;
            state.liquidityX = withRet.liquidityX;
            state.feeTimesL -= liquidDelta * lq.feeVote;
            state.fee = state.liquidity == 0 ? fee : normalizeFeeInRange(fee, uint16(state.feeTimesL / state.liquidity));
        }

The values xc and yc are the tokens owed from the current price point, and the same module computes yc by rounding down:

            withRet.yc = MulDivMath.mulDivFloor(withdrawnLiquidityY, sqrtPrice_96, TwoPower.Pow96);

At a normal price that floor barely matters. Push the price to the very bottom of the range, though, and sqrtPrice_96 gets so small that a sizable slice of liquidity is worth less than one wei of BUSD. The floor returns zero, xc is zero too, and the block that lowers state.liquidity never runs. The position is gone from the books, but the pool still counts its liquidity as live and will quote the next swap against it.

How the Attack Ran, Step by Step

The attacker's EOA called a helper contract it had deployed, and everything happened in one transaction in block 135,526,420. The token transfers and pool events lay the sequence out cleanly.

First, the helper borrowed 11,283 WBNB from PancakeSwap V3's WBNB pool in the 0.01% fee tier. It then sold 11,282.95 WBNB into the Biswap pool and received 50,993.98 BUSD, essentially every BUSD the pool held. That trade shoved the price to point minus 400,001, the bottom edge of the range, where the pool's recorded active liquidity was zero. On its own this was a terrible trade: thousands of WBNB for about $51K. The rest of the transaction existed to buy that WBNB back for nothing.

Next came the setup. The helper minted a fresh position of 4,847,000,000 liquidity units straddling the current point, which at that price cost it 500 wei of BUSD. The pool's state event after the mint showed active liquidity of 4,847,000,000.

Then the helper burned the position in ten equal slices of 484,700,000. Each burn paid out 0 WBNB and 48 wei of BUSD, so the current-point amounts rounded to zero every time, and the state event the pool emitted after each burn showed active liquidity still sitting at 4,847,000,000. After the tenth burn the position was empty, yet the pool believed all of that liquidity was still there.

With the ghost liquidity in place, the helper swapped 63,263 wei of BUSD back into the pool and received 11,283.28 WBNB, slightly more than it had sold in. The pool priced the climb from point minus 400,001 to minus 394,508 against liquidity that no position backed, so a dust-sized input bought out the whole WBNB side. The pool's final state event still showed 4,847,000,000 units of active liquidity. The helper then collected its 480 wei of burn proceeds.

To close out, the helper spent 440.06 BUSD on PancakeSwap V2 to buy 0.8011 WBNB, repaid the flash loan with 11,284.1283 WBNB including its fee, and sent 50,553.92 BUSD to the attacker's EOA. The Biswap pool was left with about 81.50 BUSD.

Where the Money Went and What Biswap Said

The 50,993.98 BUSD and 0.3272 WBNB that left the pool belonged to the liquidity providers who were still in it. Of that, 440.06 BUSD went to PancakeSwap V2 to cover the flash loan's fee, and 50,553.92 BUSD landed in the attacker's wallet. Lunaray and Arisk published similar root-cause summaries, with Arisk putting the loss at about $51,200, a figure that values BUSD at one dollar.

As of November 26, 2026, Biswap hadn't posted about the exploit on X or published a post-mortem, and no recovery or compensation plan had been announced.

How Olympix Would Have Caught the Ghost Liquidity

Olympix reads a contract as states, transitions and entry points, and uses the surrounding context to infer the invariants the system depends on. For a concentrated-liquidity pool, one of them is simple to state: the active liquidity at the current point must equal the sum of live positions covering that point. Every path that changes a position has to keep that total honest.

Static analysis would have surfaced the signal in burn() quickly. The function lowers a position's liquidity unconditionally through _updateLiquidity, then lowers the pool's matching total only inside a branch keyed to the token amounts. A running total that mirrors another quantity, updated on one side of a condition and not the other, is exactly the kind of path the engine narrows toward, because it touches the invariant directly.

BugPoCer starts from an invariant and searches for a sequence of calls that breaks it. Had Biswap's team run it against LiquidityModule, it would have looked for a burn where the floor in mulDivFloor zeroes both current-point amounts, and the bottom of the price range hands it one. It would have returned that sequence as a counterexample: push the price to the edge, mint a position across the current point, burn it, and observe active liquidity unchanged while the position reads zero. It would also have shown the payoff, a swap priced against liquidity no one owns, and generated a Forge test that replays the whole sequence. That test would have been the November 24 drain, produced in development, at the price of one failing assertion.

Tick-based pools have broken this way before. It's a close cousin of the skipped tick-crossing update that cost Ambient Finance $115K in June, where one piece of bookkeeping moved and its partner didn't.

The Lesson for Pool Builders

Rounding is a fact of fixed-point math, and paying out zero tokens on a tiny withdrawal is fine. The trouble starts when a payout amount is allowed to decide whether shared accounting gets updated. If a position leaves, its liquidity should leave the active total with it, regardless of what the token math rounded to. Old pools deserve the same scrutiny, since a deployment that stops getting attention can still hold real money.

If you're maintaining an AMM, a fork of one or any contract where a running total has to track positions underneath it, book a technical walkthrough to see how the engine maps those accounting paths and returns a runnable counterexample when one breaks.

On-Chain References

Exploit transaction: 0x13b8...f78c

Attacker EOA: 0x1ec9...90a5

Attack contract: 0x6161...40be

Victim pool (BiswapPoolV3 WBNB/BUSD): 0xc83f...b643

LiquidityModule (burn logic): 0xcbc5...44a1

Flash loan source (PancakeSwap V3 WBNB pool): 0x172f...f849

Fee leg (PancakeSwap V2 WBNB/BUSD): 0x58f8...dc16

See what Olympix finds on your own code

Send us a repo that's already been audited, and we'll run Olympix at the same commit and show you what comes back.