How Algorand Works…

Ezio Auditore
5 min readAug 16, 2019

In my previous article, I introduced you to motivations behind the creation of Algorand. In this article, I seek to shine some light on Algorand’s unique consensus mechanism, thereby delineating how Algorand works internally.

About Algorand

Algorand is a permissionless blockchain platform running on Pure Proof of Stake (PPoS) consensus. It is highly scalable and provides immediate transaction finality. Algorand aims to build trusted infrastructure for the borderless economy — an inclusive and transparent system where anyone can build prosperity, no matter where they are.

How Algorand Works…

Let’s start with a high-level overview of how Algorand works. The entire Algorand’s operation can be broadly divided into two phases (I) Block Proposal and (II) Block Agreement. They are described below…

(NOTE: Algorand works on the assumption that the majority of users (2/3rd) in the network are honest i.e. non-adversarial.)

Phase I

  1. A random user is selected amongst all the user in the network to be the next block proposer in the network (with probability directly proportional to the amount of Algos a user possesses in the network).
  2. The user proposes, signs, and propagates the new block in the network via gossiping.
  3. Public key of this user becomes known to everyone in the network.

Simply put, all the nodes in the system with anticipation of being selected as the next block proposer collect the pending transactions that are yet to be reflected on the on-chain ledger. A user out of all these users is selected randomly to be the block-proposer of the upcoming block in the Algorand blockchain. It then digitally signs and propagates its proposed block further in the network via gossiping

[Note: In cryptographic sortition function, a certain threshold of a number of block proposers are defined i.e. in a round multiple block proposers can be selected by the function, but in the end, the proposer with the highest priority will be selected and remaining blocks proposed by different users will be discarded]

Phase II

  1. About some 1000 users are randomly selected to amongst all the user in the network to form a committee.
  2. They run Byzantine Agreement on the block to verify whether the transactions in the block are valid or not.
  3. The public key of these committee gets known to every user in the network once the committee members cast their votes on validity of the block.

Some important questions that might pique your interest…

1. How can all the users in the Algorand network trust the consensus reached by these 1000 committee members to be legitimate e.g. in a case where there are…say…100,000 users in the system?

Ans: The answer lies in honest majority assumption of Algorand. In one of the presentations Silvio mentioned the following In any safe society where people live in, the criminal percentage is usually sub 5%. If they are living in a really dangerous society then it maybe 10%. But anything above it…Would they really live in that society?

Reflecting upon the society I live in, I find the assumption to be true. Think about it, even in the present society you live in, you might know your adjacent neighbours by their face, and might have a certain degree of trust towards them, but as your radius from your home to the other neighbourhood houses increases, your personal/day-to-day interaction with the society-members in the vicinity at the tip of the radius decreases i.e. you see them infrequently, implying a gradual waning of trust from the immediate vicinity of your house. However, even if you see them infrequently, or say you don’t even see/know them at all…How likely do you think that they are a criminal?….. Not so likely…Right? The same goes for Algorand. If you are in the network where 2/3rd are the honest majority, the probability that a bad actor would be chosen as a committee representative will be realistically speaking, very small. And even in the case, a bad actor or lots of bad actors are chosen…it is unlikely that they know each other personally to collaborate for nefarious activities on a scale which would have a substantial impact on the security of the Algorand network. They become aware of each other’s identities only when they have cast their votes in the Byzantine Agreement.

2. Who selects this committee?

Ans: It is randomly selected based on mathematical principles embedded in the code i.e. Cryptographic Sortition. When committee members are to be chosen, each user in the Algorand network proposes itself to be chosen as a committee member. They run a lottery protocol wherein every user in the Algorand network proposes itself as a potential candidate for the role of a committee member; if they win the lottery, they get selected to be a part of committee, and then proceed to digitally sign the block proposed from the block-proposer in Phase I. This lottery protocol works on the basis of Verifiable Random Functions (VRF) stated below…

3. How would a user know that a user claiming to be a committee member is indeed a committee member?

Ans: To allow a user (committee member) to prove that they were chosen, sortition requires each user “i” to have a public/private key pair, (pki,ski). Any user in the network can verify the if the committee member was selected by the following formula

j<- VerifySort(pk,hash,proof,seed,threshold,role,w,W )

j: sub-user index

seed: a random value generated to ensure randomness in cryptographic sortition (i.e. to ensure different members are selected in different rounds)

threshold: maximum number of block proposers/committee member for the round

role: designates whether the user is block-proposer or a committee member

w: weight of the user

W: summation of weight all users in the Algorand Network

In case the user was not selected, it VerifySort() would return 0

Final Words

I hope this article gives you a decent overview of how Algorand achieves consensus internally.

Comments and Discussion are heartily welcome.

--

--