Worked example · 2023-04
Allbridge stable-pool virtual-price manipulation — BNB Chain — 2023-04-01
Summary
Allbridge operated as a cross-chain bridge / liquidity-network protocol with stable-swap pools deployed on multiple chains. On 2023-04-01 / 2023-04-02 (the attack window straddled the date boundary in UTC), an attacker exploited the BNB Chain stable-pool deployment through flash-loan-funded same-block manipulation of pool composition against the pool's swap-pricing path.
The pool's pricing path used a stable-swap-style invariant computation in which the swap output for a given input depended on the pool's current composition. Under flash-loan-scale working capital, an attacker could imbalance the pool's composition heavily towards one asset within a single transaction, then execute swaps in the opposite direction at the favourable mispricing implied by the imbalanced composition, then unwind. The pool's invariant arithmetic was correct in isolation; the failure was that the pricing path treated the pool's own composition as a trustworthy oracle for swap pricing without bounding the rate of composition change within a block. Flash loans removed the implicit "no one can move the composition by more than ~liquidity-on-hand in a single block" assumption that the design implicitly relied on.
The exploit shape: the attacker took flash loans on BNB Chain as working capital; deposited a large single-side imbalance into the Allbridge stable pool; observed the favourable swap-pricing the imbalanced composition implied; executed swaps in the opposite direction at the favourable mispricing; withdrew; closed flash loans; net ~$573K extracted. The attack iterated a similar pattern across the BNB Chain pool's accessible asset pairs.
For OAK's purposes the case is a clean T9.001 (pool-composition-as-implicit-oracle sub-class) extraction with a T9.002 (flash-loan) working-capital precondition. The structural family is the same as Saddle Finance April 2022 — stable-swap pool with composition-driven pricing path, vulnerable under flash-loan-scale single-block manipulation — and the Allbridge case extends the cohort to the BNB Chain ecosystem with a 2023 worked example.
Timeline (UTC)
| When | Event | OAK ref |
|---|---|---|
| Pre-2023-04 | Allbridge deploys stable-swap pool on BNB Chain; pricing path treats pool composition as implicit oracle without per-block composition-change bounding | T9.001 surface (latent) |
| 2023-04-01 (late UTC) / 2023-04-02 (early UTC) — attack tx window | Attacker takes flash loans on BNB Chain as working capital | T9.002 precondition |
| same window | Attacker deposits single-side imbalance into the Allbridge stable pool, distorting composition heavily towards one asset | T9.001 manipulation |
| same window | Attacker executes swaps in the opposite direction at the favourable mispricing implied by the imbalanced composition | T9.001 extraction |
| same window | Attacker withdraws; closes flash loans; iterates similar pattern across accessible pool pairs | T9.001 + T9.002 repeat |
| 2023-04-02 (within hours) | Allbridge operations team detects the drain; pauses the affected pool; publishes initial public acknowledgement | (operator response) |
| 2023-04-02 (same day) | Allbridge publishes bug-bounty-style framing offering retention if attacker returns funds; on-chain message channel opened | (recovery channel) |
| 2023-04-03 onward | Attacker returns a substantial portion of the funds via on-chain transaction; partial recovery completes over several days | partial recovery |
| 2023-04-02 onward | BlockSec, PeckShield, SlowMist publish post-incident write-ups converging on the flash-loan + pool-composition-manipulation root cause | (transparency / cohort signal) |
What defenders observed
- The vulnerability class was already documented at Saddle Finance one year earlier. The Saddle Finance metapool case at
/examples/2022-04-saddle-finance.mddocumented the same structural pattern — stable-swap pool with composition-driven pricing path, vulnerable under flash-loan-scale single-block manipulation. Allbridge's BNB Chain deployment did not include a per-block composition-change bound or analogous mitigation. The Allbridge case is therefore a known-vulnerability-class-recurring-across-cohort worked example, structurally similar to the Onyx / Hundred Finance / Midas Capital cohort at/examples/2024-09-onyx.mdfor the empty-market rounding sub-class. - Pool-composition-as-implicit-oracle is a distinct T9.001 sub-class. External-oracle manipulation (Mango Markets at
/examples/2022-10-mango-markets.md, bZx at/examples/2020-02-bzx.md) involves an attacker manipulating an external feed (DEX spot price, perp index) that an oracle pathway then reads. Pool-composition-as-implicit-oracle (Saddle, Allbridge) involves an attacker manipulating the pool's own composition that the pool's own pricing path then reads. Both are T9.001, but the surface, mitigations, and detection signatures differ. Worked examples should preserve the sub-class distinction. - Flash-loaned working capital is the precondition that converts implicit-oracle composition into a useful attack surface. Without flash-loan-scale working capital, an attacker could not move the pool's composition meaningfully within a single block; the implicit assumption of "composition can only move by ~liquidity-on-hand per block" would hold. Flash loans remove the assumption. T9.002 is the standing precondition for the entire pool-composition-as-implicit-oracle T9.001 sub-class on permissionless EVM chains.
- The recovery channel followed the Sentiment / Euler 2023 pattern at smaller scale. Allbridge's public bounty-style framing, designated return address, and on-chain message channel paralleled the recovery primitive used by Sentiment and Euler within weeks of the Allbridge incident. The recovery activated to a partial degree (substantial-portion return, retained-bounty arrangement) rather than the near-total recovery achieved by Sentiment and Euler. Contributors should report partial-recovery outcomes as a distinct point on the recovery-primitive distribution rather than collapsing them into "recovered" or "not recovered" binary categories.
- The dollar loss is modest by 2023 standards but the cohort signal is the analytical value. ~$573K is small compared to Euler's ~$197M or Curve / Multichain incidents elsewhere in 2023. The Allbridge case earns its corpus position by extending the pool-composition-as-implicit-oracle sub-class cohort to BNB Chain and by documenting the partial-recovery point on the recovery-primitive distribution. Worked examples can be analytically valuable at modest dollar scale when the structural contribution is clear.
What this example tells contributors writing future Technique pages
- T9.001 has multiple sub-classes that should be made explicit in the Technique page. Allbridge (pool-composition-as-implicit-oracle) and Saddle Finance (the same sub-class one year earlier on Ethereum) sit alongside Mango Markets and bZx (external-oracle manipulation) as the canonical OAK worked examples for distinct T9.001 sub-classes. Sentiment 2023 (read-only reentrancy via oracle pathway) is structurally adjacent but classifies as T9.005 because the primary failure is the reentrancy / view-function inconsistency rather than the price manipulation per se. Contributors writing the T9.001 page should enumerate the sub-classes and link the per-sub-class canonical worked example.
- T9.002 is the precondition Technique that converts per-block composition manipulation into per-incident extraction. Worked examples in the T9.001 pool-composition-as-implicit-oracle sub-class should preserve the precondition / extraction structure. The Allbridge, Saddle, Beanstalk, bZx, and Sentiment worked examples all document the same structural pattern across distinct extraction sub-classes.
- Cohort monitoring around stable-swap fork deployments is a discoverable defender practice. The set of stable-swap-fork pools in production at any time is discoverable through DefiLlama, Etherscan, and per-chain block explorers. The set of those pools that have implemented per-block composition-change bounds (or analogous mitigation) is checkable on-chain. The Allbridge case is direct evidence that this cohort-monitoring discipline was not yet operationalised at coverage sufficient to flag the BNB Chain deployment as a cohort risk before the April 2023 incident, despite the Saddle Finance worked example existing one year earlier.
- Partial-recovery via bounty-retention is a real, distinct point on the recovery-primitive distribution. The Sentiment / Euler outcomes were near-total return with small retained bounty; Penpie 2024 was no return; Allbridge sits at partial return with substantial retained bounty. Worked examples should treat partial recovery as a distinct outcome category rather than collapsing it into binary recovered / not-recovered framing. The conditions that produce partial rather than near-total recovery (attacker risk-tolerance, operator-side framing, jurisdictional considerations) are not yet well-documented in the OAK corpus and remain a research question for future contributors.
Public references
[allbridgepostmortem2023]— Allbridge public post-incident statement, including the BNB Chain pool root-cause and the recovery framing.[blocksecallbridge2023]— BlockSec post-incident technical write-up of the Allbridge stable-pool exploit.[peckshieldallbridge2023]— PeckShield headline figures and on-chain analytics for the Allbridge BNB Chain drain.[slowmistallbridge2023]— SlowMist incident analysis covering the flash-loan funding sources and the on-chain return transaction.[halbornsaddle2022]— Halborn post-incident write-up of the April 2022 Saddle Finance metapool exploit, the original public root-cause for the cohort vulnerability class.
Citations
[allbridgepostmortem2023]— Allbridge's own post-incident statement and bounty-framing public communications.[blocksecallbridge2023]— BlockSec forensic analysis of the BNB Chain pool composition manipulation.[peckshieldallbridge2023]— PeckShield headline and analytics coverage.[slowmistallbridge2023]— SlowMist funding-source and recovery-tracing analysis.[halbornsaddle2022]— Halborn Saddle Finance write-up cited for cohort framing.
Discussion
Allbridge is OAK's 2023 BNB Chain worked example for the pool-composition-as-implicit-oracle sub-class of T9.001, with Saddle Finance April 2022 as the Ethereum-side canonical case for the same sub-class one year earlier. Together the two cases illustrate that the sub-class is fork-portable across stable-swap-derivative deployments and that the cohort-monitoring discipline required to flag exposed deployments was not yet operating at sufficient coverage in 2022–2023.
The partial-recovery outcome is the structurally informative dimension. The OAK recovery-primitive distribution, as currently documented across Euler 2023, Sentiment 2023, Allbridge 2023, Ronin 2024 rescue, Cetus 2025, and Penpie 2024, spans near-total return through partial return through no return through validator-coordinated freeze. Allbridge's partial-return point on this distribution is comparatively under-documented in the OAK corpus and the conditions that produced partial rather than near-total return — likely some combination of attacker risk-tolerance, operator-side framing strength, and jurisdictional considerations — remain a research question for future contributors. A mitigation-layer entry on recovery primitives should reference Allbridge as the canonical partial-recovery worked example.
The cohort framing pairs the Allbridge case with Onyx 2024 and Sentiment 2023 as evidence that vulnerability classes documented in earlier worked examples recurred in operator environments that did not deploy analogous mitigations. The cohort-monitoring discipline is the same across the three cases (discoverable cohort, on-chain-checkable patch status); the failure was the absence of operational coverage rather than the absence of technical possibility. The OAK Mitigations layer should treat publicly-disclosed-vulnerability-class cohort-monitoring as a first-class defender practice with Allbridge, Sentiment, and Onyx as the canonical 2023–2024 worked examples.