Worked example · 2026-07
B² Network — an attacker takes the staking contract's upgrade authority, rewrites what the contract does, and sells 8.59M B2 into the market — B² Network (Bitcoin Layer 2) — 2026-07-23
Summary
B² Network is a Bitcoin Layer 2 operating a staking service for its B2 token. The staking contract was upgradeable, with an upgrade authority — an administrative permission determining how the contract operates.
On 2026-07-23, an attacker gained unauthorised access to that upgrade authority and used it to modify the contract's rules directly, extracting 8.59M B2 tokens worth approximately $3.86M.
The attacker sold the full 8.59M B2 for 5,409 BNB, realising about $3.01M — roughly $850K less than the pre-sale mark, the difference absorbed by slippage. The proceeds were then bridged to Ethereum, swapped into ETH and USDT, and deposited into NEAR Intents and HOT Protocol.
B² Network disclosed the incident publicly the same day, stating that the incident involved unauthorised access to the staking contract's upgrade authority, that $B2 staking was temporarily suspended pending additional security reviews, that the issue had been contained with no further impact expected, and that all affected users would be fully compensated. The team separately offered the attacker legal immunity in exchange for returning at least 10% (~$386,000) within 24 hours.
The incident fell inside a roughly six-hour window on 2026-07-22/23 that also contained the AFX Trade ($24.15M) and Verus ($7.54M) compromises, together accounting for more than $35M.
Timeline (UTC)
| When | Event | OAK ref |
|---|---|---|
| (standing) | B2 token staking contract is upgradeable; upgrade authority is a single administrative control with no publicly-described timelock or threshold | (standing T9.004 / T6.005 surface) |
| (undisclosed, prior) | Upgrade authority comes under attacker control; method not publicly disclosed | T9.004 pre-positioning |
| 2026-07-23 | Attacker uses the upgrade authority to alter the staking contract's logic and extracts 8.59M B2 (~$3.86M) | T9.004 / T6.005 exploitation |
| 2026-07-23 | Full position sold for 5,409 BNB (~$3.01M) | T7.007 |
| 2026-07-23 | Proceeds bridged to Ethereum, swapped to ETH and USDT, deposited into NEAR Intents and HOT Protocol | T7.003 / T7.007 |
| 2026-07-23 | B² Network discloses publicly, suspends B2 staking, states the issue is contained and all affected users will be fully compensated; offers legal immunity for return of ≥10% within 24 hours | (operator response) |
What defenders observed
- Pre-event (a single authority that can rewrite the contract). Everything downstream follows from this one property. An upgrade authority reachable by one compromised credential, executing immediately, gives an attacker the full value of the contract without needing any flaw in it. Threshold control plus a timelock on upgrade authority is the standard mitigation and was absent or insufficient here (M17, M22, M34).
- Pre-event (the audit surface and the live surface were different things). Reviewers assess deployed logic; an upgrade authority means deployed logic is provisional. Any assessment of an upgradeable contract that does not separately assess who can upgrade it and how fast has assessed only half the system.
- At-event (an unscheduled upgrade is a near-perfect alert). Upgrades to a live staking contract are infrequent and planned. An alert on any upgrade transaction not matching a scheduled change is high-signal, low-noise, and would have fired at the moment of compromise rather than after the tokens were sold (M04, M05).
- At-event (8.59M tokens hitting the market is the second signal). Liquidating the full position cost the attacker roughly $850K in slippage — a sale large enough to move the market is large enough to detect. Monitoring for outsized sales of one's own token from non-treasury addresses catches the extraction leg even when the seizure leg is missed.
- Response (fast, complete disclosure with a compensation commitment). B² named the compromised control specifically — the staking contract's upgrade authority — rather than describing the event vaguely, suspended the affected service while leaving the rest of the network running, and committed to full user compensation. Naming the exact control is what lets other protocols check whether they share the exposure, and it is the part of incident response most often omitted.
Public references
[b2networkdisclosure2026]— B² Network official statement on X (the incident affecting the B2 token staking service, unauthorised access to the staking contract's upgrade authority, temporary suspension of staking, containment, and the commitment to fully compensate all affected users): https://x.com/BSquaredNetwork/status/2080077286238454109[coindeskbridges0723]— CoinDesk, "Bitcoin, Ethereum-linked protocols lose $35 million in multiple attacks hours apart" (~$3.86M / 8.59M B2 figures, the compromised-upgrade-authority mechanism, and the six-hour cohort with AFX Trade and Verus): https://www.coindesk.com/tech/2026/07/23/bitcoin-ethereum-linked-protocols-lose-usd35-million-in-multiple-attacks-hours-apart[mpostb2network2026]— Metaverse Post, "B² Network Suffers $3.86M Exploit, Offers Attacker Legal Immunity For Partial Refund" (the 10% / ~$386,000 / 24-hour legal-immunity offer): https://mpost.io/b%C2%B2-network-suffers-3-86m-exploit-offers-attacker-legal-immunity-for-partial-refund/[cryptoadventureb22026]— Crypto Adventure, "B² Network Faces $3.86 Million Token Drain As Attacker Sells 8.59M B2" (the sale of 8.59M B2 for 5,409 BNB / ~$3.01M, and the bridging to Ethereum with swaps into ETH and USDT): https://cryptoadventure.com/b%C2%B2-network-faces-3-86-million-token-drain-as-attacker-sells-8-59m-b2/[cryptoslatethree2026]— CryptoSlate, "Two Ethereum bridges lose $31.7M within hours as third protocol halts staking" (the staking halt in the context of the same-day bridge cohort): https://cryptoslate.com/two-ethereum-bridges-lose-31-7m-within-hours-as-third-protocol-halts-staking/[cryptotimesweek0726]— The Crypto Times, "Crypto Loses Over $47M in a Week as AFX Trade, Wanchain, Verus Get Hacked" (weekly cohort placement, Bitcoin-L2 scope, upgrade-authority seizure): https://www.cryptotimes.io/2026/07/26/crypto-loses-over-47m-in-a-week-as-afx-trade-wanchain-verus-get-hacked/
Discussion
The natural OAK sibling is examples/2026-06-tesseradao-tsr-admin-key-unauthorized-mint.md, where an admin key produced an unauthorised mint a month earlier, and the pair marks out a consistent 2026 pattern: the fastest route into a protocol is increasingly the administrative control it built for itself rather than a defect in the logic it shipped. B² adds a specific and under-appreciated variant, because an upgrade authority is strictly more powerful than a mint or pause authority — it does not merely exercise a privileged function, it replaces the function set. There is no code review that constrains what a contract will do once someone else can decide what the contract is.
The compensation commitment deserves a note in its own right, and specifically what it implies about where the loss landed. B² absorbed a $3.86M event onto its own balance sheet and kept the network running, which is a solvency decision rather than a security one. OAK's convention is that fund disposition is neutral metadata — full user compensation does not make this less of an attack, and the mechanism is identical whether the treasury covers the hole or the stakers eat it. What it does change is who has an incentive to fix the upgrade-authority topology, and here that is the protocol treasury, which is generally the healthiest alignment available after an incident of this kind.