Fill or refund one committed order at its committed price and consume or return
its receipt. escrow is the order's escrowed budget, order fee, and reserved
subsidy. Returns
(reason, receipt to keep, escrow left over, quantity, amount, trading_fee, builder_fee, referral_fee, subsidy_used, inventory_impact).
The amounts are zero on a refund. For a mint amount is the all-in cost and
inventory_impact the charge; for a sell amount is the proceeds and
inventory_impact the rebate.
Aborts only on a companion bookkeeping error: W not allowlisted, the version,
freeze, or snapshot-stage gate, another market's receipt (EWrongMarket), a
receipt not admitted or without a price (EWrongStage), or escrow below
budget + order_fee + subsidy_reserved (EEscrowMismatch). Every market
condition returns a refund reason instead, 0 for a fill: 5 at or past the
deadline, which also covers expiry and settlement; 9 when USDC sent to the
receipt's receive address would abort the transaction (denied: the address is
on USDC's deny list for the current epoch, or USDC is globally paused), so
nothing is sent there; 2 when no Pricer exists at the tick; then the fill's
own 1 (the order's limits), 2 (admission), 4 (a pinned node is missing, a
backstop), and 8 (the market's cash after the fill would not cover its required
cash).
A mint fill pays the premium, the trading fee net of the referral share, the
used subsidy, the order fee, and the inventory-impact charge into market cash,
sends the builder and referral fees, returns unused subsidy to the incentive
balance, emits OrderMinted with no congestion penalty, and returns the receipt
open. A sell fill pays the proceeds (redeem value plus inventory-impact rebate,
less the trading and builder fees) to the receipt's receive address, keeps the
trading and order fees in market cash, emits LiveOrderRedeemed, and returns
the receipt open with the replacement position of a partial close, or consumes
it on a full close. A builder or referral fee whose recipient is denied stays in
market cash instead, and the events still report it as charged. A refund keeps
the order fee in market cash for reasons 1 and 2, returns the reserved subsidy
to the incentive balance, prunes a mint's emptied unpinned nodes, returns the
rest of the escrow, and returns a sell's receipt open or consumes a mint's.
Every outcome takes the order out of the ledger.
Fill or refund one committed order at its committed price and consume or return its receipt.
escrowis the order's escrowed budget, order fee, and reserved subsidy. Returns(reason, receipt to keep, escrow left over, quantity, amount, trading_fee, builder_fee, referral_fee, subsidy_used, inventory_impact). The amounts are zero on a refund. For a mintamountis the all-in cost andinventory_impactthe charge; for a sellamountis the proceeds andinventory_impactthe rebate.Aborts only on a companion bookkeeping error:
Wnot allowlisted, the version, freeze, or snapshot-stage gate, another market's receipt (EWrongMarket), a receipt not admitted or without a price (EWrongStage), orescrowbelowbudget + order_fee + subsidy_reserved(EEscrowMismatch). Every market condition returns a refund reason instead,0for a fill: 5 at or past the deadline, which also covers expiry and settlement; 9 when USDC sent to the receipt's receive address would abort the transaction (denied: the address is on USDC's deny list for the current epoch, or USDC is globally paused), so nothing is sent there; 2 when noPricerexists at the tick; then the fill's own 1 (the order's limits), 2 (admission), 4 (a pinned node is missing, a backstop), and 8 (the market's cash after the fill would not cover its required cash).A mint fill pays the premium, the trading fee net of the referral share, the used subsidy, the order fee, and the inventory-impact charge into market cash, sends the builder and referral fees, returns unused subsidy to the incentive balance, emits
OrderMintedwith no congestion penalty, and returns the receipt open. A sell fill pays the proceeds (redeem value plus inventory-impact rebate, less the trading and builder fees) to the receipt's receive address, keeps the trading and order fees in market cash, emitsLiveOrderRedeemed, and returns the receipt open with the replacement position of a partial close, or consumes it on a full close. A builder or referral fee whose recipient is denied stays in market cash instead, and the events still report it as charged. A refund keeps the order fee in market cash for reasons 1 and 2, returns the reserved subsidy to the incentive balance, prunes a mint's emptied unpinned nodes, returns the rest of the escrow, and returns a sell's receipt open or consumes a mint's. Every outcome takes the order out of the ledger.