Dapps — Beyond The Abbreviation
Ethereum is one of the biggest names in the blockchain space. This is because Ethereum is not a typical cryptocurrency. While Ethereum does have a cryptocurrency, Ether, Ethereum also has a virtual machine which allows developers to write code and deploy it on to the Ethereum blockchain or a few testnets. The code is written in Solidity, Ethereum’s special programming language.
The code that developers write can be anything, from rock-paper-scissors to another Bitcoin. It is even possible to write apps on Ethereum. These are known as decentralized applications, or dapps. A noteworthy dapp is Bitcoin, the first decentralized banking application.
Security and Decentralization
Decentralized applications can be just about anything, but the main point of creating dapps was not to let a developer create Fortnite on the blockchain. Dapps utilize the blockchain’s security and the fact that they are decentralized to improve things that currently aren’t that great because they lack these key features.
Types of Dapps
There are actually three types of dapps as outlined by the Ethereum whitepaper.
- Financial applications: These involve managing and entering into contracts with money. Savings wallets, wills, some employment contracts, and hedging contracts are a few examples of these. So is Ethereum itself, or rather the cryptocurrency side of it.
- Semifinancial applications: These occur when the application involves money but is primarily based on information outside of the blockchain, such as self-enforcing bounties for solutions to computational problems.
- The third type of dapp is one that does not involve money at all, such as voting or decentralized governance.
Gambling — Type 1
A great possible use case for a dapp would be gambling. Gambling online is always a risk. All of your money could end up going to the house or another third party because of a hack. As well as this, there is a huge possibility of fraud. A dapp, utilizing decentralization and security could easily eliminate these problems. Because it is decentralized, every user knows who won what hand when, and no one can cheat or try to change records.
Think about it like this. Every person at the table writes down all of the cards that are played, who bet what, who won, and whatever else happened or needs to be remembered. Anyone at this table could write down something that never happened, like they won $1 million. If everyone did something like this, the game would never work, and everyone would walk away from the table vowing never to play that game again. With a dapp, players don’t write down what happened, the blockchain does. It’s not biased and can’t be hacked, which means that this will be a fair game.
Fizzy — Type 2
Fizzy is a dapp that was recently created for anyone who has spent too long waiting for their airplane. Whenever an airplane comes 2 or more hours late, if you originally bought flight delay insurance, you will be reimbursed almost immediately, without needing to file a claim or anything like that.
Whenever you check in with Fizzy and input that you have a flight, it checks with air traffic control and other services to see if you are eligible for a reimbursement. If you are, Fizzy sends one to you. It’s a great example of deploying something on the blockchain that has huge real-world impact. Good luck to the airlines!
Voting — Type 3
A final example of this is voting. There was an outcry after the 2016 election, investigation into tamperings with the votes, and protests everywhere. All of this could have been avoided by simply using a secure and decentralized platform, like blockchain. There have been a huge number of voting dapps created, it’s a starting point for any blockchain developer.
Voting dapps simply record who has voted and who they voted for. I recently created a voting dapp myself, check out the video I made explaining how to create one and how they work here.
This is an example of some of the code I wrote, in this case, the public function vote. This function is available to everyone. The function takes 1 input, candidateId, requires that msg.sender(you) haven’t voted already by making sure you are not in a pre-existing mapping(basically a list) of voters, requires that the candidate actually exists by making sure candidateId is greater than 0 and less than or equal to candidatesCount. It then adds your account address to the mapping created earlier that stores a list of voters, voters. The function then adds 1 to your selected candidate’s vote count, and finally emits the event votedEvent to the EVM so that the virtual machine knows someone has voted.
Dapps are a huge advancement in blockchain technology and could solve some serious issues, especially those involving security and fraud. Decentralized applications can become huge problem-solvers with developers creating new dapps and thinking of new ideas for them every day.
If you enjoyed this article: