Tech Tuesday: Metadium Consensus Algorithm Explained

Metadium team
Metadium
Published in
4 min readApr 9, 2019

Dear Metadium community,

Today we’d like take a deep dive into the consensus algorithm that was adopted by Metadium. Consensus algorithm of Metadium is Stake based Proof of Authority (SPoA) with Raft leader election. As you can recognize by the name, SPoA is modified proof of authority algorithm to offer more decentralized, democratic, and transparent governance. With SPoA, Metadium can provide a stable service to users participating in the network and a performance of several thousand TPS or more.

Who are Authorities?

In the Metadium platform, creating a block is possible only by members authorized in advance, who hold a certain amount of stake in META, a Metadium coin. Metadium’s Authority refers to a consortium as in miners in Bitcoin and Ethereum’s PoW algorithm carry out. The process of selecting or deleting Authority members is based on a voting by the current Authority members. After checking if a stake of META has been successfully allocated, any of the circumvent authorized members are allowed to submit a proposal to the governance contract for adding a new member. If a 50% of the current Authority members agree, SPoA registers a new Authority member.

If any malignant act is detected, the relevant node will be deprived by force of the entitlement of authority through voting by Authority members; its META at stake will be confiscated leading up to no rewards at all for the blocks that it has created. Such staking and rewards system are put in place in the Metadium network to administer that all Authority members act in accordance with the agreed-upon protocol and keep the network healthy, voluntarily.

How Block Producing Works

Among Authority members, leader is being selected to generate blocks based on etcd of Raft algorithm, which is pseudo-random algorithm that potentially offers equal chance of each authority member to be selected as a leader. Once a leader is selected, leader generates up to 100 blocks in a row and same leader won’t be selected consecutively until it passes leader limit, which is calculated as below.

Leader_Limit = floor(SIGNER_COUNT/2) + 1

A method of block producing depends on how a transaction is made and transmitted, not the time interval set. The Metadium blockchain aims to process registration and verification of IDs near real-time. If a valid transaction exists in the mempool, a leader creates a block. However, in that case, it is highly likely that there is one transaction in one block. The Metadium project introduced the concept of inter transaction time. In the case that there is a transaction in the mempool, the leader waits up to 100ms before creating a block, according to the governance contract.

On top of it, in the case that no transactions await in the mempool, in order to guarantee liveness and block finality, at every interval (every 5 seconds, which is set in the system) an empty block is added to the network. The two values — waiting time(100ms) and interval(5 seconds).

Reward for Block Producers (Authorities)

Block producers are rewarded for making blocks and securing the network on Metadium blockchain. Reward for block producing includes portion of emitted META and transaction fees.

Once a block is produced, there will be emission of META under set schedule and inflation algorithm mentioned in our token economics paper. 45% of emitted META (5.4% of total supply) will be given to the block producers as block producing reward, and other 45% of emitted META (5.4% of total supply) is being reserved for reward engine which is to be utilized for ecosystem building or support for consensus mechanism. The rest 10% (1.2% of total supply) will be funded to Metadium team for further development and maintenance of the network. Block producing reward (45% of emission) will be distributed equally among block producers. Transaction fees are also being distributed equally among block producers.

Initial Stage Node Operation

As you may have noticed, initial stage of the network is being secured by 9 block producing nodes. First 9 nodes are all set up by Metadium to ensure the security and stability of the network during initial stage. Block producing rewards during initial stage is given to Metadium under the same logic described above. Portion of the block producing rewards in the initial stage will be utilized to cover the node operation cost, and the rest will be used for ecosystem building. After a period of time for health check of the network, 8 nodes will gradually be replaced by Metadium’s node partners one-by-one and Metadium will keep 1 node to participate as a meaningful decision maker in the network.

If you’d like to know more about Metadium token economics and governance, check out our token economics paper on the website. Thank you for your continuous support.

Love,

Team Metadium

We are always open to feedback, so please get in touch. Follow us on Medium, Facebook and Twitter, and join our Telegram Group to receive the latest updates. Download our Keepin application on the App Store and Google Play.

--

--

Metadium team
Metadium
Editor for

Creating a free world through self-sovereign identity.