Decentralized Applications (dapps)

Introduction to DApps

·

19 min read

Decentralized Applications (dapps)

Web3.0 has the potential to change the internet as we know it, forever. You are still early in catching the trend right now and building your first blockchain application. Acquire the skills, get a high-paying job, or create a web3 project that can make you money.

Web3 applications are called DApps. Before we go in-depth on what a DApp is, I will define some terms you will come across as you proceed.

Here's a link to an article where I answered your questions on what web3 is and how the web evolved from static, boring pages to the more exciting decentralized internet that web3 offers: Starting Web3? Don't Fret!

CRYPTOCURRENCY

cryptocurrency 2.jpg Cryptocurrency is a digital currency in which transactions are verified and records maintained by a decentralized system using cryptography, rather than by a centralized authority.

Cryptocurrency is a type of currency that exists entirely online. It does not have an actual physical form but exists in a blockchain on a server, which stores data regarding transactions in blocks without personal identifying factors. They are not backed by a bank or other traditional lending institutions, and transactions are highly encrypted to keep personal information private, regardless of the transaction being made. Even so, they cannot be used for every purchase online. More often than not, they are bought as a form of investment rather than as a means to secure purchases from online shops.

BITCOIN

bitcoin.jpg Bitcoin, often described as a cryptocurrency, a virtual currency or a digital currency—is a type of money that is completely virtual. It's like an online version of cash, you can use it to buy products and services.

Bitcoin operates free of any central control, or the oversight of banks or governments. Instead, it relies on peer-to-peer software and cryptography. A public ledger records all bitcoin transactions and copies are held on servers around the world. Anyone with a spare computer can set up one of these servers, known as a node. Consensus on who owns which coins is reached cryptographically across these nodes rather than relying on a central source of trust like a bank. Every transaction is publicly broadcast to the network and shared from node to node. Every ten minutes or so these transactions are collected together by miners into a group called a block and added permanently to the blockchain. This is the definitive account book of bitcoin.

In much the same way you would keep traditional coins in a physical wallet, virtual currencies are held in digital wallets and can be accessed from client software or a range of online and hardware tools.

Bitcoins can currently be subdivided by seven decimal places: a thousandth of a bitcoin is known as a milli and a hundred millionth of a bitcoin is known as a satoshi.

In truth there is no such thing as a bitcoin or a wallet, just agreement among the network about ownership of a coin. A private key is used to prove ownership of funds to the network when making a transaction. A person could simply memorize their private key, or store it in a safe place, and need nothing else to retrieve or spend their virtual cash, a concept which is known as a “brain wallet”.

Can bitcoin be converted to cash?

Bitcoin can be exchanged for cash just like any asset. There are numerous cryptocurrency exchanges online where people can do this but transactions can also be carried out in person or over any communications platform, allowing even small businesses to accept bitcoin. There is no official mechanism built into bitcoin to convert to another currency.

What is the purpose of bitcoin?

Bitcoin was created as a way for people to send money over the internet. The digital currency was intended to provide an alternative payment system that would operate free of central control but otherwise be used just like traditional currencies.

ETHEREUM

ethereum 3.jpg What Is Ethereum? Ethereum is a platform powered by blockchain technology that is best known for its native cryptocurrency, called ether, or ETH, or simply ethereum. The distributed nature of blockchain technology is what makes the Ethereum platform secure, and that security enables ETH to accrue value.

The Ethereum platform supports ether in addition to a network of decentralized applications. Smart contracts, which originated on the Ethereum platform, are a central component of how the platform operates. Many decentralized finances (DeFi), and other applications use smart contracts in conjunction with blockchain technology.

As a cryptocurrency, Ethereum is second in market value only to Bitcoin as of March 2022.

KEY TAKEAWAYS

  • Ethereum is a blockchain-based platform that is best known for its cryptocurrency, ETH.
  • The blockchain technology that powers Ethereum enables secure digital ledgers to be publicly created and maintained.
  • Bitcoin and Ethereum have many similarities but different long-term visions and limitations.
  • Ethereum is transitioning to an operational protocol that offers incentives to process transactions to those who own the largest amounts of ETH.

How Does Ethereum Work?

Ethereum, like other cryptocurrencies, uses blockchain technology. Imagine a very long chain of blocks linked together, with all of the information about each block known to every member of the blockchain network. With every member of the network having the same knowledge of the blockchain, which functions like an electronic ledger, distributed consensus can be created and maintained about the status of the blockchain.

Blockchain technology creates distributed agreement about the state of the Ethereum network. New blocks are added to the very long Ethereum blockchain to process Ethereum transactions and mint new ether coins, or to execute smart contracts for Ethereum dApps.

The Ethereum network derives its security from the decentralized nature of blockchain technology. A vast network of computers worldwide maintains the Ethereum blockchain network, and the network requires distributed consensus—majority agreement—for any changes to be made to the blockchain. An individual or group of network participants would need to gain majority control of the Ethereum platform’s computing power—a task that would be gargantuan, if not impossible—to successfully manipulate the Ethereum blockchain.

Ethereum vs. Bitcoin

bitcoin and ethereum.jpg Ethereum is often compared to Bitcoin. While the two cryptocurrencies have many similarities, potential investors should pay attention to some important distinctions.

Ethereum is described as “the world’s programmable blockchain,” positioning itself as an electronic, programmable network with many applications. The Bitcoin blockchain, by contrast, was created only to support the bitcoin cryptocurrency.

The Ethereum platform was founded with broad ambitions to leverage blockchain technology for many diverse applications. Bitcoin was designed strictly as a cryptocurrency.

The maximum number of bitcoins that can enter circulation is 21 million. The amount of ETH that can be created is unlimited, although the time that it takes to process a block of ETH limits how much ether can be minted each year. The number of Ethereum coins in circulation was more than 118 million at the close of 2021.

One major difference that affects investors is how the Ethereum and Bitcoin networks treat transaction processing fees. These fees, known as “gas” on the Ethereum network, are paid by the participants in Ethereum transactions. The fees associated with Bitcoin transactions are absorbed by the broader Bitcoin network.

A significant way that Ethereum and Bitcoin are similar is that both of the blockchain networks consume vast amounts of energy. Each of these blockchains operates using the proof of work protocol, which is a methodology that requires extensive computing power to validate transactions and mint new currency. Ethereum is gradually transitioning to a different operating protocol known as proof of stake, which uses much less energy.

TOKEN

tokens.jpg According to the Oxford dictionary,

“A token is a round piece of metal or plastic used instead of money to operate some machines or as a form of payment.”

Crypto tokens are digital assets that are built on another cryptocurrency's blockchain. A cryptocurrency can be a coin or a token, depending on whether it's the native cryptocurrency for its own blockchain or not. Crypto coins have their own underlying blockchains; crypto tokens don't.

Why are crypto tokens important?

Tokens allow developers to create a cryptocurrency without needing to build a blockchain for that cryptocurrency. That's a big deal because it makes the process of developing cryptocurrencies much faster, simpler, and less expensive. For developers who want to make their own crypto coin, blockchain development is a serious technical undertaking. A blockchain needs to be able to process transactions quickly at a low cost, and it needs to be resistant to attacks so that hackers can't steal crypto. Building the blockchain isn't the end of the process either. A new crypto coin also needs validators to confirm its transactions. Since cryptocurrencies are decentralized, they rely on people choosing to become validators and lending computing power to the blockchain. For example, Bitcoin relies on Bitcoin mining, but that requires people across the world to use mining devices. Developers of a new coin also need to think about how they'll attract enough validators to keep the blockchain secure and avoid fraudulent transactions. The quicker option is to make a crypto token. Instead of building a blockchain from the ground up, developers can essentially piggyback on an existing blockchain, such as Ethereum. Their crypto token can then run on Ethereum's existing platform, which already has a secure system in place to validate transactions and run smart contracts.

How does crypto tokens work?

As cryptocurrencies, crypto tokens are assets with value. They can typically be transferred, traded, bought, and sold, and they're stored in blockchain wallets. Transactions with a crypto token are processed on the blockchain that it uses. For example, if it's an ERC-20 token built on Ethereum, then the Ethereum blockchain will handle all transactions for that token. In addition to their role as a currency, crypto tokens can serve many other purposes. Here are a few of the most common uses for crypto tokens:

  • Governance tokens: A governance token is a crypto token that gives the holder voting rights in a cryptocurrency project. Token holders are able to make and vote on proposals that help determine the future of that specific cryptocurrency. The more tokens you hold, the more voting power you have.
  • Decentralized finance: Decentralized finance (DeFi), refers to alternative financial systems built on blockchain technology. For example, instead of getting a loan from a lender, you could put up crypto tokens as collateral and get one from a DeFi platform. Each DeFi platform has its own token that it uses as its official currency.
  • Crypto rewards: The previously mentioned DeFi platforms rely on investors who lend their own cryptocurrency funds. In return, investors receive crypto rewards as an incentive. These rewards are usually paid out as crypto tokens.
  • Non-fungible tokens: A non-fungible token (NFT), is a crypto token that denotes ownership of a digital asset. The ownership information is stored in the cryptocurrency token. NFTs can be used to show who owns a unique digital image, a GIF, or a character in an online game.

Cryptocurrency vs. Altcoins vs. Crypto tokens

coin and token.jpg

Cryptocurrency, altcoins, and crypto tokens are common terms you'll see used to describe cryptocurrencies. Here's a quick breakdown of their definitions:

  • A cryptocurrency is a decentralized digital currency. It uses cryptography to verify transactions, and transaction data is stored on a blockchain.
  • An altcoin is any cryptocurrency other than Bitcoin. The term comes from the fact that they're alternatives to Bitcoin, the first cryptocurrency.
  • A crypto token is a cryptocurrency that doesn't have its own native blockchain. Developers build it on the blockchain of another cryptocurrency.

There's quite a bit of overlap between these categories. Cryptocurrency includes every cryptocurrency on the market, which means altcoins and crypto tokens both fall into this category. And since altcoins include every cryptocurrency outside of Bitcoin, crypto tokens all fall into the altcoin category as well.

Top Crypto Tokens

Now that we've explained what crypto tokens are, let's take a look at a few of the top ones:

  • Tether and USD Coin are stable coins pegged to the U.S. dollar. They're designed to maintain a price of $1, and they're both built on the Ethereum blockchain.
  • Shiba Inu is a controversial meme token that saw its price skyrocket in 2021. That success was primarily due to its popularity, and the token's value has fallen significantly since then. It's also built on the Ethereum blockchain.
  • Chainlink is an oracle network that allows smart contracts on a blockchain to receive real-world data. It's built on the Ethereum blockchain as well.
  • Uniswap is the token for the decentralized crypto exchange of the same name. The Uniswap exchange offers cryptocurrency trading with no central governing authority, and like the others on this list, is built on the Ethereum blockchain.

Those are some of the biggest crypto tokens by market cap, but there are thousands more out there. Although some could potentially be a good cryptocurrency investment, the vast majority aren't. Since it's so easy to create a cryptocurrency token, many developers launch useless tokens in hopes of making a quick buck. If you're interested in investing in cryptocurrency, it's helpful to understand crypto tokens. You're going to run into quite a few of them, and knowing what they are will help you better evaluate them as potential investments.

CRYPTO WALLET

wallet.jpg A cryptocurrency wallet or a blockchain wallet is an app that allows cryptocurrency users to store and retrieve their digital assets. As with conventional currency, you don't need a wallet to spend your cash, but it certainly helps to keep it all in one place. When a user acquires cryptocurrency such as bitcoins, he can store it in a cryptocurrency wallet, and from there use it to make transactions. Cryptocurrency wallets are like apps, just like those you might run on a smart phone or computer. If you prefer the tactical experience of holding a wallet, you can also buy a physical device that runs a wallet app. Crypto wallets can hold multiple cryptocurrencies.

There are different types of crypto wallets, such as; paper wallets, hardware wallets, and software wallets. A crypto wallet's security depends on how the private key is stored. A crypto wallet consists of two key pairs: private keys and public keys. A public key is derived from the private key and serves as the address used to send crypto to the wallet. Wallets have many public keys. This means that you can give out multiple different public addresses and use them to receive crypto to the same wallet.

The important part of a wallet—and the part where new users often find themselves getting into trouble—is the private key. A private key is like the key to a safe deposit box. Anyone who has access to the private key of a wallet can take control of the balance held there. But unlike a safe deposit box, crypto users who hold their own private keys and make transactions using non-custodial wallets (i.e., a wallet not hosted by an exchange or other third-party) become their own bank.

"It is similar to a bank account but the main difference is, it is controlled by a key that only you control. You use this [private] key to initiate transactions, which is called 'signing,'"

says Joel Dietz, founder of Art Wallet and contributing developer to MetaMask.

WHAT IS A DAPP?

dapp again.png A decentralized application (DApp, dApp, Dapp, or dapp) is an application that can operate autonomously, typically through the use of smart contract, that runs on a decentralized computing blockchain system. Like traditional applications, DApps provide some function or utility to its users. However, unlike traditional applications, DApps operate without human intervention and are not owned by any one entity, rather, DApps distribute tokens that represent ownership. These tokens are distributed according to a programmed algorithm to the users of the system, diluting ownership and control of the DApp. Without any one entity controlling the system, the application becomes decentralized. Decentralized applications have been popularized by distributed ledger technologies (DLT), such as the Ethereum blockchain, on which DApps are built.

The trustless and transparent nature of DApps has led to greater developments in the utilization of these features within the decentralized finance (DeFi) space.

DApps are divided into 17 categories: exchanges, games, finance, gambling, development, storage, high-risk, wallet, governance, property, identity, media, social, security, energy, insurance, and health.

There are a series of criteria that must be met for an application to be considered a DApp. Traditional definitions of a decentralized application require a DApp to be open-source, that is the application operates autonomously without a centralized entity in control of the majority of the application’s associated tokens. DApps also have a public, decentralized blockchain that is used by the application to keep a cryptographic record of data, including historical transactions. Although traditional DApps are typically open-source, DApps that are fully closed-source and partially closed-source have emerged as the cryptocurrency industry develops. As of 2019, only 15.7% of DApps are fully open-source compared to 25% of DApps being completely closed source, that is there is a smaller proportion of DApps with the code of the application and its smart contracts all completely available compared to the proportion of DApps without any disclosure of their code. DApps that are open-source, with the code of their smart contracts publicly available, generally have higher transaction volumes, indicating greater popularity in open-source DApps over closed-source DApps.

Secondly, tokens required for application use and user rewards, must be generated by the application as per a programmed algorithm or criteria. Some portion of the application’s tokens is typically distributed at the beginning of the application’s operation.

Lastly, the protocols of the application must be able to be adapted in the case of majority consensus by the application’s users, such as to make improvements to the application based on market feedback.

Bitcoin as a DApp

Bitcoin, the first cryptocurrency is an example of a DApp. Bitcoin is open-source. All transactions on the Bitcoin blockchain are open and public, and the application operates without the control of any centralized entity. Every Bitcoin transaction since the beginning of the application is publicly available and immutable. Bitcoin generates its Bitcoin tokens, through block rewards to miners for securing the network. Block rewards are halved every 210,000 blocks mined, or roughly every four years, to limit the inflationary effects on Bitcoin, capping the number of total Bitcoin at 21 million. Changes to Bitcoin must be made through Bitcoin’s proof-of-work mechanism which can only be done by a majority consensus of Bitcoin’s users.

There are four key criteria that enable an application to be decentralized:

  • Open source: The application's code must be available for public scrutiny. The application should be governed by autonomy, with any changes to the protocol decided by consensus.
  • Decentralized: The application must function on a decentralized blockchain network, which allows for data to be cryptographically stored and distributed in the decentralized ledger, enabling every user on the network to see it.
  • Incentive: Like blockchain, the application must use and provide specific tokens or digital assets to users on the network to reward them for validating blocks on the chain.
  • Protocol: The application must run on a protocol, and the community needs to agree on a cryptographic algorithm to show proof of value—such as Proof-of-Work (PoS) or Proof-of-Stake (PoW).

CLASSIFICATION OF DAPPS

DApps can be classified based on whether they operate on their blockchain, or whether they operate on the blockchain of another DApp. By this classification, DApps are divided into three types.

Type I DApps operate on their blockchain. Blockchains such as Bitcoin and Ethereum can be classified as Type I DApps.

Type II DApps are protocols that operate on the blockchain of a Type I DApp. These protocols themselves have tokens that are required for their function.

Type III DApps are protocols that operate using the protocols of a Type II DApp. Similar to Type II DApps, Type III DApps also have tokens that are required for their function.

Why DApps?

As the occurrence and threat of network hacks have become more frequent and prominent in recent years, vulnerability of user data to such hacks has become prevalent. The importance of individual ownership and management of data is a growing concern in both the digital marketplace and broader society. In addition, the need for an unedited log of digital dialogue has become increasingly important.

DApps offer a technology where publication of content would remain unchanged, available for all to see, owned by the original owner and unable to be purchased by a centralized organization. As a result of this, DApps are also secure. The data cannot be tampered with.

Further, DApps are inherently related to cryptocurrency, which can stimulate interest and activity and provide a means through which content creators can be rewarded.

As cryptocurrency continues to evolve, DApps and their benefits will take an increasingly important role both within the cryptocurrency community, and to the broader public.

There's a lot of innovation happening within the blockchain space and DApps are at the forefront.

Building DApps

Decentralized applications are built on blockchain networks and use smart contracts to create platforms that streamline the entry into industries ranging from finance to gaming—all without intermediaries and centralized authorities. In terms of front-end user experience, dApps appear nearly identical to traditional web applications. However, on the back-end, dApps function much differently than their conventional counterparts. Instead of employing the HTTP protocol to communicate with the broader network, dApps connect to the blockchain in a decentralized manner rather than routing through centralized servers.

Beyond token launches, retail dApps, and industry-specific applications, decentralized finance (DeFi) platforms have become the primary driver of dApp market value growth in 2020. But why exactly does Ethereum dominate dApp development, and is there room for diversification? A view of the Ethereum-DApp relationship can help answer these questions.

Ethereum and DApps

Although Bitcoin can be considered the first DApp, the blockchain network that is most closely associated with DApps is Ethereum. The original Ethereum whitepaper stated an intention to create a protocol for building decentralized applications. DApps running on the Ethereum network could reduce development time, increase security and improve scalability.

Ethereum has its own development language—Solidity—and the network allows users to create smart contracts, which are self-executing digital versions of contracts with specific guidelines built into the code.

Despite the growth of alternative blockchain networks, decentralized applications (dApps) exist almost exclusively on the Ethereum blockchain. The Ethereum Virtual Machine (EVM) is the primary driver of this trend, with development kits and application templates serving to continuously improve the developer experience. In combination, these tools enable the development of any application that lacks its own platform. Projects can leapfrog the development of a proprietary blockchain by using the Ethereum framework. Decentralized apps on the Ethereum blockchain also benefit from a vast community of developers, amplifying the network effect. Decentralized apps using Ethereum also have a clear path to monetization, which also attracts developers. However, blockchains like EOS and TRON have shown that alternatives to Ethereum are gaining popularity within specific dApp market segments.

Why Ethereum for dApps?

The Ethereum network currently dominates dApp development for several reasons. Ethereum implements a development interface that reduces programming time and helps quickly launch projects. Beyond this, the Ethereum developer community has grown remarkably since the platform’s launch. And Ethereum retains formidable network effects from its global coalition of technologists who remain committed to maintaining the network and actively developing user resources that drive adoption. Further, the ability to adequately monetize dApp projects incentivizes others to partake in the Ethereum ecosystem.

The Ethereum Virtual Machine (EVM)

Ethereum is known for providing a distinct and accommodating developer experience that makes it easier for novice blockchain developers to enter the space. A prime example of this is the Ethereum Virtual Machine (EVM), a unique software system that allows developers to launch any dApp regardless of the underlying coding language. Ethereum also uses a network-native language known as Solidity for coding smart contracts. This network architecture eliminates the need to develop an entirely new blockchain for every dApp.

Developers can work with the ready-made Ethereum system to fast-track onboarding and get their applications up and running sooner than other alternatives. This continues to drive the rapid development of DeFi products on the Ethereum network. By combining application templates, MetaMask integration, and the EVM, the overall Ethereum development kit allows companies to focus on refining their applications and developing on top of open-source code among a global, mission-based developer community that prioritizes cooperation over competition.

Monetizing Ethereum dApps

Many dApps utilize a native token that facilitates activity within the application—also known as a utility token. On the Ethereum network, these tokens adhere to the ERC-20 tokenization standard, a set of rules that ensure Ethereum-based tokens can interact seamlessly with one another. This component of network architecture is critical to ensuring the continuity of Ethereum-based applications. To generate revenue, dApps can monetize their assets on existing crypto exchanges or launch their own decentralized exchange (DEX).

The ERC-20 standard enables the frictionless exchange of these crypto assets. Further, the increase in trading volume brings more awareness to dApps residing within the Ethereum ecosystem; the network reinvests in itself. A clear path toward monetization results from Ethereum's vast community and robust, interoperable network infrastructure.

Next on this web3 series:

  • Smart Contract
  • Solidity
  • Understanding your solidity workspace
  • Introduction to MetaMask