When blockchain technology was first introduced a decade and a half ago, it made the possibility of a decentralized web seem viable to a mass audience. Since then, blockchains have proven themselves to be a poor solution to the majority of data storage problems outside of bearer assets - i.e. Bitcoin - because blockchains grow continuously without any ability to delete data, which just doesnât make sense for things like personal data. But âblockchainâ isnât synonymous with decentralization, and just because a blockchain isnât the best solution for personal data storage doesnât mean your app canât be decentralized.
There are two common problems when trying to port a traditional centralized application over to the blockchain: data efficiency and data custody. In this post weâll discuss why those two problems are blockers for most applications, and how Web5 components allow developers to build performant decentralized applications in a way that wasn't possible before.
Where Blockchain Doesnât Fitâ
Data Storage & Efficiencyâ
Itâs possible to make the argument that data such as GIS coordinates, historical data, or widely-used and immutable data are good candidates to be stored on the blockchain because thereâs no need for deletion and a requirement for complete history. While blockchain isnât the only storage method that meets the needs of these systems, those systems are the ones best suited to utilize blockchain. Despite that fact that those data are good candidates for blockchain, however, does not mean that blockchain is the best data storage solution for that data.
However, blockchains are continuous ledgers of data that provide the benefit of immutability at the cost of storage inefficiency, which means that they arenât great for storing large amounts of data or data sets in which there are large subsections of trivial or ignorable data. Firstly, their read times are slower than traditional data storage because the entire blockchain needs to be traversed for a read, and write times require settlement onto the blockchain which is out of an individualâs hands. As a result, the cost per transaction will likely be significantly higher on the blockchain when compared to traditional data storage, and that cost can grow over time.
Imagine an on-chain photo storage app that allows for users to encrypt their data. While this framework would technically allow for the replacement of large-scale cloud-based photo services that are run by centralized corporations, the end user experience would be tarnished by much slower speeds than what users have come to expect. Thatâs because blockchains are designed to store an immutable ledger of transactions (in this case uploads of photos), and knowing what photos belong to who would involve traversing the entirety of the blockchain. Queries to this kind of data storage are slow and expensive, as would be the proof-of-work or other verification method needed to add new blocks to the chain. As a result, while a photo sharing app, or any app that requires storage of large files, is theoretically possible on-chain, it isnât very scalable or performant.
Data Custodyâ
A key tenant to the decentralized web is the idea of custody, or data ownership. Custody, or the ability to hold an asset in which only you have full access to it, breaks down into a handful of concerns including:
- Physical storage ownership
- Deletion prevention
- Censorship resistance
- Speed of use
- Data interoperability
A truly decentralized web makes it easy for each user to custody their own data, regardless of their reasoning for doing so. No matter a customerâs âwhy,â however, custody isnât simply a matter of personal beliefs - itâs a feature that enables better user experience.
With blockchain technology, wallets donât actually store your data - instead they address to your data on the blockchain via the public/private keys they hold and represent. This means, for example, that a crypto wallet doesnât actually âstoreâ your Bitcoins; itâs an address that is used as the identifier on transactions recorded on-chain, which can then be used to determine your walletâs Bitcoin holdings.
In order to take custody of your on-chain data then you would need to run your own node on the blockchain network in question, which may not be a good solution for the average consumer. Additionally, in order to host a wallet that is available on all of your devices, that wallet will likely be hosted on a centralized third partyâs servers.
Itâs important to note that while the issues of wallet storage and running nodes arenât unsolvable problems, they are inherently outside of the definitions of what a typical blockchain wallet does today.
Building With Web5â
Bearing in mind the limitations of custody and efficiency, it becomes clear that not a lot of data makes sense to be stored on-chain. However, just because you might not want to store important, large data like photos, or small, unimportant data like favicon history on-chain doesnât mean that it isnât possible to store that data in a decentralized way that offers custody and efficiency.
Key Web5 technologies like Decentralized Identifiers (DIDs), Decentralized Web Nodes (DWNs), and Verifiable Credentials (VCs) in supplement or in place of blockchain provide a framework for an internet that is both decentralized AND solves the issues weâve discussed that blockchain alone canât solve. Itâs important to note that while the integration of these technologies with existing blockchain ecosystems isnât unheard of, they are able to solve the issues with blockchain discussed above. Cumulatively, they offer a way to efficiently address data, store and replicate data in a decentralized manner, and maintain identity.
Custodyâ
A purely blockchain-focused wallet, as discussed previously, is simply a key pairing with an address that references ownership over transactions on the blockchain but doesnât actually manage local or cloud storage. This means that any on-chain data, while decentralized, isnât user-custodied unless they set up a node on the network in which theyâre participating, which is something that in a blockchain context should happen in a separate app from the wallet.
In Web5, however, wallets are addressed via DIDs and are able to store data via DWeb Nodes - which can live on device and replicate storage remotely - rather than relying on storing everything on-chain or on the wallet developerâs cloud storage option. Because Web5 wallets are more robust than simply a wallet that connects to a blockchain, your Web5 wallet could theoretically manage running a blockchain node for you in addition to performing more standard âwalletâ tasks like you might expect.
Additionally, because DWNs are able to replicate data across instances on different devices, it makes for self-custodying your data across devices much easier than with a blockchain wallet. While blockchain wallets require re-creating the private key pairings on another device and can pose a security risk, DIDs also offer ways to easily and securely port your DID between devices to replicate data and maintain a consistent user experience. You can imagine how great this is in the case of a photo storage app that is backed by a DWN that replicates data across your devices and makes sign-in on those devices easy!
While blockchain wallets and Web5 wallets arenât mutually exclusive - Web5 wallets can very well interact with blockchains and blockchain wallets may use concepts like DIDs and VCs -, what matters is that when users take advantage of wallet apps using DIDs, DWNs, and VCs, they can self-custody all their off-chain data and even their on-chain data should they be able to run a node locally.
File Storageâ
Ledgers like the blockchain donât make for performant databases in a lot of use cases, which is why DWNs are a breakthrough in combining decentralized web technologies with centralized web performance. While blockchains require ledger consensus and redundant storage to hold any type of data, DWNs are replicable nodes that can run any of the traditionally performant database technologies youâre used to - think SQL, MongoDB, etc. - without being tied to a centralized server.
As mentioned in our discussion about custody, you could run a DWN on your laptop, your phone, on your own server, or on rented server space from a cloud provider, and all of them can be synchronized to provide the kind of redundancy that we love about blockchain. As a result, DWNs are able to solve the problems of large file storage and off-chain storage.
Final Thoughtsâ
A performant decentralized web that offers users custody of their own data has been a tantalizing dream for almost two decades, but in that same timeframe blockchain technology has proven to not be the way to make that vision a reality. If you find yourself or your customers valuing decentralization, privacy, flexibility, and self-custodial apps, then Web5 provides the framework to achieve exactly those goals. Your Web5 app may very well leverage blockchain technology - a participating financial institution on the the tbDEX protocol weâre developing is a great example of an app that uses Web5 tech to connect to blockchains, but there are lots of ways to build dApps with Web5.
If you want to try building your own decentralized applications, go ahead and check out our Web5 SDKs, join our Discord community, and connect with us on GitHub!