On-Chain and Off-Chain

On-chain activity is recorded publicly on a blockchain; off-chain activity, such as trades inside an exchange's own books, is not.

On-chain means recorded on the public blockchain. Off-chain means it happens somewhere else, such as an exchange's database, an order book or a layer 2. Most crypto trading is off-chain until coins move in or out. Knowing which side you are on tells you who you are trusting.

Category
Cryptocurrency and Blockchain
Reading time
3 min
Also called
Onchain vs offchain, On-chain transactions, Off-chain transactions
Updated

On-chain and off-chain in plain words

Off-chain trading on a platform is settled in the firm's own records and never appears on the public blockchain.1

Many exchanges mix both: a central operator runs the order book, while the blockchain mainly handles settlement.2

Some scaling systems handle transactions off-chain and settle them on-chain later.3

How a trade moves between the two

  1. Deposit on-chain

    You send coins to the venue; this is a public blockchain transaction.

  2. Balance goes off-chain

    The venue credits your account on its own books.

  3. Trade off-chain

    Trades are recorded in the platform's internal books, not on the public ledger.1

  4. Bring in outside data

    Oracles let smart contracts pull in outside, off-chain data.2

  5. Batch to the chain

    Off-chain activity can be settled later on-chain.3

  6. Withdraw on-chain

    Moving coins out is public again and pays a network fee.

Worked examples

Example 1 — Fees for many small trades

$112 a day saved

A hypothetical trader makes 40 trades a day. An on-chain swap costs $3 each; an off-chain venue trade costs $0.20.

Example 1 — Fees for many small trades — calculation
On-chain40 × $3 = $120
Off-chain40 × $0.20 = $8
Saving$120 − $8 = $112

Off-chain trades settle on the venue's internal books, so no network fee is paid per trade.1

Example 2 — What a block explorer shows

2 of 17 events on-chain

A hypothetical trader deposits 1 coin, trades it 15 times on a venue, then withdraws.

Example 2 — What a block explorer shows — calculation
Visible on-chain2 transactions (in and out)
Hidden off-chain15 trades

None of the trades appear on the public chain, so a block explorer only shows the deposit and the withdrawal.1

Example 3 — Venue risk

80% venue exposure

A hypothetical trader keeps $8,000 off-chain on a venue and $2,000 in a self-held wallet.

Example 3 — Venue risk — calculation
Share relying on the venue8,000 ÷ 10,000 = 80%

Off-chain balances exist only in the platform's own records, so 80% of the holdings depend on that one firm.1

On-chain vs off-chain

AspectOn-chainOff-chain
Where it is recordedPublic blockchainFirm database or layer 2
Cost per actionNetwork fee each timeLow or no network fee
SpeedBlock time and confirmationsNear instant
Who you trustThe protocolThe operator

Where the difference matters

Advantages and disadvantages

Advantages

  • Off-chain is fast and cheap.
  • On-chain is public and verifiable.
  • Combining both gives speed with final settlement.
  • Off-chain keeps order details private.

Disadvantages

  • Off-chain means trusting an operator.
  • On-chain fees rise when the network is busy.
  • Off-chain records are hard to verify.
  • Market data off-chain is split across venues.

Going deeper

Read as far as you need. Each level builds on the one before it.

Two places a record can live

Beginner

On-chain means the shared public ledger; off-chain means the platform's private books.1

Hybrid venues

Intermediate

Order-book exchanges often run the book centrally and use the blockchain mostly to settle.2

Supervision across both

Advanced

Good market surveillance has to watch both on-chain and off-chain data, because manipulation can hop between them.1

Common mistakes

  1. Reading on-chain data as all trading

    Most volume happens off-chain.

  2. Forgetting venue risk

    Off-chain balances depend on the operator.

  3. Ignoring withdrawal fees

    Getting back on-chain costs a network fee.

  4. Assuming off-chain is anonymous

    Venues keep detailed records.

Check your understanding

Test yourself before moving on. Each answer comes with an explanation.

Q1A trade on a centralized exchange's order book is usually:
Q210 trades cost $1 on-chain each and $0.10 off-chain. What is saved off-chain?

Key points to remember

  1. On-chain means on the public ledger.
  2. Off-chain means a firm's books or a layer 2.
  3. Most exchange trades are off-chain.
  4. Deposits and withdrawals are on-chain.
  5. Off-chain saves fees but adds operator trust.

Frequently asked questions

Is off-chain less safe?

It depends on the operator; you trade protocol rules for trust in a firm.

Are layer 2 trades on-chain?

They run off the main chain and settle back to it later.

Can I see my exchange trades on a block explorer?

No, only deposits and withdrawals appear.

Further learning

Sources

This article is written in our own words. The sources below support the specific facts, rules and figures marked with a number in the text. Links open the original publisher’s page.

  1. IOSCO. Policy Recommendations for Crypto and Digital Asset Markets (FR11/2023) (opens in a new tab) Checked .
  2. European Securities and Markets Authority (ESMA). Decentralised Finance in the EU: Developments and risks (TRV, Oct 2023) (opens in a new tab) Checked .
  3. NIST. NISTIR 8301: Blockchain Networks: Token Design and Management Overview (opens in a new tab) Checked .

Educational content, not financial advice. Examples use hypothetical prices and simplified costs; actual fees, margin rules and regulations vary by broker, market and country. We are not affiliated with any publisher linked above. Last reviewed . Report an error or request a source credit.