What is Tezos? Must Read Ultimate Guide

Rajarshi Mitra

4 months ago
What is Tezos? Must Read Ultimate Guide
en flag
zh flag
de flag
ja flag
ko flag
ru flag

Tezos burst into the crypto space by collecting $232 million in their then record-breaking ICO. Since their ICO, their launch date has been constantly delayed because of behind-the-scenes drama and other conflicts. Tezos officially launched in September 2018 and now is a good time as any to look into this exciting project.  So what is Tezos?

According to the Tezos website, “Tezos is a new decentralized blockchain that governs itself by establishing a true digital commonwealth.”

A commonwealth is a group that chooses to be linked together because of their shared goals and interests. The main aim of Tezos is to make their token holders work together to make decisions which will improve their protocol over time. The native Tezos token is XTZ.

There are a lot of features in Tezos that makes it unique. We will cover them later in the guide. For now, let’s give you a little background on the project.

A Brief History of What is Tezos

The co-founders, Arthur Breitman, and Kathleen Breitman, have been developing Tezos since 2014 with a core group of developers. The company is headquartered in Switzerland. As we have already said, they raised a $232 million in an uncapped ICO in just 2 weeks, accepting contributions of both bitcoin and ether. Shortly after their historic ICO, Tezos ran head first into a lot of management issues. To understand these management issues, you must know that the Tezos-founding company is named DLS (Dynamic Ledger Solutions) and the company that holds all the funds collected during the ICO is named “Tezos Foundation.”

Arthur and Kathleen Breitman got into a public squabble with the President of Tezos Foundation, Johann Gevers. Apparently, Gevers, who was in control of the funds, refused to disburse the funds to the Breitmans. This dispute led to mayhem within the community and the estimated exchange rate plummeted. The Breitmans released a scathing statement on Gevers which included words like “self-dealing, self-promotion and conflicts of interest”.

Eventually, after a lot of drama and undesirable media attention, Gevers left the company after receiving more than $400,000 in severance. Now things are finally sailing smoothly. So, on that note, let’s get into the bare details.

Tezos Architecture

You can’t properly answer the question ” what is tezos ?”  The Tezos blockchain uses an agonistic native-middleware called ‘Network Shell.” This allows them to develop a modular style with a self-amending ledger. A generic blockchain protocol is divided into three layers:

  • Network Protocol: This is the gossip protocol which is responsible for peer listening and broadcasting between nodes.
  • Transaction Protocol: This is the transactional layer which defined the accounting model that is implemented by the blockchain.
  • Consensus Protocol: Pretty self-explanatory. This defines the consensus protocol that will help our blockchain reach agreements on the state of our transactions.

In Tezos, the last two protocols, Transaction and Consensus, are combined together to be referred to as Blockchain Protocol. The Network Shell aids in the communication between the network protocol and the blockchain protocol. The network shell is agnostic to the transaction protocol and the consensus protocol.

The Two Accounts of Tezos

The two kinds of accounts that you can use in Tezos are:

  • Implicit Accounts.
  • Originated Accounts.

Implicit Accounts

These are the most common accounts in Tezos. They start with tz1 (Ex: tz1cJywnhho2iGwfrs5gHCQs7stAVFMnRHc1). This is a simple account that is generated from a pair of public/private keys. The tz1 public address is derived from the public key and each tz1 account has its own private key. These accounts have an account owner and account balance.

Implicit accounts cannot have a delegate. To delegate funds, they will need to transfer funds to an originated account and then a delegate must be set.

Originated Accounts

Along with implicit accounts you also have accounts for your smart contracts which are called originated accounts. These start with KT1 (Ex: KT1Wv8Ted4b6raZDMoepkCPT8MkNFxyT2Ddo). These accounts have the following fields:

  • Manager – This is the private key of the account
  • Amount – Amount of Tz in this account
  • Delegatable – If this account’s funds can be delegated for baking
  • Delegate fields – Info on who this account has delegated to for baking.

An originated account can delegate its funds to the baker’s implicit account. We will talk more about bakers later.

Tezos has three unique capabilities:

  • On-chain governance and self-amending.
  • Liquid Proof-of-Stake consensus mechanism
  • Smart contracts with formal verification.

Let’s go through each one of those one-by-one.

On-Chain Governance and Self-Amending

To understand the importance of on-chain governance and self-amending, you need to first understand the “F-word” in the crypto community, forks.

A fork is a condition whereby the state of the blockchain diverges into chains where a part of the network has a different perspective on the history of transactions than a different part of the network. That is basically what a fork is, it is a divergence in the perspective of the state of the blockchain. A fork can be achieved by a soft fork or a hard fork.

What Is A Soft Fork?

Whenever a chain needs to be updated there are two ways of doing that: a soft fork or a hard fork. Think of soft fork as an update in the software which is backwards compatible. What does that mean? Suppose you are running MS Excel 2005 in your laptop and you want to open a spreadsheet built in MS Excel 2015, you can still open it because MS Excel 2015 is backwards compatible.

BUT, having said that there is a difference. All the updates that you can enjoy in the newer version won’t be visible to you in the older version. Going back to our MS excel analogy again, suppose there is a feature which allows to put in GIFs in the spreadsheet in the 2015 version, you won’t see those GIFs in the 2005 version. So basically, you will see all text but won’t see the GIF.

What Is A Hard Fork?

The primary difference between a soft fork and a hard fork is that it is not backward compatible. Once it is utilized there is absolutely no going back whatsoever. If you do not join the upgraded version of the blockchain then you do not get access to any of the new updates or interact with users of the new system whatsoever. Think PlayStation 3 and PlayStation 4. You can’t play PS3 games on PS4 and you can’t play PS4 games on PS3.

What is Tezos? The Ultimate Guide

Andreas Antonopoulos describes the difference between hard and soft fork like this: If a vegetarian restaurant would choose to add pork to their menu it would be considered to be a hard fork. if they would decide to add vegan dishes, everyone who is vegetarian could still eat vegan, you don’t have to be vegan to eat there, you could still be vegetarian to eat there and meat eaters could eat there too so that’s a soft fork.

Now, one thing should be clear here. Forks are not a bad thing. A high-quality platform should always continually evolve and update itself. To do so, it is absolutely necessary for a system to go through constant forks, hard and soft. The main problem lies with contentious hard forks which splits the community.

The most obvious example of this is all the hard forks that Bitcoin and Bitcoin Cash has been through. Bitcoin was split into Bitcoin and Bitcoin Cash while Bitcoin Cash was itself later split into Bitcoin Cash and Bitcoin SV. The Bitcoin Cash and Bitcoin SV split has been particularly ugly. It sparked the, so-called, “hash wars.”

The hash war was basically these two chains using their hash power to mine the longest chain. The one with the longest chain supposedly becomes the dominant Bitcoin Cash chain. This needless posturing plunged the whole crypto community as the entire market dropped in value. Even worse, it split the Bitcoin Cash community into two.

This is exactly what Tezos wanted to avoid.

As Kathleen Breitman puts it, “The great irony of bitcoin is that it’s ultimately a tool for community consensus, but it’s [marred by] a tremendous amount of animosity. Tezos allows for innovation to happen in a systemized way as opposed to one born of politics. You’ll not find two people who loathe politicking more than Arthur and me. That’s the idea behind Tezos: let’s formalize this extraordinarily informal process.”

How Does Tezos Mitigate This?

Tezos mitigates contentious hard forks via self-amendments and on-chain governance. Self-amendment helps in upgrading the blockchain without undergoing a hard fork. On-chain governance simply means voting on the platform over a proposed amendment. With a combination of on-chain governance and self-amendment event, the voting process can be modified aka amended as needed. The stakeholders of the system (which we will talk about later) take care of the voting. The design of this system allows for a smooth evolution of the blockchain rather than having to hard fork.

Alright, so how does this exactly work?

  • Developers independently submit proposals for protocol upgrades and request for compensation for their work.
  • The request for compensation makes sure that the developers have a strong economic incentive to contribute to the ecosystem
  • The proposal goes through a testing period wherein the community tests the protocol and criticizes it for possible improvements.
  • After repeated testing, the Tezos token holders can then vote on whether the proposal should be approved or not.
  • Once a legitimate upgrade is decided on, a “hot swap” occurs on the protocol, which initiates the new version of the protocol.

Because of this system, the protocol upgrades passively in a decentralized manner. Each and every protocol upgradation goes through multiple testing periods and gets relevant feedback from the community. This makes sure that whatever improvement happens has the stamp of approval from the majority of the community. This prevents any chance of a community-splitting hard fork.

Liquid Proof of Stake

Consensus mechanism is the heart and soul of a decentralized network. There is no point of connecting multiple nodes across a wide area network if there were no concrete methods for them to communicate with one another and come to a decision. When Satoshi Nakamoto created Bitcoin, he integrated the proof-of-work consensus mechanism in it. The idea of the POW mechanism is pretty simple:

  • Have the miners use their computational power to solve cryptographically hard puzzles.
  • Reward the miners who were able to solve those puzzles.

It is as simple as that. These puzzles are so hard that it usually takes up a lot of your computational powers. While POW was definitely effective when it started out, it does have a lot of issues:

  • First and foremost, proof of work is an extremely inefficient process because of the sheer amount of power and energy that it eats up.
  • People and organizations that can afford faster and more powerful ASICs usually have a better chance of mining than the others.
  • POW leads to centralization.

To counter the problems of POW, a new consensus protocol called “Proof of Stake” or POS was created.

What is Proof of stake?

Proof of stake will make the entire mining process virtual and replace miners with validators.

This is how the process will work:

  • The validators will have to lock up some of their coins as stake.
  • After that, they will start validating the blocks. Meaning, when they discover a block which they think can be added to the chain, they will validate it by placing a bet on it.
  • If the block gets appended, then the validators will get a reward proportionate to their bets.

However, this can be an issue as it still includes the entire community and may not be the most scalable of methods. This is why, many modern blockchains like EOS, Cardano, Lisk, NEO etc. are built using a delegated protocol. EOS and Lisk use a delegated proof-of-stake protocol where a fixed amount of delegates gets elected beforehand. These delegates are the ones responsible for the consensus and general network well being.

Tezos’ consensus mechanism is similar to this but with a little difference. Instead of the hardcore delegation, Tezos incorporates a liquid democracy model to its consensus.

How Does Liquid Democracy Work?

What is Tezos? The Ultimate Guide

It is a system that fluidly transitions between direct democracy and representative democracy.

The process has the following features:

  • People can vote on their policies directly.
  • People can delegate their voting responsibilities to a delegate who can vote on their policies for them.
  • The delegates themselves can delegate their voting responsibilities to another delegate who can vote on their behalf. This property wherein a delegate can appoint their own delegate is called transitivity.
  • If a person, who has delegated their voting doesn’t like the vote that their delegates have chosen, then they can simply take back their vote and vote on the policy themselves.

So, what are the advantages of liquid democracy?

  • The opinion of each individual person counts and plays a part in the final policy creation.
  • In order to become a delegate, all that one needs to do is to win a person’s trust. They don’t need to spend millions of dollars on expensive election campaigns. Because of this, the barrier to entry is relatively low.
  • Because of the option to oscillate between direct and delegated democracy, minority groups can be more fairly represented.
  • Finally, it has a scalable model. Anyone who doesn’t have the time to vote on their policies can simply delegate their voting responsibilities.

What is Liquid Proof of Stake?

Unlike DPoS (Delegated proof of stake), there is no hard and fast rule that delegates absolutely need to be selected. It is completely up to the participant as to what they want to do. Alright, so let’s get started with the LPoS.

Tezos is a liquid proof of stake system that requires one to stake a certain number of Tezos token to participate in the consensus over the blockchain. The process of staking Tezos tokens (XTZ) is called baking.

Token holders aka “bakers” can delegate their validation rights to other token holders without transferring ownership. Unlike in EOS, delegation is optional.

Baking Blocks

You find and add blocks to the Tezos blockchain through a process called “baking.” This is how it works:

  • Bakers get block publishing rights based on their stake.
  • Each block is baked by a random baker and then notarized by 32 other random bakers.
  • If the block is good to go then the block gets added to the blockchain.
  • The successful baker gets a block reward and can charge transaction fees for all the transactions inside the block.

As we have said before, token holders have the option of delegating their baking rights to other holders without letting go the ownership of their tokens. Upon the completion of the baking process, the baker will share their rewards with the rest of the delegates.

Smart Contracts and Formal Verification

Tezos has been coded using OCaml. The smart contracts that will run on Tezos will be created using Michelson. So, what is special about these languages? They both happen to be functional languages.

When it comes to languages, they belong to two families:

  • Imperative
  • Functional.

Imperative Programming Languages

In an imperative approach, the coder needs to put down all the steps that the computer needs to take to reach a goal. All of our traditional programming languages like C++, Java and even Solidity are imperative programming languages. This kind of programming approach is also called algorithmic programming.

Let’s take an example of what we mean by that. Let’s look at C++. Suppose we want to add 5 and 3.

int a = 5;

int b = 3;

int c;

c= a + b;

So, as you can see, the addition process takes over multiple steps and each step is constantly changing the state of the program as they are all being executed in turn individually.

An addition process took four steps and the steps are:

  • Declaring an integer a and assigning the value 5 to it.
  • Declaring an integer b and assigning the value 3 to it.
  • Declaring an integer c.
  • Adding the values of and b and storing them in c.

Functional Programming Languages

The second family of programming languages is Functional languages. This style of programming was created to build a functional approach to problem-solving. This kind of approach is called declarative programming.

So, how does functional programming work?

Suppose there is a function f(x) that we want to use to calculate a function g(x) and then we want to use that to work with a function h(x). Instead of solving all of those in a sequence, we can simply club all of them together in a single function like this:

h(g(f(x)))

This makes the functional approach easier to reason mathematically. This is why functional programs are supposed to be a more secure approach to smart contract creation. This also aids in simpler Formal Verification which pretty much means that it is easier to mathematically prove what a program does and how it acts out.

Let’s take a real life example of this and see why it can become extremely critical and even life-saving in certain conditions.

Suppose, we are coding a program that controls air-traffic.

As you can imagine, coding such a system requires a high degree of precision and accuracy. We can’t just blindly code something and hope for the best when people’s lives are at risk. In situations like these, we need a code that can be proven to work to a high degree of mathematical certainty.

This is precisely why the functional approach is so desirable. This is why Tezos is using OCaml and their smart contracts are using Michelson.

The following table compares the Imperative approach with the Functional approach.

What is Tezos? The Ultimate Guide

Image Credit: Docs.Microsoft.com

So, let’s look at the advantages of the functional approach:

  • Helps with creating high assurance code because it is easier to prove how the code is going to behave mathematically.
  • Increases the readability and maintainability because each function is designed to accomplish a specific task. The functions are also state-independent.
  • The code is easier to refractor and any changes in the code are simpler to implement. This makes reiterative development easier.
  • The individual functions can be easily isolated which makes them easier to test out and debug.

More on Michelson

Michelson is a strongly typed, stack-based language.

In Ethereum, smart contracts are written in Solidity or Viper and they get compiled to EVM byte code, which then gets executed in the Ethereum virtual machine (EVM). In Tezos, there is no unnecessary extra step and the Michelson code itself gets to run in the Tezos VM.

What is the advantage of this approach? It can be easily read by humans which will help in building the correctness proofs and help avoid bugs.

Following is an example of a Michelson contract

parameter (pair (lambda int int) (list int));

return (list int);

storage unit;

code { DIP{NIL int};

   CAR;

   DUP;

   DIP{CAR; PAIR};     # Unpack data and setup accumulator

   CDR;

   LAMBDA (pair int (pair (lambda int int) (list int)))

      (pair (lambda int int) (list int))

      # Apply the lambda and add the new element to the list

      { DUP; CDAR;

       DIP{ DUP; DIP{CDAR}; DUP;

          CAR; DIP{CDDR; SWAP}; EXEC; CONS};

       PAIR};

   REDUCE; CDR; DIP{NIL int}; # First reduce

   LAMBDA (pair int (list int))

      (list int)

      {DUP; CAR; DIP{CDR}; CONS};

   REDUCE;         # Correct list order

   UNIT; SWAP; PAIR}    # Calling convention

Conclusion

So, there you have it. Tezos is an extremely intriguing project which unfortunately got overshadowed by all the behind-the-scenes drama. This project deserves a closer analysis because it is bringing in some interesting utility into the blockchain space. Now we need to wait and find out whether they can justify the hype they generated after their ICO.

Like what you read? Give us one like or share it to your friends

195
3

3
Discussion

Please to comment
newest oldest most voted
Hungry for knowledge?
New guides and courses each week
Looking to invest?
Market data, analysis, and reports
Just curious?
A community of blockchain experts to help

Get started today and earn 4 bonus blocks

Already have an account? Sign In