cross-chain-bridge-audit
Skill220 starsChanged 20 days agoMITView on GitHub
Use when auditing a cross-chain bridge, interoperability L1, cross-chain executor, or message-passing protocol (observe -> attest -> execute). Maps the trust/value pipeline and walks the bug classes that actually pay before declaring a surface clean.
In this repository179 other files it gives its agents.
- AGENTS.mdAGENTS.md
- chrono/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- accessible-media-authoringSkill
- agentic-safety-auditSkill
- agent-prompt-engineeringSkill
- audio-event-map-authoringSkill
- auto-scaffoldSkill
- chain-constructSkill
- chain-construct-smart-contractSkill
- claim-verificationSkill
- code-reachability-auditSkill
- code-review-loopSkill
- color-theorySkill
- conversation-designSkill
- copy-refinementSkill
- cosmos-sdk-audit-checklistSkill
- cross-file-relationship-synthesisSkill
- data-flow-traceSkill
- dedup-prior-art-checkSkill
- defi-invariant-checkSkill
- dependency-cycle-auditSkill
- dependency-health-triageSkill
- detection-as-codeSkill
- diff-aware-semgrep-scanSkill
- differential-reviewSkill
- dimensional-analysis-checkSkill
- dual-level-retrievalSkill
- durable-nonce-exploitationSkill
- erc1271-revert-data-checkSkill
- error-based-sstiSkill
- evm-audit-flowSkill
- figma-implement-designSkill
- findings-filterSkill
- forensic-timeline-authoringSkill
- game-design-fundamentalsSkill
- game-mechanics-balancingSkill
- head-tailSkill
- incident-response-runbookSkill
- interactive-audio-designSkill
- interface-ambiguity-checkSkill
- keyword-clusteringSkill
- knowledge-base-integrationSkill
- known-advisory-backport-checkSkill
- layered-analysis-loopSkill
- level-design-patternsSkill
- locale-adaptationSkill
- multi-stance-audit-fanoutSkill
- narrative-structureSkill
- osint-platform-auditSkill
- parser-differential-route-confusionSkill
- persuasive-technical-writingSkill
- platform-complianceSkill
- player-engagement-psychologySkill
- pre-audit-threat-modelSkill
- program-rubric-lookupSkill
- read-only-reentrancy-checkSkill
- requirements-elicitationSkill
- review-severity-ladderSkill
- rule6-rights-gateSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Asymmetric finality gates: if the "success" path waits N confirmations but the "not-found/failure/refund" path does NOT, a premature refund …
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
cross-chain-bridge-audit
Checklist for auditing a cross-chain bridge / interoperability L1 (observe→attest→execute). Apply on ANY bridge, cross-chain executor, or message-passing protocol. These are the classes that pay; run every one against the code before declaring a surface clean.
The trust/value pipeline — map it first
Diagram: who observes a source event, who attests (which quorum/signature), what a node trusts, where value moves (mint inbound / release outbound), and what authorizes the outbound (TSS / multisig / light client). Name the attacker: outside the validator/attestor set, or at most one member. Everything below hangs off this map.
Inbound (mint) — the "forge an attestation" class
- Event authenticity: are source logs filtered to the exact
{gateway, vault}address AND the exact event signature? An attacker emitting a matching-signature event from an arbitrary contract must be rejected. - Full-tuple binding: does the attestation/ballot key digest EVERY execution-relevant field (amount, recipient, asset, source-tx-hash, log-index, chain-id, payload)? A minority attestor must not be able to substitute one field.
- Replay/dedup: is
(source_chain, tx_hash, log_index)(or equivalent) checked before execution, exactly once? - Quorum soundness: eligible-voter set,
(2N)/3+1math, repeat-vote rejection. - Decimals/scaling: source↔local decimal conversion — an off-by-10^n inflates a mint.
Outbound (release) — the "sign an unauthorized payment" + "double-spend" classes
- Signed-payload binding: trace the EXACT bytes handed to the signer (TSS/multisig). Does every signer independently rebuild the message from consensused state and refuse to sign unless it byte-matches? A coordinator supplying the payload (not just a nonce) = forge.
- Finality on the outbound decision — THE trap: any code that decides "this outbound failed/succeeded" must read a finalized chain view, not
latest/pending. Verify the SEMANTIC, not the helper name — a function calledGetFinalizedNonce/getConfirmedthat internally passesnil/latest/0to the RPC reads latest and is reorg-exposed. Grep everyNonceAt,BlockByNumber,getBalance,getReceiptfor anil/latest block arg on a security decision. - Asymmetric finality gates: if the "success" path waits N confirmations but the "not-found/failure/refund" path does NOT, a premature refund + later success = double-payment. Both paths need the same finality gate.
- Replay of the release: a universal replay guard (executed-marker / subTxId / nonce) on EVERY outbound method (transfer, finalize, revert, rescue) — not just some. Check the destination-side dedup too.
- Refund reversibility: once a refund/revert is finalized, can a later "it actually succeeded" observation reverse it? If not, and both can fire, that's the loss.
TSS / threshold-signing (if present)
- Keygen/reshare quorum: does 100% participation let ONE griefer freeze signing (→ permanent freeze of funds)? Does a stalled reshare halt the active key, or does the old key survive?
- Fail-open verification: any path that accepts/signs when a check can't run (chain-lookup unavailable, config nil) → hunt whether an attacker can force the skip. Prefer fail-closed.
- Message-to-sign bound to consensused state; nonce reuse (ECDSA k-reuse → key extraction); transport authentication (peer-id bound).
Quorum-defeating shared-predicate errors — the deepest class
Quorum does NOT protect against a bug where all honest nodes deterministically compute the same WRONG answer on the same canonical input (mis-parsed amount, spoofable signature, a latest-read predicate, chain-id confusion). Every honest node votes the wrong way → the ballot finalizes the wrong outcome. Hunt these explicitly — they survive "2/3+1 honest" assumptions.
Reachability discipline (before escalating)
A primitive is not a critical until the terminus (funds moved) is reachable at no privilege. For nonce/reorg bugs: only the bridge signs for its address, so a distinct tx at nonce n must come from the bridge's OWN recovery/rotation path — and same-(sender,nonce) mempool replacement evicts the prior tx (a payment and its refund are often the same event, self-defeating the double). Model it dynamically (three heads: latest/safe/finalized + reorg + mempool eviction) before claiming a double-spend. Related: [[chain-construct]].
LayerZero / DVN specialization
A single-signer or attacker-compromisable Decentralized Verifier Network (DVN) / oracle-relayer set is a named instance of the Quorum soundness + forge-an-attestation classes above — not a separate skill.
- Read the config first (
cast). On a LayerZero-style OApp/OFT pathway, read the DVN/verifier set, the required threshold (quorum), and the send/receive library wiring per OApp/pathway. Record N and the threshold. Flag any pathway whose effective quorum is 1 (or trivially small / all controlled by one operator), or where the receive endpoint /OFTAdaptertrusts a single attestation with no independent second verifier and no fraud window. - PoC in a forked two-chain harness.
anvil --forkper chain: submit a forged verified message through the configured verifier path and assert the destination releases unbacked assets. Negative control: a healthy multi-DVN quorum rejects the single forged attestation. - Dedup / prior art. KelpDAO, April 2026 — $292M via a 1-of-1 LayerZero DVN compromise + RPC poisoning. The on-chain quorum weakness is the intrinsic, submittable defect; RPC poisoning and backup-node DDoS are the realistic off-chain delivery amplifiers, not the finding. Dedup against the KelpDAO / LayerZero-DVN advisories before submission.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

