On-chain vs Off-chain

What goes on-chain, what doesn’t.

In one minute

Educational only: Not financial advice. Always verify contract addresses and official links.

What usually goes on-chain

Balances & transfers

Native coin transfers and token balances (fungible and NFTs) so anyone can verify ownership.

Critical app state

Escrow amounts, governance votes, loan positions, AMM pool reserves — things contracts must enforce.

Proofs & references

Hashes (fingerprints) of larger off-chain data, or validity/fraud proofs from L2s.

What usually stays off-chain

Big files

Images, videos, large metadata. Often stored on decentralized storage (content-addressed) or traditional servers, then referenced on-chain.

Heavy computation

Analytics, order matching, simulations. Results can be committed on-chain via signatures or proofs.

User interfaces & indexing

Websites, APIs, and search/index services that make on-chain data easier to use.

Tip: Off-chain ≠ “centralized only.” Some storage networks distribute data widely and use content hashes to prevent silent edits.

Trade-offs at a glance

On-chain pros

  • Strong integrity & auditability.
  • Composability — other contracts can trust the state.
  • Censorship resistance (within the chain’s guarantees).

On-chain cons

  • Fees & limited capacity.
  • Public by default (privacy needs special techniques).
  • Hard to change once deployed.

Off-chain pros

  • Low cost, high throughput.
  • Flexible formats; easy updates.
  • Can preserve privacy more easily.

Off-chain cons

  • Availability & trust assumptions (who hosts it?).
  • Less composable with smart contracts unless anchored by hashes/proofs.
  • Link rot risk (URLs change, hosts go down).

Common patterns (plain English)

NFT storage: centralized URL vs content-addressed

As a buyer, check the token’s metadata link type in a block explorer before purchasing.

Privacy & compliance notes

Checklists

For users

  • For NFTs, check if the metadata/image link is content-addressed (less risk of silent changes).
  • Verify token addresses from official docs; be wary of look-alikes.
  • If a dApp stores funds off-chain, understand the custodian and withdrawal path.

For builders

  • Put only critical state on-chain; anchor everything else with hashes or proofs.
  • Choose storage with a plan for availability (pinning/backups) and link stability.
  • Document your oracle, L2, and storage trust assumptions clearly.
  • Design for upgrades: versioned metadata, migration paths, and user notices.

Educational content only. Do your own research.

Quick glossary

More crypto topics