Skip to main content
These charts follow a trade from the user’s request to settlement. Each one separates what happens offchain from what happens onchain, so a maker can see which steps it serves over HTTP, which steps it performs in its own systems and which steps are Solana transactions. Maker Quotes, Maker Direct Fills and Maker Escrow Fills define each endpoint, field and check. This page shows how they fit together.

Reading the Charts

  • Offchain: the grey group. The user’s app, DFlow, the maker’s HTTP endpoints and the maker’s own systems.
  • Onchain: the blue group. Solana and the orchestrator program, which holds the order and its escrow.
  • Crossing the line: an arrow from the offchain group to Solana is a transaction or an account read, and an arrow back is something the offchain side observes. DFlow never sends a transaction for the maker.
  • Arrows: solid arrows are requests or transactions, dashed arrows are replies or observed results, and open-headed arrows are notifications that nobody waits on.

Direct Fill: Buying an Equity

The maker quotes rfqFill, so it holds the equity. The user’s transaction opens an order and fills it in the same transaction, and the maker co-signs the fill.
  1. Quote: the maker answers /quote. The quote names the maker’s own input and output token accounts.
  2. Selection: DFlow builds the transaction after it picks the quote. The order address exists only from this point, so /selected carries it. DFlow does not wait for the answer.
  3. User signature: the user signs before the maker sees the transaction.
  4. Last look: the maker checks the transaction against the quote ID and order address it stored from the notice. Nothing is onchain yet, so a rejection costs nobody anything.
  5. Settlement: the maker co-signs and submits. The order opens, fills and closes in one atomic transaction. The user never holds an open order.

Direct Fill: Selling an Equity

A sell is always a direct fill. The maker pays USDC from its inventory, so it needs the settlement mint on hand. The flow matches a buy with the token directions reversed.

Escrow Fill: Buying an Equity

The maker quotes rfqOrder because it does not hold the equity. The user’s transaction only opens the order and escrows the USDC. The maker acquires the equity offchain, then fills the order in a transaction of its own.
  1. Quote: the quote carries no token accounts, because the maker picks them when it fills.
  2. Selection: /selected arrives before the user signs. The order account may never exist if the user declines or the transaction fails, so the maker waits for it and does not refuse the notification.
  3. Transaction 1: the user’s app submits it to Solana itself. DFlow does not forward it, and the maker does not co-sign it. Its orchestrator instruction only opens the order and escrows the USDC.
  4. Acquisition: the maker starts once it sees the order account. The purchase is offchain, but the equity must then arrive as tokens in the maker’s output token account, which is an onchain step. The next section describes both.
  5. Transaction 2: the maker fills the order with its own transaction. DFlow does not call /submit-transaction for an rfqOrder quote.
  6. Outcome: the order ends in a fill, a cancel or an expiry. The app watches transactions that mention the order for its final RfqOrderEvent. Detecting Escrow Fill Outcomes describes how.

Acquiring the Equity Offchain

DFlow sees none of the acquisition. The maker buys the equity through whatever source it uses, in its own systems and on its own terms. Everything the maker needs to size and time the purchase is onchain in the order account and its escrow. The acquisition has an onchain half. A purchase offchain gives the maker no way to pay the user until the equity exists as tokens in the token account the fill pays from. Your source or your own systems must mint or transfer those tokens to that account with a Solana transaction, and the maker confirms the balance before it fills.
  • Amount: the maker pays received × quoted_out ÷ quoted_in, rounded down, where received is the USDC that reaches its account after any platform fee or Token-2022 transfer fee. The escrow can be smaller than the quote’s ceiling, so the maker sizes the purchase from the escrow it reads.
  • Price risk: the price is fixed by the quote and the maker alone bears any move in the market while it acquires the equity.
  • Deadline: the fill must land by last_fillable_slot. The maker also needs the equity in the token account it pays from before it submits, because the transaction reverts if that account cannot cover the payment.
  • Failure: a maker that cannot acquire the equity closes the order by last_fillable_slot instead of leaving it to expire. The close returns the user’s USDC at once.
The maker fills with the equity already in its token account. The fill itself is the same instruction a direct fill uses, described in Read the Fill Instruction.

Order Lifecycle

An order has one onchain account. Each transition emits an RfqOrderEvent. A fill, cancel or expiry also closes the account. The user cannot close the order. last_fillable_slot is the earlier of the slot of the quote’s expiry and the open slot plus up to 150 slots. Fill Deadline describes how it is set.