Inventory

Inventory

Become a maker in one transaction, then deposit into and withdraw from vaults the program controls, one per mint.

Registering is permissionless: any wallet can become a maker once the desk is unlocked. Each step below is one transaction the desk builds and your wallet signs, on /desk/inventory.

Register

  1. Unlock the desk

    Registering writes your quote key on chain, so the desk has to be unlocked first. See Unlock the desk.

  2. Press Register as a maker

    The transaction creates your maker account, naming your wallet as owner and your quote key as the key the program accepts quotes from. Once it confirms, requests addressed to you start arriving on /desk/quotes.

One more transaction, set_quote_key, replaces the quote key or marks the maker inactive. Quotes signed with an old key stop settling as soon as it confirms, and an inactive maker’s quotes do not settle at all.

Deposit

Pick a mint and an amount, press Deposit and sign. The tokens move from your wallet into your vault for that mint, a token account the program controls through your maker account. The first deposit in a mint creates that vault, unless a settlement created it first. Your inventory per mint is the vault’s balance. A SOL deposit wraps the SOL in the same transaction.

A settlement pays out of one of your vaults and into the other. The vault you pay out of has to hold your leg; the one you receive into is created by the settlement if it does not exist yet. So a deposit in the base token lets you fill buy requests, and a deposit in the quote token lets you fill sell requests.

Quote only what your vaults can cover. A settlement against a vault that is short fails in simulation, before the taker signs anything.

Withdraw

Pick a mint and an amount, press Withdraw and sign. The tokens move from your vault back to your wallet; SOL comes back unwrapped, as native SOL. You can withdraw at any time, whether or not your maker is active and whether or not the desk still lists the mint, including while quotes of yours are still valid; a quote that your vault can no longer cover will fail if the taker accepts it.

States

StateMeaning
Not a makerNo maker account for this wallet yet
PendingThe transaction is signed and the desk is watching it confirm
ConfirmedBalances show the new amounts
FailedThe stage that failed is named: build, wallet rejected, wallet changed it, simulation or send

Vault balances

Your balances per mint come from GET /v1/vaults/{maker} and update over the live channel after every deposit, withdrawal and fill. Each fill moves the taker’s leg into one of your vaults and your leg out of another.