Last updated
AFX uses a central limit order book (CLOB) matching engine with on-chain verifiable settlement.
Orders are matched using price-time priority:
Price priority — The best priced orders are matched first. Buy orders at higher prices and sell orders at lower prices have priority.
Time priority — Among orders at the same price, earlier orders are matched first.
When a buy price ≥ sell price, the orders are matched. The trade executes at the maker's price (the price of the resting order in the book).
The Last Price is determined by the first trade in the order book — the intersection of the highest buy price and the lowest sell price.
AFX implements platform-level self-trade prevention. Self-trades are detected and blocked automatically.
Detection criteria:
Both orders originate from the same user's contract address.
A new taker order enters at a price that would match against the user's own resting maker order.
Handling: Cancel Newest — The incoming taker order is rejected (not matched) if it would result in a self-trade. The existing maker order in the book remains unchanged. This approach maintains order book stability and is compatible with on-chain verification.
Last updated

