# Bitcoin verification

Maxy proves every Bitcoin payment on chain with a modified cryptographic proof, checked by an on-chain Bitcoin node. No Maxy server takes part, and none can mark a payment as made.

**An on-chain Bitcoin node follows Bitcoin.** Each chain's verifier is a contract that validates and stores Bitcoin's block headers. Anyone can submit the next header, and Maxy's relayer does so every minute. The node accepts a header only after checking its proof of work, its difficulty and its link to the header before it. Reorganisations are handled on chain, so the node tracks the Bitcoin chain with the most work. It does not run Bitcoin scripts or track unspent outputs, so it is not a full node.

**A proof presents one payment.** It holds the raw Bitcoin transaction, the index of the output that pays the order, the Merkle branch that places the transaction in its block, and that block's header with its predecessor and height.

**The node checks that the payment is in Bitcoin.** It hashes the raw transaction to get its txid, folds the Merkle branch up to the block's Merkle root, and matches that root to a header on its canonical chain, with the required confirmations on top.

**The settler checks that the payment is this order's.** It reads the named output and requires the exact amount, paid to the exact script the user signed for, with the confirmations the order sets, inside the order's time window.

**Settlement happens in the same transaction.** If every check passes, the escrow is released at once. If any check fails, nothing moves.

[Status](https://maxy.co/status) shows each chain's verifier and how many blocks it is behind; `GET /health` answers the same, per chain, as `lagBlocks`. Solana orders use the same idea: Maxy's Solana program has its own Bitcoin node, `AVna5sHdDYF5uhS8KK7muNxCFe92nveopbHrfuq8Q12o`.

## How it differs from SPV

A simple SPV proof answers one question: is this transaction in a block with work on top of it? A swap needs a harder question answered: was this order paid, in full, to the right place, in time? Maxy's proof answers that one. The comparison, row by row, and the five things that make it stronger: [Proof versus SPV](https://maxy.co/docs/proof-versus-spv).

## Confirmations

Confirmations are counted at the verifier: the payment's block counts as the first. Each order names how many it needs in its `requiredConfirmations`, and `GET /pairs` lists the number per pair.

| Route | Confirmations | The deadline for the proof |
| --- | --- | --- |
| Buying BTC with an EVM coin | Set per order by size, below. The BTC is sent before any of them: the proof is how the solver gets paid | The order's `settlementTimeoutBlocks` after the solver commits: 36 Bitcoin blocks, about 6 hours, on API orders. Without a proof in that time, the user takes the escrow back with the bond |
| Selling BTC for an EVM coin | 1 to 6, set per order; larger orders can need more. The quote states it | The order's Bitcoin deadline, 19 blocks on live orders, plus one block in which the proof still pays the user |
| SOL to BTC, BTC to SOL | 1 | The program's own escrow expiry |

The verifier itself has a minimum, set by its admin: 1 on every chain.

Maxy scales confirmations with what is at stake. On a buy, the Bitcoin is sent to the user at once; confirmations decide only when the solver is paid from escrow. Small orders settle after one confirmation, because reversing even one Bitcoin block would cost far more than they are worth. Larger orders wait for more confirmations, so that reversing a payment always costs far more than the order is worth.

| Buy order value | Confirmations before the solver is paid |
| --- | --- |
| Below $2,000 | 1 |
| From $2,000 | 2 |
| From $20,000 | 3 |

An order within 3% below a threshold asks for the higher number, so a price move between the quote and the commit cannot leave it one confirmation short.

The API writes the number into each intent's `requiredConfirmations`, and `GET /pairs` marks buy pairs with `confirmationsBySize: true`; the quote states the number. Maxy's solver commits only to a buy that asks at least this many.

Who sends the proof, and what it changes on an order: [Submitting a proof](https://maxy.co/docs/submitting-a-proof). Where these checks sit among the other contracts: [Contract architecture](https://maxy.co/docs/contract-architecture). The Bitcoin side of each route: [Bitcoin coverage](https://maxy.co/docs/bitcoin-coverage).

---
Source: https://maxy.co/docs/bitcoin-verification (Maxy Docs › Maxy architecture › Bitcoin proofs)
