Crypto exploits

BYToken exploit analysis

BYToken's permissionless triggerAutoBurn let an attacker donate WBNB straight into the BY/WBNB pair to cross its trading threshold, then burn BY out of the pool to collapse its BY reserve before selling into it. DeFiHackLabs reports about 146.60 WBNB drained on BNB Chain; CryptoTimes separately put the loss near $88,400.

David

Security ·

Reported loss
$87K
Occurred
Logged
Chain
BNB Smart Chain

Logged as “2026-06-04: Permissionless Triggerautoburn Reserve Manipulation on BYToken”.

Analysis2 min read

BYToken ran a BY/WBNB pair on PancakeSwap with a permissionless triggerAutoBurn function that burns a fraction of BY supply each BURN_INTERVAL, taking from the token contract's own balance first and from the pair for any remainder. The function is permissionless. Anyone can call it once the contract's own cooldown, tracked through lastBurnTimestamp and BURN_INTERVAL, has elapsed. The TRADING_ENABLE_BNB_THRESHOLD is a separate check: once the pair's WBNB reserve reaches it, the token flips tradingEnabled on, which lets ordinary AMM buys through. Nothing in that check looks at who supplied the WBNB that crossed the threshold.

The proof of concept DeFiHackLabs published, and which this account reads in full, reconstructs the exploit against BNB Chain state forked at block 102,329,718, one block before the attack block 102,329,719. It starts the attack contract with a balance of 422,497 WBNB. The test supplies this directly through Foundry's deal, and the file does not show where the real attacker sourced that capital on-chain.

The attack sequence

  1. A first router swap converts part of the WBNB into BY, with the BY output sent to the router's own address rather than the attacker's. This pushes the pool's price up without leaving the attacker holding a traceable BY balance.
  2. A further WBNB transfer goes straight into the BY/WBNB pair, followed by a call to the pair's sync(). Pancake's pair contracts treat any token sitting in the pair as reserve once synced, so this donation crosses TRADING_ENABLE_BNB_THRESHOLD without a swap.
  3. A second router buy converts more WBNB into BY, this time credited to the attacker's own contract.
  4. triggerAutoBurn() is now callable. It burns BY out of the pair, which crashes the BY reserve. The proof of concept's own comment describes this step only as burning BY from the pair to crash its reserve.
  5. Five single-wei BY-to-WBNB swaps run against the collapsed reserve, followed by a swap of the attacker's full remaining BY balance. Because so little BY is left in the pair after the burn, each swap pulls out WBNB far in excess of the BY going in.

DeFiHackLabs puts the loss at about 146.60 WBNB, worth roughly $87,402 at the time, a figure this account has not independently revalued. CryptoTimes, citing the security firm TenArmorAlert, separately put the drain at about $88,400 and described the attacker routing the attack through a helper smart contract before a series of transfers and swaps, consistent with the two-contract structure in the proof of concept: an externally owned attacker address at 0x047547A4fa4a67C1032d249B49EC1a79c0460BAD and a deployed contract at 0xc08106a36BfA9CFad264F0d64fC45B93543485Ec. DeFiHackLabs dates the attack to June 4, 2026, consistent with the attack block 102,329,719 listed in the proof of concept (it forks from the block before). CryptoTimes' report carries a June 5 date, consistent with simple reporting lag rather than a different incident.

BYToken's contract source and the attack transaction have not been independently confirmed beyond the proof of concept's account. No bounty, pause, or compensation announcement from BYToken has been published.

What would have prevented it is a burn trigger that measures the pool against a time-weighted reserve, or one that is not callable by anyone outside the deployer, rather than a live-balance threshold that a single transaction can manufacture by donating straight into the pair.

Sources read (2)

Other exploits

Query every incident yourself — free, no signup

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