• Reading the docs…
Start trading

Trading

Policy

A policy holds your account to the controls a fund or desk keeps: a freeze, the pairs it may trade, the most it may hold of an asset, the addresses it may Exit to, a co-signer above a size, and an auditor who reads every entry. The enclave checks each one on every order and Exit, and nothing on chain shows that the account has a policy. Policy sits on Account under Trade keys, with its state beside the heading: None, In force or Frozen.

Set a policy#

Set a policy (or Change the policy once one is in force) opens the form. Every control starts from the policy as it stands, so changing one leaves the others as they are.

Field What it sets
Auditor key A key that every entry of the account, and every action the policy refuses, is also sealed to. “None” when blank.
Exit allowlist One address per line: Exits then go only to those addresses. Blank allows any address.
Co-sign above A USD threshold and the Co-signer’s key: an order whose notional at its limit is above the threshold waits for the co-signer. The two go together.
Pairs Allow a pair adds a pair the account may trade; with none listed it reads Any pair. A pair’s chip removes it.
Position limits Add a limit names an asset and the most of it the account may hold, counting its open buys.
A loosening waits None, 1 hour, 1 day or 7 days: how long any later loosening of this policy waits before it takes effect.

Set the policy seals it to the enclave with your account’s key; no wallet prompt. A change that holds the account at least as tightly in every control takes effect at once, and the panel reads “Set. The enclave holds this account to it from now.” Anything else is a loosening, which waits the delay of the policy in force: “Set. It loosens the policy, so it takes effect after the delay the policy in force names.” The exact rule is in Tightening and loosening.

The policy in force#

Under the heading the panel lists the policy as the enclave holds it:

Row Reads
Trading and Exits Open, or Frozen.
Auditor The auditor key, to copy, or None.
Exits to Any address, n allowed addresses, or An allowlist on a device that doesn’t hold its addresses.
Co-sign “Above $threshold, by key”, or Off.
Pairs The allowed pairs, or Any pair.
Limits Each limit as an amount and its asset, or None.
A loosening waits No delay, or the delay in hours or days.

A loosening waiting for its slot shows below it, under “Loosens at date, slot n”, with the rows it will change. The policy comes from the enclave and follows you to any device.

Freeze#

Freeze is one press: the account trades and exits nothing until Unfreeze. Freezing is a tightening and holds at once; unfreezing is a loosening and waits the delay. While an unfreeze waits, the button reads Keep it frozen: pressing it keeps the account frozen, and the waiting unfreeze no longer takes effect. An order or Exit placed while frozen is refused with “This account’s policy has it frozen: it trades and exits nothing.”

Refused orders and Exits#

The enclave refuses what the policy does not allow, and the order or Exit shows the reason in words:

The app shows When
“This pair is outside the pairs this account’s policy allows.” The order’s pair is not among the allowed pairs.
“It would take a position past this account’s policy limit, counting open orders.” A buy would take the account’s holding past its limit.
“The destination is not on this account’s Exit allowlist.” An Exit’s destination is not on the allowlist.
“This account’s policy has it frozen: it trades and exits nothing.” The account is frozen.

The Exit form says the same before the press: the Exit button reads “Frozen by this account’s policy” or “Not on the Exit allowlist”. A refused Exit shows in the Exit list as “Refused · reason”.

The allowlist stays as a root inside the policy, and its addresses stay on the device that set it. On another device the panel asks for them under “Exits from this device need the allowlist’s addresses”: paste the list, one address per line, and Keep on this device checks it against the root before Exits use it. Until then the Exit form reads “Add the allowlist on Policy first”.

Orders held for the co-signer#

An order above the co-sign threshold is accepted and its funds reserved, but it waits in the enclave instead of joining a Crossing. It shows “Held for the co-signer” in the ticket and in Placed here, and the Policy panel lists it under Held for the co-signer: side, size and pair, with its order id to copy.

  1. Send the co-signer the order id#

    Copy the id from the held order’s row.

  2. The co-signer signs it#

    On their own Account, under Co-sign an order for another account, the co-signer pastes the id and presses Sign with this wallet. Their wallet signs the order id, and the panel shows Signature for the owner to copy.

  3. Release it#

    Paste the signature into the held order’s row and press Release. The order enters the next Crossing.

When the connected wallet is itself the co-signer, the row shows Co-sign and release, which signs and releases in one press. Cancel on the order’s row in the Placed here tab takes a held order out instead; it reads “Cancelling at the next Crossing” until that Crossing’s Commit.

The auditor#

The auditor reads the account’s entries with its own key, from the public Commits alone: every fill, deposit, Exit and fee, and every order or Exit the policy refused, each as the account received it. Every entry a Commit writes carries a second slot of one fixed size, sealed to the account’s auditor or filled when it has none, so the chain shows no difference between an account with an auditor and one without. An auditor reads the trail with the SDK (The auditor’s trail).