The paper analyzes the lack of end-to-end value accounting in cross-chain transactions as the root cause of a wide range of attacks on cross-chain bridges. It introduces the concept of a balance invariant, which states that the value of the asset inflow (deposit) in a cross-chain transaction should equal the value of the asset outflow (withdrawal), less any fees or costs incurred by the bridge.
The authors first validate this hypothesis by retrospectively analyzing over 20 million transactions across 11 major cross-chain bridges and 21 blockchains. They show that the balance invariant is sufficient to identify each of the 12 largest known attacks on cross-chain bridges, which collectively resulted in over $2.6 billion in losses. Moreover, they find very few other transactions that violate the invariant, most of which appear to be implementation errors or suspicious activities deserving of further scrutiny.
The paper then describes a live auditing system that monitors ongoing transactions on the Wormhole bridge in real-time, using the balance invariant to detect any violations. The system has been deployed for a month and has successfully alerted on multiple transactions that violated the invariant.
Finally, the authors propose a new bridge architecture called "announce-then-execute" that incorporates the balance invariant checking directly into the transaction flow, thereby preventing unbalanced malicious transactions from ever completing. This approach treats the most complicated components of bridges as black boxes, adds no new attack surface for theft, and requires minimal changes to existing codebases.
To Another Language
from source content
arxiv.org
Key Insights Distilled From
by Enze Liu, El... at arxiv.org 10-03-2024
https://arxiv.org/pdf/2410.01107.pdfDeeper Inquiries