FxEscrow contract, a Circle-controlled
funding wallet delivers the maker’s leg on the maker’s behalf through a
delegate-deliver path, and the maker authorizes that delivery with a signature.
The credit line
Each approved maker has one credit line, represented by theSettlementAdvanceCredit resource and retrievable through the
Get settlement advance credit
endpoint. The credit line tracks the maker’s borrowing limit, current usage, and
available headroom both overall and per currency. It also holds the onchain
repayment address and the advance fee rate, expressed in basis points (bps).
Delegate funding
Settlement Advance is built on a delegate funding primitive on the existingFxEscrow contract. Rather than calling the direct maker delivery path with
their own funds, the maker authorizes a Circle-controlled funding wallet to
deliver the maker’s leg on their behalf.
The maker grants this authorization by signing a Uniswap Permit2
PermitWitnessTransferFrom payload whose permitted.amount is 0. Because the
permitted amount is zero, no tokens ever leave the maker’s wallet. Permit2 acts
purely as an authorization carrier, not as a transfer instruction.
The authorization is bound to a single trade through the
DelegateFundingAuthorization witness, which captures these values:
id: the onchain trade IDfunder: the Circle-controlled funding walletrecipient: the escrow address that receives settlement proceedstoken: the base-token ERC-20 contractamount: the authorized amount
spender is the FxEscrow contract, and the typed-data
primaryType is DelegateFundingAuthorizationPermitWitnessTransferFrom. For
background on how Permit2 authorizations work in StableFX, see
Grant a USDC allowance with Permit2.
Collateral
The taker’s USDC settlement proceeds are held in escrow to back the advance. This collateral builds on the risk-buffers model: just as StableFX holds buffers from both parties to manage counterparty risk, the taker’s proceeds are held in escrow as security for the funds Circle advances to the maker. To understand how StableFX uses escrow to manage exposure during trade execution, see StableFX risk buffers.Reservations
A reservation is an optional, short-lived hold that a maker can place on their credit line before requesting an advance. Reserving credit locks a fee snapshot so the maker knows the fee before committing. A reservation expires at the time recorded in itsexpirationDate, after which the maker must reserve again. A
maker can skip the reservation and request an advance directly.
A credit line has at most one active reservation. Submitting a new reservation
with a different idempotency key replaces an existing active reservation. The
SettlementAdvanceReservation resource includes an id, an amount (currency
and amount), an expirationDate, a fee, and a status drawn from
ReservationStatus:
funds_reserved: the reservation is active and holding creditexpired: the reservation expired before it was consumedreplaced: a newer reservation replaced this oneconsumed: the reservation was used to fund an advance
The advance lifecycle
An advance moves through the states defined byAdvanceCreditStatus. The maker
drives the advance over the API: optionally reserving credit, pre-signing to
obtain the Permit2 typed data, requesting the advance with the signed
authorization, and tracking status through to repayment. Funding runs
asynchronously after the request.
The states are:
funds_reserved: credit is reserved and awaiting maker actionrequested: the maker submitted the signed authorization and Circle is moving fundsdisbursed: the advanced funds were delivered to the funding pass-through walletpast_due: thedueDatepassed without full repaymentpaid: the advance is fully repaid
rejected: the credit line rejected the requestexpired: the reservation expired before it was consumedcanceled: the maker or Circle canceled the advance
SettlementAdvanceDetail resource reports an advance through advanceId,
tradeId, contractTradeId, status, the advance amount, the collateral
amount, and the fee fields described in the next section.
Fees and repayment
Each advance carries a fee rate in bps, recorded asfeeBps on the advance and
derived from the credit line’s stableFxFeeInBps. The detail resource exposes
the fee in stages:
accruedFee: the fee accrued so far. Omitted until the advance is funded.fee: the total fee for the advance. Omitted until the advance is fully repaid.
fundedAt and dueDate fields are also omitted until the advance is
funded. Once funding completes, dueDate records the repayment due date.
Repayments apply on a first-in-first-out (FIFO) basis across the maker’s
outstanding transfers in the same currency: the oldest outstanding transfer is
repaid first. If a repayment exceeds the outstanding balance, the excess is
recorded as a credit over-repayment. The detail resource lists repayments in
repayments, and records feeCollectedAt once the fee is collected, which
happens after the advance is fully repaid.
To request, fund, and repay an advance step by step, see
Fund a trade with Settlement Advance.
Settlement Advance applies only to per-trade instant settlement and to pairs
where the maker holds an active credit line. For the currencies and pairs
StableFX supports, see
StableFX supported currencies.