Next Steps in the Evolution of Decentralized Oracle Networks
Total Page:16
File Type:pdf, Size:1020Kb
Chainlink 2.0: Next Steps in the Evolution of Decentralized Oracle Networks Lorenz Breidenbach1 Christian Cachin2 Benedict Chan1 Alex Coventry1 Steve Ellis1 Ari Juels3 Farinaz Koushanfar4 Andrew Miller5 Brendan Magauran1 Daniel Moroz6 Sergey Nazarov1 Alexandru Topliceanu1 Florian Tram`er7 Fan Zhang8 15 April 2021 v1.0 1Chainlink Labs 2The author is a faculty member at University of Bern. He co-authored this work in his separate capacity as an advisor to Chainlink Labs. 3The author is a faculty member at Cornell Tech. He co-authored this work in his separate capacity as Chief Scientist at Chainlink Labs. 4The author is a faculty member at University of California, San Diego. She co-authored this work in her separate capacity as an advisor to Chainlink Labs. 5The author is a faculty member at University of Illinois Urbana-Champaign. He co-authored this work in his separate capacity as an advisor on Chainlink. 6The author is a PhD candidate at Harvard University. He co-authored this work while on leave from Harvard, in his capacity as a researcher at Chainlink Labs. 7The author is a PhD candidate at Stanford University. He co-authored this work in his separate capacity as an advisor to Chainlink Labs. 8The author will be joining the faculty of Duke University in fall 2021. He co-authored this work in his current capacity as a researcher at Chainlink Labs. 1 Abstract In this whitepaper, we articulate a vision for the evolution of Chainlink be- yond its initial conception in the original Chainlink whitepaper. We foresee an increasingly expansive role for oracle networks, one in which they comple- ment and enhance existing and new blockchains by providing fast, reliable, and confidentiality-preserving universal connectivity and off-chain computation for smart contracts. The foundation of our plan is what we call Decentralized Oracle Networks, or DONs for short. A DON is a network maintained by a committee of Chainlink nodes. It supports any of an unlimited range of oracle functions chosen for deployment by the committee. A DON thus acts as a powerful abstraction layer, offering interfaces for smart contracts to extensive off-chain resources and highly efficient yet decentralized off-chain computing resources within the DON itself. With DONs as a springboard, Chainlink plans to focus on advances in seven key areas: • Hybrid smart contracts: Offering a powerful, general framework for aug- menting existing smart contract capabilities by securely composing on-chain and off-chain computing resources into what we call hybrid smart contracts. • Abstracting away complexity: Presenting developers and users with simple functionality eliminates the need for familiarity with complex underlying protocols and system boundaries. • Scaling: Ensuring that oracle services achieve the latencies and throughputs demanded by high-performance decentralized systems. • Confidentiality: Enabling next-generation systems that combine blockchains’ innate transparency with strong new confidentiality protections for sensitive data. • Order-fairness for transactions: Supporting transaction sequencing in ways that are fair for end users and prevent front-running and other attacks by bots and exploitative miners. • Trust-minimization: Creating a highly trustworthy layer of support for smart contracts and other oracle-dependent systems by means of decen- tralization, strong anchoring in high-security blockchains, cryptographic techniques, and cryptoeconomic guarantees. • Incentive-based (cryptoeconomic) security: Rigorously designing and ro- bustly deploying mechanisms that ensure nodes in DONs have strong eco- nomic incentives to behave reliably and correctly, even in the face of well- resourced adversaries. We present preliminary and ongoing innovations by the Chainlink community in each of these areas, providing a picture of the broadening and increasingly powerful capabilities planned for the Chainlink network. 2 Contents 1 Introduction6 1.1 Decentralized Oracle Networks.......................7 1.2 Seven Key Design Goals..........................8 1.3 Organization of this Paper......................... 19 2 Security Model and Goals 19 2.1 Current Architectural Model........................ 20 2.2 Consensus Assumptions.......................... 20 2.3 Notation................................... 22 2.4 Note on Trust Models........................... 22 3 Decentralized Oracle Network Interface and Capabilities 23 3.1 Networking................................. 24 3.2 Computation................................ 25 3.3 Storage.................................... 27 3.4 Transaction-Execution Framework (TEF)................. 27 3.5 Mempool Services.............................. 28 3.6 Stepping Stones: Existing Chainlink Capabilities............. 29 3.6.1 Off-Chain Reporting (OCR).................... 29 3.6.2 DECO and Town Crier....................... 30 3.6.3 Existing On-Chain Chainlink Services............... 31 3.6.4 Node Reputation / Performance History............. 33 4 Decentralized Services Enabled by Decentralized Oracle Networks 34 4.1 Proof of Reserves.............................. 35 4.2 Interfacing with Enterprise / Legacy Systems.............. 35 4.3 Decentralized Identity........................... 36 4.4 Priority Channels.............................. 39 4.5 Confidentiality-Preserving DeFi / Mixicles................ 41 5 Fair Sequencing Services 43 5.1 The Front-Running Problem........................ 45 5.1.1 Oracle Front-Running....................... 45 5.1.2 Front-Running User Transactions................. 47 5.2 FSS Details................................. 48 5.2.1 Transaction Processing....................... 48 5.2.2 Transaction Atomicity....................... 51 5.3 Fair Transaction Sequencing........................ 53 5.4 Network-Layer Considerations....................... 56 5.5 Entity-Level Fairness Policies....................... 57 3 6 The DON Transaction-Execution Framework (DON-TEF) 57 6.1 TEF Overview............................... 58 6.2 Transaction Routing............................ 60 6.3 Syncing................................... 61 6.4 Reorgs.................................... 64 7 Trust Minimization 65 7.1 Data-Source Authentication........................ 65 7.1.1 The Limitations of Authenticated Data Origination....... 67 7.1.2 Confidentiality........................... 67 7.1.3 Combining Source Data...................... 68 7.1.4 Processing Source Data....................... 69 7.2 DON Trust Minimization.......................... 70 7.2.1 Failover Clients........................... 70 7.2.2 Minority Reports.......................... 70 7.3 Guard Rails................................. 71 7.4 Trust-Minimized Governance........................ 72 7.5 Public-Key Infrastructure......................... 73 8 DON Deployment Considerations 75 8.1 Rollout Approach.............................. 76 8.2 Dynamic DON Membership........................ 76 8.3 DON Accountability............................ 77 9 Economics and Cryptoeconomics 78 9.1 Staking Overview.............................. 81 9.2 Background................................. 83 9.3 Modeling Assumptions........................... 84 9.3.1 First-Tier Incentive Model: Rational Actors........... 85 9.3.2 Second-Tier Adjudication Model: Correctness by Assumption. 85 9.3.3 Adversarial Model......................... 86 9.3.4 How Much Cryptoeconomic Security Is Enough?......... 87 9.4 Staking Mechanism: Sketch........................ 87 9.4.1 Further Mechanism Details..................... 89 9.4.2 Quadratic Staking Impact..................... 90 9.4.3 Realization of Second Tier..................... 91 9.4.4 Misreporting Insurance....................... 93 9.5 Single-Round Variant............................ 94 9.6 Implicit-Incentive Framework (IIF).................... 95 9.6.1 Future Fee Opportunity...................... 96 9.6.2 Speculative FFO.......................... 97 9.6.3 External Reputation........................ 98 4 9.6.4 Open IIF Analytics......................... 98 9.7 Putting It All Together: Node Operator Incentives........... 99 9.8 The Virtuous Cycle of Economic Security................. 100 9.9 Additional Factors Driving Network Growth............... 101 10 Conclusion 102 A Glossary 116 B DON Interface: Further Details 119 B.1 Networking................................. 119 B.1.1 Integrity............................... 120 B.1.2 Confidentiality........................... 121 B.1.3 Availability............................. 122 B.2 Computation................................ 122 B.2.1 Trusted Execution Environments (TEEs)............. 122 B.2.2 TEE Security............................ 123 B.2.3 Secure Multi-Party Computation (MPC)............. 124 B.3 Storage.................................... 125 B.4 Resource Pricing.............................. 125 C Adapter Examples 126 C.1 Oracle-Mediated Data-Source Access (MediatedReport)......... 126 C.2 Cross-Ledger Reports (XL-Report-Read).................. 127 C.3 Confidential Switch (ConfSwitch)..................... 128 D Functional Signatures 129 D.1 Functional Signatures for Combining Data................ 130 D.2 Discretized Functional Signatures..................... 130 E Prospective Bribery 134 F Random vs. Committee-Based Oracle Selection 135 5 1 Introduction Blockchain oracles are often viewed today as decentralized services with one objective: to forward data from off-chain resources onto blockchains. It’s a short step, though, from forwarding data to computing on it, storing it, or transmitting it bidirection- ally.