Storing Documents on the Blockchain: Good or Bad Idea?
Why Store Data on a Blockchain?
Even though blockchain has been touted to be a flexible technology which has many applications, using it to store data is not all that easy. There are many ways in which you can use blockchain to store data, and it all depends on what use case you have and if blockchain is the right tool for it.
In today’s article, we will be discussing the pros and cons of blockchain’s use in document storage and figure out if it really worth the hassle.
There are currently two ways of storing a document on a blockchain:
- Storing the entire document
- Storing a hash of the document
Storing an entire document is rarely an advised option due to size limitations, and you would also have to compress and format before recording it. Storing your document by hashing it with an algorithm saves up more space and it scales more efficiently.
One of the most beneficial features of blockchain is its immunity to tampering. This feature ensures that documents stored on-chain cannot be counterfeited and thus prevents any kind of document fraud. If the size of the document is too large for storage, then even hash storage is still efficient in keep it tamper-proof.
Every time you modify the input of a file, the hash value which corresponds to that file will change as well. The document can be verified by rehashing it and comparing it to the hash stored on-chain.
Recording a document on a public blockchain makes it available for anyone to access and view. But you have to be sure that you really want that file to be visible, as once it is stored (even in hash form), it can never be changed or modified.
There are, of course, easier ways of ensuring visibility, but with blockchain, it is permanent due to its security.
If you think you cannot rely on a third-party storage provider to keep your files due to various political reasons, then the decentralized nature of blockchain can be of help here. By not being owned by any entity, be it corporate, institutional or governmental, the document cannot be censored or modified, as it complies only to the code of the blockchain.
There are, however, different types of blockchains that use consensus protocols that are not completely decentralized which allow the reversal and censorship of transactions.
One of the biggest issues with storing on a blockchain is the amount that can be stored. Because the storage amount is limited by the protocol or because high transaction fees, the option of storing them on-chain is not that effective.
Most chains have storage capacities that are limited at kilobytes or less. You could in theory bypass that limitation by dividing the file into smaller units and storing them individually. But this method would also incur higher costs, as you would be required to pay the base price of the transaction multiplied by the number of divided units.
The Cost of Storing Data
On-chain storage is also expensive. This is because every full node on this planet has to store your data and each time the blockchain downloaded- your data is also downloaded.
This is why even kilobyte- sized documents can lead to high costs. In addition to the transaction’s base price, you will also have to pay an amount per byte. Also, for platforms that deploy smart contracts, you have to pay the fees for its execution time.
Access latency is a time delay experienced by the user when he accesses an online network and starts the process of downloading or uploading a document. The average latencies for blockchain protocols are usually more than 30 seconds. As a blockchain network has more nodes, the access latency becomes higher.
When more users join the network, the access latency accentuates, which can lead to hours to process a transaction (as it was in Bitcoin’s case).
Blockchain does have its advantages, but if you are looking for anything else aside from back-up storage, such as live editing and fast access, then this type of storage system is not suitable for you.