Book a free call

How to Build a Hybrid Crypto Exchange, Step by Step

A hybrid crypto exchange matches orders off-chain for speed and settles them on-chain for safety. Here is how to build one, from architecture to launch.

Hertiv engineering teamReviewed by a senior engineer
6 min read
How to Build a Hybrid Crypto Exchange, Step by Step
On this page

Short answer

A hybrid crypto exchange is built by combining a fast off-chain matching engine with on-chain settlement and custody. Orders are placed and matched on the operator's servers, while completed trades settle through smart contracts, so users keep control of their funds without paying gas on every order.

What is a hybrid crypto exchange?

A hybrid crypto exchange is an exchange that splits trading into two jobs and runs each where it works best. Order placement and matching happen off-chain, in the operator's matching engine, while fund custody and final settlement happen on-chain, through smart contracts.

The split solves the main trade-off in exchange design. A centralised exchange is fast because one operator controls the ledger, but users hand over custody of their funds. A decentralised exchange keeps custody with the user, but every order and cancellation is an on-chain transaction, so active traders pay gas all day for orders that never fill.

A hybrid takes the fast part from one and the custody part from the other. Placing or cancelling an order costs nothing, because those actions never touch the blockchain; only the completed trade reaches the chain. For the full definition, see what a hybrid crypto exchange is.

How does a hybrid exchange work?

A trade on a hybrid exchange follows a fixed sequence, and each step sits in the layer that handles it best. The table below shows the split.

StepWhere it runsWhat happens
Order placedOff-chainUser signs the order with their wallet key
Order bookOff-chainMatching engine holds the live book in memory
MatchingOff-chainEngine pairs buy and sell orders by price and time
Settlement instructionOff-chainMatch creates a signed instruction to move assets
SettlementOn-chainSmart contract moves the assets and records the trade
CustodyOn-chainFunds sit in contracts, not on the operator's balance sheet

The useful detail is the order book. Because orders never reach the chain until they fill, a trader can place and cancel orders freely, and the matching engine can pair them in milliseconds. The chain only sees the fills, which keeps gas costs low and the record public.

How to build a hybrid exchange, step by step

Build the architecture in the order the trade flows through it: custody first, then matching, then settlement, then the product around them. Custody comes first because it decides the legal and security design of everything else.

  1. Choose the settlement chain. Pick a chain with fast finality and low fees, since every fill settles there. A rollup or a fast layer-one chain suits most designs.
  2. Design custody and settlement contracts. Write the contracts that hold user funds, enforce the settlement rules and allow withdrawals even if the operator stops. Get them audited before launch.
  3. Build the matching engine. Build an in-memory order book with price-time priority, plus order types such as limit, market and stop orders.
  4. Add the signing flow. Let users sign orders with their wallet keys, and check each signature and balance before the order reaches the book.
  5. Connect liquidity. Bring market makers or an external liquidity source, because an empty order book attracts no traders.
  6. Build compliance. Add identity checks, transaction monitoring and sanctions screening to the onboarding and withdrawal flows.
  7. Test with real traders. Run a closed beta with real traders and real funds, and fix the settlement and withdrawal paths before opening to the public.

Do not build the matching engine before the custody contracts are designed. The contracts decide what the engine is allowed to do, and an engine built first will need to be rebuilt around them.

What does the custody design need to cover?

Custody is the part that decides whether a hybrid exchange is genuinely different from a centralised one. If the operator can move user funds without the user's signature, the exchange is custodial whatever the marketing says.

The design needs three properties. First, funds sit in audited smart contracts, and the operator cannot sign a transfer out of a user's account. Second, the operator can match and liquidate within the contracts' rules, but only within them. Third, a withdrawal works even when the operator does not cooperate, through a documented exit path in the contracts.

Test the exit path before launch. A withdrawal that only works while the operator's servers are running is not an exit path. For the build partner side, see crypto exchange development companies for startups.

What about liquidity, fees and compliance?

Liquidity decides whether traders stay. A hybrid exchange with an empty order book has wide spreads and no fills, however good the custody design is. Most new hybrids start with a market maker agreement or by aggregating liquidity from other venues, and they pay for that liquidity until their own volume grows.

Fees need to cover three costs: the matching infrastructure, the on-chain settlement gas, and the market maker incentives. Some hybrids charge a trading fee and pay the gas themselves; others pass the settlement gas to the trader. Either way, the fee schedule should be published and simple, because traders compare it directly with other venues.

Compliance depends on the jurisdiction and the products offered. Spot trading, margin and derivatives each carry different licensing and reporting duties, and the exchange needs legal advice before choosing which products to offer. Identity checks and sanctions screening are part of the onboarding flow, not an afterthought.

Example (hypothetical): a first-year build budget

Example (hypothetical): a team budgets $600,000 for the first year of building a hybrid spot exchange. It splits the budget into $200,000 for the matching engine and trading API, $150,000 for the custody and settlement contracts plus two audits, $100,000 for the web and mobile apps, $80,000 for liquidity incentives and $70,000 for legal and compliance work.

The total is 200,000 + 150,000 + 100,000 + 80,000 + 70,000 = $600,000. The team then adds $120,000 for running costs in the first year, mostly servers and on-chain settlement gas, bringing the first-year cash need to $720,000.

The team launches with spot trading for five assets and one market maker, rather than ten assets and derivatives, because each extra product adds contract, compliance and liquidity work. The lesson is to launch narrow: the custody contracts and the matching engine are the product, and everything else can wait for the second year.

What are the common mistakes?

The most common mistakes when building a hybrid exchange are treating custody as a feature, skipping the audit, and launching with no liquidity.

  • Custody as marketing. If the operator can move funds without the user's signature, the exchange is custodial, whatever the website says.
  • Skipping the audit. Settlement contracts hold user funds, so they need an independent audit before launch, not after.
  • No exit path. A withdrawal that depends on the operator's servers is not an exit path.
  • Empty order book. Launching without a market maker leaves wide spreads and no fills, and traders do not return.
  • Matching before custody. Building the engine before the custody contracts are designed means rebuilding the engine later.
  • Too many products at launch. Each extra product adds contract, compliance and liquidity work, so start with spot trading.

If you are planning the build, crypto exchange development covers how Hertiv approaches exchange projects.

Key takeaways

  • Matching off-chain gives speed; settlement on-chain gives safety
  • Custody design decides whether a hybrid is genuinely different
  • Contracts hold the funds; the operator matches within their rules
  • Launch narrow with spot trading and one market maker
  • Audit the settlement contracts before launch, not after
  • Test the withdrawal exit path while the operator is offline

Frequently asked questions

What is the difference between a hybrid exchange and a DEX?

A decentralised exchange runs matching and settlement on-chain, so every order and cancellation is a transaction that costs gas. A hybrid exchange matches orders off-chain in the operator's engine and settles only completed trades on-chain, so placing and cancelling orders is free and matching is faster.

Do users keep their own keys on a hybrid exchange?

In a well-designed hybrid, yes. Users sign orders with their wallet keys, and funds sit in smart contracts rather than on the operator's balance sheet. The operator can match and liquidate within the contracts' rules but cannot sign a transfer out of a user's account.

Is a hybrid exchange safer than a centralised exchange?

It removes the largest centralised risk, which is the operator holding user funds, but it adds smart contract risk and keeps the operator in charge of matching. The safety of a hybrid depends on audited contracts and a working exit path, not on the label.

How much does it cost to build a hybrid crypto exchange?

Costs vary widely by scope, but a small team building a spot-only hybrid with audited contracts, a matching engine and apps should budget several hundred thousand dollars for the first year, plus running costs for servers, gas and liquidity. Get a written quote for the actual scope before planning.

What blockchain should a hybrid exchange settle on?

Pick a chain with fast finality and low fees, since every fill settles there. Many hybrids settle on a rollup or a fast layer-one chain, and some use a dedicated chain for settlement. The choice affects gas costs, finality time and which wallets users can connect with.

Do hybrid exchanges need a licence?

It depends on the jurisdiction and the products offered. Spot trading, margin and derivatives each carry different licensing and reporting duties, and most jurisdictions treat an exchange that matches buyers and sellers as a regulated activity. Get legal advice before choosing products or markets.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: blockchain systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Planning a hybrid exchange and want the architecture checked? Talk to Hertiv.

A senior engineer replies within one business day. Or see our Crypto Exchange service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to [email protected].

Prefer email? Write to [email protected]
Estimate costBook a call