HappySchool

The Architecture of Web3.0

May 9, 2019 • ☕️☕️ 11 min read

Language: 简体中文

There are several different perspectives to understand Blockchain’s value, one of which is by knowing the role it plays in the context of next generation Web, namely Web3.0. There are several challenges we may face building a decentalized Web, and let’s figure out how Blockchain can fix them and why DApps will require the decoupling of App and Data. At last, I wish you are able to form a new Blockchain investment model by looking at a picture larger than Smart Contract.

The outline is:

  1. Next Web will be decentralized
  2. Blockchain as the incentive layer and truth layer
  3. How decentralized ID works
  4. From App to DApp — A paradigm shift

Let’s get started.

Next Web will be decentralized

Technology always moves humanity forward, and empowers individuals. We see a clear clue of decentralization in the history.

1943, somebody from IBM said 5 computers would be enough for the whole world to use, and everybody was expected to connect to them with her dumb terminal. Obviously, Apple and Microsoft did not buy this, and the rest was history. The picture here comes from a early Apple advertisement with a lady holding a hammer to smash the monopoly of IBM. The right side shows Apple2, one of the early personal computer that many people knew about. A side note, Microsoft did not start the PC revolution, Apple did.

Similarly, corperations were reluctant to use the newly born Internet with low security, no censorship, and full of drug dealers and porn. That’s why they tried to build a global intranet, and keep it pure by tight control. In reality, the public Internet won at last, because innovation happens when there is enough freedom.

It was not just hardware that got decentralized, software too. Microsoft made huge profit by selling software copies. But after 2000, with the rise of so called internet companies like Google and Facebook, selling software is no longer so common. Google offers its software for free, while instead make use of user’s data to make a profit.

The main goal for the decentralization of the Web is to set up digital property rights there, and let the users own their own data. That is to decentralize data ownership. Therefore, data can be traded freely and economy will boom.

The current Web falls deep in the centraliztion hole. Facebook plus google mean a large part of many people’s Web. We need to first get into their walled gardens to be able to use the Web. I like these companies cause they are much better than the earlier systems, but things have to change to stop them to be the next dictators.

When the Web was born, it was totally decentralized. It was expected to empower individuals and clear out the social hirachey. But current reality is the monopolies are getting stronger, so what’s the problem here? To put it simply, the current Web lacks a effective way to incentivise people and keeping truth.

Blockchain As the Incentive layer and Truth Layer

Blockchain will fill the gap by providing the truth layer and incentive layer for the Web. Let first figure out why a truth layer is indispensable.

Firstly, the Web needs immutable data as the root of trust. The Web has no way to store data for itself, data must be saved in somebody’s database which can neither stop data tampering nor allow others to verify the data is not tampered. Therefore, some say there are only data on Web, no truth. And what is root of trust? when we open google.com, we trust it is google, since DNS system is secure enough to prenvent attackers from faking the domain, here DNS system is the root of trust. When we use HTTPS, we believe the certificates are not faked, because we trust the organization, namely the CA, that issued the certificates. CAs are here the root of trust.

Web3.0 will use Blockchain as root of trust. DNS and CAs for Web3.0 will be based on Blockchain and its immutable data. It’s rediculus now that the Web2.0 root of trust is actually organizations, that are nothing more than small groups of strangers. But Blockchain follows the priciple that

In Math We Trust

There is no one to trust, all you need is to trust Math. In a nut shell, Blockchain means everybody on earth can hold a copy of the data, people reach a consensus following clear mathimatical rules to make sure the data is not tampered.

Secondly, with the truth layer, we can implement self-executed rules. In real world, court is there to enforce the law by punishing evil. With truely trust worthy data, we can now first time in history let the software to execute real world rules automatically, that’s the idea behind smart contract. For real world projects, you can check Nervos to know more about the idea of crypto court, and check Ethereum to know more about smart contracts. We will not talk much here, since we will be foucing on the next Web.

That’s why the truth layer is so important, and now let’s move on to make it clear why a incentive layer is also indespensible.

Firstly, a decentralized system must be able to run by itself. Remember, in decentralized world there is no company to provide servers for us, then there has to be some way to incentivise users to share their own hardware resources to save or process data for strangers. Fortunately, We have coins on Blockchain for this. Some people call Blockchain distributed ledger, digital coins running on it brings an incentive layer for the Web.

Secondly, Blockchain is able the align the interests of all parties, and movtivate everyone work towards the same goal. Old time democracy usually resulted in a mob. People got rid of one tyrant and got 1000 in return. But on blockchian, the democracy is based on contribution, it’s different from the one person one vote schema. If you contribute nothing, you don’t have a vote.

Thirdly, coins can be used to avoid the abuse of public resources. A lot of the Web2.0 infrastructures can be used free of charge. Bad guys therefore are able to abuse them to send Email SPAM or DDOS attacts. One of the ancestors of Bitcoin is Hashcash, it was design to prevent such abuse. With blockchain, we can give all the resources a small price, normal users won’t feel it, but spamers will find it too expensive to send thousands emails a time.

Now is the point we conculde the importances of truth layer and incentive layer. Without the two, there is no way the Web can be decentralized.

Decentralized ID

The next generation Web will be decentralized, therefore digital identity, ID for short, will be decentralized as well. What exactly is ID? Why should it be decentralized? Will the concept of login still be relevant for a decentralized Web? And most importantly how decentralized ID works? Let’s take a glimpse of the future.

A simple question first, what is ID? In digital world, a user ID is made of everything she says, does and experiences.

Your ID is more than your username and password. For example, my Github username is happypeter, happypeter is my ID identifier, and password is the secret key to prove I own my ID, but it is very different from a private key which we will talk soon. So happypeter is not my ID, it is the identifier of my ID.

My id is me in digital form, a virtual me. ID is everything that defines me, all the personal data generated by technolody. Today, the digital representation of a ID is a mix of data fragmented across many apps and services. You don’t own your ID, large commercial entities like google and facebook own it.

Now it’s time to ask a serious question. Why do we need decentralized ID? The answer is quite simple, users need to control their own data.

Let’s first make it clear that what is a decentralized ID. What are the key differences between a decentralized ID and a current centralized one? Currently, my facebook ID is owned by facebook, the id identifier, and all my personal data that goes with this it is stored in facebooks’s database. However, a decentralized ID is not owned by anybody but you. It is user-generated, self-owned, with a globally unique identifier rooted in blockchain.

Every user needs a ID that she truly owns. She will be in control of her own data and able to decide what she shares, who she shares with and when to stop sharing.

A decentralized ID system is still not widely deployed, it’s hard to say what’s the final solution. But we can clearly see a lot of consensus has gathered around W3C DID https://w3c-ccg.github.io/did-spec and people are collaborating on platforms like DIF https://identity.foundation/ with members like Microsoft, IBM, Webank, and also blockchain projects like Ethereum, Bytom, Blockstack etc.

User first needs to generate her ID identifier, a username in the decentralized world. Currently cellphone number or email addresses or social network usernames are wildly used to login our daily apps. They are nice identifiers in that they are really human-friendly, but problems is that they are centralized and given by other providers and can be removed by them. If you use a decentralized system like Blockstack, your ID identifier will be generated on blockchain, with W3C DID data syntax. However decentralized ID identifier is not human-friendly, I can no longer use something like happypeter, DID identifier usually is much longer, like

did:example:123456789abcdefghi

Due to the Zooko’s Triangle, DID is hard to make human-meaningful. Binding an easy to remember username to the DID in a really secure and decentralized way is harder than it looks.

The decentralized world has no server at all, users are responsible to save their own data. Blockchain projects like Ethereum is like a mainframe trying to save all the user data on the chain, but considering how much data a user using her social app can generate, many people are now prefer a layered solution. That is only saving the most important root of trust data on-chain, while users’ actual identity data resides encrypted off-chain.

Users will store data at their own devices or their own controlled cloud space. Preferably it will be a blockchain backed decentralized storage method, say IPFS or Blockstack’s Gaia system https://github.com/blockstack/gaia . Because these are not controlled by any commercial entity and is immune to censorship. Or you can still use Google or Microsoft’s cloud services as long as you do enough backups. All your data is encrypted, so nobody knows what’s inside.

Each DID has its own public key also saved on blockchain, and user uses the private key to do authentication and authorization. Even you are not a Cryptography expert, and have no idea about how digital signatures works. It’s not hard to understand how people can sign with their private key to prove that they are associated with a DID, and they have the right to do something. But authenticating by signing way is not like the traditional logging in.

Bitcoin developer Peter Todd once said,

If you’re logging in it is centralized

Traditionally, my username and password are stored in the app’s database, the logging in is actually asking the app if I can come in. But now with the decentralized way, I don’t need to stay logging in at all, whenever I need to prove my right to do sth, I sign with my private key. Also I sign to authorize people how they can access my data, say, I can allow all my friends to view my posts, and my collaborators to edit the documentation I shared with them, everything can be done in a fine-grained way.

That’s how decentralized ID works.

The Paradigm Shift

Web3.0 will experience an app design paradigm shift, we will switch from an App-centered to a User-centered paradigm. And this is very important for the decentralization of the Web.

For centralized Web, Data and App are tightly bound together. If you use Facebook, your ID is saved in Facebook database. There is no good way to get all your data out, and no point to do so since other apps won’t be able to parse the data due to the incompatible format.

However in the decentralized world, there is this huge paradigm shift

App design will be user-centered rather than App-centered.

By saying User-centered, to a large extend, it means different apps will be designed based on one single User ID.

User will hold her own ID. At the same time, my friends and I share the same format for all our social networking data, because we all follow an open standard. And the connections among us is also part of our ID, and are not saved with some specific app.

Apps will switch role from the rule makers, to pure tools for the users saving and parsing data following the standard format. This way, users are in charge of the whole game and have the freedom to exit, which means if I don’t like social app A, I can switch to app B without losing my own data and all the connections with my friends. Cause everything is saved in our IDs followings the same standard, all the apps will be able to parse the data. Think about the Bitcoin P2P network, you can write a client yourself with whatever features you like, as long as you respect to protocol of the network, you will still be able to connect to other peer clients. That’s what I meant by a User-centered design paradigm.

And we will see a shift from App-in-charge to Protocol-in-charge schema as well. Now the situation is big companies try there best to maintain a great app, so that they can hold the user data and make all the money, that’s how monopolies are born, since once you build the app people love, all your competitors are cut out. But the future is different, because what’s important is the open standards and protocols, users hold their own IDs, all the ID data follows the same format, all the apps connect with each other with a open protocol, forming a fair market for all the developers.

The paradigm shift brings a benefit that users become first-class citizens, and are not dictated by some app. Therefore they are free to use their data whenever and wherever they want in whatever way. To understand the paradigm shift is key to understand the decentralization of the Web and how DApp works.

Conclusion

That’s almost all I want to share for this episode. And Lastly I want to stress on a few points.

Firstly, Web3.0 will be a trust-worthy Web. All the infrastructure burying their root of trust in Blockchain, benefiting from its data immutability, to form a trust-less system. Web2.0 is not trust-worthy itself, all the trust is from some organization.

Secondly, DApps will be part of the Web, they will be community driven. Companies will still build DApps in order to provide their services, but since Apps won’t be able to hold user data, so companies will see them very differently.

Thirdly, User ID won’t be fragmented into different apps. Data formats will follow some open standards, and all the apps trying to parse the data will have to follow the standards as well.

Lastly, if you want to check real world Web3.0 infrastructure and DApps, go to Blockstack.org for more resources.

Thanks!

Ref: