Table of Contents
Preface ix
1 What Is a Decentralized Application? 1
Preliminaries: What Is Bitcoin? 1
What Is a Decentralized Application? 3
Feature 1 Open Source 4
Feature 2 Internal Currency 6
Feature 3 Decentralized Consensus 6
Feature 4 No Central Point of Failure 7
The History of Decentralized Applications 8
PopcornTime 9
OpenBazaar 9
FireChat 9
Lighthouse 10
Gems 10
Enabling Technologies 11
Defining the Terms 11
Getting Started 14
2 A Flourishing Dapp Ecosystem 15
Decentralized Data 15
Option 1 Storing Data Directly in the Bitcoin Blockchain 16
Option 2 Storing Data in a Distributed Hash Table 17
Decentralized Wealth 21
Decentralized Identity 26
Decentralized Computing 29
Decentralized Bandwidth 31
Decentralized Markets for Decentralized Assets 33
Practical Decentralization 36
3 Building Your First Dapp 39
Go 39
Centralized Architecture 40
Decentralized Architecture: Introduction to IPFS 41
What Are We Building? 43
Setup 43
Routing 48
Data Storage and Retrieval 49
Passing and Displaying Data to the Frontend 52
Dapp Economics 54
Remaining Problems 58
Private Networks 58
Human-Readable Names 59
Showing Only Peers on Mikro, Not IPFS in General 59
Tamper-Free Payments 59
4 OpenBazaar 61
Why Make OpenBazaar? 61
What Is OpenBazaar? 62
How Does OpenBazaar Work? 63
Merchant 63
Buyer 64
Notary 65
How to Install OpenBazaar 66
Possible Errors 66
Identity 70
Reputation 71
What Could OpenBazaar Have Done Better? 74
5 Lighthouse 77
Functionality 78
SPV Wallets 84
Identity 84
6 La'Zooz 87
What Is La'Zooz? 87
Distribution Protocol 88
DAO Structure 89
UX 91
Architecture 92
Contracts 95
Improvements 96
Conclusion 97
Index 99