Crypto exploits

XDKRecycle exploit analysis

XDK's own public recycle path, meant to move XDK out of its PancakeSwap pair under a daily cap, treated any plain transfer to the pair as a sell, letting a flash-borrowed attacker reset and drain the cap with transfers it reclaimed via the pair's skim(). DeFiHackLabs reports a loss of 6.84 WBNB, confirmed on-chain by the attack transaction's block and timestamp.

David

Security ·

Reported loss
6.84 WBNB, per DeFiHackLabs
Occurred
Logged
Chain
BNB Smart Chain

Logged as “2026-02-16: Xdk Recycle Reserve Manipulation on XDKRecycle”.

Analysis3 min read

XDK traded against GPC on a PancakeSwap pair on BNB Smart Chain and carried a "recycle" mechanism: any transfer that lands on the XDK/GPC pair counts as a sell, and once a sell clears the pair's trade fee, the contract pulls a slice of the dead wallet's share of the pool's XDK out to DEAD_WALLET and tops up its own rewardPoolBalance, then calls the pair's sync() so its recorded reserve matches. That pull is capped once a day by thisRecycleMaxBalance, set to 10 percent of whatever XDK balance the pair holds the first time the daily cooldown reopens, and every individual transfer into or out of the pair is separately capped under 10 percent of the live reserve.

The published PoC, `XDKRecycle_exp.sol`, reconstructs the attack as a single flash-swap transaction against the WBNB/GPC pair. Inside the swap callback, the attacker:

  1. if the daily recycle window looked stale, sent 1 GPC into the XDK/GPC pair, swapped it for a trace of XDK, then sent that XDK back to the pair and called its skim() to reclaim it, a transfer that counts as a sell and resets the window without costing anything
  2. spent the borrowed GPC buying XDK from the XDK/GPC pair in steps just under a tenth of its reserve each time
  3. sold XDK back into the pair in the same under-a-tenth steps, each one landing as a plain transfer() immediately reclaimed with skim(), until the day's recycle cap was reached
  4. sold whatever XDK remained for GPC through ordinary pair swaps
  5. repaid the flash swap in GPC and converted the surplus to WBNB

XDK's verified source, read on Sourcify, confirms the mechanism the PoC assumes rather than leaving it a guess. The vulnerable function is _recycleFromBlackHoleOnSell, called from handlerTranscation whenever isMainPair(recipient) is true, meaning the recipient of a transfer is the XDK/GPC pair specifically, with no check for whether that transfer was part of an actual AMM swap. A plain transfer() to the pair qualifies exactly like a router-routed sell. Because PancakeSwap's pair contract exposes a permissionless skim() that returns any token balance sitting above its recorded reserves to whoever calls it, the attacker's transfer-then-skim sequence nets the XDK it sent right back, while still satisfying the contract's own definition of a sell. That is the missing check: nothing in _transfer or handlerTranscation requires that a "sell" correspond to tokens actually leaving the caller's control through the pool's pricing formula. The per-call size limit is also real and enforced in the deployed bytecode, written as require(transferAmount < reverseThis/10, 'max cap') inside handlerTranscation, which is why the PoC repeats the pattern in capped steps rather than draining the window in one call, looping up to 55 times to exhaust it.

The transaction's on-chain record confirms the PoC's attacker address, 0xB180eF1bF6FB3e9A0b5dB4460e4DB804e946cC8a, as the sender of the attack transaction, mined in block 81,556,796 at 12:51:23 UTC on 16 February 2026, matching the date in DeFiHackLabs' entry. The exact token amounts moved have not been confirmed independently of the PoC.

DeFiHackLabs reports the resulting loss as 6.84 WBNB. The attack ran through a contract at 0x1e7e4e41DEFdE022e78aDd6F6e406A7520b63c70 against the XDK contract at 0x02739BE625f7A1Cb196F42dceEe630C394DD9FAA. Neither DeFiLlama's hacks database nor any independent write-up covers XDK or XDKRecycle specifically.

The same pattern, a token-level recycle function that moves tokens out of the pair's reserve and calls sync(), reachable without a genuine trade, also drained LULA on BNB Smart Chain, where claiming a rental reward called Lularecycle to move LULA out to a rental address and sync the pair without USDT leaving. In both incidents a rebalancing routine meant to run quietly inside a tax or reward flow pulled tokens out of a pool's actual reserve on a condition reachable without a genuine trade, then let an ordinary buy or swap realise the resulting price gap.

Sources read (6)

Other exploits

Query every incident yourself — free, no signup

Updated 9 Nov 2026. Figures are as reported by the sources listed above and are not independently verified.