Get pinged when your stocks flip

We'll only notify you about YOUR stocks — when the trend flips, hits stop loss, or hits a target. Never spam.

Install TrustyBull on iPhone

  1. Tap the Share button at the bottom of Safari (the square with an up arrow).
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add in the top-right.

How much data can a DApp store on the blockchain?

Storing large amounts of data directly on a blockchain is extremely expensive, often costing hundreds of thousands of dollars per megabyte. DApps typically only store essential data like ownership records on-chain, using separate, cheaper off-chain storage systems for things like images or documents.

TrustyBull Editorial 5 min read

Storing 1 Megabyte of Data Can Cost Over 500,000 Dollars

You cannot store much data on a blockchain. At least, not directly. Storing just a single megabyte (MB) of data on the Ethereum blockchain can cost hundreds of thousands of dollars, depending on network fees. This is a core concept in our guide on blockchain technology explained. Unlike your cloud storage, a blockchain is not designed for photos, videos, or large documents. It is a secure, decentralized ledger, and that security comes at a very high price in terms of storage capacity.

The cost is not a fixed price. It changes based on network congestion and the price of the cryptocurrency itself. But the fundamental truth remains: on-chain storage is incredibly expensive. This forces developers of decentralized applications (DApps) to be extremely clever about how and where they store their data.

Understanding Blockchain Data and Why It's So Expensive

Why does it cost so much? The answer lies in the architecture of a blockchain. When you add data to a blockchain like Ethereum, you are not just saving it to one computer. You are demanding that thousands of computers (called nodes) all around the world do the following:

  • Receive your data.
  • Verify that it is valid according to the network's rules.
  • Include it in a new block.
  • Store a copy of it forever.

This massive redundancy is what makes the blockchain secure and decentralized. There is no single point of failure. But it also means that a simple act of saving data is multiplied by thousands, consuming immense collective resources. You pay for this through transaction fees, often called “gas fees” on Ethereum. Every byte of data adds to the computational load, increasing the gas you must pay.

A Real-World Calculation of On-Chain Storage Costs

Let's break down the math for storing data on Ethereum. The cost depends on three factors: the gas required for the storage operation, the price of gas in a unit called Gwei, and the price of Ether (ETH).

The main operation for storing data is called SSTORE. It saves a 32-byte word of data. A new storage slot costs about 22,100 gas.

  1. Gas Cost: 22,100 gas per 32 bytes.
  2. Gas Price: Let's assume a conservative gas price of 25 Gwei. (1 Gwei = 0.000000001 ETH).
  3. ETH Price: Let's assume ETH is trading at 3,000 dollars.

First, we calculate the cost in dollars to store just 32 bytes:

Cost = (22,100 gas) x (25 Gwei/gas) x (0.000000001 ETH/Gwei) x (3,000 dollars/ETH) = 1.66 dollars

That's over one and a half dollars for a tiny piece of data. Now, let's scale that up.

Data Size Number of 32-Byte Slots Estimated Cost (in dollars)
32 Bytes 1 $1.66
1 Kilobyte (KB) 32 $53.12
1 Megabyte (MB) 32,768 $54,394.88
1 Gigabyte (GB) 33,554,432 $55,700,355.84

Note: These are simplified estimates. Actual costs can be even higher due to other operational overheads in a smart contract.

As you can see, storing even a single megabyte is financially impractical for almost any application. Storing a gigabyte is completely out of the question.

So, Where Do DApps Put Their Data?

If you can't store data on the blockchain, how do DApps work? They use a hybrid approach, separating the small, critical data from the large, general-purpose data. The large files are stored off-chain.

1. Centralized Servers

The simplest method is to use traditional web servers, just like a normal application. A DApp might store user profiles, images, and text on a private server (like AWS). The blockchain part only handles ownership or financial transactions. This is easy to implement but sacrifices decentralization, which many users find unappealing.

2. InterPlanetary File System (IPFS)

IPFS is a popular decentralized storage solution. It's a peer-to-peer network for storing and sharing files. Instead of addressing a file by its location (like a web URL), IPFS addresses it by its content. It creates a unique hash (a fingerprint) for each file. This hash is small enough to be stored on the blockchain.

So, an NFT DApp doesn't store the image on-chain. It stores the IPFS hash of the image. This proves ownership and links to the correct file without costing a fortune.

3. Arweave and Other Permanent Storage

Arweave is another decentralized network, but it focuses on permanent storage. You pay a one-time fee to store your data forever. It's designed for archiving data that must never be lost, like historical records or critical documents. Other networks like Filecoin and Sia also offer decentralized storage markets, where users can rent storage space from providers around the world.

What Data Actually Belongs on a Blockchain?

Given the extreme cost, only the most essential information should be stored directly on-chain. This is the data that defines the core state of the application and requires the highest level of security and decentralization.

  • Ownership Records: Who owns what. This is the foundation of NFTs and digital collectibles.
  • Account Balances: How much of a certain token each user holds.
  • Application State: Critical variables that define the rules of the DApp. For a lending protocol, this would be interest rates or collateral ratios.
  • Content Hashes: As mentioned, small cryptographic fingerprints of large off-chain files to ensure data integrity.

Think of the blockchain as the ultimate source of truth for your DApp's most important logic, not its file cabinet. For more information on the risks and complexities of digital assets, you can review investor alerts from regulatory bodies like the U.S. Securities and Exchange Commission. The SEC provides bulletins for investors on a variety of topics, including crypto.

The Future of Cheaper Blockchain Data

The high cost of data is a major challenge for blockchain scalability. Thankfully, developers are working on solutions. Ethereum's recent Dencun upgrade introduced a feature called Proto-Danksharding (EIP-4844). This creates a new, temporary way to store data on the blockchain in large chunks called "blobs."

Blobs are much cheaper than permanent storage and are designed to help Layer 2 scaling solutions process transactions more efficiently. While not a direct solution for storing your photo album on-chain, it shows that the technology is evolving. The goal is to make the blockchain more efficient for its core purpose: securing transactions and state, not acting as a global hard drive.

Frequently Asked Questions

Why is it expensive to store data on a blockchain?
It's expensive because every computer (node) in the network must download, verify, and store a copy of the data forever, creating massive redundancy and computational cost.
What is the alternative to storing data on-chain?
DApps use off-chain storage solutions. These can be centralized servers or decentralized networks like IPFS or Arweave, which are designed for storing large files cheaply.
What kind of data is typically stored on a blockchain?
Only small, critical pieces of information are stored on-chain. This includes token balances, NFT ownership, and the core logic or state of a smart contract.
Can I store a PDF or a video on the Ethereum blockchain?
While technically possible, it is financially impossible for most people. Storing a single high-resolution image, let alone a video, could cost millions of dollars in transaction fees.
How do NFTs store images and videos?
NFTs do not store the media file on the blockchain. They store a link, or hash, that points to the file stored on an off-chain system like IPFS. The on-chain part is just the proof of ownership.