Bitcoin Cash · CashScript · CashTokens

Bitcoin Cash smart contract audits

Sighash Labs audits CashScript contracts and CashTokens systems on Bitcoin Cash. We review how contracts constrain each other across a transaction, not just one function at a time.

What we review

CashScript contracts
Every function of every contract in scope, line by line, at a pinned commit.
Contract systems
How contracts authenticate each other through sidecars, threads, and token identity, and which transaction topologies that allows.
CashTokens logic
Token category and capability checks, NFT commitments, fungible amounts, minting authority, and burns.
Value flow
Where every satoshi and token goes on every spending path, and whether supply and reserves still add up.
Builders and docs
Transaction builders, tests, and documentation, where they bear on contract behaviour.

How we audit

  1. 01

    Topology from the code

    Line-by-line review of every contract function, with the transaction topology re-derived from the code rather than taken from the docs.

  2. 02

    Covenant hazard checklist

    Output constraints, token identity and capability, encoding, time, value flow, liveness, deployment, and accounting.

  3. 03

    Invariant pass

    Every arithmetic line restated, and the supply and reserve identities tested on every path.

  4. 04

    Proof of concept

    Exploitable findings are demonstrated with an attack transaction executed on libauth's Bitcoin Cash VM with CashTokens validation.

  5. 05

    Fix verification

    Each fix is re-reviewed on the revised commit, re-running the original attack where one exists, across as many review passes as the fixes need.

What goes wrong in CashScript covenants

UTXO contracts fail differently from account-based ones. These are the bug classes we look for first.

Token substitution
Amounts summed without checking the token category, so foreign tokens count as the real thing.
Unconstrained outputs
Change, fee, or return outputs left out of the checks, letting value or minting NFTs escape.
Position assumptions
Inputs outside the range a contract inspects, spent without ever being measured.
Identity by commitment
A thread or anchor authenticated by category and commitment, but not by the script that locks it.
Unlocking vs. locking bytecode
Authorisation that compares attacker-supplied unlocking bytecode instead of locking bytecode.
Value-flow leaks
Fees or interest deducted from a UTXO without enforcing where they are paid.
VM limits
Operation-cost and size budgets that leave large positions impossible to redeem or liquidate.
Fragmentation
Cheap transactions that split supply or custody into dust UTXOs and price out later operations.

What you get

  • A report with the scope pinned to exact commits, and each finding's severity, issue, and resolution.
  • Fix verification on every revised commit until each finding is fixed, mitigated, or acknowledged.
  • Publication on this site once you approve it.

Published Bitcoin Cash audits

Starting an audit

Send the repository and commit, any spec or design notes, and the invariants your system relies on.

info@sighash.xyz →