Quote as a maker
Requests addressed to you open in your browser; a quote is one press, signed with your quote key and sealed to the taker.
You need a registered maker account and inventory in the token you pay out; Inventory covers both. Quoting itself never opens the wallet.
The inbox
/desk/quotes lists every request addressed to you, newest first, each opened in your browser: pair, side, size and the time left in its window. New requests arrive over the live channel while the page is open.
| State | Meaning |
|---|---|
open | The request is open and you have not quoted |
quoted | You sent a quote; the taker has not accepted any quote yet |
won | The taker settled against your quote |
lost | The taker settled against another maker’s quote |
expired | The request ended without a settlement: its window ran out, or the taker cancelled it |
The side shown is the taker’s: on a buy request the taker buys the base token from you.
Quote
Set a price
The price starts at the reference price moved by your last spread on that pair: above it for a buy request, below it for a sell request. This browser remembers the spread. Prices are quote tokens per base token.
Press Quote
Your browser computes the quote amount for the requested size, signs the quote with your quote key and seals it to the taker. The quote is valid for 30 seconds.
You can quote again while the request is open; the new quote replaces your last one. If the taker accepts, the settlement draws on your vault at that moment, so keep enough inventory for every quote that is still valid: the base token for buy requests, the quote token for sell requests.
What a quote signs
The quote key signs one 201-byte message, which the program rebuilds byte for byte when it checks the Ed25519 instruction in the settlement transaction. Integers are little-endian.
The message starts with the 8-byte ASCII tag ASIDEQ01.
| Offset | Bytes | Field |
|---|---|---|
| 0 | 8 | The ASCII tag |
| 8 | 32 | Program id |
| 40 | 32 | Maker wallet |
| 72 | 32 | Taker wallet |
| 104 | 32 | Base mint |
| 136 | 32 | Quote mint |
| 168 | 1 | Taker side: 0 buy, 1 sell |
| 169 | 8 | Base amount, u64, in the base token’s smallest units |
| 177 | 8 | Quote amount, u64, in the quote token’s smallest units |
| 185 | 8 | Expiry, i64, Unix seconds |
| 193 | 8 | Nonce, u64 |
The quote hash is the SHA-256 of this message. Once a quote settles, the program records its hash, and the same quote can never settle again.
The house maker
Aside house quotes every request addressed to it, within seconds. It prices from a reference price plus a spread and signs with its own quote key, the same way any maker does.