COBALT-TLA: A Neuro-Symbolic Verification Loop for Cross-Chain Bridge Vulnerability Discovery

Dominik Blain · 2026

Read COBALT-TLA: A Neuro-Symbolic Verification Loop for Cross-Chain Bridge Vulnerability Discovery by Dominik Blain (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2604-12172.txt.

Introduction

Blain builds COBALT-TLA, a loop pairing a language model with the TLA+ model checker to hunt vulnerabilities in cross-chain bridges. The model drafts bounded specifications, the checker returns structured error traces, and those traces steer the next draft until a verified bug state is reached. On three bridge targets, one a faithful model of the 190 million dollar Nomad exploit, it finds bugs within two iterations, with checker runs under 0.30 seconds.

Catalog record

CREATORDominik Blain
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE18170
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2604.12172

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

COBALT-TLA: A Neuro-Symbolic Verification Loop for Cross-Chain Bridge Vulnerability Discovery Dominik Blain Abstract Cross-chain bridge exploits have caused over $1.1B in losses through a single recurring pathology: temporal ordering violations in distributed state machines. Existing static analyzers and bounded symbolic execution engines lack the semantic vocabulary to reason about concurrency and finality, while TLA+—the formal specification language designed expressly for this class of flaw—remains inaccessible due to prohibitive syntactic and mathematical complexity. Large language models offer theoretical coverage of this gap but produce severely hallucinated TLA+ specifications when applied zero-shot, generating unbounded state spaces that instantly exhaust model checker memory. We present COBALT-TLA , a neuro-symbolic verification loop that pairs an LLM with TLC, the TLA+ model checker, in an automated REPL. The LLM generates bounded TLA+ specifications; TLC acts as a semantic oracle; structured error traces are parsed and injected back into the model’s context to drive convergence. We evaluate the system against three cross-chain bridge targets, including a faithful model of the Nomad $190M exploit. COBALT-TLA reaches a verified BUG_FOUND state in ≤ 2 \leq 2 iterations on all targets, with TLC execution consistently below 0.30 seconds. Notably, the system autonomously discovers an unprompted vulnerability class—the Optimistic Relay Attack —not present in the human-written baseline specification. We argue that deterministic prover feedback is sufficient to neutralize LLM hallucination in formal methods, transforming zero-shot code generation into a convergent proof-finding strategy. I Introduction Cross-chain bridge exploits represent the most catastrophic capital destruction events in the history of decentralized finance. The Ronin Network ($625M), Wormhole ($320M), and Nomad ($190M) exploits share a fundamental pathology: they were not caused by standard cryptographic failures or simple arithmetic overflows. Instead, they were temporal ordering violations and distributed state synchronization failures. These are architectural flaws where the sequencing of individually valid transactions produces a globally invalid state, allowing attackers to spoof messages or bypass finality. The current Web3 security apparatus is structurally blind to this class of vulnerability. Industry-standard static analyzers (e.g., Slither) and bounded symbolic execution engines (e.g., Echidna, Z3) evaluate intra-contract logic but lack the semantic vocabulary to reason about concurrency, distributed consensus, and time. While formal specification languages like TLA+ and its model checker TLC were designed expressly to verify concurrent systems—famously used by Amazon Web Services to verify S3’s consistency [ 2 ] —their steep learning curve and esoteric mathematical syntax have prevented their adoption in smart contract security. The Web3 industry possesses the right problem, but lacks the engineering bandwidth to deploy the right tool. Large Language Models present a theoretical bridge to this gap, demonstrating near-expert proficiency in code generation. However, applying zero-shot LLMs to formal verification yields severe hallucinations. When tasked with writing TLA+, LLMs routinely declare unbounded sets or infinite state spaces, causing TLC’s breadth-first search to instantly exhaust available memory. Without a strict, programmatic grounding mechanism, LLMs cannot reliably produce verifiable formal specifications; they generate syntax that looks like math, but fails as a proof. To solve this, we introduce COBALT-TLA , the first neuro-symbolic verification engine that orchestrates a Read-Eval-Print Loop (REPL) between a Large Language Model and the TLC model checker. Rather than relying on zero-shot generation, COBALT-TLA treats the LLM as a hypothesis generator and TLC as an absolute semantic oracle. By deterministically parsing TLC’s raw error traces—including compilation failures and invariant violations—and injecting them back into the model’s context window, the system forces the LLM to autonomously converge on a valid, tightly bounded TLA+ specification. We demonstrate the efficacy of this architecture against three distributed bridge models. COBALT-TLA not only successfully reverse-engineered the exact state-transition trace of the $190M Nomad exploit from a natural language prompt, but also autonomously discovered an unprompted Optimistic Relay Attack in a standard Lock-and-Mint architecture. In all experiments, the neuro-symbolic loop converged on a verified vulnerability trace in a maximum of two iterations, proving that LLM hallucination in formal methods can be effectively neutralized via automated prover feedback. II Background II-A Temporal Logic and the TLA+ Model Checker TLA+ (Temporal Logic of Actions), introduced by Lamport [ 1 ] , is a formal specification language designed to model concurrent and distributed systems. Unlike programming languages, TLA+ relies on first-order logic and set theory to describe discrete state transitions over time. A TLA+ specification defines an initial state ( Init ) and a next-state relation ( Next ), mapping out every mathematically possible execution path of the system. TLC, the companion model checker, explores this state space via breadth-first search to verify whether a given SafetyInvariant holds across all reachable states. The “small scope hypothesis” [ 3 ] supports the practical utility of bounded model checking: most structural errors in protocol design manifest within small instances of the state space. While highly effective at identifying deadlocks, race conditions, and synchronization flaws in complex architectures, TLA+ has seen limited adoption in the smart contract security industry due to its steep learning curve and its lack of direct translation to EVM bytecode. II-B Cross-Chain Bridges and Temporal Vulnerabilities Cross-chain bridges are asynchronous, distributed state machines that lock collateral on a source chain and mint equivalent assets on a destination chain, usually coordinated by an off-chain relay or multisignature scheme. Because these events occur across disparate networks with independent consensus mechanisms, they are highly susceptible to temporal ordering violations. If the destination chain executes a state transition (e.g., minting a token) based on a source chain state that is subsequently reverted (e.g., a blockchain reorganization) or spoofed (e.g., initializing an unverified Merkle root as valid, as in the Nomad protocol [ 4 ] ), the global invariant of the system—the peg between locked and minted assets—is irreparably broken. III Methodology III-A System Architecture We present COBALT-TLA, a neuro-symbolic verification loop that pairs a large language model with TLC in a REPL. The system operates as a Read-Eval-Print Loop: the LLM generates a formal specification, TLC evaluates it against declared invariants, and the resulting proof state—whether a violation trace or a compilation error—is injected back into the LLM’s conversational context as structured feedback. The loop terminates when TLC either confirms all invariants hold ( SAFE ) or produces a counterexample ( BUG_FOUND ), or when the iteration budget is exhausted. The architecture comprises four components: (1) a prompt-engineered specification generator, (2) a bounded state space enforcer embedded in the system prompt, (3) a subprocess execution layer wrapping TLC, and (4) an error trace parser that transforms TLC’s raw output into semantically meaningful feedback. III-B Specification Generation The LLM receives a natural language description of a cross-chain protocol and produces two artifacts: a TLA+ module ( .tla ) and a TLC configuration file ( .cfg ). The system prompt constrains output to a strict structural template and requires both artifacts as delimited code blocks, enabling deterministic extraction via regular expression. The SafetyInvariant convention inverts the standard verification framing. Rather than asking the LLM to prove a system correct, we ask it to model a system whose known flaw will produce a TLC counterexample. A SAFE result under this convention signals a modeling error , not protocol correctness—a critical distinction that guides the LLM’s self-correction strategy. III-C Bounding the State Space Unbounded state spaces are the primary failure mode when LLMs generate TLA+

Read the complete text