Book table of contents

(For a pdf, go here)

Table of Contents

1 Basic of cryptographic payments 3

1.1 Preliminaries on cryptographic signatures 3

1.1.1 Binary and Hexadecimal 3

1.1.2 Hashing function. 4

1.1.3 Cryptographic Signatures 6

1.1.4 Takeaway 8

1.2 Blockchain Protocols 9

1.2.1 Consensus 9

1.2.2 Proof of Work 12

1.2.3 Block Difficulty adjustment 15

1.2.4 Longest-chain / Heaviest-chain rule 15

1.2.5 Halving 16

1.2.6 Blocksize 17

1.2.7 Why is it called “Proof of Work”? 18

1.2.8 Rise of ASICs 18

1.2.9 Layer 2 networks 19

1.2.10 Cursory analysis 19

1.2.11 Proof of Stake 21

1.2.12 Nodes and miners 21

1.2.13 Soft forks and hard forks 22

1.3 What is Bitcoin and why does it work? 23

1.4 More on mining 24

1.4.1 UTXO 24

1.4.2 Common assumptions in mining games 27

2 Probability spaces 30

2.0.1 Countably and Uncountably infinite 31

2.1 Partitions 32

2.1.1 Conditional Probability 33

2.2 Random Variables 34

2.2.1 Expectation 34

2.2.2 Conditional expectation 36

2.3 Bernoulli Processes and Bernoulli Schemes 38

2.3.1 The binomial distribution formula and De Moivre–Laplace

2.3.2 Probability-preserving isomorphisms and comparison of expectations 42

2.4 Win-Lose-Pay Game 45

2.5 Probability distribution functions 46

2.5.1 Jensen’s inequality. 47

2.6 Poisson processes 47

2.6.1 Naturally occurring chain splits 49

3 Game theory basics 52

3.1 Single round games 52

3.1.1 Payoff Tables 53

3.1.2 Preferences and utility function 54

3.1.3 Matrix Games 55

3.1.4 N-players games and more terminology 56

3.1.5 Dominant Strategies 57

3.1.6 Examples 58

3.1.7 Nash equilibria 59

3.1.8 Examples 60

3.1.9 Determining Nash Equilibria by looking at a table. 60

3.2 Mixed strategies 62

3.2.1 Mixed strategies in real life 62

3.3 Extensive-Form Games 63

3.3.1 State of a game 63

3.3.2 Game Trees 65

3.4 Schelling points 67

4 Monopolizing Pool 69

4.1 Rough approach: Bernoulli’s Law of Large Numbers and Hoeffding’s bound 70

4.2 Binomial distribution and De Moivre-Laplace theorem 73

5 Basic double-spend game 76

5.1 Simplest Strategy: Charlie elects to mine his own chain when less than k blocks behind 78

5.1.1 Recursion formulas 79

5.1.2 A method for computing winning probability 80

5.1.3 Another method: difference equations 82

5.1.4 Computing expected values 84

5.2 Longer duration attacks 90

5.3 Stealth 6 block double-spend. 92

5.3.1 Negative binomial distribution 93

6 Censorship attacks 97

6.1 Worked example: two rational pools 99

6.1.1 Consideration for this choice of function. 101

6.1.2 There are many strategies 102

6.1.3 Case 1: (Non-compliant, Non-compliant) 103

6.1.4 Case 2 (Non-compliant, Mildly Compliant). Pool 1 is non-compliant, Pool 2 is mildly compliant. 106

6.1.5 Case 3 Both Pools Mildly compliant 113

6.1.6 Analysis: Low fee regime 114

6.1.7 Higher fee regime 117

6.1.8 Conclusion 117

7 Economics of Mining 119

7.1 Hashing as a market 119

7.1.1 Cournot oligopoly Model 119

7.1.2 A model for the mining market 121

7.1.3 Linear cost model 121

7.1.4 Monopolist pricing and collusion 124

7.1.5 Perfectly competitive markets 124

7.1.6 Nash Equilibrium in the mining market. 126

7.2 Market for ASICs 127

7.2.1 Four Regimes 128

8 Selfish mining 130

8.1 Exploiting the difficulty adjustment 131

8.2 The basic Selfish Mine 132

8.3 Market distortions 137

8.4 Markov Chains 138

8.5 Selfish mining analyzed via a Markov process with cuts. 140

8.6 Selfish mining with partial cooperation 143

8.7 Defense against selfish mining 144

9 Strategic Mining 146

9.1 Petty Compliant strategy and fee-undercutting 147

9.1.1 Fee-Undercutting 147

9.1.2 Fee-sniping vs. fee-undercutting 149

9.1.3 Emergence of petty compliant Miners 149

9.1.4 Selfish mining as incentive to use petty compliant mining 150

9.1.5 Measures against undercutting 151

9.2 Other Deviant mining strategies 152

9.2.1 Accepting bribes. 152

9.2.2 Block withholding 159

9.2.3 Protecting one’s own interests 160

9.2.4 Mine-from-behind 161

9.2.5 Extended example 161

9.2.6 Deferring to the alpha dog 165

9.2.7 Responding to exogenous demand for hashrate 168

9.2.8 Harmonic Mining / Switch Mining 170

9.2.9 Merge-mining, layer 2, sidechains and strategies playing out on other blockchains 172

9.3 Will there be a transition from default compliant to a fully strategic regime? 173

9.3.1 Block optimization and transaction selection 174

9.3.2 Overpaying pools 175

9.3.3 Direct signaling and optimizer-training 176

9.3.4 Purge pooling 176

9.3.5 Precedent: MEV and selfing mining in Ethereum 177

10 What discourages strategic mining? 179

10.1 Market Fragility Hypothesis 179

10.2 Repeated games and institutional norms. 180

10.2.1 Mining that can be punished 182

10.2.2 Problems with punishment 182

11 Declining Block Subsidy 184

11.1 Security budget 185

11.2 The mining gap 187

11.3 Problems with a mining gap 189

11.4 Undercutting 190

11.4.1 Private transaction brokering 192

11.5 Summary 193

12 Flattening ASIC cost curve 195

12.1 Hash deployment ratio 195

12.2 Purge Pools 196

12.2.1 Protection against a purge attack when HDR is low 197

12.3 The dynamical system determined by the difficulty adjustment 198

12.3.1 Phase transition to Galloping Gertie 205

12.4 Financialization of hashrate markets 207

13 Attacks 209

13.1 Why have there been no attacks yet? 210

13.2 Nation state / Authoritarian attacks 211

13.2.1 The empty-block attack 211

13.2.2 Obvious criticism of the empty-block attack 212

13.2.3 Layer 2 s under an empty-block attack 213

13.2.4 The seesaw attack 213

13.2.5 bribe-flooding attack 214

13.2.6 Empty-block purge attack 215

13.3 Checkpointing against a persistent 51 % attack 215

13.4 Buyout Attacks 218

13.5 Nuclear option: new proof-of-work algorithm 219

13.6 Less-than-brute-force attacks 221

13.6.1 Nudging towards a strategic regime 221

13.6.2 FUD and social attacks 222

13.6.3 Regulations 223

13.7 Goldfinger attacks 223

13.7.1 Slippery-slope attacks 225

13.7.2 Selfish mining as a slippery-slope attack 226

13.7.3 Low probability attacks 227

13.8 Soft-forkability: Can the community suspend Nakamoto consensus? 229

13.8.1 Additional security layers 232

13.8.2 Example: Purge Exploit and Buy Beware response 234

13.8.3 The government to the rescue 235

13.8.4 Economic majority vs. mining majority 236

13.8.5 A tetralemma 237

14 Direct Frontal Takeovers 239

14.1 Institutional response 241

14.2 Creeping corporate takeover 242

14.3 Alliances are beneficial 242

14.4 ESG takeovers 243

14.5 Government KYC takeovers 244

14.6 Overexposed bagholder exploit 244

14.7 Fee market and the long term viability 245

14.8 How much is censorship resistance worth? 246

14.9 67 % Fiat Attack 247

14.10 Permissioned Bypass 248

15 Nash bargaining 249

15.1 The Bargaining problem 250

15.1.1 Motivating Real World Problems 251

15.1.2 Motivating Game Theory Games 251

15.1.3 Dividing a surplus and the Nash bargaining solution 252

15.1.4 Exogenous probability of breakdown 254

15.1.5 What if players can determine the probability of breakdown? 256

15.2 Creating commitment 258

15.2.1 Enter blockchains? 259

15.2.2 Commitment Can Backfire 260

15.3 Mixed Strategies and Schelling Threats 260

15.3.1 Jane’s example, again 261

15.4 Extortion and griefing 262

15.4.1 Schelling attacks as an inexpensive way to destroy a network. 265

15.5 Wars of attrition 266

16 Coalitional game theory 267

16.0.1 Motivating examples 267

16.0.2 Characteristic form and payoff configurations 269

16.0.3 Standard coalitional game theory and the Bitcoin mining game 271

16.0.4 Solution concepts 272

16.0.5 Analysis of solution concepts for the weighted majority games and CBMG 279

16.0.6 The 3 player case 284

16.0.7 Discussion 288

17 Stock, Flow and Economic considerations 290

17.1 Double-spend exploits 293

17.1.1 Finality 295

17.2 Sabotage (Goldfinger) Attack 298

17.3 Determining the stock value of ASICs. 299

17.3.1 Moore’s law 300

17.3.2 flow-based miner cost model 301

17.3.3 Stock value of latent hashrate as a threat 302

17.4 Stable regimes 303

17.5 Efficiency, Security and Decentralization. 304

17.5.1 Efficiency 305

17.6 Theoretical pushout and epsilon-attacks 308

18 Bitcoin as it matures 310

18.1 Hyperbitcoinization 310

18.1.1 Decentralized Hyperbitcoinization 311

18.1.2 Centralized Hyperbitcoinization 314

18.1.3 Sovereign currency will not die 317

18.2 Will nation-states support Bitcoin? 320

18.2.1 Indifference to centralization and the Soft-Forkability hypothesis. 322

18.2.2 Bitcoin mining 323

18.3 Non-profitable mining 324

18.3.1 Will corporations protect their bags? 327

18.4 Geopolitical considerations in adversarial conditions 327

18.4.1 Nice and naughty nations. 331

18.4.2 The free-rider problem with a finite supply currency 333

18.5 Can the supply be increased? 334

18.6 Limits as a decentralized store-of-value 335

18.6.1 Asymmetric risk premium 336

18.6.2 Failure as a functional store of value 337

18.7 Beasts in the Jungle: Centralization, Capture and Collapse 338

18.7.1 Centralization 338

18.7.2 Capture 340

18.7.3 Collapse 342