Live
  • BTC$43,517▼ 15.70%
  • ETH$1,371▼ 13.36%
  • SOL$55.28▼ 18.36%
  • BNB$422.77▼ 17.30%
  • XRP$0.7108▼ 15.88%
  • DOGE$0.0446▼ 20.35%
  • GRAM$0.6783▼ 19.59%
  • ADA$0.1164▼ 16.92%
  • SHIB$0.00000288▼ 16.94%
  • PEPE$0.00000266▼ 18.55%

ICPSwap exploit: zero-output swaps moved pool prices and drained 6,227 ICP

ICPSwap's patch rejects swaps that return nothing, because those swaps could move a pool's price without charging the caller. The ICP ledger shows 21 pools down 6,227 ICP on 2 December 2026.

Official ICPSwap and Internet Computer logos above a hand-drawn whiteboard flow: swap sent, output zero, price still moves, caller charged zero, with a note on our 6,227 ICP ledger count and the Next 100X GEMS mark.

ICPSwap, a decentralized exchange on the Internet Computer, says an exploit on 2 December 2026 cost it "slightly over 6,000 ICP." The ICP ledger agrees on the size: the main ICP balances of 21 ICPSwap pools fell by 6,226.91 ICP that day, about $11,600 at $1.86 per ICP.

The cause sits in a code change ICPSwap merged on 2 December and linked on 4 December. Before it, a swap that returned nothing could still move a pool's price and record trading fees, and the caller paid no input. Swaps were still suspended in its 4 December post. ICPSwap says it expects to reopen liquidity withdrawals within 48 to 72 hours of its 4 December post and that it is prepared to cover the losses.

What ICPSwap has said, and when

ICPSwap's first public note, on X on 2 December, said the platform was "currently undergoing maintenance and upgrades" and that trading was paused. It did not mention an exploit. On 3 December a thread on the Internet Computer developer forum asked for an official statement, and users in it were already rebuilding the drain from the ledger.

The statement came on 4 December. "ICPSwap experienced an exploit the day before yesterday, resulting in an estimated loss of slightly over 6,000 ICP," it said, and that the vulnerability "was promptly identified and fixed." It linked the commit, f840997. Swaps stay off "until all code has undergone another comprehensive security audit." As of 5 December we found no post-mortem.

What was the swap check missing?

A pool of this kind holds liquidity in price ranges. A swap walks the price through those ranges, takes the trader's input and pays out the other token. The commit shows two steps that were not tied together.

First, the swap calculation updated the pool's price, its current range and its fee counters. Second, a separate function collected the trader's input, but only when the output was above zero. ICPSwap's own comment in the patch says so: the function "only debits the caller's input when the output is > 0, so committing a zero-output swap would move price/tick/fee growth without charging anyone."

So a swap that came out at zero, for instance through a stretch of price with no liquidity in it, changed the pool and cost the caller nothing. Our reading of the diff in src/SwapPool.mo is that the fix works out the output first and returns the error "Swap output is zero" before any state is saved.

The same commit adds a withdraw-only mode that pools start in. Only admins, whitelisted callers and the canister's controllers can swap or add liquidity. A follow-up on 4 December, version 3.7.7, also blocks plain deposits in that mode, and a separate change switches off creation of new pools.

ICPSwap's test script shows the sequence its developers were guarding against. One scenario, titled "narrow-range theft of another user's deposit," mints a one-unit position far above the market price, sends a large swap that returns zero to drag the price toward it, burns the position, and checks that the caller received nothing. A comment elsewhere in the script says that before the fix such a swap "moved the global price for free, enabling price manipulation that drains low-liquidity pools." That is a test, not a record of what happened on 2 December.

A forum post by a user called Henn91 describes a similar pattern on the LIQD/ICP pool. It says three cycles opened a position holding 0.00000001 LIQD but claiming 6.12e21 units of liquidity, about 174 billion times the pool's real active liquidity, and used a price limit near the top of the allowed range. It says that pool stayed solvent, with about 1.4 ICP to spare. That is one poster's reading of one pool, and ICPSwap has not confirmed the mechanism.

What the ICP ledger shows

Our data point, read on 5 December from the public ICP ledger API. We took the 21 pool canisters listed in a forum analysis by Menese Protocol, a team that integrates ICPSwap pools. For each, we derived the ICP account from the canister ID, rebuilt its balance from every transfer, and compared the balance before the first pool call on 2 December with the balance after the last.

PoolsICP beforeICP afterDrop
18 memecoin pools5,859.4767.235,792.24
3 further pools435.040.37434.67
All 216,294.5167.606,226.91

At $1.8649 per ICP, CoinGecko's 4 December price, the drop is about $11,613. Our per-pool figures match Menese's to within a cent, and the total sits just over ICPSwap's "slightly over 6,000." DefiLlama's entry for the incident lists $11,700. The count covers ICP in each pool's main account only. Menese says four larger pools also shed ICP in the same window, mostly to two arbitrage accounts, and we did not net those out.

Where did the ICP go?

Menese ties the drain to one principal, 2wuok-e3xnm-264cm-dhjqx-352pk-rmakg-civgk-ivzhv-isa6e-5ciw5-uqe. We checked its ledger account, 572e17ec…5bf3. It was funded with 9,434.09 ICP from one address, in four transfers on 1 December and one on 2 December. That day it made 234 transfers, 41 of them outgoing. Its last large ones were 7,000 and 900 ICP to a second address, cda77594…d911. Each was forwarded to a third address, 86a778f3…bbac, within two minutes. The third address has 8,663 transactions on the ledger.

We did not trace further and cannot say who controls any of these accounts. ICPSwap has not named anyone.

Menese also says the pools' internal books still credit users with 41,770.90 ICP against the 67.59 ICP they hold, including 30,573.31 ICP credited to that same principal. We did not check pool books, and we found no ICPSwap statement on how those credits will be treated.

Is 6,227 ICP the whole loss?

Not necessarily. ICPSwap calls its figure an estimate. Henn91 wrote on 3 December that the total was hard to work out because the activity spread across many pools. Menese notes that the history needed to say what liquidity providers in the larger pools lost sits with ICPSwap, which has not published it.

For other recent exploits where value left a protocol without the backing it implied, see Hydration's forged SPY price, ApeChain's native yield bug and the Pots Money exploit.

Sources

Next 100X GEMS Research

The research desk at Next 100X GEMS. Stories name the document they rely on, and a sponsored post is labeled as paid.

How the desk sources stories

Markets today

CoinPrice24h
BitcoinBTC$43,517−15.70%
EthereumETH$1,371−13.36%
SolanaSOL$55.28−18.36%
BNBBNB$422.77−17.30%
XRPXRP$0.7108−15.88%
DogecoinDOGE$0.0446−20.35%

Keep reading

More project news