Skip to main content
bitrune-verify is a command-line tool for independently verifying Bitrune transactions on the Bitcoin blockchain. It decodes the on-chain audit tags embedded in Runestone OP_RETURN outputs and validates that the AMM math is correct — without trusting Bitrune’s servers.

Installation

Build from the project repository:
cd cli
cargo build --release
The binary is produced at target/release/bitrune-verify.

Usage

bitrune-verify <txid_or_hex> [options]
Arguments:
ArgumentDescription
<txid_or_hex>A 64-character transaction ID (fetched from bitcoind) or raw transaction hex
Options:
OptionDefaultDescription
--rpc-urlhttp://127.0.0.1:18443bitcoind RPC endpoint
--rpc-userrpcRPC username
--rpc-passrpcRPC password
--jsonoffOutput results as structured JSON
--helpShow usage information
RPC credentials can also be set via environment variables: BITRUNE_RPC_URL, BITRUNE_RPC_USER, BITRUNE_RPC_PASS.

What It Verifies

The tool decodes all Bitrune audit tags present in a transaction and runs validation checks against each:
TagNameChecks Performed
111Tax SpecificationTax rates within valid range (0–10000 bps), bucket shares sum to 100%
333Swap DataDirection valid, amounts positive
555Reserve ProofReserve deltas are directionally consistent (one up, one down), fee within range, LP shares positive, constant-product invariant holds
777Tax Execution Proofgross = tax + net, bucket distribution sums to total tax, params_hash matches etch-time commitment
889Pool ParametersFee within range, initial reserve positive
999LP Event ProofOperation type valid, reserve deltas match amounts, deposits have zero reward claims
1111Batch SettlementUser count positive, reserve changes consistent with total input/output
1333LP-Rune LinkageFee within range, LP premine positive

Example

Verify a swap transaction:
$ bitrune-verify abc123...def456

Bitrune Tag Verifier
txid: abc123...def456

Tag 333 — Swap Data
  rune_id              840001:5
  direction            Buy (AToB)
  amount_in            1000000
  amount_out           4900000
  fee_in               3000
  [OK] direction valid
  [OK] amounts positive

Tag 555 — Reserve Proof
  reserve_a (pre)      100000000
  reserve_b (pre)      500000000000
  reserve_a (post)     101000000
  reserve_b (post)     495100000000
  fee_bps              30
  lp_total_shares      223606797
  [OK] directional consistency
  [OK] fee_bps in range
  [OK] constant-product invariant holds

Summary: 2 tags found, 2 passed, 0 failed
JSON output for programmatic use:
bitrune-verify abc123...def456 --json
{
  "txid": "abc123...def456",
  "tags": [
    {
      "tag_id": 333,
      "name": "Swap Data",
      "fields": {
        "rune_id": "840001:5",
        "direction": "Buy",
        "amount_in": "1000000",
        "amount_out": "4900000",
        "fee_in": "3000"
      },
      "checks": [
        { "label": "direction valid", "passed": true },
        { "label": "amounts positive", "passed": true }
      ],
      "passed": true
    }
  ],
  "summary": { "total": 2, "passed": 2, "failed": 0 }
}

Use Cases

  • Auditors: Verify that every swap executed by Bitrune follows the constant-product formula and applies fees correctly.
  • Rune creators: Confirm that deflationary tax rules are applied exactly as configured at etch time, with no modifications.
  • LP providers: Validate that deposit/withdraw share calculations match the published AMM formulas.
  • Block explorers: Integrate structured Bitrune tag data into transaction detail pages.

Connecting to a Node

For mainnet verification, point the tool at a Bitcoin Core node with txindex=1 enabled:
bitrune-verify <txid> \
  --rpc-url http://127.0.0.1:8332 \
  --rpc-user myuser \
  --rpc-pass mypass
The tool only reads transactions; it does not broadcast or modify any blockchain state.