Over the last few years Ethereum has brought us hundreds of Decentralized

Applications, or DApp’s — And more are introduced to us every few days.

Let’s take a moment to review the anatomy of a DApp, and why DApp’s are so

important.

The What

A DApp is an application that is not controlled by a central authority. That

is to say, it operates based on a program or a set of egalitarian rules that cannot be changed by any authoritarian individual or bureaucracy. The whole point of decentralization is to eliminate the need to trust an individual management entity.

As a trivial example, think of the difference between two childhood games: In Musical Chairs there was always an adult, who was in charge of starting and stopping the record player (Yes, I’m dating myself), and who would settle any arguments when two kids sat on a chair simultaneously. Although the adult was involved with the game, she was not an equal participant.

This created a very different dynamic between the kids compared to, for example “Tag” — in Tag there was some rule for selecting the next searcher, (“not it!”), and the same rules applied to everybody. Everyone involved was an equal.

This feature is more important than you might appreciate at first. Think of

all the times in human history in which monarchs, dictators, heads of state,

or corporations have set up unfair (sometimes unknown) rules. When our institutions give way to DApps we are taking another step towards egalitarian justice.

The How of Decentralization

Crypto-currencies, like Bitcoin and Ethereum are probably the most accessible examples of DApps. They operate based on strict rules, and are not controlled by any privileged management team or authority. Note, this is not to say that different players can’t play different roles. I’ll never “mine a block” on the Bitcoin blockchain; and I might never generate an “EIP”, or Ethereum

Improvement Proposal to the Ethereum core developers. The point is that

the rules are the same for everyone (the Bitcoin protocol) — there is nothing

in the system preventing me, or thousands of people from all around the world, from doing those things.

Anatomy of a DApp

The typical architecture for a DApp is very simple:

Business logic is coded in an Ethereum smart contract. The source code for the contract must be published — this is critical to ensure that the rules of the system are fair; that is, the author didn’t sneakily reserve some special privileges for themselves.

A user interface for interacting with the smart contract.

The user interface must:

Be open source:

This is so that users can verify that the code does what it is purported to do, and nothing else. Run entirely on the user’s computer and be verifiable:

Code that runs on a back-end server is a black-box…. There’s no way to know what it’s actually doing. So most DApp front-ends are written in javascript. One of the reasons is that you can press <control-shift-i> in your browser to see the actual source code that is executing. Of course only a minority of people will actually check the code that is running, but in most cases that’s enough — if there’s anything amiss it only takes one person to sound the alarm. There are ways that make the code even more verifiable, which I’ll get to shortly. Not be “hosted” on a centralized server.

This is important for several reasons. Firstly for reliability and censorship resistance, since any single server or small cluster of servers can fail, or can be censored. But more importantly, when a website comprising a DApp’s user interface is hosted on a centralized server, the content can be modified willy-nilly. If on the other hand the DApp program is hosted on a decentralized, distributed system, like IPFS or Swarm, then the content is uniquely identified by a hash that would change if even one line of the

program was tampered with.

The foregoing is the prototypical architecture for a DApp. However there are also more elaborate models, for example Distributed Autonomous Organizations, or DAO’s, in which specific players take the traditional “management” roles. The essential feature remains the same — the management roles must be open to everyone, because the system does not give privileges to any one person or group above any other.

My Dapps, My Pledge

In case you haven’t guessed yet, I write DApps. I also frequently check out DApps written by other individuals and groups. I always consider it a red flag when a new DApp doesn’t make it explicitly clear how it is decentralized. It’s not a good sign when I can’t tell if a system uses a back-end server even after reading the whitepaper.

All of the DApps I write are 100% decentralized. I put together a little website at diazgonewild.com for links and articles about those DApps. My most recent DApp is Turms Anonymous Message Transport, which provides truly decentralized messaging between Ethereum accounts. Like my other projects it is open source on github; anyone can rebuild the user interface from source, and see that the git tag, which is embedded in the code matches the git tag on the version that is hosted on IPFS (shown in the options panel below).

I made Turms Anonymous Message Transport to lay the groundwork for another DApp that I’m working on right now. If you like my direction, then please check it out.

Demand decentralization my friends!

Alejandro Diaz