CloudSketch AI Logo
FeaturesTemplatesPricingEnterpriseAboutContactLog in
🌙☀️
Log inStart free
Home/Templates/Blockchain & Web3

⛓️ Blockchain & Web3 · C4 Architecture · Pro

Crypto Exchange Architecture

The main parts of a centralised crypto exchange: a matching engine, wallets split between hot and cold storage, deposits and withdrawals, and compliance checks.

More Blockchain & Web3 templates

C4 Architecture diagrams are part of Pro. Anyone can view this one; generating and editing it needs Pro.

Drawing diagram…

What this diagram shows

  • Most funds are kept in offline cold wallets
  • Withdrawals pass compliance and risk checks
  • The matching engine keeps its order book in memory

Prompt used

Crypto exchange: traders use web and mobile apps through an API gateway. The matching engine keeps the order book in memory and writes trades to a trade log. A ledger service tracks every user's balances. A wallet service manages hot wallets for daily withdrawals and cold wallets (offline, multi-signature) for most funds, and watches blockchain nodes for deposits. A compliance service does KYC, travel rule and sanctions screening for withdrawals.

Mermaid code
C4Container
title Crypto Exchange
Person(trader, "Trader", "Buys and sells crypto")
System_Boundary(ex, "Exchange") {
  Container(app, "Trading Apps", "React / React Native", "Charts and orders")
  Container(gw, "API Gateway", "Go", "REST and WebSocket")
  Container(me, "Matching Engine", "C++", "In-memory order book")
  Container(led, "Ledger Service", "Java", "User balances")
  Container(wal, "Wallet Service", "Go", "Deposits and withdrawals")
  Container(comp, "Compliance Service", "Python", "KYC and screening")
  ContainerDb(db, "Ledger DB", "PostgreSQL", "Balances and trades")
}
System_Ext(nodes, "Blockchain Nodes", "Bitcoin, Ethereum")
System_Ext(cold, "Cold Wallet", "Offline multi-signature")
Rel(trader, app, "Uses")
Rel(app, gw, "Orders and quotes")
Rel(gw, me, "Places orders")
Rel(me, led, "Settles trades")
Rel(led, db, "Reads/writes")
Rel(gw, wal, "Withdraw request")
Rel(wal, comp, "Screen withdrawal")
Rel(wal, nodes, "Broadcasts and watches")
Rel(wal, cold, "Refills hot wallet")

Related templates

SequenceBlockchain & Web3

Crypto Withdrawal Sequence

How an exchange processes a crypto withdrawal safely: balance hold, 2FA, risk and address screening, signing, broadcast and confirmations.

C4 ArchitectureProBlockchain & Web3

NFT Marketplace

How an NFT marketplace works: listings signed off-chain, metadata on IPFS, and sales settled by a marketplace smart contract.

FlowchartBlockchain & Web3

Smart Contract Upgrade Process

How a team safely upgrades a smart contract behind a proxy: audit, testnet rehearsal, multi-signature approval and a timelock before the change goes live.

State MachineBlockchain & Web3

Blockchain Transaction States

The states a blockchain transaction goes through from signing to final confirmation, including replacement and dropped transactions.

NetworkBlockchain & Web3

Hot and Cold Wallet Custody

How a custodian separates internet-connected hot wallets from offline cold storage, with signing hardware and an air-gapped transfer process.

DeploymentProBlockchain & Web3

Web3 dApp Deployment

Where a decentralised app's parts run: frontend on IPFS, contracts on a layer-2 chain, and supporting services like RPC providers and an indexer.