Incentives in cryptocurrencies
ECRYPT Workshop on Cryptocurrencies
Joseph Bonneau
Recap: Bitcoin miners
Bitcoin depends on miners to:
Who are the miners?
Early miners faced high risk
Chilkoot pass,
1898 Klondike gold rush
Mining is extremely difficult
Number of attempts to find a block:
269.6 = 903,262,006,880,187,187,200
Network hash rate = 1,432,691 TH/s
Trillion
Mining difficulty grows over time
bitcoinwisdom.com
Difficulty adjusts every two weeks
bitcoinwisdom.com
10 minutes
2 weeks
Mining has quickly become industrial
CPU GPU FPGA ASIC
gold pan sluice box placer mining pit mining
Bitcoin ASICs
Market dynamics (2013/2014)
But... rising prices saved them!
Bitcoin ASICs
Market dynamics (2015/2016)
[Taylor 2013]
Bitcoin and the Age of Bespoke Silicon.
Current hardware (2015/2016)
Case study: Ant Miner S7
Still, 4.8 years to find a block!
Market dynamics (2015/2016)
Professional mining centers
Needs:
Mining center in China
Philosophical questions
Hard questions about power usage
Data furnaces
Can mining become “virtual”?
If future mining converts Bitcoin to electricity...
Why not just vote by Bitcoin holdings?
“Proof of stake”
Deviant mining strategies
Assume you control 0 < α < 1 of mining power and the remainder is “compliant”
Can you profit from a non-default strategy?
For some α, YES, though not observed in practice
Strategy space for miners
What can you do with α > 51%?
All of these attacks are highly visible
Forking attacks
M→M’
M→B
M→M’
M→B
Attackers care about the exchange rate
Source: blockchain.info
Mt. Gox hacked
Mining hardware is illiquid
Result: Miners care about future exchange rate
Forking attacks via bribery
[Bonneau 2016]
Why buy when you can rent? Bribery attacks on Bitcoin consensus
In-band bribery possible with scripts
K0 → K1
$$$$$$$$$$$ → K0
K0→ {t1, t2, t3, t4, ...}
B0
B1
B2
...
Guaranteed bribes
Can we do anything with α < 50%?
Surprising answer: Yes!
Temporary block-withholding attacks
Strategy: don’t announce blocks right away. Try to get ahead!
Secret Block
Secret Block
All other miners are wasting effort here!
“Selfish mining”
Temporary block-withholding, take 2
What happens if a block is announced when you’re ahead by 1?
Network race
Secret Block
Assume you win races with prob. ɣ
[Eyal, Sirer 2014]
Majority is not enough: Bitcoin mining is vulnerable.
Surprising theoretical finding, never observed!
Whale mining
Risks of uneven transaction fees
100 BTC
25 BTC
25 BTC
25 BTC
Expected reward: α2 x 125
Expected reward: α x 25 BTC
Expected reward: α3 x 125
Transaction fees will matter more
Courtesy:
Brian Warner
Currently, block rewards are > 99% of miner revenue. But:
Eventually, transaction fees will dominate
Transaction fees already increasing
[Möser, Böhme 2015]
Trends, Tips, Tolls: A Longitudinal Study of Bitcoin Trans. Fees
What will set transaction fees?
Mining pools (May 2016)
Economics of being a small miner
Ant Miner S7
Mining uncertainty (4.7 year mean)
Probability density
4.7
years
Time to find first block
# blocks found in one year | probability (Poisson dist.) |
0 | 36.7% |
1 | 36.7% |
2 | 18.3% |
3+ | 8.1% |
Idea: could small miners pool risk?
Mining pools
How do we know how much work members perform?
Show work with near-valid blocks (shares)
4AA087F0A52ED2093FA816E53B9B6317F9B8C1227A61F9481AFED67301F2E3FB
D3E51477DCAB108750A5BC9093F6510759CC880BB171A5B77FB4A34ACA27DEDD
00000000008534FF68B98935D090DF5669E3403BD16F1CDFD41CF17D6B474255
BB34ECA3DBB52EFF4B104EBBC0974841EF2F3A59EBBC4474A12F9F595EB81F4B
00000000002F891C1E232F687E41515637F7699EA0F462C2564233FE082BB0AF
0090488133779E7E98177AF1C765CF02D01AB4848DF555533B6C4CFCA201CBA1
460BEFA43B7083E502D36D9D08D64AFB99A100B3B80D4EA4F7B38E18174A0BFB
000000000000000078FB7E1F7E2E4854B8BC71412197EB1448911FA77BAE808A
652F374601D149AC47E01E7776138456181FA4F9D0EEDD8C4FDE3BEF6B1B7ECE
785526402143A291CFD60DA09CC80DD066BC723FD5FD20F9B50D614313529AF3
000000000041EE593434686000AF77F54CDE839A6CE30957B14EDEC10B15C9E5
9C20B06B01A0136F192BD48E0F372A4B9E6BA6ABC36F02FCED22FD9780026A8F
Mining pools
0x00000000000490c6b00...
0x00000000000000003f89...
0x000000000001e8709ce...
0x0000000000007313f89...
0x0000000000045a1611f...
0x00000000000a877902e...
Pool manager
$$$
$$
$
Hey folks! Here’s our next block to work on
coinbase:
25→pool
mrkl_root: H( )
prev: H( )
nonce:
hash:
Do we want pools?
Pros:
Cons:
Interesting result [Miller et al. 2015]:
we can design a cryptocurrency so that pools are impossible
None serious deviations observed yet...
If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth.
--Satoshi Nakamoto
Many explanations for lack of attacks in practice
Miners are too simplistic?
Too much risk and capital needed?
Hard to profit from double-spends?
Honor among miners?
Attacks are lucrative in a simple model
Infinite:
Negligible:
Game theory poorly suited to Bitcoin
Usual assumptions:
Most Bitcoin “game theory” is really unilateral optimization
Games at two levels
What if you want to crash Bitcoin?
Goldfinger Attack
I expect you to die, Mr. Bitcoin
[Kroll, Davey, Felten 2013]
The Economics of Bitcoin Mining, or Bitcoin in the Presence of Adversaries
Summary
Things might be about to get interesting...
Mining hardware is illiquid
Conclusion: Miners care about future exchange rate
To attack, or not to attack?
Revenue
Time
attack
default behavior
Mining pool variations
Rewards structure for pools
Goals:
Impossibility result (in progress):
[Schrijvers, Bonneau, Roughgarden, Boneh 2016]
Incentive Compatibility of Bitcoin Mining Pool Reward Functions
Are mining pools a good thing?
Can we prevent pools?
Mining pool sabotage
Surprising result:
[Eyal 2015]
The Miner’s Dilemma
Mining pools may attack each other
Goals:
Strategies:
Mining pool sabotage
α = 50%
α = 50%
Bitcoin network
0.5
0.5
0.5
0.5
Honest behavior: 0.5
Mining pool sabotage
α = 50%
α = 50%
Bitcoin network
0.25
0.33
0.5
0.66
0.25
0.22
Dishonest behavior: 0.555...
Will miners cooperate to enforce fees?
Feather-forking
Goal: blacklist/censor some addresses
Strategies:
Feather forking
Block with banned tx
Feather forker works here
Chance of success down to α3, give up
Feather-forking
Goal: blacklist/censor some addresses
Strategies:
Apparent outcome: