A protocol is a set of rules that governs how a system operates. The rules establish the basic functioning of the different layers, how they interact with each other, and what conditions are necessary for running the protocol. The different parts of a protocol are not dependent on order or chronology. In fact, a protocol does not tell the system how to produce a result. It does not have any other objective other than to execute the set of rules. It does not produce an output, it simply executes rules making it so that algorithms are part of the protocol.
The blockchain stack will be different from the Internet stack in that there will be many middle layer protocols instead of a HTTP protocol to power most applications. Each of these middle-layer protocols captures the value of staking, commission, and other protocol usage fees, in the same way that blockchain layer protocols capture value. For example, the computational power provided by Ethereum.
An algorithm is a set of instructions that produces an output or a result. It can be a simple script, or a complicated program. The order of the instructions is important and the algorithm specifies the order. It tells the system what to do in order to achieve the desired result. It may not know what the result is beforehand, but it knows that it must have results.
The protocol is a set of rules that determines how the system functions. The algorithm tells the system what to do. The protocol is. The algorithm does. Because the blockchain needs both protocols and algorithms, each have a distinct role.
Protocols can be understood as the underlying infrastructure on which applications are built, and profit from any growth in the ecosystem. Some examples of current protocols include blockchains such as Ethereum, NEO, Stellar, Lisk, QTUM, and ICON amongst many others.
In blockchain, the protocol:
- Tells the nodes how to interact with each other (without telling them to do)
- Determines how data is routed from one node to the next (without telling the data to move)
- Defines what the blocks have to look like
- Stipulates who decides which transactions are valid
- Establishes how consensus is determined (without dictating the procedure)
- Identifies who maintains the ledger
- Delegates who determines how the rules of the system change
- Decides if identities are needed
- Determines who can create new coins (but not how)
- Triggers procedures in case of error
A Deeper Look into the Ouroboros Protocol; An Example of Applying Proof-of-Stake
The Ouroboros protocol applies the Proof-of-Stake algorithm and defines the way in which nodes reach consensus about the state of ledger. Ouroboros is unique since it is the first blockchain protocol that is based on the PoS algorithm and has been scientifically proven as secure.
The core idea is that a node is selected to generate (“mint”) a new block with a probability that is proportional to the amount of coins the node has. If a node has a positive stake, it is called a “stakeholder”. If a node is chosen to mint a new block, it is called a “slot leader”. Only stakeholders may participate in running the protocol. In order to generate new blocks for the blockchain, a stakeholder must be elected as a slot leader. A slot leader can listen to transactions by other nodes, generate a block of those transactions, and sign the block with a private key to publish to the network. Slot leaders are similar to miners in Bitcoin, but this consensus algorithm defines who will be able to mine, when and how much.
The Ouroboros protocol divides physical time into epochs, and each epoch is divided into slots of time. A slot is a relatively short period of time, for example, twenty seconds. The slot leader has a right to produce only one block during their slot. The number of slot leaders is equal to the number of slots in an epoch. If a slot leader missed their slot (for example, connection issues or going offline), the right to produce a block is lost until they are elected again.
Slot leaders are elected from the group of stakeholders and are voted in by those that have enough stake to vote, known as “electors”. Electors select slot leaders for the next epoch during the current epoch.
A multiparty computation approach (MPC) is used to achieve the randomness where each elector independently performs an action called“coin tossing” and they share their results with other electors. An elector then generates a “secret” (random value) and forms a “commitment” which is a message that contains encrypted shares and proof of secret. The elector then signs and attaches a public key. Following that, the secret is revealed by the elector sending an “opening” to retrieve the secret and insert into a block to become part of the blockchain. An elector verifies that commitments and openings match to extract the secret and form a “seed” (randomly generated byte string). Once the electors have the same seed, it is used for the Follow the Satoshi (FTS) algorithm to select a particular slot leader for the next epoch.
To describe how a slot leader is selected, think of the smallest, atomic piece of value as a coin called “Lovelace”. Fundamentally, the ledger produces the distribution of coins since slot leaders can only be selected from stakeholders. FTS is an algorithm that verifiably picks a coin and when the coin owned by a stakeholder is selected, the stakeholder becomes a slot leader. The more coins a stakeholder has, the higher the probability that the stakeholders coins will be selected.
The fundamental concept of the Ouroboros protocol is known as thehonest majority meaning that participants who own at least 50% + 1 of the total stake are considered the honest majority.
A Deeper Look into the Slasher Protocol; A Punitive Example of Applying Proof-of-Stake
The Slasher protocol is constructed with a PoS algorithm and is suggested to allow users to “punish” the cheater who forges on top of more than one blockchain branch. It assumes that one must double-sign to create a “fork” (a radical change to the protocol) and that one can be punished for creating a fork while not having a stake.
The concept with Slasher is that powerful miners will not have any way of attempting to create many blocks and publishing only those that assign their own stake a signing privilege. The use of 100 pre-committed random numbers is particular for Slasher and is an idea taken from fair gambling protocols.
This algorithm is not purely PoS since minimal PoW is required to maintain time intervals between blocks. However, a 51% attack on PoW would be essentially inconsequential since PoS signing is the sole deciding factor in which blockchain wins. Furthermore, the energy usage from PoW can be reduced by 95–99%, resolving the environmental concern with PoW.
It is a useful construct to have in case PoS mining becomes substantially more popular. Slasher may also benefit other cryptocurrencies that operate independently of Ethereum.
A Deeper Look into Protocols; Algorand, Filecoin, Chia
The PoWeight algorithm is applied in the Algorand protocol, consensus model. Algorand confirms transactions very quickly. On this network, Algorand assigns a weight to each user. Weighted users play an integral role in this process. Before consensus is reached, the system ensures that a higher fraction of users agree. Each user on the network utilizing PoWeight has a “weight” attached to them. This weight is based on how many coins the user holds in their account. As long as the user holds a higher fraction, majority being 2/3 of the tokens, the network is able to operate normally and also avoid forks and double-spending. PoWeight mechanisms can create a committee made up of random network users to run each set of the protocol. As such, the protocol ensures that majority of the committee members are honest, while also introducing some degree of centralization. In the case of Filecoin, it depends on how much IPFS data users are storing at any given time. Chia uses proof-of-space and proof-of-time to calculate weight and achieve consensus.
A Deeper Look into Protocols; Counterparty, Slimcoin
In the Counterparty protocol, participants transfer Bitcoin to an address to receive Counterparty tokens in exchange. The Counterparty PoB was set up so that anyone who sent Bitcoin to a specific address during a particular one-time burn period, received Counterparty tokens in proportional return to the amount of Bitcoin they burnt.
Slimcoin is an experimental cryptocurrency created in 2014. It is the first known coin that uses PoB to generate blocks. It also uses PoW and PoS, making it unique with three different block generation mechanisms. With Slimcoin, if you burn coins, you earn the right to compete for the next block.
Mitigating Risk and Value with Protocols
The layer of protocol that directly supports the application layer will create the most value, and the generated token of that protocol will capture the most value. Protocols can enhance existing systems with greater ease than having to perform a complete system overhaul, allowing for incredible flexibility. Through the use of different protocols, we are sure to see all blockchains, not just Bitcoin, evolve to their maximum potential.
A blockchain protocol cannot be owned by anyone, so in essence, it does not matter how many tokens someone has, they cannot control its protocol and production. The blockchain protocol is run by a number of computers around the world, distributed, and they are rewarded for their contribution of computer operations and processing for a cryptocurrency.