Chapter-6: Blockchain : Introduction to decentralized applications(DApps):
What is Decentralized application?
4 main features associated to DApp:
Advantages of DApps
DApp vs other:
So, what’s the difference between decentralized and distributed?
Can a system be both distributed and decentralized?
Then, why isn’t the title of this book Distributed and Decentralized Applications?
So, is having decentralized consensus the only requirement to being a decentralized app?
Open source
Any app can be open source. So why aren’t they?
So, what incentive is there for app developers to open source the work from which they plan to profit?
Internal currency
How is any open-source dapp developer supposed to make money?
Does this mean users would need to pay to use any dapp?
Decentralized consensus
No central point of failure
What is Decentralized application?
It’s a new model for building massively scalable and profitable applications and BITCOIN paved the way with its crypto-graphically stored ledger, scarce-asset model, and peer-to-peer technology. These features provide a starting point for building new type of software called Decentralised applications.
DApps are more flexible, transparent, distributed, resilient, and have a better incentivized structure than current software models. The DApps aim to eliminate the intermediaries of linking, omnipresent in our modern economy, and to improve the traceability and the transparency of the collected information.
A standard web app, like Uber or Twitter, runs on a computer system which is owned and operated by an organization giving it full authority over the app and its workings. There may be multiple users on one side, but the backend is controlled by one single organization.
dApps can run on both a P2P network as well as a blockchain network. For example, BitTorrent, Tor, and Popcorn Time are examples of applications that run on various computers that are part of a P2P network where there are multiple participants on all sides’ some are consuming the content, some are feeding or seeding the content, while others are simultaneously performing both functions.
In the context of cryptocurrencies, the dApps exist and run on blockchain network in a public, open source, decentralized environment and are free from control and interference from any single authority.
For example, a developer can create a Twitter-like dApp and put it on a blockchain where any user can tweet messages. Once posted, no one — including the app creators — can delete the tweets. Editing may be possible by the sender, but the original tweet would be retained forever.
4 main features associated to DApp:
• They are open source.
• They operate autonomously, without the help of a central entity, thanks to a consensus mechanism providing proof of the value exchanged on the network. The consensus also makes it possible to decide on each application change by consulting all the nodes of the network.
• They operate on a blockchain or other public decentralized registry to make the transaction history public and accessible to everyone.
• They are designed around incentive crypto-economic models, mostly through the creation and exchange of a cryptocurrency. This cryptocurrency is generally necessary to use the services of the application, but also and particularly to reward all those contributing to the security and development of the DApp. It is this alignment of the economic interests of all users of the DApp around a cryptocurrency that allows the DApp to operate autonomously and decentralized.
Advantages of DApps
As Bitcoin and other cryptocurrencies become increasingly popular, it is clear the the DApps are filled with advantages that even banks or physical cash cannot compete. This includes:
• The use of the blockchain. This clever network removes the possibility of one single point or node causing total network failure. The interconnectedness of the blockchain means that it cannot be shut down from an authority source and instead, is stabilised by the nodes of the peer-to-peer (P2P) network.
• The most secure paper trail. The blockchain is infamous for its infallible data integrity — meaning that once something is added, it cannot be changed, reversed or deleted without permission.
• Updated in real time. Completely changing the game is the public ledger within DApps, a ledger that is accountable and only editable with consensus from all involved. In January 2009, with the creation of Bitcoin, we saw for the first time a P2P network that was able to not only host but also maintain a public ledger in real time through consensus.
DApp vs other:
Most people are familiar with the term “application” as it pertains to software. A software application is software that defines a specific goal. There are millions of software applications currently in use, and the vast majority of web software applications follow a centralized server-client model. Some are distributed, and a select few novel ones are decentralized. Following figure shows a visual representation of these three models for software.
Centralized systems are currently the most widespread model for software applications. Centralized systems directly control the operation of the individual units and flow of information from a single center. All individuals are directly dependent on the central power to send and receive information and to be commanded. Facebook, Amazon, Google, and every other mainstream service we use on the Internet uses this model. Let’s call these huge services “The Stacks.” The Stacks are useful because they provide a valuable service to us, but they have immense flaws.
So, what’s the difference between decentralized and distributed?
Distributed means computation is spread across multiple nodes instead of just one. Decentralized means no node is instructing any other node as to what to do. A lot of Stacks such as Google have adopted a distributed architecture internally to speed up computing and data latency. This means that a system can be both centralized and distributed.
Can a system be both distributed and decentralized?
Yes, it can. Bitcoin is distributed because its timestamped public ledger, the blockchain, resides on multiple computers. It’s also decentralized because if one node fails, the network is still able to operate. That means that any app that uses a blockchain alongside other peer-to-peer tools can be distributed and decentralized.
Then, why isn’t the title of this book Distributed and Decentralized Applications?
Centralized systems can be distributed as well. Software applications that are able to achieve decentralized consensus are a real innovation.
So, is having decentralized consensus the only requirement to being a decentralized app?
The dapp space is currently an emerging field with a lot of smart people still experimenting with new models. Different developers have different opinions on what exactly a dapp is. Some developers think that having no central point of failure is all it takes and some think that there are other requirements. The focus of this book is to talk about profitable dapps; that is, dapps from which developers and users can earn money. The reason for the profit focus is because profit is the cornerstone of a successful, robust, and sustainable dapp. Incentives keep developers building, users loyal, and miners maintaining a blockchain. To that end, following figure shows the four features any profitable dapp should have.
Open source
Decentralized, closed-source applications require users to trust that the app is as decentralized as the core developers say it is, and that they don’t have access to their data through a central source. Closed-source applications thus raise a red flag to users and act as a barrier to adoption. The aversion to closed source is particularly pronounced when the application is designed to receive, hold, or transfer user funds. Although it might not be impossible to successfully launch a closed-source decentralized application, the battle would be uphill from the start, and users would favor open source competitors. Open sourcing a dapp changes the structure of its business practices so that the Internet is common denominator instead of a chain of closed silos.
Any app can be open source. So why aren’t they?
If we delve into the traditional business models, all of them require the product or service for sale to be better than that of the competitor. Open sourcing your product would mean that any competitor could take all of your work, white label it, and sell it as their own.
So, what incentive is there for app developers to open source the work from which they plan to profit?
Bitcoin is a good example of an open-source dapp from which the creator profited handsomely. Satoshi kept an initial amount of Bitcoins and let others use the rest. Because Bitcoins were limited in quantity and the network itself provided huge value to society in the form of its novel proof-of-work mechanism, the value of Bitcoin started to increase and so did his wealth. Having the app be open source made it possible for the network to achieve the transparency it needed to improve itself with developer contributions and grow trust among its users to give its coins real-world value. Open sourcing your dapp will gain the trust of potential users. Anyone can fork your dapp, but they can’t fork your development team. Users want to get behind the people best suited to maintain the dapp, and often, those people tend to be the original developers.
Internal currency
A question that consistently comes up in dapp circles is how to monetize a dapp. Traditional modes of monetization for centralized applications include transaction fees, advertising revenues, referral commissions, access rights to user data, and subscription services. If you open source your dapp, how are you supposed to make money? You might try programmatically inserting a fee for transactions in the network that would automatically go to the app developers’ account, but that would rely on trusting users to not fork the app and take out your commission — not ideal. Neither is embedding advertising, subscription services, or any of the other centralized business models.
How is any open-source dapp developer supposed to make money?
The answer is to allocate scarce resources in the network using a scarce token: an appcoin. Users need this appcoin to use the network. Owners of scarce resources get paid in appcoins. In the Bitcoin network, the owners (miners) of the scarce resources (computing power) are paid with transaction fees directly from the users so that they can use the service. Because the network grew to include more users and there were a fixed amount of coins from the outset, the values of the coins grew, as well. We can apply this model to any kind of dapp. Scarce resources could be storage space, trades, images, videos, texts, ads, and so on.
Does this mean users would need to pay to use any dapp?
Yes and no. Although blockchains are pay-to-play, there are different ways to structure incentives within dapps. Users could receive a sign-up bonus of coins or even have the option to willingly sell their data or local storage space in exchange for coins. Besides using appcoins, dapp creators could monetize virtual assets like real estate in a decentralized MMORPG, domains in a special namespace, or even reputation.
Decentralized consensus
Before Bitcoin, consensus on transaction validity always required some degree of centralization. If you wanted to make a payment, your transaction had to go through a clearing house that monitored all transactions. Bitcoin is peer to peer (P2P), which means nodes are able to talk to each other directly. P2P networks are not a novel thing; Distributed Hash Tables (DHTs) like BitTorrent were invented before the blockchain. DHTs are great for storing and streaming decentralized data, but if you want application-level constructs like usernames, status updates, high scores, and so forth for which you need everyone to agree on in a decentralized way, you’ll also need a blockchain.
The blockchain doesn’t replace the need for DHTs, but it does serve to complement them. What makes the blockchain unique is that it solves the major security issue of DHTs: not forcing nodes to trust each other on the validity of data. The blockchain is a decentralized database of transactions and it’s the first decentralized database that is highly tamper-resistant.
No central point of failure
Dapps can’t be shut down, because there is no server to take down. Data in a dapp is decentralized across all of its nodes. Each node is independent; if one fails, the others are still able to run on the network. There are a number of decentralized database systems on which to build dapps that allow for this feature, such as Interplanetary File System, BitTorrent, and independent DHTs.
References : Oreilly and investopedia