
đ Explanation
A blockchain is more than a database. Itâs a consensus engine.
That doesnât necessarily make it better: it comes with a burden. Itâs slower, more expensive, replicated, and permanent by design.
We should avoid putting data on-chain unless all other options are exhausted.
On-chain data is broadcast, stored forever, and visible to anyone with access.
Itâs like tattooing your application state and sending copies to every node in the world.
You might think: âJust encrypt it or hash it.â But thatâs a common fallacy:
- A hash is worthless once its pre-image leaks.
- Encryption fails the moment its key is exposed.
These arenât shields. Theyâre veils. Privacy doesnât live in one-to-one projections. It lives in what cannot be reconstructed.
Even cryptography ages. #Quantum computing may break todayâs assumptions sooner than expected.
All the more reason to minimize what you expose: and assume anything stored forever may one day become readable.
Donât get enthusiastic about what can be stored. Be wary of which burden and responsibility youâre willing to carry. Nothing is impossible: but think well if itâs worth deviating from the river to pass through the swamp.
đ„· How to Apply
- Default to off-chain, unless on-chain is essential for logic.
- If the data is required for smart contract execution and not sensitive, storing it on-chain is practical: especially when the chain is purpose-built, like in a limited consortium (e.g., Hyperledger Fabric), where replication and access are controlled.
- If itâs sensitive, never expose a direct mapping of the data: not even a hash. Use commitments, signatures, or zero-knowledge proofs instead.
- Zero-Knowledge Proofs (ZKPs) offer elegant solutions: enabling you to prove facts without revealing the underlying data. But theyâre also complex and unforgiving in their implementation. A small misstep can compromise the very privacy theyâre meant to protect.
- Design for privacy by default. Assume anything published forever could one day become readable.
Every Sunday, Iâll propose a blockchain first principle for architects. Not fixed rules, but emerging truths: meant to be ruthlessly challenged, like a scientific hypothesis. If a principle canât stand up to questioning, Iâll refine or toss it.
đ Also shared on LinkedIn
Photo by R. Skrypnyk: Pexels