Data On-Chain: A Simple Guide for Everyone

Coauthor: NCU.FI

· News,Blog

🧭 Part 1. Quick Introduction to Key Concepts

🔗 What is a Blockchain?

A blockchain is a shared database that stores information (transactions) in a chain of blocks — each securely linked to the one before it.

Once a record is written, it cannot be changed without altering every following block, which makes tampering nearly impossible. Like a global Google Sheet where every entry is timestamped and publicly visible — but no one can delete or modify past rows.

Section image

Examples of Public Blockchains

  • Bitcoin (BTC) – The first blockchain, focused on financial transactions. It’s like a decentralized bank ledger.

  • Ethereum (ETH) – A more advanced blockchain that supports smart contracts, enabling programmable logic and decentralized applications (dApps).

Section image

🧮 What is a Hash Code?

A hash code is a unique digital fingerprint created from data using a cryptographic algorithm (like SHA-256 or Keccak-256).

Hashing is one of the key technical foundations of blockchain. If even one character of the input changes, the hash output becomes completely different. It’s unique, fixed-length, and one-way — you can’t get the original data back from the hash. Its sensitivity and irreversibility together form the basis of the blockchain's immutability.

Section image

What a Real Hash Looks Like?

Bitcoin’s SHA-256 hash:

e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

Ethereum’s Keccak-256 hash:

0x5c60da1eaa08d6f6b37ad62123b7c82fef86e3b58a8b51dfc2b8e9f6b6d2b6f3

✅ If a file is a person, the hash is their DNA — short, unique, and impossible to fake.

🧠 What is a Smart Contract?

A smart contract is a small program that lives on a blockchain (like Ethereum). It automatically executes actions when predefined conditions are met.

  • It runs without a central server.

  • Anyone can read its source code (e.g., on Etherscan.io).

  • Anyone can see all transactions that have interacted with it.

  • Once deployed, it can’t be secretly changed.

Section image

☁️ What is IPFS (InterPlanetary File System)?

IPFS is a decentralized storage network — think of it as a distributed, peer-to-peer version of Google Drive. Unlike HTTP, which locates data by where it is (a server address), IPFS locates data by what it is (a cryptographic hash of the content itself).

  • Files are stored across many computers worldwide.

  • Each file has a Content Identifier (CID), which is its hash.

  • Anyone can access a file using its CID, no matter where it’s physically stored.

Section image

⚠️ IPFS Files Are Immutable

When you upload a file to IPFS:

  • Its CID is generated from the file’s exact content.

  • If you modify the file, even slightly, the CID completely changes.

🔗 Why Combine IPFS + Blockchain?

IPFS stores the actual files (decentralized, cost-efficient).

Blockchain stores the proof and retrieval logic (secure, immutable).

Together, they create a verifiable and transparent data system — perfect for long-term authenticity and auditability.

🧩 Part 2. Data On-Chain Concept

We’ve explored the building blocks of blockchain—its distributed structure, the role of hash codes in ensuring immutability, how IPFS enables decentralized file storage, and how smart contracts automate trust—we can begin to understand how data actually moves on-chain.

In simple terms, data on-chain means that information is stored directly within a blockchain network, or is referenced through a verifiable link to off-chain storage such as IPFS. This process transforms data from being isolated in private databases into transparent, tamper-proof, and universally accessible records. Once data is on-chain, it becomes part of a shared digital ledger, where anyone can verify its existence and integrity without relying on a central authority.

The significance of this shift is profound: it changes how we trust, verify, and exchange information. Instead of trusting intermediaries, we trust cryptography and consensus. Instead of hidden systems, we gain open, verifiable transparency. In essence, putting data on-chain marks a step toward a more decentralized, accountable, and interoperable internet — where data itself becomes a first-class citizen in the digital economy.

👉Know more about the on-chain details please visit: Data On-Chain: A Technical Deep Dive - Blog

🌍 Part 3. How to Verify the Dataset Through Our Dashboard and Onchain Viewer

🖥 Step 1: Open the Onchain Viewer

This web interface connects directly to the blockchain and IPFS network.

  • Contract Address: This is the address of our Retrieve Smart Contract, which is used to fetch data stored on the blockchain.

  • Dataset ID: This is the ID returned by the on-chain smart contract.

For convenience, these two fields are already pre-filled for users.

Section image

⚙️ Step 2: Retrieve the On-Chain Data

Click the “Data Retrieve” button.

The system will automatically:

  1. Connect to the Ethereum blockchain.

  2. Read the transaction information from the Retrieve Smart Contract.

  3. Extract the File Digest CID from the transaction.

  4. Retrieve the corresponding dataset from IPFS.

This process may take a few seconds, depending on the Ethereum block confirmation speed.

Section image

📊 Step 3: Explore the Retrieved Data

The result section shows detailed on-chain information about the dataset and you can download all the relevant dataset.

Section image
Section image

🔍 Step 4: Compare with Dashboards

  1. Web2 Dashboard – This button opens the traditional dashboard where the original dataset is stored and displayed using conventional web technology.

  2. Onchain Data Dashboard – This opens the decentralized dashboard where the same dataset is displayed, but retrieved directly from the blockchain and IPFS.

Section image

By switching between these two dashboards, users can compare the data displayed from Web2 and Web3 sources. This allows you to confirm that the data on-chain is identical to the data published in our Web2 system — ensuring full transparency and consistency.

Section image

Congratulations on completing this guide. You’ve gained a solid foundation in how data moves on-chain and its role in shaping a transparent and decentralized future.