# Bitcoin coverage

The Bitcoin side of every Maxy swap: how the user receives BTC, how they sell it, and how a payment is proven. It is for teams that run or show the user's Bitcoin wallet.

Nothing is wrapped: BTC moves only in ordinary Bitcoin mainnet transactions, to and from the user's own addresses. In `GET /chains` Bitcoin is `bitcoin`, CAIP-2 `bip122:000000000019d6689c085ae165831e93`.

## Receiving BTC

When the user buys BTC with an EVM coin or SOL, a solver pays the BTC first and is paid from the escrow only after proving that payment.

| | EVM coin to BTC | SOL to BTC |
| --- | --- | --- |
| Receiving address | Native SegWit, `bc1q…` | `bc1q…` or `bc1p…` (the sandbox takes `bc1q…` only) |
| Smallest order | 546 sats after costs | About $2 |
| `completed` when | the BTC payment exists (`btcTxId`) | the BTC payment exists (`btcTxId`) |

The BTC is sent as soon as the payment is broadcast. The user's wallet shows it after the first confirmation, about 10 minutes, and it is final from then. Before it confirms, the solver may speed the payment up: same amount and address, a new `btcTxId`. Show the latest. Check the address before you quote: [Bitcoin addresses](https://maxy.co/docs/bitcoin-addresses).

## Selling BTC

The user sells BTC for a coin on an EVM chain. The payout is locked for the user before they pay anything.

1. The EVM wallet that will receive the payout signs one message, the sell intent.
2. The solver locks the payout in the settler, for that wallet.
3. Only then does `GET /orders/{id}/deposit` answer `ready: true`, with the deposit `address`, the exact `sats` and a `bitcoinUri` for a QR code. The address is decoded from the script the settler stores, and the SDK reads that script on chain itself. A deposit address belongs to the solver that locked the payout for this order.
4. The user pays exactly `sats` to that address in one output. Live orders allow 19 Bitcoin blocks, about 3 hours.
5. Once the payment has the order's confirmations, a proof of it releases the payout to the user.

| Rule | Value |
| --- | --- |
| Confirmations | Set per order, 1 to 6. Larger orders can need more (`confirmationsBySize`); the quote states `requiredConfirmations` |
| Smallest order | About $10 |
| Open sells | Three per wallet; a fourth answers `409 open_sells_limit` until one is paid or expires |
| Who can pay | Any Bitcoin wallet, one output of the exact amount. The SDK's own payment, `swap.payDeposit`, pays from a P2WPKH (`bc1q…`) or P2SH-P2WPKH (`3…`) address |

`deposit_address_unverified` means the payout is not escrowed for the user: **do not pay**, and start again. A payment of another amount, or after the window, is not paid out by the contract. Such a payment is returned under the [mispaid-sell policy](https://maxy.co/docs/mispaid-sells#the-mispaid-sell-policy). The calls: [Sell BTC](https://maxy.co/docs/sell-btc). Selling BTC for SOL: [Solana coverage](https://maxy.co/docs/solana-coverage#btc-to-sol).

The sell pairs and their confirmation rules, with the setup from [Get a quote](https://maxy.co/docs/buy-btc#get-a-quote):

```sh
curl -s -H "x-maxy-key: $MAXY_API_KEY" "$BASE/pairs" \
  | jq -c '.pairs[] | select(.from.chain == "bitcoin") | {label, minUsd, requiredConfirmations, confirmationsBySize}'
```

## How payments are proven

No Maxy server can mark a Bitcoin payment as made. Each settler reads Bitcoin through its verifier, an on-chain Bitcoin node:

- Bitcoin block headers are submitted to the verifier, which checks their proof of work and difficulty itself. Maxy runs a relayer that feeds new headers to every chain each minute, and anyone may submit them.
- A proof is the raw transaction, its Merkle branch and the block headers above it. The verifier accepts it only for an output paying the exact amount to the script the order names, with enough confirmations.
- The settler releases an escrow only against an accepted proof.

On a buy, the solver submits the proof to be paid. On a sell, the solver sends it too, and `GET /orders/{id}/claim` answers the same proof as a transaction any wallet may send, paying out only to the user. Details: [Bitcoin verification](https://maxy.co/docs/bitcoin-verification).

## Mainnet only

Maxy pays and accepts mainnet BTC only. A testnet or signet address (`tb1…`) is well formed but never paid. In the sandbox nothing is broadcast: deposit addresses are testnet ones, Bitcoin txids start with `53414e44424f58`, and a recipient address must still be a mainnet one. Each chain's verifier lag is on [Status](https://maxy.co/status).

---
Source: https://maxy.co/docs/bitcoin-coverage (Maxy Docs › Supported systems › Coverage)
