Book a free call

4 Essential Parts of a Crypto Derivatives Exchange

A derivatives exchange runs on four parts: a matching engine, a margin and risk system, safe custody and settlement, and deep liquidity. Here is what each part does.

Hertiv engineering teamReviewed by a senior engineer
6 min read
4 Essential Parts of a Crypto Derivatives Exchange
On this page

Short answer

A crypto derivatives exchange is built from four parts: a matching engine that pairs buy and sell orders, a margin and risk engine that sets collateral and closes risky positions, custody and settlement that hold funds and move them after trades, and liquidity and market data that keep prices tight and trading possible. Each part must work under load, or the whole exchange stops.

What are the parts of a crypto derivatives exchange?

A crypto derivatives exchange is a trading venue where people buy and sell contracts whose value follows a crypto asset, such as a perpetual future or an option, instead of trading the asset itself. Four parts carry the whole system: a matching engine, a margin and risk engine, custody and settlement, and liquidity and market data.

Each part has a different job, and a weak part limits the rest. A fast matching engine means little if the risk engine cannot close losing positions in time, and deep liquidity means little if settlement takes hours. The table below gives a quick view of each part before the detail.

ComponentMain jobWhat breaks first
Matching enginePairs buy and sell ordersOrders queue and prices slip
Margin and risk engineSets collateral and closes risky positionsLosses pass to other traders
Custody and settlementHolds funds and moves them after tradesWithdrawals stall or funds sit at risk
Liquidity and market dataKeeps prices tight and trading possibleWide spreads and thin order books

<h3>1. Matching engine: best for fast, fair order fills</h3>

The matching engine pairs buy and sell orders by price and time, and it is the part traders feel first. When it is fast, orders fill at the price shown on the screen, and the order book updates without delay. When it is slow, orders queue, fills slip, and traders leave for a venue that answers faster.

A good engine handles bursts, such as a sharp price move that brings thousands of orders in one second. It must stay fair too: orders should fill in the order they arrived, and no trader should be able to jump the queue. Teams test this with load tests that replay busy market days before launch, as part of crypto exchange development.

Do it well:

  • Orders fill in price-time order.
  • Handles sudden bursts without slowing.
  • Publishes a clear, live order book.

Get it wrong:

  • Fills slip during busy markets.
  • Traders cannot trust the prices they see.
  • The venue gains a name for slow fills.

<h3>2. Margin and risk engine: best for keeping the exchange solvent</h3>

The margin and risk engine decides how much collateral each trader must post and when a losing position must be closed. Derivatives let traders control a large position with a small deposit, so losses can grow faster than the deposit. The engine watches each position and closes it before the loss eats into other traders' funds.

This part needs clear rules that traders can read before they trade: how margin is counted, when a position is closed, and what happens if a close fails. A shared insurance fund, paid for by trading fees, covers the rare case where a closed position still leaves a shortfall. Without these rules, one bad day can leave the exchange owing money it does not have.

Do it well:

  • Margin rules are public and simple.
  • Losing positions close before they turn negative.
  • An insurance fund covers rare shortfalls.

Get it wrong:

  • Traders learn the rules only after a loss.
  • Forced closes happen late or at bad prices.
  • Losses are shared across all traders.

<h3>3. Custody and settlement: best for safe funds</h3>

Custody and settlement hold trader funds and move them when trades close. Most exchanges keep most funds in cold wallets that are not connected to the internet, with only a small share in hot wallets for daily withdrawals. Settlement is the step that moves profits and losses between accounts after a trade ends.

Traders judge this part by withdrawals: they should arrive on time, every time. Slow or paused withdrawals are the fastest way for an exchange to lose trust, even when trading works well. Good custody practice is covered in our guide to what crypto custody means, and it only helps if withdrawals stay open.

Do it well:

  • Most funds sit in cold wallets.
  • Withdrawals run on time, every day.
  • Reserves are checked by outside auditors.

Get it wrong:

  • Too much money sits in hot wallets.
  • Withdrawals pause without warning.
  • Traders cannot see how funds are held.

<h3>4. Liquidity and market data: best for tight prices</h3>

Liquidity is the depth of the order book: how much can be bought or sold without moving the price. A liquid market has many orders near the current price, so large trades fill with little slippage. A thin market has wide gaps between buyers and sellers, so even a modest trade moves the price against the trader.

New exchanges often hire market makers, firms that keep orders on both sides of the book in return for fee rebates. Market data matters just as much: traders need a live feed of prices, trades and order book depth, and the feed must match what the matching engine sees.

A stale feed is worse than no feed, because traders act on prices that no longer exist. Building a new venue follows the same steps as any crypto exchange build.

Do it well:

  • Order book is deep near the current price.
  • Market makers quote on both sides.
  • Price feed matches the engine in real time.

Get it wrong:

  • Spreads are wide and books are thin.
  • Large trades move the price sharply.
  • Traders see stale prices.

How to judge a derivatives exchange build

Before you trade on a new derivatives exchange, or build one, run through these five checks. Each one takes an hour or less and tells you more than a sales page will.

  1. Trade on the test version first. Place orders, close positions and withdraw funds before any real money is at stake.
  2. Read the margin rules. Check how margin is counted, when positions close, and who pays if a close leaves a shortfall.
  3. Check the order book at busy times. Look at spreads and depth during a sharp price move, not only in quiet hours.
  4. Ask how funds are held. Find out how much sits in cold wallets, who can move it, and how withdrawals are handled.
  5. Look for outside checks. Audits of reserves, code reviews and a public record of past incidents all tell you how the team works.

Common mistakes

These are the errors that sink new derivatives exchanges most often, and all of them are easy to avoid with a little planning.

  • Building the matching engine first and the risk engine last. Risk is what keeps the exchange alive, so it needs the same care as speed.
  • Treating liquidity as a launch-day problem. A venue with no depth on day one rarely gets a second chance to win traders back.
  • Hiding the margin rules. Traders who learn the rules from a forced close do not come back.
  • Keeping too much in hot wallets. Convenience for withdrawals is not worth the added risk to trader funds.
  • Copying another exchange's fee model. Fees, rebates and insurance funds need to fit your own traders and volumes.

Key takeaways

  • Four parts carry a derivatives exchange: matching, margin and risk, custody and settlement, and liquidity.
  • The margin and risk engine protects the exchange from losses that outgrow a trader's deposit.
  • Most funds should sit in cold wallets, with withdrawals running on time every day.
  • Liquidity decides whether large trades fill at a fair price or move the market.
  • Judge a build by its margin rules, its order book in busy hours and its outside audits.

Frequently asked questions

What is a crypto derivatives exchange?

It is a venue where traders buy and sell contracts, such as perpetual futures and options, whose value follows a crypto asset. Traders do not buy the asset itself; they take a position on its price, using collateral that the exchange holds.

What does a matching engine do?

It pairs buy and sell orders by price and time. A fast, fair engine fills orders at the price shown and keeps the order book current, even when thousands of orders arrive in one second.

Why does a derivatives exchange need a margin engine?

Derivatives let traders control large positions with small deposits, so losses can outgrow the deposit. The margin engine sets collateral, watches positions and closes them before losses reach other traders.

What is the difference between custody and settlement?

Custody is how the exchange holds trader funds, usually in cold wallets that stay offline. Settlement is the step that moves profits and losses between accounts after a trade closes, so each trader's balance reflects the result.

How do new exchanges get liquidity?

They usually work with market makers that keep orders on both sides of the book in return for fee rebates. Some also share liquidity with larger venues until their own order book is deep enough.

What should I check before trading on a new derivatives exchange?

Read the margin rules, test withdrawals, check spreads during busy hours and look for outside audits of reserves and code. If any of these are missing or unclear, trade small or wait.

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 derivatives exchange?

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