The document summarizes Proof of Stake (PoS) and compares it to Proof of Work (PoW). It discusses how PoS works by having validators stake coins to validate transactions and forge new blocks, earning transaction fees, rather than expending computing power like in PoW. PoS is more efficient and deters attacks as validators who validate fraudulent transactions lose part of their stake. While a 51% attack is theoretically possible in PoS, it would require buying a majority of the total coin supply, making it impractical. Popular blockchains that use PoS include NXT, BlackCoin and Peercoin.
1 of 14
More Related Content
Understanding Proof of Work (PoW) and Proof of Stake (PoS) Algorithms
1. Developer Weekly #2
LetsBuildEOS | Blockchain Developer Community
Understanding Proof of Stake
(PoS) Algorithm
August 11, 2018
Gautam ANAND
2. About Gautam ANAND
5 Years of FullStack Software Development
Software Architecture Design (Microservices) - Build & Scale
JavaScript ES6 (Node.js), C++ (EOSIO Smart Contracts) and Python (Scikit-Learn &
TensorFlow)
DevOps (Docker/Kubernetes/Serverless)
Databases (Mongo, Redis and PostgresQL)
Machine Learning Models to Cloud Agnostic APIs
Code Reviews
3X Blockchain Hackathons
Building two EOSIO based projects (SmartCitySteriods & ReliefChain).
Part of Global EOS Community
3. About Blockchain Technology
How developers see it?
Decentralised Database running on millions of computer
Public chain (You dont the location); Private Chain (Your company datacenter)
Data entry is one way i.e. NO UPDATE and NO Delete. Only Create and READ is
allowed.
Smart contracts are the actions on top of DATA entry, increasing functionality.
In nutshell,
1. Data (Transactions) is immutable
2. Network as a secure model
6. Originated in 1993 by
Cynthia Dwork and Moni
Naor
Why initially created?:
Discourage DDoS but after
2009 was adopted for
trustless and distributed
consensus
Trustless and distributed
consensus: Send/Receive
money without a third
party (bank)
Validation: Prove that you
have spent a lot of
computing power in
making a block
Rewards: Given to the first
miner who solves each
blocks problem
How it works?
Transactions are bundled together into what we
call a block
Miners verify that transactions within each
block are legitimate
To do so, miners should solve a mathematical
puzzle known as proof-of-work problem
A reward is given to the first miner who solves
each blocks problem
Verified transactions are stored in the public
blockchain
Understanding Mining
Mining process is an operation of inverse hashing.
1. Determine a number (nonce)
2. Cryptographic Hash Algorithm of block data
results in less than a given threshold
(Difficulty)
Input
Crypto
Hash
Function
fixed-size
alphanume
ric string
easy easy
tough tough
If more computing power is added to the network
can result in:
1. Difficulty parameter to increase
2. Increasing the average number of
calculations needed to create a new block.
3. Increases the cost of the block creation.
4. This parameter update should occur every
14 days and new block is generated every
10 minutes.
7. Breaking Point
1. Needs computing power i.e. high electricity usage:
2017, Bitcoin Energy Farms alone consumed 54 TWh
(~5M US Households or power hungary/Ireland)
2. Higher Rewards are given to people with better and
more equipments: Higher hashrate, Higher the reward.
3. Mining Pools make blockchain more centralised than
decentralised: Miners create a mining pool to combine
hashpower and share the profits evenly.
Reference: https://www.theguardian.com/technology/2018/jan/17/bitcoin-electricity-usage-huge-climate-cryptocurrency
8. If three biggest mining pools combine they will take over the network and start approving fraudulent
transactions.
Concerns
10. Originated in 2011 by
Quantum Mechanic
(Bitcointalk.org)
Why initially created?:
Letting everyone compete
with each other for mining
is wasteful (Proof of Work)
Validation: Creator of a
new block is chosen in a
deterministic way,
depending on its wealth,
also defined as stake.
Rewards: No block
rewards, so the validators
take the transaction fees.
How it works?
Transactions are bundled together into what we
call a block
Validators will stake (personal wealth as
security deposit) to be randomly selected in a
deterministic way
Validators will mint/forge a new block.
Validators take the transaction fees inside a
block. They lose a part of stake if they verify
fraud transactions.
Verified transactions are stored in the public
blockchain
Block selection variants
Selecting by account balance would result in
(undesirable) centralization, so other ways are:
1. Randomized Block Selection: Look the
lowest hash value in combination with the
size of stake (NXT and BlackCoin).
2. Coin Age-based selection: A number
derived from the product of the number of
coins multiplied by the number of days the
coins have been held (Peercoin).
Stake and chance are linear
Trustless and distributed
consensus: Send/Receive
money without a third
party (bank)
11. Additional Points
1. Stake vs Chance relation is linear: In PoW, the price of mining
equipment reduce with high quantity, where as here it's always
linear. In this way, it's more efficient.
2. Validators lose a portion of stake if they verify fraudulent
transactions: As long as the stake is higher from the
transaction fees, we can trust that validators to correctly do
their job.
3. If node stop being a validator: Validator stake plus
transaction fees will be released after a certain period of time.
12. The 51% Attack
Scenario: If one can buy majority in the network, they can influence it.
Proof of Work (BTC) Proof of Stake (BTC)
Impractical as the attacker will
need 79 Billion USD if BTC was to
move to PoS from PoW.