Decentralized applications are applications that run on a P2P network of computers rather than a single computer. dApps, have existed since the advent of P2P networks. They are a type of software program designed to exist on the Internet in a way that is not controlled by any single entity.
- Decentralized applications don’t necessarily need to run on top of a blockchain network. BitTorrent, Popcorn Time, BitMessage, Tor, are all dApps that run on a P2P network, but not on a Blockchain P2P network.
- As opposed to simple smart contracts, in the classic sense of Bitcoin, that sends money from A to B, dApps have an unlimited number of participants on all sides of the market.
# What’s the difference between dApps & Smart Contracts?
dApps are a ‘blockchain enabled’ website, where the Smart Contract is what allows it to connect to the blockchain. The easiest way to understand this is to understand how traditional websites operate.
- A dApp is very similar to a traditional web application. The front end uses the exact same technology to render the page. The one critical difference is that instead of an API connecting to a Database, you have a Smart Contract connecting to a blockchain. dApp enebled website: Front End → Smart Contract → Blockchain
As opposed to traditional, centralized applications, where the backend code is running on centralized servers, dApps have their backend code running on a decentralized P2P network. Decentralized applications consist of the whole package, from backend to frontend. The smart contract is only one part of the dApp:
- Frontend (what you see of an application), and
- Backend (the logic in the background).
A smart contract on the other hand, consists only of the backend, and often only a small part of the whole dApp. That means if you want to create a decentralized application on a smart contract system, you have to combine several smart contracts and rely on 3rd party systems for the front-end.
Illustration of a DApp that uses a blockchain with smart contracts combined with the pillars of Swarm and Whisper.
Source: Ethereum Stack exchange
dApps can have frontend code and user interfaces written in any language (just like an app) that can make calls to its backend. Furthermore, its frontend can be hosted on decentralized storage such as Swarm or IPFS.
# Blockchain dApps
For an application to be considered a dApp in the context of Blockchain, it must meet the following criteria:
- Application must be completely open-source
It must operate autonomously, and with no entity controlling the majority of its tokens. The application may adapt its protocol in response to proposed improvements and market feedback, but the consensus of its users must decide all changes.
- Application’s data and records of operation must be cryptographically stored
in a public, decentralized blockchain in order to avoid any central points of failure.
- Application must use a cryptographic token
(Bitcoin or a token native to its system) which is necessary for access to the application and any contribution of value from (miners/farmers) should be rewarded with the application’s tokens.
- Application must generate tokens
according to a standard cryptographic algorithm acting as a proof of the value, nodes are contributing to the application (Bitcoin uses the Proof of Work Algorithm).
# dApp development process
- A whitepaper is published describing the dApp and its features
- Initial tokens sale is set up
- The ownership stake of the Dapp is spread
# dApp Licences
Operating under open-source licenses allows dApps to be open for innovation without restrictions of copyright or patent. Also, by being completely open-source, decentralized applications can operate under the legal model of open-source software. Bitcoin, for example, uses the MIT open-source software license.
# Ethereum dApps
The intent of Ethereum is to create a protocol for building decentralized applications. Ethereum provides developers with a foundational layer: a blockchain with a built-in Turing-complete programming language, allowing anyone to write smart contracts and decentralized applications where they can create their own arbitrary rules for ownership, transaction formats, and state transition functions. In general, there are three types of applications on top of Ethereum.
# Financial applications, providing users with more powerful ways of managing and entering into contracts using their money.
# Semi-financial applications, where money is involved but there is also a heavy non-monetary side to what is being done
# Applications such as online voting and decentralized governance that are not financial at all.
- Token Systems
On-blockchain token systems have many applications ranging from sub-currencies representing assets such as USD or gold to company stocks, individual tokens representing smart property, secure unforgeable coupons, and even token systems with no ties to conventional value at all, used as point systems for incentivization.
- Financial derivatives and Stable-Value Currencies
For example, a very desirable application is a smart contract that hedges against the volatility of ether with respect to the US dollar by using the data feed from eg. NASDAQ.
- Identity and Reputation Systems
A contract stating the name of the owner of a land tile can be added to the Ethereum network but not modified or removed from. Anyone can register a name with some value, and that registration then sticks forever.
- Decentralized File Storage
A Dropbox-like dApp where a smart contract splits the desired data up into blocks, encrypting each block for privacy, and builds a Merkle tree out of it, then the whole data gets distributed across the network
- Decentralized Autonomous Organizations(DAOs)
A virtual entity that has a certain set of members or shareholders who, perhaps with a 67% majority, have the right to spend the entity’s funds and modify its code. The members would collectively decide on how the organization should allocate its resources.
Read up on the basic concepts: Ethereum whitepaper is good place to start
Read the Ethereum yellow paper for technical specifications of the blockchain
Pick a language: Solidity the one language that has most extensive documentation
Pick a framework and test rpc: Solidity frameworks Embark and Truffle and use Ethersim as test rpc
Look at example projects: eg. Consensys on Github
Join a community & ask questions
# Further Reading
Ethereum official documentation
dApps basic terminology
ConsenSys dApps tutorial
Ethereum Dapps for beginners
Ethereum reading list for prospective dApp developers
Full stack “Hello World” voting Ethereum dApp tutorial
List of all dApps developed on Ethereum