Quote as a maker

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.

StateMeaning
openThe request is open and you have not quoted
quotedYou sent a quote; the taker has not accepted any quote yet
wonThe taker settled against your quote
lostThe taker settled against another maker’s quote
expiredThe 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

  1. 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.

  2. 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.

OffsetBytesField
08The ASCII tag
832Program id
4032Maker wallet
7232Taker wallet
10432Base mint
13632Quote mint
1681Taker side: 0 buy, 1 sell
1698Base amount, u64, in the base token’s smallest units
1778Quote amount, u64, in the quote token’s smallest units
1858Expiry, i64, Unix seconds
1938Nonce, 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.