Chainlink 백서

Chainlink

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 19쪽 중 2쪽

ss secure against miner / validator manipulation, etc. For smart contracts to realize their full potential therefore requires smart contracts to be architected with two parts: an on-chain part (which we typically denote by SC) and an off-chain part, an executable running on a DON (which we typically denote by exec). The goal is to achieve a secure composition of on-chain functionality with the multiplicity of off-chain services that DONs aim to provide. Together, the two parts make up a hybrid contract. We present the idea conceptually in Fig. 2. Already today, Chainlink services 3 such as data feeds and VRFs are enabling otherwise unachievable smart contract applications, ranging from DeFi to fairly generated NFTs to decentral- ized insurance, as first steps toward a more general framework. As Chainlink services expand and grow more performant according to our vision in this whitepaper, so too will the power of smart contract systems across all blockchains. Our other six key focuses in this whitepaper may be viewed as acting in the service of the first, overarching one of hybrid contracts. These focuses involve removing visible complexity from hybrid contracts, creating additional off-chain services that enable the construction of ever more capable hybrid contracts, and, in the case of trust minimiza- tion, bolstering the security properties achieved by hybrid contracts. We leave the idea of hybrid contracts implicit throughout much of the paper, but any combination of MAINCHAIN logic with a DON may be viewed as a hybrid contract. Abstracting away complexity: DONs are designed to make use of decentralized systems easy for developers and users by abstracting away the often complex machinery behind DONs’ powerful and flexible array of services. Existing Chainlink services already have this feature. For example, data feeds in Chainlink today present on- chain interfaces that do not require developers to concern themselves with protocol- level details, such as the means by which OCR enforces consensus reporting among a 2The idea of on-chain / off-chain contract composition has arisen previously in various constrained forms, e.g., layer-2 systems, TEE-based blockchains [80], etc. Our goal is to support and generalize these approaches and ensure that they can encompass off-chain data access and other key oracle services. 3Chainlink services comprise a variety of decentralized services and functionality available through the network. They are offered by the numerous node operators composed into various oracle networks across the ecosystem. 9 Figure 2: Conceptual figure depicting on-chain / off-chain contract composition. A hybrid smart contract 3© consists of two complementary components: an on-chain component SC 1©, resident on a blockchain, and an off-chain component exec 2© that executes on a DON. The DON serves as a bridge between the two components as well as connecting the hybrid contract with off-chain resources such as web services, other blockchains, decentralized storage, etc. decentralized set of nodes. DONs go a step further in the sense that they expand the range of services for which Chainlink can offer developers an abstraction layer with accompanying streamlined interfaces for high-level services. We present several application examples in Section 4 that highlight this approach. We envision enterprises, for instance, using DONs as a form of secure middleware to connect their legacy systems to blockchains. (See Section 4.2.) This use of DONs ab- stracts away the complexity of general blockchain dynamics (fees, reorgs, etc.). It also abstracts away the features of specific blockchains, thereby enabling enterprises to con- nect their existing systems to an ever-broadening array of blockchain systems without a need for specialized expertise in these systems or, more generally, in decentralized- systems development. Ultimately, our ambition is to push the degree of abstraction achieved by Chainlink to the point of implementing what we refer to as adecentralized metalayer. Such a layer would abstract away the on-chain / off-chain distinction for all classes of developers and users of DApps, allowing seamless creation and use of decentralized services. 10 To simplify the development process, developers could specify DApp functional- ity in the metalayer as a virtual application in a unified machine model. They could then use a decentralized-metalayer compiler to instantiate the DApp automatically as a set of interoperating decentralized functionalities spanning blockchains, DONs, and external services. (One of these external services could be an enterprise system, mak- ing the metalayer useful for applications involving legacy enterprise systems.) Such compilation is akin to how modern compilers and software-development kits (SDKs) support generalist programmers in using the full potential of heterogeneous hardware architectures consisting of a general-purpose CPU and specialized hardware like GPUs, machine-learning accelerators, or trusted enclaves. Fig. 3 presents this idea at a con- ceptual level. Hybrid smart contracts are a first step along the way to this vision and to a con- cept we call meta contracts. Meta contracts are applications coded on a decentralized metalayer and implicitly encompass on-chain logic (smart contracts), as well as off- chain computation and connectivity among various blockchains and existing off-chain services. Given the need for language and compiler support, new security models, and conceptual and technical harmonization of disparate technologies, however, realization of a true decentralized metalayer is an ambitious goal to which we aspire over a long time horizon. It is nonetheless a helpful ideal model to keep in mind while reading this paper, not detailed here, but something we plan to focus on in our future work on Chainlink. Scaling: A goal of preeminent importance in our evolving designs is enabling the Chainlink network to meet the growing scaling needs of the blockchain ecosystem. With network congestion becoming a recurring problem in existing permissionless blockchains [86], new and more performant blockchain designs are coming into use, e.g., [103, 120, 203], as well as complementary layer-2 scaling technologies, e.g., [5, 12, 121, 141, 169, 186, 187]. Oracle services must achieve latencies and throughputs that meet the performance demands of these systems while minimizing on-chain fees (e.g., gas costs) for contract operators and ordinary users alike. With DONs, Chainlink functionality aims to go further and deliver performance high enough for purely web- based systems. DONs derive much of their performance gain from their use of fast, committee- based or permissionless consensus protocols, which they combine with the blockchains they support. We expect many DONs with different configurations to run in paral- lel; different DApps and users can navigate tradeoffs in underlying consensus choices according to their application requirements. DONs may be viewed in effect as layer-2 technologies. We expect that among other services, DONs will support the Transaction Execution Framework(TEF), which facilitates efficient integration of DONs and thus oracles with other high-performance layer-2 systems—e.g., rollups, systems which bundle transactions off chain to achieve performance improvements. We introduce the TEF in Section 6. 11 Figure 3: Conceptual figure showing ideal realization of a decentralized metalayer. For ease of development, a developer specifies a DApp, highlighted in pink, as a virtual application in a unified machine model. A decentralized-metalayer compiler automati- cally generates corresponding interoperating functionalities: smart contracts (denoted by SC), logic (denoted by exec) on DONs, adapters connecting to target external ser- vices, and so forth, as indicated in yellow highlight. Fig. 4 shows conceptually how DONs improve blockchain (smart contract) scaling by concentrating transaction and oracle-report processing off chain, rather than on chain. This shift in the main locus of computation reduces transaction latency and fees while boosting transaction throughput. Confidentiality: Blockchains provide unprecedented transparency for smart con- tracts and the applications they realize. But there is a basic tension between trans- parency and confidentiality. Today, for example, users’ decentralized exchange trans- 12 Figure 4: Conceptual figure showing how Decentralized Oracle Networks improve the scaling of blockchain-enabled smart contracts. Figure A© shows a conventional oracle architecture. Transactions are sent directly to the blockchain, as are oracle reports. Thus the blockchain, highlighted in yellow, is the main locus for transaction process- ing. Figure B© shows use of a DON to support contracts on the blockchain. A DON executable processes transactions along with data from external systems and forwards results—e.g., bundled transactions or contract state changes resulting from the trans- actions’ effects—to the blockchain. The DON, highlighted in yellow, is thus the main locus for transaction processing. actions are recorded on chain, making it easy to monitor exchange behavior, but also making users’ financial transactions publicly visible. Similarly, data relayed to smart contracts remains on chain. This makes such data conveniently auditable, but acts as a disincentive for data providers wishing to furnish smart contracts with sensitive or proprietary data. We believe that oracle networks will play a pivotal role in catalyzing next-generation systems that combine blockchains’ innate transparency with new confidentiality pro- tections. In this paper, we show how they will do so using three main approaches: • Confidentiality-preserving adapters: Two technologies with planned deployment in Chainlink’s networks, DECO [234] and Town Crier [233], enable oracle nodes to retrieve data from off-chain systems in ways that protect user privacy and data confidentiality. They will play a key role in the design of adapters for DONs. (See Section 3.6.2 for details on these two technologies.) • Confidential computation: DONs can simply conceal their computation from re- lying blockchains. Using secure multi-party computation and/or trusted execu- tion environments, stronger confidentiality is also possible in which DON nodes compute over data into which they themselves do not have visibility. 13 • Support for confidential layer-2 systems: The TEF is designed to support a va- riety of layer-2 systems, many of which use zero-knowledge proofs to provide various forms of transaction confidentiality. We discuss these approaches in Section 3 (with additional details in Section 6, Ap- pendix B.1, and Appendix B.2). Fig. 5 presents a conceptual view of how sensitive data might flow from exter- nal sources to a smart contract by means of confidentiality-preserving adapters and confidential computation in a DON. Figure 5: Conceptual diagram of confidentiality-preserving operations in a DON on sensitive data (highlighted in yellow). Sensitive source data (black circles) in web servers is extracted to the DON using confidentiality-preserving adapters (blue, double- arrowed lines). The DON receives derived data (hollow circles) from these adapters— the result of applying either a function or, e.g., secret-sharing, to the sensitive source data. An executable on the DON may apply confidential computation to derived data to construct a report (double circle), which it sends over an adapter to the blockchain. We believe that powerful tools for handling confidential data will open up a whole range of applications. Among these are private decentralized (and centralized) fi- nance, decentralized identity, credit-based on-chain lending, and more efficient and user-friendly know-your-customer and accreditation protocols, as we discuss in Sec- tion 4. Order-fairness for transactions: Today’s blockchain designs have a dirty little open secret: They are ephemerally centralized. Miners and validators can order trans- 14 actions however they choose. Transaction order can also be manipulated by users as a function of the network fees they pay (e.g., gas prices in Ethereum) and to some extent by taking advantage of fast network connections. Such manipulation can, for example, take the form of front-running, in which a strategic actor such as a miner observes a user’s transaction and inserts its own exploitative transaction into an earlier position in the same block—effectively stealing money from the user by leveraging ad- vance knowledge of the user’s transaction. For example, a bot may place a buy order before a user’s. It can then take advantage of the asset price increase induced by the user’s trade. Front-running by some bots that harms ordinary users—analogous to high-frequency trading on Wall Street—is already prevalent and well documented [90], as are related attacks such as back-running [159] and automated transaction mimicking [195]. Pro- posals to systematize order exploitation by miners have even surfaced recently [110]. Layer-2 technologies such as rollups don’t solve the problem, but merelyre-centralize ordering, placing it in the hands of the entity that creates a rollup. One of our goals is to introduce into Chainlink a service called Fair Sequencing Services (FSS) [137]. FSS helps smart contract designers ensure fair ordering for their transactions and avoid front-running, back-running, and related attacks on user trans- actions as well as other types of transactions, such as oracle report transmission. FSS enables a DON to implement ideas such as the rigorous, temporal notion of order- fairness introduced in [144]. As an incidental benefit, FSS can alsolower users’ network fees (e.g., gas costs). Briefly, in FSS, transactions pass through the DON, rather than propagating di- rectly to a target smart contract. The DON orders the transactions and then forwards them to the contract. Figure 6: Example of how FSS is beneficial. Fig. A© shows how a miner, exploiting its centralized power to order transactions, may swap a pair of transactions: transaction 1© arrives before 2©, but the miner instead sequences it after 2©. In contrast, Fig. B© shows how a DON decentralizes the ordering process among DON nodes. If a quorum of honest nodes receive 1© before 2©, the FSS causes 1© to appear before 2© on chain— preventing miner reordering by attaching contract-enforceable sequence numbers. Fig. 6 compares standard mining with FSS. It shows how in standard mining, 15 the process of transaction ordering is centralized with the miner and thus subject to manipulation, such as reordering a pair of transactions with respect to their arrival times. In contrast, in FSS, the process is decentralized among DON nodes. Assuming a quorum of honest nodes, FSS helps enforce policies such as temporal ordering of transactions, reducing opportunities for manipulation by miners and other entities. Additionally, since users need not compete for preferential ordering based on gas price, they can pay relatively low gas prices (while transactions from the DON can be batched for gas savings). Trust minimization: Our general aim in the design of DONs is to facilitate a highly trustworthy layer of support for smart contracts and other oracle-dependent systems by means of decentralization, cryptographic tools, and cryptoeconomic guarantees. A DON itself is decentralized, and users can choose from any available DON that supports the main chain on which they wish to operate or spawn additional DONs with committees of nodes they trust. For some applications, however, particularly smart contracts, Chainlink users may favor a trust model that treats the main chain supported by a DON as more trustworthy than the DON itself. For such users, we already have or plan to incorporate into the architecture of the Chainlink network a number of mechanisms that enable contracts on a main chain to strengthen the security assurances provided by DONs, while at the same time also enforcing protections against the possibility of corrupted data sources such as the web servers from which the DON obtains data. We describe these mechanisms in Section 7. They fall under five main headings: • Data-source authentication: Tools that enable data providers to digitally sign their data and thereby strengthen the chain of custody between the origin and relying contract. • DON minority reports: Flags issued by a minority subset of DON nodes that observes majority malfeasance in the DON. • Guard rails: Logic on a main chain that detects anomalous conditions and pauses or halts contract execution (or invokes other remediations). • Trust-minimized governance: Use of gradual-release updates to facilitate com- munity inspection, as well as decentralized emergency interventions for rapid response to system failures. • Decentralized entity authentication: Use of public-key infrastructure (PKI) to identify entities in the Chainlink network. Fig. 7 presents a conceptual schematic of our trust-minimization goals. Incentive-based (cryptoeconomic) security: Decentralization of report genera- tion across oracle nodes helps ensure security even when some nodes are corrupted. 16 Figure 7: Conceptual depiction of Chainlink’s trust-minimization goal, which is to minimize users’ need for correct behavior of the DON and data sources such as web servers. Yellow highlights in the figure indicate trust-minimization loci: the DON and individual or minority sets of web servers. Pink highlights indicate system components that are highly trustworthy by assumption: contracts on the blockchain and a majority of web servers, i.e., web servers in the aggregate. Equally important, though, is ensuring that nodes have a financial incentive to be- have correctly. Staking, i.e., requiring nodes to provide deposits of LINK and slashing (confiscating) these deposits in case of misbehavior, will play a key role in Chain- link. It is an important incentive design already used in a number of blockchains, e.g., [81, 103, 120, 204]. Staking in Chainlink, however, looks very different from staking in standalone blockchains. Staking in blockchains aims to prevent attacks on consensus. It has a different goal in Chainlink: to ensure timely delivery of correct oracle reports. A well- designed staking system for an oracle network should render attacks such as bribery unprofitable for an adversary, even when the target is a smart contract with high monetary value. In this paper, we present a general approach to staking in Chainlink with three key innovations: 17 1. A powerful adversarial model that encompasses attacks overlooked in existing approaches. One example is what we call prospective bribery. This is a form of bribery that determines which nodes receive bribes on a conditional basis, e.g., offers guaranteed bribes in advance to nodes that a staking mechanism selects at random for particular roles (such as triggering report adjudication). 2. Super-linear staking impact , meaning informally that to be successful, an ad- versary must have a budget $ B greater than the combined deposits of all oracle nodes. More precisely, we mean that as a function of n, $B(n)≫ $dn in a network of n oracle nodes each with a fixed deposit amount $ d (more formally, $B(n) is asymptotically larger in n than $dn). Fig. 8 gives a conceptual view of this property. 3. The Implicit-Incentive Framework (IIF), an incentive model we have devised to encompass empirically measurable incentives beyond explicit deposited staking funds, including nodes’ future fee opportunities . The IIF extends the notion of stake beyond explicit node deposits. Figure 8: Conceptual diagram depicting super-linear scaling in Chainlink staking. The bribe $B(n) required by an adversary grows faster in n than the combined deposits $dn of all oracle nodes. We show how the IIF and super-linear staking impact together induce what we call a virtuous cycle of economic security for oracle networks. When
프로젝트로 돌아가기