DApps: building applications that live on the blockchain

The following is the script/talking points and KeyNote of the talk on Blockchain and DApps presented at DebugCon in Pristina, Kosovo on the 30th of March.

Keynote: https://www.icloud.com/keynote/070thZZwP7X9nJHlpzw6FMfoA


Blockchain / DLT

I want you to forget everything you know about Bitcoin, Ethereum, or any other cryptocurrency that you may know! Today we’re not going to talk about the economic aspect of the technology, because they are simply a small use-case for the more powerful underlying technology: “Distributed Ledger Technology” or as known as Blockchain.

Blockchain is not Bitcoin, but Bitcoin is powered by blockchain, I want to emphasise on this difference, because going forward it will make things more clear.

Blockchain is a set of protocols that when followed by the majority creates trust in a trust-less environment.

The Internet made the world more connected, blockchain will make the world more open!

Blockchain is the first layer of this technology, as we will go through the talk we will see the upcoming layers.


Smart Contracts

Smart Contracts is actually an awful name for these scripts running on the blockchain. They’re anything but smart or contracts!

Ethereum did not invent Smart Contracts, bitcoin has “smart contracts” as well, touring incomplete, but still they act like intermediary between two or more parties.

The term “Smart Contracts” was coined a few years back and somehow it got stuck with the Ethereum community and then everyone followed.

Smart contracts are a way to interface with the blockchain, a simple way to put it is to think of front-end and back-end where smart-contracts play the role of the back-end, and the blockchain is the database that you’re trying to manipulate.

Smart-contracts get compiled to byte-code, deployed onto the blockchain and get assigned a specific HASH, from which then you can call the public interface of these contracts.

Now what makes Smart Contracts interesting is that anyone can own a piece of the code / logic, this is the beauty of the blockchain technology, it does not matter in a technical aspect who creates it, anyone can be a participant in the token economy, anyone can own a “share”, “token”, “coin” or whatever name you decide to assign it too.

But honestly speaking, smart contracts as of now are buggy, there are major development issues, and the thing is, once you publish a contract, you can’t revert it, or update it. So as of now, developing on top of these protocols is a bit like wrestling.

Majority of production ready apps that have been built on top of blockchains are mainly about exchanges, and gambling, though from what I have seen, things are starting to change, there are new protocols being created and built on top of different blockchains.


Decentralised Apps

The crypto community is known for giving meaningless names to concepts that are already well known, just to give them a sense of freshness. That applies for the term DApp or Decentralised Applications.

When I first heard about DApps somehow it sounded “special” that there are specific requirements that you need to fulfil to create these applications, but in the end I discovered that they’re nothing more than normal Apps, the only difference is that DApps have replaced some of the back-end business logic with Smart Contract.

To build a DApp you need a few things, or at least understand a few things and how they work:

  • Public-Private Key / Accounts / Addresses

People call them many names, but they technically are the same thing, it’s a cryptographic key that can be used to verify your identity or that you’re the owner of the broadcasted data.

Only on this topic we can cover a lot of materials, but I’m not going to delve into it too much as not to confuse anyone, but the main takeaway is that, these keys are your Identity when communicating with the Distributed Ledger, whenever you want to mutate the ledger, the keys need to sign that transaction.

  • A wallet provider

A wallet provider is a tool that allows you to manage and store your keys they also facilitate the interaction between Blockchain, DApps and you. Since keys are sensitive, wallets need to be extremely scrutinised in terms of security. Majority of hacks in the crypto world have to do with unsecure wallets.

One of the most popular Ethereum wallet is MetaMask, and generally when you want to use a DApp that is built on Ethereum you’re going to be asked to either install MetaMask, or give access to your account in MetaMask.

For me MetaMask is a bad app and UX, and I expect / believe that in the future we will have natively supported wallets in browsers, mobile phones, computers, big vendors will embrace wallets natively.

  • You will need an SDK

Many of the blockchain projects will provide you with SDKs in different programming languages, in case of Ethereum you have Web3, and for other blockchains, just check their documentation.

Also majority of the blockchain nodes expose JSON-RPC or REST/RESTful APIs.

  • Test Networks, Edge Networks and Main net.

The same process that we use for Web Development, where we have a Production branch, Development branch and Staging, each blockchain offers a few environments to work on:

  • Main net — This is the production network
  • Test net — Testing network for development
  • Edge net — Trying out new features

Though no one is stopping anyone from creating other private or public networks.


Use-cases

So, there are a few interesting use-cases that I’ve seen and worked on.

  • Token Migration

When I first joined Ape Unit, I was sent to work on the “Token Migration”, this is the process that after an ICO, your stakeholders need to migrate their tokens from ERC20 to the blockchain, and this involves writing a few contracts, sending (“burning”) tokens there, and mapping these addresses and amounts to the Genesis Block of the blockchain.

One thing I’ve noticed in this area, is the amount of work that need to be done UX wise. Security on blockchain is extremely important, as there is no going back, there is no “undo”. We worked a few months on this project, and even though we tried to do the easiest UI/UX, and provide different options for the users to transfer their ERC20 tokens, a lot of people managed to screw up!

  • Crypto Kitties

This was one of first big DApps that a few years back gained a huge momentum and adoption, probably you have heard it. Its Crypto Kitties which makes use of the ERC-721 standard of non-fungible tokens to create unique kittens with unique attributes, that can be traded.

What are fungible and non-fungible tokens?

A way to describe the difference between the two is:

  • Fungible tokens are similar to each-other, they can be traded and their value is equal
  • Non-fungible tokens are unique, even though they might come from the same contract, their properties inside make them different
  • Brave Browser & Basic Attention Token

Another great project I wanna talk about is Brave Browser and BAT, to me they are one of the few most interesting projects in this space.

Brave is a chromium browser but which emphasises on privacy and has native support for blockchain through its own token called Basic Attention Token, with this token they aim to create an ecosystem where users, content creators and publishers can be self sustaining.

Imagine if by viewing ads/articles/videos you were getting paid by publishers, or you wanted to tip 1$ to a content creator who wrote an amazing article that changed your life, all this without the middle man, without someone getting 40% of your share, it’s simple and direct.

  • Tokenizing Celebrities

This was one of those use-cases that when I heard it first, I was like “WTF man, what have you smoked?”; but the more I thought about it, the more it made sense!

Here me out first before you judge it as stupid! We currently live in a world more connected, and the line between a celebrity and a normal person has blurred, a celebrity can be anyone who has a following! I am a celebrity in a way. By speaking to you now, a lot of people get to know about me.

Now, let say I offer specific services, maybe my time, my advice, my merchandise? I can tokenize myself, and raise funds so I can do what I actually am good at, and in exchange I provide my services to my supporters. Once you have the tokens, you can trade them, send them to anyone you want, they are yours, and in some form if a celebrity becomes more popular their value also increases over time, thus more people would want their services or tokens.

Now think how many YouTube, Instagram, Twitch celebrities are there? Not such a stupid idea after all?


Conclusion & Future

I believe I’m almost out of time, and maybe I spoke too much, but what I want you to get out of this talk is the following:

  • Blockchain is not Bitcoin, but Bitcoin is powered by blockchain.
  • The blockchain ecosystem is still in its infancy, we still haven’t seen its full capabilities, use-cases, or the revolution that everyone expects.
  • Cryptocurrencies are just one of the use-cases that blockchain technology can be used.
  • Wallet providers in the future will be supported natively by the big vendors.
  • Building on top of blockchain is not rocket science, it just needs to be seen on a different perspective.
1
Copyright © Sadi Qevani All rights reserved.