Maxy architecture / Smart contracts
Intent fields
Every field of the intent a user signs to buy BTC, what it binds, and the value the API always sends. It is for teams that check typed data before the wallet opens. Compare each field with what you expect, and reject a quote whose fields differ.
The intent is EIP-712 typed data on the domain { name: "BitcoinIntentSettler", version: "6", chainId, verifyingContract }, where the contract is the settler on that chain. Its hash is the order id, on chain and in the API. The intent step of GET /quote carries it as typedData, with its hash.
| Field | What it binds | Value the API sends |
|---|---|---|
side | A buy or a sell | 0, a buy |
maker | The paying wallet. Only its signature can authorise this escrow, and only it can take the escrow back before a deadline | fromAddress |
asset | The coin paid | The zero address for the chain's own coin, or the token's address |
scriptHash | keccak256 of the Bitcoin output script that must receive the BTC | The script of toAddress, decoded from the address |
satAmount | Exactly how many sats the user receives | toAmount |
designatedFiller | The only solver that may commit; the zero address lets any solver commit | The zero address |
pricingMode | A fixed limit price, or a price that moves over time | 0, a fixed limit price |
limitPrice | What one sat costs in whole coins of the coin paid, scaled by 10^18, the same scale for every coin. The settlement amount is satAmount × limitPrice × 10^decimals ÷ 10^18, rounded down; the deposit raises the price by slippageBps first (Price band). USDC at $100,000 a BTC: a sat costs 0.001 USDC, so limitPrice is 10^15 before costs, and 10,000 sats settle 10,000,000 units, 10 USDC | The quote's price, with the fill cost in |
startPrice, endPrice | The bounds of a moving price | 0 |
decayStartTime, decayEndTime | When a moving price moves | 0 |
slippageBps | How far the price may move before the escrow opens | 50, 0.5%, unless you pass slippageBps |
oracleDiscountBps | A discount on an oracle price | 0 |
bondBps | The bond a solver posts when it commits | 100, 1%, as a live quote sends it. Orders placed from the Maxy app can ask another bond |
requiredConfirmations | Bitcoin confirmations before the solver can be paid | By order size: 1 below $2,000, 2 from $2,000, 3 from $20,000, and an order within 3% below a threshold asks for the higher number |
settlementTimeoutBlocks | Bitcoin blocks the solver has, after its commit, to pay and prove | 36, about 6 hours |
deadline | When an order with no escrow or no commit lapses, in Unix seconds | 2 hours after the quote |
nonce | The order's uniqueness on the settler | A fresh value per quote |
oracleConfigHash | The oracle settings a price may use | Zero: no oracle |
These are the values a live key gets. A sandbox quote carries an intent no contract can use: its scriptHash, limitPrice, slippageBps, bondBps and settlementTimeoutBlocks are 0. And in the sandbox the wallet signs a MaxySandboxOrder message, not this 20-field intent, so a field check like the one below can only be tested against a live quote (read-only: a quote places nothing).
A worked intent on Base
A buy of 30,000 sats for ETH on Base, every field as GET /quote fills it, with a deadline long past so it can never be opened: intent-vector-base.json holds the 20 fields, the typed data and the scriptPubKey. Its EIP-712 hash, which the settler's hashIntent returns for it, is 0x32b09fc5d747820825a1ec122b1126702f18a08f6d235de55d959685b1b7673a. Check your own encoder against it before you sign real orders: hash typedData from the file and compare.
Over HTTP, reject a quote whose typed data differs from these values before the wallet signs. The SDK computes the hash itself and compares it with the settler's own hashIntent before the wallet is asked to sign; over HTTP, compute the EIP-712 hash and compare it with the step's hash: Sign. What the settler does with each field: Contract architecture.