Predict Market Desk Connect to Dexsport
DexsportMarketsMechanics Connect to Dexsport

Home › Mechanics › On-chain versus off-chain order matching

Where the matching happens: on-chain, off-chain or hybrid

Where the matching happens: on-chain, off-chain or hybrid — Dexsport

Matching and settlement

When people talk about an on-chain sportsbook or exchange, they often collapse two quite different processes into one word: "on-chain". Matching is the act of finding a counterparty and agreeing a price. Settlement is the act of moving value and making the outcome final. These can happen in the same place or in entirely different places, and the distinction matters far more than the marketing label on the front page.

A matching engine takes incoming orders and pairs buyers with sellers. On a traditional sportsbook there is no matching at all in the peer-to-peer sense: the book itself is the counterparty to every bet, and it manages risk by adjusting prices. On an exchange-style platform, orders are matched against each other, either continuously as they arrive or in periodic batches. Where that matching happens — inside a smart contract, on a private server, or in some combination — determines who can see the order flow, who can halt trading, and what happens if the operator disappears.

Settlement is the reckoning. For a sports bet, settlement means deciding the result and paying the winner. On-chain settlement means the payout is executed by a contract according to rules written in code, with the transaction visible on a public ledger. Off-chain settlement means an internal database records who is owed what, and the blockchain, if it is involved at all, only sees deposits and withdrawals. Many platforms that describe themselves as decentralised are in fact off-chain for both matching and settlement, using a token or a wallet connection as a thin layer over a conventional database.

The trust model follows from these choices. If matching and settlement are both on-chain, you are trusting code and the consensus of the underlying chain, but you are also accepting its costs and its public exposure. If both are off-chain, you are trusting the operator in the ordinary way, and the crypto elements may add little beyond faster deposits. The interesting and most common case is the hybrid: matching off-chain for speed, settlement on-chain for finality. That combination can work well, but it splits trust in ways that are easy to misread.

A careful reader should also separate custody from settlement. A platform might settle trades on-chain while holding your funds in a pooled wallet it controls, which means the on-chain settlement is real but your claim on the pool is not enforced by code. Conversely, a platform might hold funds in a non-custodial contract while matching orders on a private server. Neither arrangement is automatically better; they simply place the trust in different places, and the questions you need to ask differ accordingly.

Fully on-chain markets

In a fully on-chain market, orders live in a smart contract. Placing an order is a transaction; cancelling it is another; filling it is a third. The contract holds the rules for matching — whether that is a simple order book, a constant-product automated market maker, or a peer-to-pool model where you bet against liquidity rather than a named counterparty. Because every step is a transaction, anyone can inspect the flow, and the platform cannot quietly change the price you were shown or refuse to honour a fill that the contract accepted.

The strongest version of this model is the automated market maker applied to betting. Instead of waiting for a counterparty, you trade against a pool of liquidity that prices outcomes according to how much has been staked on each side. The pool takes the other side of your bet, and the pricing curve adjusts as the balance shifts. Settlement is then a matter of the contract reading an outcome — usually via an oracle — and distributing the pool accordingly. There is no operator deciding who wins; there is a contract applying a rule.

The trade-offs are real. Every action costs gas, and on a congested chain that cost can be unpredictable. Order placement and cancellation become expensive in a way that a centralised book never is, which discourages the kind of rapid order adjustment that professional traders rely on. Throughput is bounded by the chain, so a busy market can see orders queue and fill at prices that have already moved. These are not fatal problems, but they shape who can use the market and how.

There is also the oracle question, which is where many "fully on-chain" claims get softer. The contract may be on-chain, but the result of a football match is not. Someone or something has to feed the outcome into the contract, and that feed is a point of trust or a point of failure. A decentralised oracle with multiple reporters and dispute periods is more robust than a single signer, but it is still an external input. If the oracle is wrong, the contract settles wrongly and there is often no appeal beyond whatever dispute mechanism the design includes.

Transparency cuts both ways. A public order book reveals positioning, which can be exploited by anyone watching the mempool. Front-running and sandwiching are familiar problems on public chains, and a betting market with visible pending orders is exposed to them unless the design includes commit-reveal schemes or private order flow. Fully on-chain markets are therefore most comfortable for users who value verifiability and censorship resistance over speed and cost, and least comfortable for anyone trying to move size without being seen.

Finally, consider what "fully on-chain" means for custody. If the contract holds the funds and pays out by rule, then the operator cannot abscond with the pool — but a bug in the contract can still drain it, and upgrades or admin keys can reintroduce operator control. The honest version of this model is not trustless in an absolute sense; it is trust-minimised, with the remaining trust concentrated in the code, the oracle, and whoever holds the keys to change either.

Off-chain matching with on-chain settlement

This is the architecture most exchange-style crypto platforms actually use, and it is worth understanding precisely. Orders are submitted to a server, matched in a private engine, and the resulting trades are batched and settled on-chain. The matching is fast because it is not constrained by block times or gas. The settlement is on-chain because the final transfer of assets is recorded on a public ledger, often through a smart contract that enforces the terms of the batch.

The appeal is obvious. You get the responsiveness of a centralised book with the finality and auditability of a public chain. A trader can place and cancel orders at no cost, and only executed trades incur settlement costs, which can be netted across many participants so that a hundred trades might resolve into a handful of on-chain transfers. This is how many decentralised exchanges achieve usable performance without giving up on-chain finality.

The trust assumptions, however, are not the same as a fully on-chain market. The matching engine sees your orders before they settle, which means it can in principle trade ahead of you, prioritise its own flow, or simply go down at an inconvenient moment. The settlement contract may guarantee that executed trades are honoured, but it does not guarantee that your order was treated fairly before execution. That gap between matching and settlement is where the operator's discretion lives, and it is the part of the design that deserves the most scrutiny.

There is also a liveness question. If the matching engine stops, the market stops, even though the settlement layer is still running. Funds held in the settlement contract may be recoverable, but open orders and positions may be stuck until the operator resumes or a fallback mechanism activates. Some designs include a "force exit" or "escape hatch" that lets users withdraw directly from the contract if the operator goes silent; others do not, and the difference is significant.

Custody is the other variable. In some hybrid designs the settlement contract holds user funds and the matching engine merely instructs it, which means the operator cannot move funds without an on-chain transaction that users can see. In others the operator holds funds in a pooled wallet and settles internally, using the chain only for deposits and withdrawals. The first is meaningfully more constrained than the second, and the phrase "on-chain settlement" is used for both. The question to ask is not whether settlement is on-chain but whether the contract, rather than the operator, controls the assets in between.

A final edge case: what happens when the chain itself is congested at the moment of settlement? A batch that would normally settle cheaply may become expensive or delayed, and the operator may have discretion over which trades are included in which batch. That discretion is a form of ordering power, and it should be described in the platform's documentation rather than left implicit. Where it is not described, assume it exists.

Latency and cost

Latency and cost are not abstract technicalities; they determine what kind of market you are in. A fully on-chain order book inherits the block time of its chain. If blocks arrive every twelve seconds, an order placed now may not be fillable for twelve seconds, and the price may have moved by then. On faster chains or layer-two networks the gap narrows, but it never disappears, and the trade-off between speed and decentralisation is a genuine one rather than a marketing problem to be waved away.

Off-chain matching removes that constraint almost entirely. A centralised engine can match in milliseconds, and the settlement can happen later in a batch. This is why hybrid designs dominate for active trading: they let the matching layer behave like a conventional exchange while the settlement layer provides the audit trail. The cost is paid in trust, as discussed, but the latency benefit is real and worth stating plainly.

Cost follows a similar pattern. On-chain actions cost gas, and gas prices fluctuate with network demand. Placing, cancelling, and filling orders each cost something, which makes strategies that rely on frequent cancellation uneconomic. Hybrid designs push most of that cost into periodic settlement, where it can be shared and netted. A platform that charges no trading fee may still be passing on settlement costs, and a platform that charges a fee may be absorbing them; the headline number rarely tells the whole story.

For bettors rather than traders, the cost picture is simpler but still worth understanding. A fully on-chain betting pool charges you in gas to enter and to claim, and the pricing curve embeds a margin for the liquidity providers. A hybrid sportsbook may charge a margin in the odds and settle internally, with the chain only involved when you deposit or withdraw. Neither is free, and the question is whether the costs are transparent and whether they are proportionate to the trust you are being asked to extend.

There is a subtler cost that rarely appears in fee schedules: the cost of being seen. Public order flow on a fully on-chain market exposes your intentions, and the resulting adverse selection — being filled only when the market moves against you — is a real expense. Private matching avoids this at the price of trusting the matcher. This is the same trade-off that traditional finance navigates with dark pools and payment for order flow, and crypto has not escaped it; it has merely re-expressed it in new vocabulary.

Finally, consider the cost of exit. Withdrawing from a fully on-chain contract is a transaction you can initiate yourself, subject to gas. Withdrawing from a hybrid platform may depend on the operator processing a withdrawal request, and during busy periods that can take time. The ability to exit promptly and at a known cost is part of the overall cost of using a platform, and it is worth testing with a small amount before committing larger funds.

Trust assumptions

Every platform asks you to trust something. The useful question is what, and how much. A fully on-chain market asks you to trust the contract code, the oracle that reports outcomes, and the chain's consensus. It does not ask you to trust an operator to honour your bet, because the contract enforces the payout. But it does ask you to trust that the code has no bugs and that the oracle is honest, and those are not small asks.

A hybrid platform asks you to trust the operator's matching engine to treat your orders fairly, to remain available, and to process settlements and withdrawals as promised. The on-chain settlement provides evidence that trades happened, but it does not by itself prove that the matching was fair or that the operator did not trade ahead of you. The trust is therefore broader than in the fully on-chain case, even though the settlement is visible.

A fully off-chain platform asks you to trust the operator in the ordinary way, with the added complication that crypto deposits may be irreversible. If the operator fails, your claim is a legal one against a company, and the blockchain record may show only that you sent funds to an address. This is not necessarily worse than a conventional sportsbook, but it is worth being clear that the crypto wrapper does not change the underlying trust model.

There is also the question of governance and upgradeability. A contract that can be upgraded by a multisig is only as trustless as the multisig's signers. A contract with an admin pause function can be halted. These features are sometimes necessary for security and sometimes a backdoor, and the documentation should say which keys exist and who holds them. Where that information is missing, the honest assumption is that the operator retains meaningful control, whatever the marketing says.

Regulatory and legal trust is a separate layer. A platform may be offshore, may not hold a licence in your jurisdiction, and may not offer the same consumer protections as a licensed operator. The trust model of the code does not resolve the trust model of the law. For readers in the Netherlands and elsewhere, this is not legal advice, and the rules on online gambling are specific and change; check the current position yourself and treat any platform's claims about legality with caution. Gambling is for adults only, and it should be treated as entertainment with a budget, not as a source of income. If it stops being fun, stop.

What to check on a platform

Start with the documentation, and read it for the architecture rather than the adjectives. Does the platform say where matching happens and where settlement happens? Does it say who holds funds between deposit and withdrawal? Does it describe what happens if the matching engine goes offline? A platform that is clear about these things is easier to assess than one that repeats "decentralised" without saying what is decentralised.

Look for the contract addresses and check that they are what the platform says they are. If settlement is on-chain, there should be a contract you can inspect, and its functions should match the description. If funds are held in a contract, check whether withdrawals are processed by the contract or by an operator wallet. If the answer is an operator wallet, the on-chain settlement is real but your custody is not enforced by code.

Test the exit. Deposit a small amount, place a small bet or trade, and withdraw. Note how long it takes, what it costs, and whether the process matches the documentation. This tells you more about the practical trust model than any whitepaper. It also tells you whether the platform is usable at your scale before you commit more.

Check the oracle or result source for sports markets. Who reports the outcome, and what happens if the report is disputed or delayed? A market that cannot settle a void or abandoned fixture cleanly is a market with a hidden edge case. The same applies to rules on postponed matches, changed venues, and statistical corrections; these should be written down, not decided after the fact.

Finally, weigh the trust model against your own priorities. If verifiability matters most and you can tolerate cost and latency, a fully on-chain market may suit you. If speed and cost matter most and you are comfortable with operator discretion, a hybrid may suit you better. Dexsport sits in the wallet-first, no-KYC corner of this landscape and is the book our desk recommends for readers who want to bet from a wallet without an account rigmarole; it is worth comparing against the alternatives on the specific questions above rather than on the label. Whichever you choose, keep records, set limits, and remember that the house edge and the trust assumptions are both real. 18+; gamble responsibly.

This guide was researched, written and fact-checked by the Predict Market Desk editorial desk before publication. Last reviewed 02.12.2026. Spotted something wrong? Tell us.

Connect to Dexsport