FurlPay Docs
Open App
  • Platform Overviewupdated
  • API Referencenew
  • 5-Minute Sandbox Quickstartupdated
  • Sandbox & Test Assetsnew
  • Create a Developer Account
  • Identity & KYC Verification
  • Passkeys & Biometrics
  • Transaction Statuses & Retries
  • Frequently Asked Questions
  • Core Primitives & Money Modelnew
  • Merchant Payments & Invoices
  • Contractor Payroll & Batch Payouts
  • EIP-3009 Gasless & Recurring
  • Circle CCTP Cross-Chain
  • LI.FI Cross-Chain Swaps
  • Solana Actions & Blinks
  • Wallet Infrastructure & Handles
  • Market Data Streams
  • Gasless Transfers Availability
  • Deposits & Withdrawals Support
  • Agentic Finance Overviewupdated
  • x402 & MPP Settlement Gatewayupdated
  • Agent Identity, Trust & TAP Mandatesupdated
  • Autonomous Finance & Policies
  • Claude Connector (MCP + OAuth 2.1)
  • AI Assistants & HITL Approvals
  • x402 Monetization Basics
  • Settlement Workspace & Maker-Checker
  • Transaction Truth & Double-Entry Ledgerupdated
  • Par 1:1 Routing Simulator Overview
  • Par Quote Engine & Swap Lifecycle
  • Par Networks & Settlement Assets
  • Par Operator Console
  • Par API Reference
  • Par Webhooks
  • Par AML & Travel Rule
  • Screening, Monitoring & Travel Rule
  • Circle Integration
  • Stripe Crypto Integration
  • Persona KYC Integration
  • API Conventions & Idempotencyupdated
  • Authentication, Keys & Versioning
  • Webhooks (PUSH HMAC-SHA512 & PULL)
  • Errors & Exception Playbooks
  • Rate Limits & Retry-After
  • Official SDKs (TS, Python, Go, Rust)updated
  • FurlPay CLI (@furlpay/cli) & MCP
  • Monorepo & Package Reference
  • SDK & API Integration Support
  • Cryptographic Architecture & KMS
  • Security Posture & Isolation
  • Signing Boundaries & WebAuthn
  • Production Configuration & Workers
  • Colocation Directory
  • Security & Compliance Frameworks
  • Regulatory & Launch Posture
  • Privacy, Redaction & GDPR

CLI full reference

  • CLI overview & install
  • Command index
  • MCP tool reference
  • Honesty matrix

Resources

  • Interactive Developer Workbench
  • Operational Status (/status)
  • Release Changelog
  • OpenAPI 3.1 Spec
  • Postman Collection
  • llms.txt (AI Index)
  • llms-full.txt (Full Docs)
  • Network & Assets
  • Proof of Reserves
  • Terms of Service
  • Privacy & DPA
  • Regulatory Disclosures
  • Security Disclosures
  • Contact Support
  • GitHub
Docs/04. Treasury and Institutional Finance/Par Quote Engine & Swap Lifecycle

Par 1:1 FX

Quote engine & swap lifecycle

A Par swap is a quote, a swap, a deposit, a screen, and a settlement — in that order, with every transition checked against an explicit table. This page is the state machine as implemented, including the states where a swap stops and what an operator can do about it.

The quote engine

A quote fixes the rate, the corridor and the amount for 15 minutes. It is the unit of price certainty: after it expires, a new quote is required, and the rate a customer gets is whatever the next quote says.

ParameterTypeDescription
quoteIdrequireduuidServer-minted identifier of the locked quote. Required to open a swap.
sellTokenrequiredUSDT | USDCAsset the customer sends.
buyTokenrequiredUSDT | USDCAsset the customer receives. Must differ from sellToken.
sellNetworkrequirednetwork idSource chain. Must be a network the sell token settles on.
buyNetworkrequirednetwork idDestination chain. Must be a network the buy token settles on.
sellAmountrequireddecimal stringAmount to sell. At most 6 decimals, greater than zero, at most 50,000,000.
operatorRefoptionalstring ≤64Your own reference. Echoed onto the swap and the invoice.

The quote is single-use

Creating a swap consumes the quote atomically with the swap write, so the same quote cannot open two swaps. If a swap request is retried, send the same idempotencyKey and the rail returns the swap that already exists rather than opening a second one.

An indicative rate is what the market is doing right now — the Par console shows it beside the locked rate so you can see what the par guarantee is worth. An executablequote is the 1.000000 contract above. Only the second one binds Furlpay.

bash
curl -X POST https://furlpay.com/api/par/quotes \
  -H "authorization: Bearer sk_test_..." \
  -H "content-type: application/json" \
  -d '{
    "sellToken": "USDT",
    "buyToken": "USDC",
    "sellNetwork": "tron",
    "buyNetwork": "base",
    "sellAmount": "100000"
  }'

The swap state machine

Eight states, and a table of legal transitions between them. An illegal transition is a409, not a silent move of money.

Rendering diagram…
Par swap states. 'failed' and 'expired' are sinks; 'aml_screening' is a parking state, not a failure.
ParameterTypeDescription
lockedoptionalstateQuote consumed, swap open, deposit address assigned. Awaiting the sell leg.
deposit_detectedoptionalstateThe sell leg was seen on chain (mempool or first confirmation). Not yet final.
deposit_confirmedoptionalstateThe network's own confirmation depth is reached. Depth is per-chain, not global.
aml_screeningoptionalstateBoth legs are being screened. A 'review' verdict parks the swap here and opens a compliance case.
settlingoptionalstateApproved and past screening. Vault legs are being moved and the ledger is being posted.
completedoptionalstateTerminal. The payout reference is recorded and the invoice line is billed.
failedoptionalstateTerminal. Carries a failure reason. A sanctions block ends here.
expiredoptionalstateTerminal. The deposit arrived after the rate lock closed. No settlement, no fee.

A review verdict parks the swap; it does not fail it

Screening returns three verdicts. allow continues to settlement. block fails the swap permanently — nothing is settled, and an operator cannot approve it away.

review is neither. The swap stays in aml_screening, a compliance case is opened against it, and the operator resolves that case. Approving the case resumes settlement from where the swap stopped. Failing the swap on a review verdict instead would leave an approved case with a dead swap and no path to payout.

Deposit detection and confirmation

There are two ways a deposit is reported, and they are not interchangeable.

  • Inbound notification — a chain watcher or your own operator posts to POST /api/webhooks/par-deposit with an HMAC signature over the raw body. The route verifies the signature, rejects a stale timestamp, and refuses a deposit hash that another swap already claimed.
  • On-chain verification — in a live or production deployment the rail reads the transaction over the network's RPC and checks it itself: the receipt succeeded, the token contract matches, the recipient matches, the amount is at least the quoted amount, and the confirmation depth is deep enough. A signed report is not enough on its own.

Confirmation depth is a property of the chain

A 12-confirmation Arbitrum deposit and a 32-slot Solana deposit are not the same risk. Each network carries its own required depth, and a deposited leg is not paid out until its own network's number is reached.

Settlement

Settlement is where the money actually moves, and it moves in the ledger first. The rail debits the payout vault, credits the collection vault, and posts a balanced double-entry pair — and only then records the payout reference. If the ledger posting fails, the swap does not report as completed.

The payout is executed by the deployment's payout executor, and the deployment does not get to choose per call: in production the only executor is the KMS-backed on-chain one. It builds an ERC-20 transfer from the custody vault, has the configured key-management backend sign it under a deny-by-default transaction policy, broadcasts it over the chain's RPC, and waits for the network's confirmation depth.

  • The deterministic simulator cannot run in production. It refuses there rather than returning a hash. A swap that cannot be paid is held at settling with the refusal recorded — not failed, and not reported as completed.
  • The key can sign one transaction class. The signing guard refuses anything that is not this transfer, of this token, to this address, on this chain. A key provisioned for settlement cannot be used for anything else.
  • A swap is paid once. The payout slot is claimed atomically before the broadcast, so two concurrent settlements cannot both send. A retry after a crash polls the existing transaction instead of sending a second one.
  • The rail is checked at the broadcast boundary. A pause that lands between the request and the signature stops the payout — and an unreadable control store is treated as paused, because settlement never proceeds on an assumption.

A simulated payout is not a transaction

A settlement that ran through the simulator carries a 0xsim-prefixed reference, which is deliberately not a valid transaction hash. No explorer, reconciliation job or downstream system can read it as an on-chain transfer.
Did this page help?
Edit this page on GitHub

Previous

Par 1:1 Routing Simulator Overview

Next

Par Networks & Settlement Assets