Worked example · 2021-07
ChainSwap bridge unauthorised-mint exploit — multi-chain (Ethereum, BSC) — 2021-07-02 and 2021-07-11
Summary
ChainSwap was a cross-chain bridge linking Ethereum, BSC, Polygon and Huobi Eco Chain [forklogchainswap]. In July 2021 it was exploited twice:
July 2, 2021: an earlier incident with losses of about $800K
[rektchainswap]. Sources consulted did not describe its mechanism.July 10-11, 2021: the attacker called the
receivefunction of the per-token proxy Factory contracts on Ethereum, minting tokens to addresses of their choosing; the auth check was weak (a new address was supplied as the signature each time) and each call paid a 0.005 ETH fee. On BSC the exploit targeted 20 tokens; for Wilder World's WILD, 40 repeated transactions each minted 500,000 WILD (20M total), sold for about 650 WBNB on PancakeSwap[rektchainswap]. Affected projects included Wilder World, Antimatter, Optionroom and Umbrellabank[halbornchainswap]. Date is given as July 10 by Halborn and July 11 by Rekt's linked post-mortem.
Whether the second exploit used a flaw related to the first patch is not established by the sources consulted; the earlier claim that it did, and that ChainSwap commissioned a full audit and a token-registry gate, was unsourced and is removed. The earlier comparison with Poly Network and Thorchain sub-classes is OAK-internal framing rather than sourced fact.
Timeline (UTC)
| When | Event | OAK ref |
|---|---|---|
| 2021-07-02 | First incident, about $800K [rektchainswap] |
(mechanism not sourced) |
| 2021-07-10/11 | Second exploit: unauthorised mint via weak auth on receive; 20 BSC tokens targeted [rektchainswap] [halbornchainswap] |
T10.002 + T9.004 |
| 2021-07-10/11 | Attacker cashes out ~456 ETH via 1inch; wallet had been funded from Tornado Cash [rektchainswap] |
T7.001 (funding side) |
What defenders observed
- Mint paths must verify message provenance. The exploited
receivepath accepted an attacker-supplied value in place of a real signature[rektchainswap]. - Thin DEX pools amplify mint exploits. Minted WILD was sold into a WILD/WBNB pool, depleting it, and several affected tokens lost most of their value
[rektchainswap][halbornchainswap].
What this example tells contributors writing future Technique pages
- Record whether an incident involved one or several exploit events. ChainSwap had two events in about nine days.
- The mechanism here is an unauthorised mint on existing bridged tokens, not token deployment. Contributors should not reuse the earlier "cross-chain token-deployment authorisation" sub-pattern label for this case.
Public references
[rektchainswap]— Rekt, "ChainSwap - REKT" (2021-07-13): https://rekt.news/chainswap-rekt[halbornchainswap]— Halborn, "Explained: The ChainSwap Hack (July 2021)": https://halborn.com/explained-the-chainswap-hack-july-2021[forklogchainswap]— Forklog, "Hackers drain more than $4M from DeFi projects due to ChainSwap vulnerability": https://forklog.com/en/hackers-drain-more-than-4m-from-defi-projects-due-to-chainswap-vulnerability/[investingchainswap]— Investing.com, "$8 Million Lost In Major ChainSwap Exploit": https://investing.com/analysis/8-million-lost-in-major-chainswap-exploit-200590819
Discussion
ChainSwap July 2021 is a bridge unauthorised-mint case: weak authentication on a mint path allowed minting of bridged tokens to arbitrary addresses. The earlier text of this file framed it as the canonical "cross-chain token-deployment authorisation" sub-pattern; the sources consulted do not support that framing. Mechanism details beyond the weak auth check (Rekt's account) are not confirmed by an operator post-mortem seen here. Technique mapping (T10.002 vs a minting-authority T9.004 case) may merit review.