DApps are a relatively new and innovative way to make use of blockchain’s capabilities. However, largely because of how recently they have appeared, it can be tough to find a plain English definition of exactly what they are and how they differ from traditional applications.
In this article we will explain:
- what is a DApp,
- how do DApps work, and
- Why DApps are an awesome opportunity for developers.
What is a decentralised app (DApp)?
So let’s get straight to it: a decentralised app, or DApp for short, is an online application that works on a decentralised peer-to-peer network. In most functional ways DApps are used in the same way as any other software application and can be based on a website or as a mobile app.
What makes them distinct from normal apps is that they are:
- Unkillable: they have no single, central point of failure.
- Decentralised: all activity and data in a DApp runs through a distributed network of machines/nodes ie. it must run on a blockchain network rather than a centralised server.
Optional extras often associated with DApps:
- Open-source: You don’t technically have to open source your code to make your DApp, but it is common. We would highly recommend it to give your user base complete visibility and trust in your app.
- Data ownership: Many DApps, or more specifically DApp creators, don’t own their users’ data. Users are empowered to own their own data, either to share with different DApps or remove it fully from the ecosystem.
- Tokens: A lot of DApps embrace the use of some form of token. Again not necessary but can be very useful for rewarding your community, and with a DApp it’s also fairly easy to do. DApps run over blockchains so they can easily provide some form of valuable asset, such as tokens, to act as cash and enable applications where the exchange of value is demanded. Traditional applications would need to create bank or card transactions for such purposes and hold your money in their wallets. However, with DApps users money/rewards can stay in their own wallets.
It’s worth knowing at this point that there is still some debate over exactly what constitutes a DApp in the purest of senses. Some people swear there has to be a token involved always, others are very hung up on the open-source nature, but the key factor to remember at this point is that DApps are built on a decentralised network.
So what exactly makes a DApp revolutionarily different to normal apps? To understand what makes DApps special first we need to dive into how normal, traditional (slightly boring?) centralised apps work.
How do centralised apps work?
Okay so we are going super basic here, so please forgive any generalisations. The majority of traditional apps consist of three key functions:
- Interface: Users interact with the app via the front end of a web, mobile or desktop interface.
- Server: Requests from the front end are then passed to a centralised server.
- Database: Data from user actions on the front end (acquired through requests through the server) are collected and stored on a centralised database owned by a single company or individual. Note: while servers and databases can be distributed across multiple data centres or a cloud service provider they are still ultimately controlled by one organisation.
This mode of creating workable applications has been, and continues to be, a very effective way of getting your service up and running. Centralisation provides low-cost hosting, fast running speeds, easy development and a tightly controlled user experience.
However, these advantages come at some serious costs. Number one is handing over a significant amount of control to large hosting organisations, like the friendly people at Google or Amazon. On top of that, a centralised database is an impossibly tempting target for hackers. You have to hope that the big brothers have their security up to scratch, but let’s be honest, cybercrime is only ever going to get more prevalent and cybersecurity more fraught.
And as for your users, well they have to either ignorantly or begrudgingly accept that all of their personal and private data is owned by someone else – usually the highest bidder.
DApps offer an alternative, one which seeks to solve all these problems and add a bit of social justice in to boot.
How do DApps work?
I’m glad you asked. A bit like centralised apps we can split a DApps functionality into three basic stages:
- Interface: The front end is largely the same as in a centralised app.
- Smart contract: We could have a whole separate article (or series of articles) on what smart contracts are, but for now, all you need to know is that they are the part of the DApp that interacts with the blockchain network. In this basic explanation, the front end communicates with the smart contract using an API (in reality this happens via a blockchain wallet and gets a bit more complicated).
- Blockchain network: Code run by the smart contract then selects and stores data on the decentralised blockchain network.
Within the DApp system, data is stored on behalf of the user in order to allow accurate functionality of the app and all its transactions.
The special thing about the DApp is the bottom layer – the blockchain network upon which the whole system runs. Unlike the centralised database, which is owned and controlled by one person (or a multinational conglomerate), the blockchain network is fully decentralised, meaning it is run and seen by every user on the ecosystem.
It’s technically called a peer-to-peer system. Every request from the front end of the app filters through every person (node) that exists on the network. They all run the code from the smart contract and store the resulting blockchain data on their very own copy of the ledger. So everyone has their own record of every transaction that has ever happened on the DApp. This makes the information ridiculously tricky to tamper with while also allowing maximum visibility and community ownership of data. Mind-blowing right?
Why are DApps an opportunity for developers?
In our honest opinion DApps, and the blockchain space that fuels them, are quite simply the most exciting thing being developed right now! Blockchains and DApps are still brand new and there is still so much to be discovered and created – and you, yes you right there – could be helping to forge this path. A path which honestly looks like it will be revolutionary not just for tech but the population at large.
Yes yes, it’s all very exciting, you’re probably thinking soberly, but when are they actually going to give me some proper business reasons why I should now spend an extraordinary amount of time learning a whole new skill set? The answer is right here right now in this nice list below:
Security, security security
Data privacy is now a legal and moral requirement for every organisation or business. If you have any user data at all (very likely for an app creator with anything other than zero subscribers) you NEED to keep it secure. And not just “ah yeah we all have passwords on our laptops secure”, we are talking secure enough to prevent one or more of the 2,244* malicious hacks happening a day breaching your system. Even more worrying is that the job of keeping your user data safe will only get more difficult, yes as you add more users, but also if you intend to grow as an organisation. Human error is still far and away the biggest cause of data breaches.
Sound terrifying? Well, the good news is DApps make the job of securing user data much more manageable, basically by avoiding the huge security pitfall which is centralisation.
By running on a distributed blockchain computing system DApps stored data is not vulnerable to one single point of failure, unlike the centralized storage of big tech companies. So in essence DApps make it structurally much harder (if not impossible) for hackers to steal user data, as the data simply isn’t stored in a single hackable place. On top of that, data security on a blockchain is also ensured through the use of cryptographic verification methods such as the Zero Knowledge Proof (ZKP) method. Making it double safe. And don’t panic too much if you’re now worried about making your own cryptography algorithms, they come as a bit of a free package in a blockchain primitive/protocol.
Maybe this feels like a bit of a freebie for developers in currently fully democratised countries, but for those with interests or customers in parts of the world where the government enjoys a tighter control over the internet, it is important. Blockchains can empower real people to access data and financial facilities. There is no single entity on the network which can block users from deploying DApps, reading data or submitting transactions through the blockchain – meaning your service can carry on regardless of worldwide pressures. Even better, there is less platform risk too. By avoiding building on any of the big company platforms they are also unable to shut down your app if it offends their sensibilities (by, you know, becoming too successful…).
Everyone can check out and analyze the code that is run in a DApp, to make sure it’s fair and accurate. Because everyone can see exactly what’s happening there is no need to put trust into a central authority (like a bank or government) which functions on closed processes which you can’t have full visibility over.
Say goodbye to downtime
Once your smart contract is deployed and set up on the blockchain you are officially unkillable. The network as a whole will always be able to serve clients interacting with the smart contract and hackers or other malicious parties would have to pay colossal prices to launch denial-of-service attacks towards individual DApps.
Do DApps come with some challenges – naturally…
- Costs: Decentralised networks have to run on every node, this can make initial computational overheads eye wateringly high. However, it’s worth noting that the new generation of the blockchains are addressing the extra computational overhead and its cost by using smart designs such as “proof of stake” and “elected authorities”.
- A slower network: Some computations have to first be run on every node, then a consensus has to be reached about results. This can make actions slower than on centralised servers.
- User experience: Though things are headed in the right direction, it can be harder to create a user-friendly experience, particularly for those without technical knowledge.
*Source: University of Maryland study: https://eng.umd.edu/news/story/study-hackers-attack-every-39-seconds