Cryptoacademy Academy Week 13 Homework Post for Crpto-Prof @alphafx on the topic: Consensus algorithm. Written by @chinma

in SteemitCryptoAcademy3 years ago

20210513_133348_0000.png

Introduction

The Stellar Consensus Protocol (SCP) which is a Federated Byzantine Agreement (FBA) is a decentralized protocol made for the ease of financial transactions across borders without the need for a middleman.

Say for instance, my Aunt wants to send money to me from Canada, she would of course have to use the Western Union Money Transfer which would incur additional fees for both transfer and conversion to US Dollars from the Canadian dollars. In addition, I have to also convert the US Dollars to naira incurring more cost.

The Stellar Consensus Protocol which uses it's native currency Stellar Lumen (XLM) was created to cut off these middle-men charges and faster transaction time.

Before going into detail on how the Stellar Consensus Protocol works, let us understand some concepts that would appear often in the course of our discussion.

  1. Nodes: These are computer devices that represents all organisations in the Stellar network that are in charge of keeping the shared distributed ledger. Nodes are in communication with one another to confirm and add transactions to the ledger. They can also be referred to as validators.

  2. Quorum slice: An important concept in SCP, a quorum slice is a list of nodes or validators in the Stellar network that a particular node trust. It is kind like a subset since we would have many quorum slices.

  3. Quorum: for consensus to be reached, there should be an overlap of quorum slices. This overlap is called the Quorum. It should be non-empty and have a slice for each member.

  4. Safety: in simple terms, it is a guarantee that a bad thing would not happen on the network. That means our output value would equal at least one of the validators input value. It is therefore agreement and validity on the network.

  5. Liveness: this is a guarantee that something good will happen. This is to say that eventually all the nodes would reach agreement, output a value and reach consensus.

How does the Stellar Consensus Protocol work?

This algorithm makes use of independent nodes which when a transaction is made, each node has to select a network of nodes it trust(quorum slice) and the over-laps of these quorom slices forms a quorum that sees and agrees to the transaction.

There are three(3) interlocking mechanisms that the protocol works on.
I. Nomination which is the initial stage by which the nodes get to know of the transaction or value.

II. Balloting is the process of voting and when an agreement is reached, an output value is given out.

III. Timeout is the process by which consensus is not reached and the process is carried out again.

Process by which transactions take place on the Stellar blockchain

The Stellar network operates an accounting ledger that holds both a customer's debit and credit balances. So, if Mr. Larsen wants to send me some dollars from the United States on the Stellar network, the blockchain uses it's native currency Stellar Lumen which can be used to exchange every currency pair. After the process of agreement using the SCP, his account is debited and mine credited. I can then withdraw my Naira and use.

Properties of the Stellar Consensus Protocol (SCP).

The SCP has four(4) key properties. These are
a. Decentralized control
b. Low latency
c. Flexible trust
d. Asymptotic security.

A. Decentralized Control: The SCP is completely decentralized and operates on an open membership system where no one is in charge and everyone has a role to play in reaching consensus. Unlike the proof of work, it does not require complex puzzles nor mining.

B. Low Latency: The SCB has a high transaction speed. This is because it does not go through the mining process but only requires messages passing through a voting process. This makes transactions to be confirmed within 3-5seconds as against the 10minutes mark for Proof of Work.

C. Flexible Trust: The SCP works on trust between the nodes. Infact, for the SCP to work, each node forms a quorum slice which is a set of other trusted nodes. Where they overlap forms a quorum. An accidental fork which is the possibility of the network not in agreement and creating two different ledgers does not arise in the SCP. This is because the network would stop making progress until a consensus can be reached. It is also termed Safety which is preferred in the SCP over liveness.

D. Asymptotic Security: In the SCP, the possibility of a malicious attack occuring is near impossibility. This is because no individual person is responsible for consensus to be reached and there must be an overlap of trusted nodes.

Differences between Stellar Consensus Protocol and Proof of Work.

PropertiesPoWSCP
MembershipClosed membership. Only people with mining rig and join and leave the network even without affecting consensusOpen to everyone. Each validator decides which other validator to trust forming a quorum slice which overlaps to form a quorum that affects consensus In a transaction.
Safetysupports liveness over safetysupports safety over liveness
Latency or transaction speedSince it undergoes the mining process, it takes approximately 10 long minutes for a transaction to be completedsince it only involves sending messages through a voting process, it's takes within 3-5minutes.
Asymptotic SecurityIf one controls upto 51% of the mining process, that person can introduce malicious attacks on the blockchainnot open to attacks since it requires the input of all the validators who use their private keys

Conclusion

The Stellar Consensus Protocol (SCP) has proven to be a better consensus algorithm making transactions faster and reaching across borders opening up financial transactions in a decentralized way that creates ease for transfer in a security tight environment.

Thanks to Crypto-Prof @alphafx for this opportunity to broaden my horizon as it concerns the Stellar Consensus Protocol.

I am a member of steemalive and this is my introductory post

image.png
Subscribe:::Discord.
:::Whatsapp :::join trail

Sort:  

Hello @chinma, it's nice seeing you here.
Here's my WhatsApp contact +2348137569690, I noticed you are from Nigeria, kindly drop yours or send a dm

The SCP is a very interesting algorithm and contains a lot of details, cut short by your post. Nevertheless, well done.

Task satisfactorily done

Parameterrating
Presentation1/2
Content4/5
Originality1/3
Total6

Thanks for participating

Coin Marketplace

STEEM 0.17
TRX 0.15
JST 0.028
BTC 58404.34
ETH 2367.70
USDT 1.00
SBD 2.45