SlideShare a Scribd company logo
1
Proof-of-Stake And It's Improvements
@chepurnoy
2
About Myself
●
Nxt Core Developer
●
Secureae.com / SmartContract.com cofounder
●
Consensus Research member
3
Fields of Interest
●
Distributed & P2P systems
●
Blockchain Tech
●
Functional Programming (Haskell / Scala)
●
Finite State Machines
●
Formal Methods (model checking / Coq)
4
Consensus Research
Me + Andrew Lyashin
●
Andrew is a big fan of concrete math, category theory,
Coq, proven code
●
Asset on Nxt AE
5
Consensus
●
A lonely toy for computer scientists for > 50 years
●
Crash failure
●
Byzantine failure
6
Problems in Distributed Systems
●
CAP theorem
●
FLP impossibility
7
Byzantine Consensus
●
Has been studying since 80s
●
A lot of algos found & analyzed
8
Anonymous Byzantine Agreements
●
Anonymous Byzantine Agreements are vulnerable to
sybil attacks
●
Moderately-Hard Puzzles(a.k.a Proof-of-Work) as
anonymous identity tools were proposed since mid 90s
●
Finally, an approach was used(along with pretty informal
definition) by „Satoshi Nakamoto“
9
Bitcoin Consensus?
Anonymous Byzantine Agreement with Computational
Puzzles as Identity Tool
10
Good Papers To Read!
●
Anonymous Byzantine Consensus from Moderately-Hard
Puzzles: A Model for Bitcoin (A. Miller / J. LaViola)
●
Research Perspectives and Challenges for Bitcoin
and Cryptocurrencies (J. Bonneau, A. Miller et al)
●
The Bitcoin Backbone Protocol: Analysis and Applications
( https://eprint.iacr.org/2014/765.pdf )
11
Bitcoin Consensus Simply
●
Random oracle (a.k.a sha256)
●
x questions to the oracle, which is sha256(~mining
power) at each round(say, 1 sec)
●
probability of positive answer should be → 0
●
honest players should have 50+% queries to the
oracle(„mining power“), with some glitches below
2/3(selfish mining etc)
●
length(chain) as chain quality measure
12
BlockTree
13
Blockchain As Database
●
Persistent(versioned) database
●
Genesis state – initial verion of the database
●
Block(„Block Delta“ by Bill White)
●
State(h) * Block → State(h+1)
●
Very weak consistency!
14
Common chain prefix property
●
After k permutations a state of the blockchain database
for versions 1..N-k is considered to be stable (the
chance of opposite is negligible) (with some
assumptions made)
●
Bitcoin: k = 6
15
Proof-of-Stake
●
Anonymous Byzantine Agreement with internal tokens
as identity tools
●
So no mining
●
Right to generate a block depends on stake
●
So a bunch of oracles (hit < target)
●
Cumulative difficulty(maxvalid in Backbone's paper) is
the chain quality measure(in a blocktree)
16
Hit & Target (Nxt's Random Oracle)
●
hit = first8BytesAsNumber (sha256 (append
(lastBlock.generationSignature account.publicKey)))
●
target = lastBlock.baseTarget * (currentTime()-
lastBlock.time()) * account.effectiveBalance
●
block.baseTarget = prevBlock.baseTarget*((block.time-
lastBlock.time) / 60) then bounded by
(prevBlock.baseTarget / 2,prevBlock.baseTarget * 2)
●
hit < target
17
Cumulative difficulty - Chain Quality Measure
●
sum(1 / block.baseTarget)
18
●
Inside a Proof-of-Stake Cryptocurrency Part 1: Basic
Structures
http://chepurnoy.org/blog/2014/10/inside-a-proof-of-stake-cryptocu
●
Inside a Proof-of-Stake Cryptocurrency Part 2: Forging
Algorithm
http://chepurnoy.org/blog/2014/10/inside-a-proof-of-stake-cryptocu
●
Inside a Proof-of-Stake Cryptocurrency Part 3: A Local
Ledger
http://chepurnoy.org/blog/2014/11/inside-a-proof-of-stake-cryptocu
●
Inside a Proof-of-Stake Cryptocurrency Part 4: The
Executable Forging Simulation
http://chepurnoy.org/blog/2014/12/inside-a-proof-of-stake-cryptocu
19
Part 1 is finished!
●
Questions?
20
Let's try to crack it!
●
https://github.com/ConsensusResearch/ForgingSimulation
(Haskell)
●
https://github.com/ConsensusResearch/MultiBranch
(Coq)
21
Nxt Promises Revisited
●
Avg time beetwen blocks is ~1.9 mins not 1.
●
http://www.scribd.com/doc/243341106/nxtforging-1
22
Private Branch Attack
●
Example: attacker with 20% decides to work on his own private
branch(with no contribution to the canonical one)
●
After that we have two networks, one with 0.8*X forging stake,
another with 0.2*X (X - forging stake of last block)
●
Retargeting is needed for both the networks
●
But it's limited by factor of 0.5..2
●
So attacker's chain will be worse
●
So the attack is impossible if block delays are close to 1 minute
23
Private chain attack (multibranching adversary)
●
Contributing to both forks
●
Attack could be successul in case of long delays for major network
●
Only few blocks overtake is possible
●
There's no way to predict an outcome of an attack(but it's cheap to try)
●
Attack allows collect more forging profits
●
Attack has positive outcome for the network(shorter avg. block delays)
●
Wait for 10 confirmations, as recommended by Nxt developers!
24
Multiple-Branching Forging
●
Forging is cheap, so forging to every branch is possible
●
But number of branches is growing exponentially with
time, so the only strategy is to forge to N best chains
●
Simulation tools:
https://github.com/ConsensusResearch/MultiBranch,
https://github.com/ConsensusResearch/ForgingSimulation
(multibranch-experimental branch)
25
Nothing-At-Stake Attack
●
Buterin: „Possible with 1% stake even“
●
Not possible at the moment!
●
Will be possible when most of forgers are multi-
branching
●
With 25 confirmations needed 10% attacker can't make
an attack(in simulations, in real world probably less
confirmations is needed)
●
Attack outcome is unpredictable
26
History Attack
●
Buy IPO whale's key for $5
●
Build better history
●
???
●
Profit!
●
(impossible in Nxt because of few checkpoints within
code)
27
Others attempts to improve Proof-of-Stake
●
Deposits / fines(Tendermint, GHOST)
●
Delegates(DPoS)
●
Totally unclear mixes of consensus & economics
properties!
28
Proof-of-Stake with Multiple-Branching
Forging
●
N forks running parallel (N is to be set in client)
●
BlockTree instead of Blockchain
●
Quantum view of a system
●
Large Common Prefix Property is met (k could be found
with some assumptions made) (in simulations)
●
That's not formally proven(yet!)
29
Proof-of-Stake Improvements
●
Better blockchain quality measure(than cumulative
difficulty)
●
Proof-of-Stake + Proof-of-Activity Hybrid
(paper on PoW+PoA Hybrid: „Proof of Activity: Extending
Bitcoin's Proof of Work via Proof of Stake“
http://eprint.iacr.org/2014/452.pdf )
●
(Semi)Formal model, not simulations
30
Proof-of-Stake
●
Greener(no millions to be spent on planet heating)
●
More suitable for some classes of blockchain
systems(industrial chains, small-scale chains)
●
Allows systems with different economics properties(than
w. mining rewards)
31
Part 2 is finished!
●
Questions?
32
Better Quality of Coins
●
Safer languages(Scala/Ocaml, Haskell, Idris/Coq)
●
Formal methods & simulations usage
●
Prototypes first, not products!
33
Security Problems
●
Consensus algo flaws – FATAL
●
Transaction layer flaws – from trivial to critical
●
Network layer – ddoses, unconfirmed pool attacks
34
Bitcoin: Transaction Layer bug
On July 28 2010, two bugs were discovered and
demonstrated on the test network. One exploited a bug
in the transaction handling code and allowed an attacker
to spend coins that they did not own. This was never
exploited on the main network, and was fixed by Bitcoin
version 0.3.5.
●
After these bugs were discovered, many currently-
unused script words were disabled for safety.
35
Bitcoin: Transaction Layer Bug
●
On 15 August 2010, with an exploit over 184 billion
bitcoins were generated in a transaction, and sent to two
addresses on the network. This was the only major
security flaw found and exploited in Bitcoin's history.
●
Fixed with hard-fork
36
Formalizations & tools
●
Network layer – simulations / monitoring
●
Transactions layer – formal models(w. Coq as well)
●
Consensus layer – formal models(Coq?)
37
Formal Approach
●
Formal Models on Paper
●
Interactive Theorem Provers(Coq etc)
●
Certified cryptocurrency engine
38
Formal Approach w. Coq Examples
●
Formal Idealizations of Cryptographic Hashing
https://github.com/billlwhite/cryptohash
●
A Theory for Lightweight Cryptocurrency Ledgers
https://github.com/billlwhite/ledgertheory
●
Upcoming Consensus Research paper
39
SemiFormal Approach
●
Hoare Logic
●
QuickSpec / HipSpec / ScalaLeon
●
Simulation tools
40
SCOREX
●
SCala + QOra EXperimental cryptocurrency engine
●
To make proof-of-concepts FAST!
●
Compact code
●
Intentionally not-production-ready
41
Lagonaki Release
●
100% Proof-of-stake
●
Simplified account-based transaction model
●
Simple payments only
●
Curve25519 for signing
●
JSON API
●
Command-line client
42
Lagonaki Release
●
Scala, just 4K lines of code
●
YoctoDb / MapDb
●
Release: March 2015
●
Contributions are welcomed!
43
Kizhi Release
●
Multiple-Branching Forging
●
Test network(please contribute with hardware!)
●
Scripts for attacks (Nothing-At-Stake)
●
Release: April-May 2015
44
Part 3 is finished!
Questions?
Consensus Research Wallets:
●
NXT-R58Z-PUMK-JCG4-5TC6M
●
(„consensus“ tokens on Nxt Assets Exhange)
●
17YksFD7eRB4NhPfEtGrGnuvuwpkAeBd7f
45
Pictures Taken From
●
Blockchain
https://sophosnews.files.wordpress.com/2013/03/bitcoin-dia
●
BlockTree
http://www.bitcoinsecurity.org/wp-content/uploads/2012/07/b

More Related Content

What's hot

Real world blockchains
Real world blockchainsReal world blockchains
Real world blockchains
Dmitry Meshkov
 
Bitclamp - A Permanent and Anonymous Publishing Platform Over Bitcoin
Bitclamp - A Permanent and Anonymous Publishing Platform Over BitcoinBitclamp - A Permanent and Anonymous Publishing Platform Over Bitcoin
Bitclamp - A Permanent and Anonymous Publishing Platform Over Bitcoin
BSidesROC
 
Blockchain
BlockchainBlockchain
Blockchain
Soichiro Takagi
 
Lightning Network
Lightning  NetworkLightning  Network
Lightning Network
Felix Crisan
 
Programming Decentralized Application
Programming Decentralized ApplicationProgramming Decentralized Application
Programming Decentralized Application
Bambang Purnomosidi D. P.
 
Intro to Blockchain - And, by the way, what the heck is proof-of-work?
Intro to Blockchain - And, by the way, what the heck is proof-of-work?Intro to Blockchain - And, by the way, what the heck is proof-of-work?
Intro to Blockchain - And, by the way, what the heck is proof-of-work?
Jim Flynn
 
The Bitcoin Lightning Network
The Bitcoin Lightning NetworkThe Bitcoin Lightning Network
The Bitcoin Lightning Network
Shun Shiku
 
State of Ethereum, and Mining
State of Ethereum, and MiningState of Ethereum, and Mining
State of Ethereum, and Mining
Mediabistro
 
Intro to Blockchain Slides
Intro to Blockchain SlidesIntro to Blockchain Slides
Intro to Blockchain Slides
Shannon Wells
 
How does the Bitcoin network work?
How does the Bitcoin network work?How does the Bitcoin network work?
How does the Bitcoin network work?
Akshay Kumar
 
Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)
Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)
Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)
Svetlin Nakov
 
Bitcoin Lightning Network - Presentation
Bitcoin Lightning Network - Presentation Bitcoin Lightning Network - Presentation
Bitcoin Lightning Network - Presentation
Jim Brysland
 
Blockchain - a basic overview
Blockchain - a basic overviewBlockchain - a basic overview
Blockchain - a basic overview
Syed Rakib Al Hasan
 
Can we safely adapt the construction of permissionless blockchain to user dem...
Can we safely adapt the construction of permissionless blockchain to user dem...Can we safely adapt the construction of permissionless blockchain to user dem...
Can we safely adapt the construction of permissionless blockchain to user dem...
I MT
 
Bitcoin Wallet &amp Keys
Bitcoin Wallet &amp KeysBitcoin Wallet &amp Keys
Bitcoin Wallet &amp Keys
Shun Shiku
 
The Lightning Network - A gentle introduction
The Lightning Network - A gentle introductionThe Lightning Network - A gentle introduction
The Lightning Network - A gentle introduction
Roland Stadler
 
Blockchain Technology
Blockchain TechnologyBlockchain Technology
Blockchain Technology
Giuseppe Andreetti
 
CBGTBT - Part 3 - Transactions 101
CBGTBT - Part 3 - Transactions 101CBGTBT - Part 3 - Transactions 101
CBGTBT - Part 3 - Transactions 101
Blockstrap.com
 
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
Svetlin Nakov
 
Architecture ethereum dapp
Architecture ethereum dappArchitecture ethereum dapp
Architecture ethereum dapp
Nicolas Wagner
 

What's hot (20)

Real world blockchains
Real world blockchainsReal world blockchains
Real world blockchains
 
Bitclamp - A Permanent and Anonymous Publishing Platform Over Bitcoin
Bitclamp - A Permanent and Anonymous Publishing Platform Over BitcoinBitclamp - A Permanent and Anonymous Publishing Platform Over Bitcoin
Bitclamp - A Permanent and Anonymous Publishing Platform Over Bitcoin
 
Blockchain
BlockchainBlockchain
Blockchain
 
Lightning Network
Lightning  NetworkLightning  Network
Lightning Network
 
Programming Decentralized Application
Programming Decentralized ApplicationProgramming Decentralized Application
Programming Decentralized Application
 
Intro to Blockchain - And, by the way, what the heck is proof-of-work?
Intro to Blockchain - And, by the way, what the heck is proof-of-work?Intro to Blockchain - And, by the way, what the heck is proof-of-work?
Intro to Blockchain - And, by the way, what the heck is proof-of-work?
 
The Bitcoin Lightning Network
The Bitcoin Lightning NetworkThe Bitcoin Lightning Network
The Bitcoin Lightning Network
 
State of Ethereum, and Mining
State of Ethereum, and MiningState of Ethereum, and Mining
State of Ethereum, and Mining
 
Intro to Blockchain Slides
Intro to Blockchain SlidesIntro to Blockchain Slides
Intro to Blockchain Slides
 
How does the Bitcoin network work?
How does the Bitcoin network work?How does the Bitcoin network work?
How does the Bitcoin network work?
 
Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)
Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)
Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)
 
Bitcoin Lightning Network - Presentation
Bitcoin Lightning Network - Presentation Bitcoin Lightning Network - Presentation
Bitcoin Lightning Network - Presentation
 
Blockchain - a basic overview
Blockchain - a basic overviewBlockchain - a basic overview
Blockchain - a basic overview
 
Can we safely adapt the construction of permissionless blockchain to user dem...
Can we safely adapt the construction of permissionless blockchain to user dem...Can we safely adapt the construction of permissionless blockchain to user dem...
Can we safely adapt the construction of permissionless blockchain to user dem...
 
Bitcoin Wallet &amp Keys
Bitcoin Wallet &amp KeysBitcoin Wallet &amp Keys
Bitcoin Wallet &amp Keys
 
The Lightning Network - A gentle introduction
The Lightning Network - A gentle introductionThe Lightning Network - A gentle introduction
The Lightning Network - A gentle introduction
 
Blockchain Technology
Blockchain TechnologyBlockchain Technology
Blockchain Technology
 
CBGTBT - Part 3 - Transactions 101
CBGTBT - Part 3 - Transactions 101CBGTBT - Part 3 - Transactions 101
CBGTBT - Part 3 - Transactions 101
 
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
 
Architecture ethereum dapp
Architecture ethereum dappArchitecture ethereum dapp
Architecture ethereum dapp
 

Viewers also liked

What is Blockchain Tech for Tokyo Blockchain Summit Dec 2015
What is Blockchain Tech for Tokyo Blockchain Summit Dec 2015What is Blockchain Tech for Tokyo Blockchain Summit Dec 2015
What is Blockchain Tech for Tokyo Blockchain Summit Dec 2015
Robert Schwentker
 
VeriCoin PoST WhitePaper.
VeriCoin PoST WhitePaper.VeriCoin PoST WhitePaper.
VeriCoin PoST WhitePaper.
VeriCoin
 
Blockchain: The Information Technology of the Future
Blockchain: The Information Technology of the FutureBlockchain: The Information Technology of the Future
Blockchain: The Information Technology of the Future
Melanie Swan
 
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for CypherpunksTrick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
David Evans
 
Alternative cryptocurrencies
Alternative cryptocurrencies Alternative cryptocurrencies
Alternative cryptocurrencies
vpnmentor
 
State Of Smart Contract Platforms from Smart Contract JP
State Of Smart Contract Platforms from Smart Contract JP State Of Smart Contract Platforms from Smart Contract JP
State Of Smart Contract Platforms from Smart Contract JP
Tomoaki Sato
 
Blockchain @ Descon 2016
Blockchain @ Descon 2016Blockchain @ Descon 2016
Blockchain @ Descon 2016
P-e-t-a-r
 
Proofs on cryptocurrencies
Proofs on cryptocurrenciesProofs on cryptocurrencies
Proofs on cryptocurrencies
Iván Sanchez Vera
 
Software for the Internet of Things
Software for the Internet of ThingsSoftware for the Internet of Things
Software for the Internet of Things
Alexandru Radovici
 
Intro into blockchain
Intro into blockchainIntro into blockchain
Intro into blockchain
Roderik van der Veer
 
Block Chains and Consensus Algos
Block Chains and Consensus AlgosBlock Chains and Consensus Algos
Block Chains and Consensus Algos
Jerry David Chan
 
Экскурс по блокчейн технологии, Сколково, Открытые инновации 2016
Экскурс по блокчейн технологии, Сколково, Открытые инновации 2016Экскурс по блокчейн технологии, Сколково, Открытые инновации 2016
Экскурс по блокчейн технологии, Сколково, Открытые инновации 2016
Sergey Lonshakov
 
xDSL Signal Encoding Efficiency
xDSL Signal Encoding EfficiencyxDSL Signal Encoding Efficiency
xDSL Signal Encoding Efficiency
PROBOTEK
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to Blockchain
Jordan Harris
 
비트코인과 디지털통화 - 이주영
비트코인과 디지털통화 - 이주영비트코인과 디지털통화 - 이주영
비트코인과 디지털통화 - 이주영
00heights
 
Bitcoin 기술분석 - 조남수
Bitcoin 기술분석 - 조남수Bitcoin 기술분석 - 조남수
Bitcoin 기술분석 - 조남수
00heights
 
Hands on with multichain
Hands on with multichainHands on with multichain
Hands on with multichain
Roderik van der Veer
 
Smart Contracts and Identity
Smart Contracts and IdentitySmart Contracts and Identity
Smart Contracts and Identity
Pascal Van Hecke
 
Blockchain BTSym '16
Blockchain BTSym '16Blockchain BTSym '16
Blockchain BTSym '16
Percival Lucena
 

Viewers also liked (20)

What is Blockchain Tech for Tokyo Blockchain Summit Dec 2015
What is Blockchain Tech for Tokyo Blockchain Summit Dec 2015What is Blockchain Tech for Tokyo Blockchain Summit Dec 2015
What is Blockchain Tech for Tokyo Blockchain Summit Dec 2015
 
VeriCoin PoST WhitePaper.
VeriCoin PoST WhitePaper.VeriCoin PoST WhitePaper.
VeriCoin PoST WhitePaper.
 
Blockchain: The Information Technology of the Future
Blockchain: The Information Technology of the FutureBlockchain: The Information Technology of the Future
Blockchain: The Information Technology of the Future
 
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for CypherpunksTrick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
 
Alternative cryptocurrencies
Alternative cryptocurrencies Alternative cryptocurrencies
Alternative cryptocurrencies
 
State Of Smart Contract Platforms from Smart Contract JP
State Of Smart Contract Platforms from Smart Contract JP State Of Smart Contract Platforms from Smart Contract JP
State Of Smart Contract Platforms from Smart Contract JP
 
Blockchain @ Descon 2016
Blockchain @ Descon 2016Blockchain @ Descon 2016
Blockchain @ Descon 2016
 
Proofs on cryptocurrencies
Proofs on cryptocurrenciesProofs on cryptocurrencies
Proofs on cryptocurrencies
 
Software for the Internet of Things
Software for the Internet of ThingsSoftware for the Internet of Things
Software for the Internet of Things
 
Intro into blockchain
Intro into blockchainIntro into blockchain
Intro into blockchain
 
Block Chains and Consensus Algos
Block Chains and Consensus AlgosBlock Chains and Consensus Algos
Block Chains and Consensus Algos
 
FinalBlockchainPaper_mod
FinalBlockchainPaper_modFinalBlockchainPaper_mod
FinalBlockchainPaper_mod
 
Экскурс по блокчейн технологии, Сколково, Открытые инновации 2016
Экскурс по блокчейн технологии, Сколково, Открытые инновации 2016Экскурс по блокчейн технологии, Сколково, Открытые инновации 2016
Экскурс по блокчейн технологии, Сколково, Открытые инновации 2016
 
xDSL Signal Encoding Efficiency
xDSL Signal Encoding EfficiencyxDSL Signal Encoding Efficiency
xDSL Signal Encoding Efficiency
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to Blockchain
 
비트코인과 디지털통화 - 이주영
비트코인과 디지털통화 - 이주영비트코인과 디지털통화 - 이주영
비트코인과 디지털통화 - 이주영
 
Bitcoin 기술분석 - 조남수
Bitcoin 기술분석 - 조남수Bitcoin 기술분석 - 조남수
Bitcoin 기술분석 - 조남수
 
Hands on with multichain
Hands on with multichainHands on with multichain
Hands on with multichain
 
Smart Contracts and Identity
Smart Contracts and IdentitySmart Contracts and Identity
Smart Contracts and Identity
 
Blockchain BTSym '16
Blockchain BTSym '16Blockchain BTSym '16
Blockchain BTSym '16
 

Similar to Proof-of-Stake & Its Improvements (San Francisco Bitcoin Devs Hackathon)

Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)
Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)
Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)
Alex Chepurnoy
 
Crypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies IntroCrypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies Intro
Tal Shmueli
 
Best practices to build secure smart contracts
Best practices to build secure smart contractsBest practices to build secure smart contracts
Best practices to build secure smart contracts
Gautam Anand
 
blockchain-and-trusted-computing
blockchain-and-trusted-computingblockchain-and-trusted-computing
blockchain-and-trusted-computing
YongraeJo
 
“A bitcoin mining rig”
“A bitcoin mining rig”“A bitcoin mining rig”
“A bitcoin mining rig”
glitterlabs
 
Brief Introduction to Blockchain Security
Brief Introduction to Blockchain SecurityBrief Introduction to Blockchain Security
Brief Introduction to Blockchain Security
Johnson, Chuan Zhang CISM CCSK OSCP
 
Some Open Problems in Blockchains
Some Open Problems in BlockchainsSome Open Problems in Blockchains
Some Open Problems in Blockchains
Alex Chepurnoy
 
Blockchain 101
Blockchain 101Blockchain 101
Blockchain 101
Oded Noam
 
Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018
Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018
Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018
Codemotion
 
Introduction to Attacks on Bitcoin and Cryptos
Introduction  to Attacks on  Bitcoin and CryptosIntroduction  to Attacks on  Bitcoin and Cryptos
Introduction to Attacks on Bitcoin and Cryptos
ssuser18349f1
 
Understanding Proof of Work (PoW) and Proof of Stake (PoS) Algorithms
Understanding Proof of Work (PoW) and Proof of Stake (PoS) AlgorithmsUnderstanding Proof of Work (PoW) and Proof of Stake (PoS) Algorithms
Understanding Proof of Work (PoW) and Proof of Stake (PoS) Algorithms
Gautam Anand
 
Bitcoin - Beyond the basics
Bitcoin - Beyond the basicsBitcoin - Beyond the basics
Bitcoin - Beyond the basics
Chris DeRose
 
01 what is blockchain
01 what is blockchain01 what is blockchain
01 what is blockchain
BastianBlankenburg
 
Introduction to Bitcoin for programmers
Introduction to Bitcoin for programmersIntroduction to Bitcoin for programmers
Introduction to Bitcoin for programmers
Wojciech Langiewicz
 
Blockchain, cryptography and tokens — NYC Bar presentation
Blockchain, cryptography and tokens — NYC Bar presentationBlockchain, cryptography and tokens — NYC Bar presentation
Blockchain, cryptography and tokens — NYC Bar presentation
Paperchain
 
The Emergent Layer 2
The Emergent Layer 2The Emergent Layer 2
The Emergent Layer 2
Chris Priest
 
Bitcoin Blockchain - Under the Hood
Bitcoin Blockchain - Under the HoodBitcoin Blockchain - Under the Hood
Bitcoin Blockchain - Under the Hood
Galin Dinkov
 
Blockchain learning to basic understand.pptx
Blockchain learning to basic understand.pptxBlockchain learning to basic understand.pptx
Blockchain learning to basic understand.pptx
balakrishna110526
 
Blockchain, bitcoin, ethereum and ICOs
Blockchain, bitcoin, ethereum and ICOsBlockchain, bitcoin, ethereum and ICOs
Blockchain, bitcoin, ethereum and ICOs
Bogdan Fiedur
 

Similar to Proof-of-Stake & Its Improvements (San Francisco Bitcoin Devs Hackathon) (20)

Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)
Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)
Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)
 
Crypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies IntroCrypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies Intro
 
Best practices to build secure smart contracts
Best practices to build secure smart contractsBest practices to build secure smart contracts
Best practices to build secure smart contracts
 
blockchain-and-trusted-computing
blockchain-and-trusted-computingblockchain-and-trusted-computing
blockchain-and-trusted-computing
 
“A bitcoin mining rig”
“A bitcoin mining rig”“A bitcoin mining rig”
“A bitcoin mining rig”
 
Brief Introduction to Blockchain Security
Brief Introduction to Blockchain SecurityBrief Introduction to Blockchain Security
Brief Introduction to Blockchain Security
 
Some Open Problems in Blockchains
Some Open Problems in BlockchainsSome Open Problems in Blockchains
Some Open Problems in Blockchains
 
Bitcoin Talk at Rainbow
Bitcoin Talk at RainbowBitcoin Talk at Rainbow
Bitcoin Talk at Rainbow
 
Blockchain 101
Blockchain 101Blockchain 101
Blockchain 101
 
Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018
Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018
Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018
 
Introduction to Attacks on Bitcoin and Cryptos
Introduction  to Attacks on  Bitcoin and CryptosIntroduction  to Attacks on  Bitcoin and Cryptos
Introduction to Attacks on Bitcoin and Cryptos
 
Understanding Proof of Work (PoW) and Proof of Stake (PoS) Algorithms
Understanding Proof of Work (PoW) and Proof of Stake (PoS) AlgorithmsUnderstanding Proof of Work (PoW) and Proof of Stake (PoS) Algorithms
Understanding Proof of Work (PoW) and Proof of Stake (PoS) Algorithms
 
Bitcoin - Beyond the basics
Bitcoin - Beyond the basicsBitcoin - Beyond the basics
Bitcoin - Beyond the basics
 
01 what is blockchain
01 what is blockchain01 what is blockchain
01 what is blockchain
 
Introduction to Bitcoin for programmers
Introduction to Bitcoin for programmersIntroduction to Bitcoin for programmers
Introduction to Bitcoin for programmers
 
Blockchain, cryptography and tokens — NYC Bar presentation
Blockchain, cryptography and tokens — NYC Bar presentationBlockchain, cryptography and tokens — NYC Bar presentation
Blockchain, cryptography and tokens — NYC Bar presentation
 
The Emergent Layer 2
The Emergent Layer 2The Emergent Layer 2
The Emergent Layer 2
 
Bitcoin Blockchain - Under the Hood
Bitcoin Blockchain - Under the HoodBitcoin Blockchain - Under the Hood
Bitcoin Blockchain - Under the Hood
 
Blockchain learning to basic understand.pptx
Blockchain learning to basic understand.pptxBlockchain learning to basic understand.pptx
Blockchain learning to basic understand.pptx
 
Blockchain, bitcoin, ethereum and ICOs
Blockchain, bitcoin, ethereum and ICOsBlockchain, bitcoin, ethereum and ICOs
Blockchain, bitcoin, ethereum and ICOs
 

More from Alex Chepurnoy

Ergo Presentation - Tokyo
Ergo Presentation - TokyoErgo Presentation - Tokyo
Ergo Presentation - Tokyo
Alex Chepurnoy
 
Berlin sigma-2017
Berlin sigma-2017Berlin sigma-2017
Berlin sigma-2017
Alex Chepurnoy
 
Ethereum and Its Challenges
Ethereum and Its ChallengesEthereum and Its Challenges
Ethereum and Its Challenges
Alex Chepurnoy
 
Improving Authenticated Dynamic Dictionaries, with Applications to Cryptocurr...
Improving Authenticated Dynamic Dictionaries, with Applications to Cryptocurr...Improving Authenticated Dynamic Dictionaries, with Applications to Cryptocurr...
Improving Authenticated Dynamic Dictionaries, with Applications to Cryptocurr...
Alex Chepurnoy
 
Масштабируемость блокчейн-систем: проблемы и решения
Масштабируемость блокчейн-систем: проблемы и решенияМасштабируемость блокчейн-систем: проблемы и решения
Масштабируемость блокчейн-систем: проблемы и решения
Alex Chepurnoy
 
Sigma Protocols and Zero Knowledge
Sigma Protocols and Zero KnowledgeSigma Protocols and Zero Knowledge
Sigma Protocols and Zero Knowledge
Alex Chepurnoy
 

More from Alex Chepurnoy (6)

Ergo Presentation - Tokyo
Ergo Presentation - TokyoErgo Presentation - Tokyo
Ergo Presentation - Tokyo
 
Berlin sigma-2017
Berlin sigma-2017Berlin sigma-2017
Berlin sigma-2017
 
Ethereum and Its Challenges
Ethereum and Its ChallengesEthereum and Its Challenges
Ethereum and Its Challenges
 
Improving Authenticated Dynamic Dictionaries, with Applications to Cryptocurr...
Improving Authenticated Dynamic Dictionaries, with Applications to Cryptocurr...Improving Authenticated Dynamic Dictionaries, with Applications to Cryptocurr...
Improving Authenticated Dynamic Dictionaries, with Applications to Cryptocurr...
 
Масштабируемость блокчейн-систем: проблемы и решения
Масштабируемость блокчейн-систем: проблемы и решенияМасштабируемость блокчейн-систем: проблемы и решения
Масштабируемость блокчейн-систем: проблемы и решения
 
Sigma Protocols and Zero Knowledge
Sigma Protocols and Zero KnowledgeSigma Protocols and Zero Knowledge
Sigma Protocols and Zero Knowledge
 

Recently uploaded

KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
ssuser7dcef0
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
zwunae
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
Kamal Acharya
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
symbo111
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
ClaraZara1
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
yokeleetan1
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
drwaing
 
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
dxobcob
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
anoopmanoharan2
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 

Recently uploaded (20)

KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
 
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 

Proof-of-Stake & Its Improvements (San Francisco Bitcoin Devs Hackathon)

  • 1. 1 Proof-of-Stake And It's Improvements @chepurnoy
  • 2. 2 About Myself ● Nxt Core Developer ● Secureae.com / SmartContract.com cofounder ● Consensus Research member
  • 3. 3 Fields of Interest ● Distributed & P2P systems ● Blockchain Tech ● Functional Programming (Haskell / Scala) ● Finite State Machines ● Formal Methods (model checking / Coq)
  • 4. 4 Consensus Research Me + Andrew Lyashin ● Andrew is a big fan of concrete math, category theory, Coq, proven code ● Asset on Nxt AE
  • 5. 5 Consensus ● A lonely toy for computer scientists for > 50 years ● Crash failure ● Byzantine failure
  • 6. 6 Problems in Distributed Systems ● CAP theorem ● FLP impossibility
  • 7. 7 Byzantine Consensus ● Has been studying since 80s ● A lot of algos found & analyzed
  • 8. 8 Anonymous Byzantine Agreements ● Anonymous Byzantine Agreements are vulnerable to sybil attacks ● Moderately-Hard Puzzles(a.k.a Proof-of-Work) as anonymous identity tools were proposed since mid 90s ● Finally, an approach was used(along with pretty informal definition) by „Satoshi Nakamoto“
  • 9. 9 Bitcoin Consensus? Anonymous Byzantine Agreement with Computational Puzzles as Identity Tool
  • 10. 10 Good Papers To Read! ● Anonymous Byzantine Consensus from Moderately-Hard Puzzles: A Model for Bitcoin (A. Miller / J. LaViola) ● Research Perspectives and Challenges for Bitcoin and Cryptocurrencies (J. Bonneau, A. Miller et al) ● The Bitcoin Backbone Protocol: Analysis and Applications ( https://eprint.iacr.org/2014/765.pdf )
  • 11. 11 Bitcoin Consensus Simply ● Random oracle (a.k.a sha256) ● x questions to the oracle, which is sha256(~mining power) at each round(say, 1 sec) ● probability of positive answer should be → 0 ● honest players should have 50+% queries to the oracle(„mining power“), with some glitches below 2/3(selfish mining etc) ● length(chain) as chain quality measure
  • 13. 13 Blockchain As Database ● Persistent(versioned) database ● Genesis state – initial verion of the database ● Block(„Block Delta“ by Bill White) ● State(h) * Block → State(h+1) ● Very weak consistency!
  • 14. 14 Common chain prefix property ● After k permutations a state of the blockchain database for versions 1..N-k is considered to be stable (the chance of opposite is negligible) (with some assumptions made) ● Bitcoin: k = 6
  • 15. 15 Proof-of-Stake ● Anonymous Byzantine Agreement with internal tokens as identity tools ● So no mining ● Right to generate a block depends on stake ● So a bunch of oracles (hit < target) ● Cumulative difficulty(maxvalid in Backbone's paper) is the chain quality measure(in a blocktree)
  • 16. 16 Hit & Target (Nxt's Random Oracle) ● hit = first8BytesAsNumber (sha256 (append (lastBlock.generationSignature account.publicKey))) ● target = lastBlock.baseTarget * (currentTime()- lastBlock.time()) * account.effectiveBalance ● block.baseTarget = prevBlock.baseTarget*((block.time- lastBlock.time) / 60) then bounded by (prevBlock.baseTarget / 2,prevBlock.baseTarget * 2) ● hit < target
  • 17. 17 Cumulative difficulty - Chain Quality Measure ● sum(1 / block.baseTarget)
  • 18. 18 ● Inside a Proof-of-Stake Cryptocurrency Part 1: Basic Structures http://chepurnoy.org/blog/2014/10/inside-a-proof-of-stake-cryptocu ● Inside a Proof-of-Stake Cryptocurrency Part 2: Forging Algorithm http://chepurnoy.org/blog/2014/10/inside-a-proof-of-stake-cryptocu ● Inside a Proof-of-Stake Cryptocurrency Part 3: A Local Ledger http://chepurnoy.org/blog/2014/11/inside-a-proof-of-stake-cryptocu ● Inside a Proof-of-Stake Cryptocurrency Part 4: The Executable Forging Simulation http://chepurnoy.org/blog/2014/12/inside-a-proof-of-stake-cryptocu
  • 19. 19 Part 1 is finished! ● Questions?
  • 20. 20 Let's try to crack it! ● https://github.com/ConsensusResearch/ForgingSimulation (Haskell) ● https://github.com/ConsensusResearch/MultiBranch (Coq)
  • 21. 21 Nxt Promises Revisited ● Avg time beetwen blocks is ~1.9 mins not 1. ● http://www.scribd.com/doc/243341106/nxtforging-1
  • 22. 22 Private Branch Attack ● Example: attacker with 20% decides to work on his own private branch(with no contribution to the canonical one) ● After that we have two networks, one with 0.8*X forging stake, another with 0.2*X (X - forging stake of last block) ● Retargeting is needed for both the networks ● But it's limited by factor of 0.5..2 ● So attacker's chain will be worse ● So the attack is impossible if block delays are close to 1 minute
  • 23. 23 Private chain attack (multibranching adversary) ● Contributing to both forks ● Attack could be successul in case of long delays for major network ● Only few blocks overtake is possible ● There's no way to predict an outcome of an attack(but it's cheap to try) ● Attack allows collect more forging profits ● Attack has positive outcome for the network(shorter avg. block delays) ● Wait for 10 confirmations, as recommended by Nxt developers!
  • 24. 24 Multiple-Branching Forging ● Forging is cheap, so forging to every branch is possible ● But number of branches is growing exponentially with time, so the only strategy is to forge to N best chains ● Simulation tools: https://github.com/ConsensusResearch/MultiBranch, https://github.com/ConsensusResearch/ForgingSimulation (multibranch-experimental branch)
  • 25. 25 Nothing-At-Stake Attack ● Buterin: „Possible with 1% stake even“ ● Not possible at the moment! ● Will be possible when most of forgers are multi- branching ● With 25 confirmations needed 10% attacker can't make an attack(in simulations, in real world probably less confirmations is needed) ● Attack outcome is unpredictable
  • 26. 26 History Attack ● Buy IPO whale's key for $5 ● Build better history ● ??? ● Profit! ● (impossible in Nxt because of few checkpoints within code)
  • 27. 27 Others attempts to improve Proof-of-Stake ● Deposits / fines(Tendermint, GHOST) ● Delegates(DPoS) ● Totally unclear mixes of consensus & economics properties!
  • 28. 28 Proof-of-Stake with Multiple-Branching Forging ● N forks running parallel (N is to be set in client) ● BlockTree instead of Blockchain ● Quantum view of a system ● Large Common Prefix Property is met (k could be found with some assumptions made) (in simulations) ● That's not formally proven(yet!)
  • 29. 29 Proof-of-Stake Improvements ● Better blockchain quality measure(than cumulative difficulty) ● Proof-of-Stake + Proof-of-Activity Hybrid (paper on PoW+PoA Hybrid: „Proof of Activity: Extending Bitcoin's Proof of Work via Proof of Stake“ http://eprint.iacr.org/2014/452.pdf ) ● (Semi)Formal model, not simulations
  • 30. 30 Proof-of-Stake ● Greener(no millions to be spent on planet heating) ● More suitable for some classes of blockchain systems(industrial chains, small-scale chains) ● Allows systems with different economics properties(than w. mining rewards)
  • 31. 31 Part 2 is finished! ● Questions?
  • 32. 32 Better Quality of Coins ● Safer languages(Scala/Ocaml, Haskell, Idris/Coq) ● Formal methods & simulations usage ● Prototypes first, not products!
  • 33. 33 Security Problems ● Consensus algo flaws – FATAL ● Transaction layer flaws – from trivial to critical ● Network layer – ddoses, unconfirmed pool attacks
  • 34. 34 Bitcoin: Transaction Layer bug On July 28 2010, two bugs were discovered and demonstrated on the test network. One exploited a bug in the transaction handling code and allowed an attacker to spend coins that they did not own. This was never exploited on the main network, and was fixed by Bitcoin version 0.3.5. ● After these bugs were discovered, many currently- unused script words were disabled for safety.
  • 35. 35 Bitcoin: Transaction Layer Bug ● On 15 August 2010, with an exploit over 184 billion bitcoins were generated in a transaction, and sent to two addresses on the network. This was the only major security flaw found and exploited in Bitcoin's history. ● Fixed with hard-fork
  • 36. 36 Formalizations & tools ● Network layer – simulations / monitoring ● Transactions layer – formal models(w. Coq as well) ● Consensus layer – formal models(Coq?)
  • 37. 37 Formal Approach ● Formal Models on Paper ● Interactive Theorem Provers(Coq etc) ● Certified cryptocurrency engine
  • 38. 38 Formal Approach w. Coq Examples ● Formal Idealizations of Cryptographic Hashing https://github.com/billlwhite/cryptohash ● A Theory for Lightweight Cryptocurrency Ledgers https://github.com/billlwhite/ledgertheory ● Upcoming Consensus Research paper
  • 39. 39 SemiFormal Approach ● Hoare Logic ● QuickSpec / HipSpec / ScalaLeon ● Simulation tools
  • 40. 40 SCOREX ● SCala + QOra EXperimental cryptocurrency engine ● To make proof-of-concepts FAST! ● Compact code ● Intentionally not-production-ready
  • 41. 41 Lagonaki Release ● 100% Proof-of-stake ● Simplified account-based transaction model ● Simple payments only ● Curve25519 for signing ● JSON API ● Command-line client
  • 42. 42 Lagonaki Release ● Scala, just 4K lines of code ● YoctoDb / MapDb ● Release: March 2015 ● Contributions are welcomed!
  • 43. 43 Kizhi Release ● Multiple-Branching Forging ● Test network(please contribute with hardware!) ● Scripts for attacks (Nothing-At-Stake) ● Release: April-May 2015
  • 44. 44 Part 3 is finished! Questions? Consensus Research Wallets: ● NXT-R58Z-PUMK-JCG4-5TC6M ● („consensus“ tokens on Nxt Assets Exhange) ● 17YksFD7eRB4NhPfEtGrGnuvuwpkAeBd7f