Skip to main content
The orchestrator owns the order (intent) lifecycle. It checks every rule when an order opens, and it releases escrowed USDC only against a valid claim or the depositor’s own release.

The order

signal_intent

signal_intent(taker, provider, amount, rail, rate_e6, expected_amount_minor, payer_id_hash, nonce) -> BytesN<32>
  1. taker.require_auth(), and the taker is not the provider.
  2. min_amount ≤ amount ≤ max_amount.
  3. The provider has terms for the rail, or RailNotAccepted.
  4. rate_e6 ≥ min_rate_e6, or RateBelowMinimum. expected_amount_minor ≥ ceil(amount × rate_e6 / 10^13), or FiatBelowRate.
  5. The provider’s allowed takers are empty or include the taker, or TakerNotAllowed.
  6. The retail quota applies to the party that is not a registered LP. Two LPs trade with no quota.
  7. The order ID is sha256(contract ‖ taker ‖ provider ‖ amount ‖ rail ‖ rate_e6 ‖ payer_id_hash ‖ nonce). An existing ID fails with IntentExists.
  8. The escrow address comes from config, never from the caller. The amount is locked.
  9. pay_by = now + pay_window_secs and settle_by = pay_by + settle_grace_secs.
20 USDC is amount = 200_000_000. ₱57.00 is 5,700 centavos, so rate_e6 = 5_700 × 10^6 = 5_700_000_000. ceil(200_000_000 × 5_700_000_000 / 10^13) = 114_000 centavos, so the taker pays ₱1,140.00.

fulfill_intent

fulfill_intent(intent_hash, claim)
  1. The order is ACTIVE and now ≤ settle_by.
  2. claims.verify(claim) passes: a registered verifier key for this network, inside the claim’s issue and expiry times.
  3. claim.satisfied is true, and the claim’s policy is the registered policy for the order’s rail and direction.
  4. The claim’s context_digest equals the digest the contract rebuilds from the order: order ID, expected amount, currency, payee hash (from the live rail terms, which cannot change while locked), payer hash and the order reference.
  5. claims.consume_nullifier(claim.nullifier) succeeds, or NullifierUsed.
  6. fee = amount × fee_bps / 10_000. The escrow releases to the taker. Status becomes FULFILLED.

Other exits

Config and LP registry

register_lp(admin, lp), revoke_lp(admin, lp) and is_lp(addr) manage the LP registry. Registration exempts an address from the retail quota. It gives no power over anyone’s funds.