Based on Cardano’s Ouroboros, Ouroboros Samisika is a proof-of-stake consensus mechanism that requires far less computing power than Bitcoin’s PoW protocol. Check out this video to learn more about Proof-of-Work (PoW) and Proof-of-Stake (PoS) before diving into Ouroboros!
PoS and the Dartboard Analogy
PoS can be thought of as a game of darts. The network throws darts at a dartboard with stakes broken down into a pie chart. While the dart can land anywhere with equal likelihood, the chance a dart hits your portion of the board is correlated to the size of the portion of stake. The larger the stake is, the larger the area on the dartboard and, as a result, the greater the chance of being hit with a dart. When your stake is hit with the dart, you can produce a block.
Because people’s hold on stake changes frequently, the distribution of stake on the dartboard must change as well.
In this dartboard example, the dartboard must be redrawn to recalculate the stake distribution for every epoch. Each epoch in Mina consists of 7,140 slots, and in each slot, a new dart is thrown (aka a new block is produced). As of mainnet launch, each slot in Mina lasts 3 minutes, meaning each epoch is around 14 days.
There is no minimum staking requirement with Mina. Anyone can stake their own MINA or delegate their stake to another person. Stake distribution is based on whatever SNARK workers have finished snarking at the last block two epochs prior. For example, if the current epoch is 5, then the state of the blockchain at the last block of the 3rd epoch would be used to calculate stake distribution (aka the dartboard). You can find more information about SNARK working here.
Verifiable Random Functions Determine Opportunities to Produce Blocks
The opportunity to produce a block for a slot is determined by a Verifiable Random Function (VRF). This is a random function that needs a private key to run and can be verified with a public key. Executing a VRF is Ouroboros’ mechanism for throwing the dart.
If the dart lands on your dartboard slice, you can make a block. Checking that your VRF output is greater than your stake fraction is the same as hitting your part of the dartboard.
Ouroboros Improves Security
Using VRFs, the dart throw that each block producer performs is secret and not revealed until their block is shared. Because only the holder of the private key can determine the VRF output, block producers can secretly compute when they are going to produce the block without anyone else on the network knowing until the block producer actually produces the block. This improves overall security because a bad actor will be unable to identify and target the next block producer at a certain slot with a targeted DoS attack — an attack where one or more machines try to overload another.
Additionally, multiple block producers can be chosen for the same slot, further reducing the likelihood of targeting the correct block producer for an attack. If multiple block producers produce a valid block for the same slot, a short-range fork will result, with the longest chain selected using standard consensus rules. However, if there are only forks of equal length, a node will either accept the first block seen or replace it if a block with a larger VRF output is seen.
In order for the network to believe a given VRF, the randomness for it is carefully computed from Ouroboros’ epochs to make sure malicious influence is not possible under reasonable assumptions about usage (ie: no 51% attacks, etc).
Putting all this together, the way that these VRFs work on Mina implies that if most of the stake is participating, we expect a block on the main chain (not a fork) around every 4 minutes.
Difference Between Cardano’s Ouroboros and Mina’s Ouroboros Samisika
In a recent version of Cardano’s Ouroboros, long-range forks look at the entire chain path to determine which chain is real. However, since Mina is a succinct blockchain and can’t check history, this would not work.
The main innovation of Mina’s Ouroboros Samisika involves replacing the long-range chain checking with a minimum-density function, or a single number that stands in for checking all the blocks on a chain.
The minimum chain density of a valid chain will always be higher. As a result, any node will naturally follow the chain with the highest density, even if it isn’t the longest. Essentially, Mina is revolutionary because it can achieve consensus with no long-term history!
A Secure, Scalable, and Efficient Consensus Mechanism
Mina builds on Ouroboros to create Ouroboros Samisika, a provably secure PoS protocol that combines the best features of each iteration of Ouroboros to deliver a PoS mechanism that can resolve long-range forks without requiring history or risking centralization by relying on trusted third parties to provide fork information. Ouroboros Samisika selects winning block producers using VRFs, which protects against DoS attacks while also allowing for scalability.
If you’d like to learn more about Mina’s technology in simple terms, check out this Simply Explained video series which breaks down Mina’s advanced technology for anyone to understand.
You can also dig deeper to find out how Ouroboros upholds Mina’s goal of decentralization here.
About Mina Protocol
Mina is the world’s lightest blockchain, powered by participants. With its elegant design, Mina is the first Layer-1 enabling easy programmability of zero knowledge smart contracts, zkApps. The unique privacy and security features and ability to connect to any website via its zkApps enable a more secure and private Web3—paving the way to the democratic future we all deserve. Mina is stewarded by the Mina Foundation, a public benefit corporation headquartered in the United States.