RoadToChain Logo
RoadToChain
T0/M0.1/Where blockchain SHOULD NOT be used
beginner 15m read

Where blockchain SHOULD NOT be used

The most important lesson in T0. If a database works, use a database. Blockchain is a trust primitive.

#architecture #mistake

In my first year in Web3, I was so excited about smart contracts that I wanted to put everything on-chain. I designed a chat app that stored messages on-chain, a school grading portal that stored test scores on-chain, and an attendance log that stored every click on-chain.

They were all disasters.

They were slow, they cost thousands of dollars in gas to test, and they leaked private data to the entire world. I had made the classic rookie mistake: treating blockchain as a general-purpose cloud database.

It isn't. It is a highly specialized, very slow, and very expensive trust primitive.


1. The Litmus Test: The Shared-Write Database Check

Before deciding to write a single smart contract or build a dApp, you should run your idea through a simple set of questions (originally formulated by computer scientist Wüst & Gervais):

  1. Do you need to store state? If no, you don't need any database.
  2. Are there multiple writers? If only one entity writes to the database (e.g. only you, or only a single company), use a standard database like Postgres. It is infinitely faster and cheaper.
  3. Is there a trusted third party? If you have a coordinator that both sides fully trust (like AWS, or a mutually agreed escrow company), use a centralized database managed by them.
  4. Are the writers untrusted or hostile? If multiple entities need to update the database but they do not trust each other, this is where blockchain becomes viable.

If your project doesn't pass all four steps, do not use blockchain.


2. Layman Explanation: The Public Chisel

Imagine you want to keep a personal diary.

  • Do you buy a notebook and write in it with a pen (centralized)?
  • Or do you hire 100 sculptors to follow you around, chiseling every sentence you say onto giant granite blocks and storing them in the town square (blockchain)?

For a personal diary, chiseling granite is ridiculous. It takes hours, costs thousands in sculptors' salaries, and everyone can read your secrets.

You only use the granite chiseling team if you are writing the Town Constitution — a document that no single person should be allowed to erase or alter, and that must be visible to every citizen forever.

Most application data is like a diary. It is private, changes constantly, and doesn't need to be chiseled in granite.


3. Technical Comparison: Blockchain vs. Database

Let's look at the numbers of running a transaction on a standard database versus a blockchain:

| Metric | PostgreSQL (AWS RDS) | Ethereum Mainnet | |:---|:---|:---| | Writes per second | 10,000+ transactions | ~15–30 transactions | | Read latency | < 1 millisecond | ~12 seconds (average block time) | | Cost per write | Less than $0.00001 | $2.00 – $50.00+ (varies with congestion) | | Data Privacy | Encrypted, access control limits | 100% public to anyone running a node | | Storage cost | ~$0.10 per Gigabyte/month | ~$20,000.00+ per Gigabyte (gas cost) |

Staggering differences. If you store a 1MB profile picture on Ethereum, it will cost you tens of thousands of dollars in gas.

Blockchain vs Database — speed, cost, and use case comparison
PostgreSQL handles 10,000+ writes/second at fractions of a cent. Ethereum handles ~15 writes/second at $2–$50+ per write. Use blockchain only when censorship resistance and trustless auditability are the actual requirements.

// Reality Check

Many enterprise blockchain pilots fail because developers try to use blockchain to track "supply chain data" without checking the input. If a human worker enters fake data at the warehouse (a "garbage in, garbage out" problem), the blockchain will record that fake data honestly. Blockchain proves data wasn't tampered with after it was written; it does NOT prove the data was true when it was entered.

— Production Engineering Principle

// I Got This Wrong

Designed a social post feed that wrote the text of every post directly to a contract storage variable. A single "hello world" post cost $8 in testnet gas, and took 15 seconds to load. Switched to storing the text in a standard database and only storing the cryptographic hash of the content on-chain for verification. The app instantly loaded in milliseconds.

— Postmortem Confession

System Design Challenge
Think Active

Look at the following project ideas. For each, decide if it should be built using a centralized Postgres database, or a decentralized ledger:

  1. A credit scoring database used only by Chase Bank.
  2. A global land registry ledger where multiple governments register property deeds.
  3. A chat application for a local soccer club.
[ Think Before Continuing ]

// Project Connection

Visual Blockchain Simulator

In the Visual Blockchain Simulator, we build the state machine. Running this simulator locally will demonstrate that even a simple simulated blockchain requires significant loops, hash recalculations, and state synchronization, reinforcing why centralized databases remain the choice for standard applications.

Skills you'll practice:
  • Node propagation
  • P2P communication
  • Block formation
  • Gas fee mechanics

Was this lesson helpful?

Let us know what you think of this specification. (submitting anonymously)