Chainlink: شبكة أوراكل اللامركزية

Chainlink 2.0: Next Steps in the Evolution of Decentralized Oracle Networks

저자 Steve Ellis, Ari Juels and Sergey Nazarov · 2017

Abstract

Abstract

In this whitepaper, we articulate a vision for the evolution of Chainlink beyond its initial conception in the original Chainlink whitepaper. We foresee an increasingly expansive role for oracle networks, one in which they complement 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 augmenting 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 decentralization, strong anchoring in high-security blockchains, cryptographic techniques, and cryptoeconomic guarantees. • Incentive-based (cryptoeconomic) security: Rigorously designing and robustly deploying mechanisms that ensure nodes in DONs have strong economic incentives to behave reliably and correctly, even in the face of wellresourced 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.

خلاصة

في هذا المستند التقني، نوضح رؤية لتطور Chainlink بما يتجاوز تصوره الأولي في المستند التقني Chainlink الأصلي. نحن نتوقع دور متزايد التوسع لشبكات oracle، وهو الدور الذي تكمل فيه وتعزز شبكات blockchain الحالية والجديدة من خلال توفير خدمات سريعة وموثوقة ومفيدة السرية - الحفاظ على الاتصال العالمي والحساب خارج السلسلة لـ smart contracts. أساس خطتنا هو ما نسميه شبكات أوراكل اللامركزية، أو DONs للاختصار. DON هي شبكة تتم صيانتها بواسطة لجنة مكونة من Chainlink العقد. وهو يدعم أي نطاق غير محدود من وظائف oracle المختارة النشر من قبل اللجنة. وبالتالي فإن DON بمثابة طبقة تجريد قوية، تقديم واجهات لـ smart contracts لموارد واسعة النطاق خارج السلسلة وبدرجة عالية موارد حوسبة فعالة وغير مركزية خارج السلسلة داخل DON نفسها. باستخدام DONs كنقطة انطلاق، تخطط Chainlink للتركيز على التقدم في سبعة المجالات الرئيسية: • smart contracts المختلط: تقديم إطار عام قوي لزيادة إمكانات smart contract الحالية من خلال الإنشاء الآمن على السلسلة وموارد الحوسبة خارج السلسلة إلى ما نسميه smart contracts الهجين. • التخلص من التعقيد: تقديم معلومات بسيطة للمطورين والمستخدمين تلغي الوظيفة الحاجة إلى الإلمام بالأساسيات المعقدة البروتوكولات وحدود النظام. • القياس: التأكد من أن خدمات oracle تحقق زمن الاستجابة والإنتاجية التي تتطلبها الأنظمة اللامركزية عالية الأداء. • السرية: تمكين أنظمة الجيل التالي التي تجمع بين blockchains' الشفافية الفطرية مع حماية قوية جديدة لسرية الأشخاص الحساسين data. • عدالة ترتيب المعاملات: دعم تسلسل المعاملات بطرق مختلفة التي تكون عادلة للمستخدمين النهائيين وتمنع الهجمات الأمامية والهجمات الأخرى الروبوتات وعمال المناجم الاستغلاليين. • تقليل الثقة: إنشاء طبقة دعم جديرة بالثقة للغاية smart contracts والأنظمة الأخرى التي تعتمد على oracle عن طريق اللامركزية، والتثبيت القوي في blockchains عالية الأمان، والتشفير التقنيات والضمانات الاقتصادية المشفرة. • الأمن القائم على الحوافز (الاقتصاد المشفر): التصميم الصارم والنشر القوي للآليات التي تضمن أن العقد في DON لديها حوافز اقتصادية قوية للتصرف بشكل موثوق وصحيح، حتى في مواجهة الخصوم ذوي الموارد الجيدة. نقدم ابتكارات أولية ومستمرة من قبل مجتمع Chainlink في كل من هذه المجالات، مما يوفر صورة للتوسع وبشكل متزايد الإمكانات القوية المخطط لها لشبكة Chainlink.

Introduction

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 bidirectionally. This observation justifies a much broader notion of oracles’ functionality. So too do the growing service requirements of smart contracts and increasingly multifaceted technologies that rely on oracle networks. In short, an oracle can and will need to be a general-purpose, bidirectional, compute-enabled interface between and among onchain and off-chain systems. Oracles’ role in the blockchain ecosystem is to enhance the performance, functionality, and interoperability of smart contracts so that they can bring new trust models and transparency to a multiplicity of industries. This transformation will come about through broadening use of hybrid smart contracts, which fuse blockchains’ special properties with the unique capabilities of off-chain systems such as oracle networks and thereby achieve far greater reach and power than on-chain systems in isolation. In this whitepaper, we articulate a vision for what we call Chainlink 2.0, an evolution of Chainlink beyond its initial conception in the original Chainlink whitepaper [98]. We foresee an increasingly expansive role for oracle networks, one in which they complement and enhance existing and new blockchains by providing fast, reliable, and confidentiality-preserving universal connectivity and computation for hybrid smart contracts. We believe that oracle networks will even evolve to become utilities for exporting high-integrity blockchain-grade data to systems beyond the blockchain ecosystem. Today, Chainlink nodes run by a diverse set of entities come together in oracle networks to relay data to smart contracts in what are known as reports. We can view such oracle nodes as a committee similar to that in a classical-consensus blockchain [72], but with the goal of supporting existing blockchains, rather than providing freestanding functionality. With verifiable random functions (VRF) and Off-Chain Reporting (OCR), Chainlink is already evolving toward a general-purpose framework and infrastructure for providing the computational resources that smart contracts require for advanced functionality. The foundation of our plan for Chainlink 2.0 is what we call Decentralized Oracle Networks, or DONs for short. Since we introduced the term “oracle network” in the original Chainlink whitepaper [98], oracles have developed ever richer functionality and breadth of application. In this paper, we offer a fresh definition of the term according to our future vision for the Chainlink ecosystem. In this view, a DON is a network maintained by a committee of Chainlink nodes. Rooted in a consensus protocol, it supports any of an unlimited range of oracle functions chosen for deployment by the committee. A DON thus acts as a blockchain abstraction layer, providing interfaces to off-chain resources for both smart contracts and other systems. It also provides access to highly efficient yet decentralized off-chain computing resources. In general, a DON supports operations on a main chain. Its goal is to enable secure and flexi-

ble hybrid smart contracts, which combine on-chain and off-chain computation with connection to external resources. We emphasize that even with the use of committees in DONs, Chainlink itself remains inherently permissionless. DONs act as the foundation of a permissionless framework in which nodes can come together to implement custom oracle networks with their own regimes for node inclusion, which may be permissioned or permissionless. With DONs as a foundation, we plan to focus in Chainlink 2.0 on advances in seven key areas: hybrid smart contracts, abstracting away complexity, scaling, confidentiality, order-fairness for transactions, trust minimization, and incentive-based (cryptoeconomic) security. In this paper introduction, we present an overview of Decentralized Oracle Networks in Section 1.1 and then our seven key areas of innovation in Section 1.2. We describe the organization of the rest of this paper in Section 1.3. 1.1 Decentralized Oracle Networks Decentralized Oracle Networks are designed to enhance and extend the capabilities of smart contracts on a target blockchain or main chain through functions that are not available natively. They do so by providing the three basic resources found in computing systems: networking, storage, and computation. A DON aims to offer these resources with strong confidentiality, integrity, and availability properties,1 as well as accountability. DONs are formed by committees of oracle nodes that cooperate to fulfill a specific job or choose to establish a long-lived relationship in order to provide persistent services to clients. DONs are designed in a blockchain-agnostic way. They promise to serve as a powerful and flexible tool for application developers to create off-chain support for their smart contracts on any supported main chain. Two types of functionalities realize the capabilities of a DON: executables and adapters. Executables are programs that run continuously and in a decentralized manner on the DON. While they do not directly store main-chain assets, they have important benefits, including high performance and the ability to perform confidential computation. Executables run autonomously on a DON and perform deterministic operations. They work in hand with adapters that link the DON to external resources and may be called by executables. Adapters, as we envision them for DONs, are a generalization of the external adapters in Chainlink today. While existing adapters typically only fetch data from data sources, adapters may operate bidirectionally; in DONs, they may additionally leverage joint computation by DON nodes to achieve additional features, such as encrypting reports for privacy-preserving consumption by an executable. To provide a sense of a DON’s basic operation, Fig. 1 shows conceptually how a DON might be used to send reports to a blockchain and thus achieve traditional, existing oracle functionality. DONs can provide many additional features, however, beyond 1The “CIA triad” of information security [123, p. 26, §2.3.5].

Conceptual figure showing how a Decentralized Oracle Network can realize basic oracle functionality by relaying off-chain data to a contract

Chainlink’s existing networks. For example, within the general structure of Fig. 1, the executable could record fetched asset-price data on the DON, using such data to compute, e.g., a trailing average for its reports. Figure 1: Conceptual figure showing as an example how a Decentralized Oracle Network can realize basic oracle functionality, i.e., relay off-chain data to a contract. An executable uses adapters to fetch off-chain data, which it computes on, sending output over another adapter to a target blockchain. (Adapters are initiated by code in the DON, represented by small blue boxes; arrows show the direction of data flow for this particular example.) The executable can additionally read and write to local DON storage to keep state and/or communicate with other executables. Flexible networking, computation, and storage in DONs, all represented here, enable a host of novel applications. A major benefit of DONs is their ability to bootstrap new blockchain services. DONs are a vehicle by which existing oracle networks can quickly stand up service applications that would today require the creation of purpose-built networks. We give a number of examples of such applications in Section 4. In Section 3, we provide more details on DONs, describing their capabilities in terms of the interface they present to developers and users. 1.2 Seven Key Design Goals Here we briefly review the seven key focuses enumerated above for the evolution of Chainlink, namely:

Hybrid smart contracts: Central to our vision for Chainlink is the idea of securely combining on-chain and off-chain components in smart contracts. We refer to contracts realizing this idea as hybrid smart contracts or hybrid contracts.2 Blockchains are and will continue to play two critical roles in decentralized-service ecosystems: They are both the loci where cryptocurrency ownership is represented and robust anchors for decentralized services. Smart contracts must therefore be represented or executed on chain, but their on-chain capabilities are severely limited. Purely on-chain contract code is slow, expensive, and insular, unable to benefit from real-world data and a variety of functionalities that are inherently unachievable on chain, including various forms of confidential computation, generation of (pseudo)randomness 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 services3 such as data feeds and VRFs are enabling otherwise unachievable smart contract applications, ranging from DeFi to fairly generated NFTs to decentralized 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 minimization, 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 onchain interfaces that do not require developers to concern themselves with protocollevel 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.

Conceptual figure depicting on-chain and off-chain contract composition in a hybrid smart contract architecture

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 abstracts away the complexity of general blockchain dynamics (fees, reorgs, etc.). It also abstracts away the features of specific blockchains, thereby enabling enterprises to connect their existing systems to an ever-broadening array of blockchain systems without a need for specialized expertise in these systems or, more generally, in decentralizedsystems development. Ultimately, our ambition is to push the degree of abstraction achieved by Chainlink to the point of implementing what we refer to as a decentralized 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.

To simplify the development process, developers could specify DApp functionality 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, making 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 conceptual level. Hybrid smart contracts are a first step along the way to this vision and to a concept we call meta contracts. Meta contracts are applications coded on a decentralized metalayer and implicitly encompass on-chain logic (smart contracts), as well as offchain 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 webbased systems. DONs derive much of their performance gain from their use of fast, committeebased or permissionless consensus protocols, which they combine with the blockchains they support. We expect many DONs with different configurations to run in parallel; 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 offchain to achieve performance improvements. We introduce the TEF in Section 6.

Conceptual figure showing ideal realization of a decentralized metalayer that abstracts blockchain and DON complexity

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 automatically generates corresponding interoperating functionalities: smart contracts (denoted by SC), logic (denoted by exec) on DONs, adapters connecting to target external services, 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 offchain, 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 contracts and the applications they realize. But there is a basic tension between transparency and confidentiality. Today, for example, users’ decentralized exchange trans-

Conceptual figure showing how DONs improve blockchain smart contract scaling by moving computation off-chain

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 processing. 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 transactions’ 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 protections. 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 relying blockchains. Using secure multi-party computation and/or trusted execution environments, stronger confidentiality is also possible in which DON nodes compute over data into which they themselves do not have visibility.

Conceptual diagram of confidentiality-preserving operations in a DON processing sensitive data through adapters

• Support for confidential layer-2 systems: The TEF is designed to support a variety 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, Appendix B.1, and Appendix B.2). Fig. 5 presents a conceptual view of how sensitive data might flow from external 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, doublearrowed 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) finance, decentralized identity, credit-based on-chain lending, and more efficient and user-friendly know-your-customer and accreditation protocols, as we discuss in Section 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-

Example comparing standard mining with Fair Sequencing Services showing how FSS prevents transaction reordering

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 advance 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]. Proposals to systematize order exploitation by miners have even surfaced recently [110]. Layer-2 technologies such as rollups don’t solve the problem, but merely re-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 transactions 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 orderfairness introduced in [144]. As an incidental benefit, FSS can also lower users’ network fees (e.g., gas costs). Briefly, in FSS, transactions pass through the DON, rather than propagating directly 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,

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 community 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 generation across oracle nodes helps ensure security even when some nodes are corrupted.

Conceptual depiction of Chainlink trust-minimization goal showing DON and data source trust loci

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 behave 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 Chainlink. 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 welldesigned 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:

Conceptual diagram depicting super-linear scaling in Chainlink staking where briber cost grows faster than combined node deposits

  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 adversary 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 new users enter

the system, increasing potential future earnings from running Chainlink nodes, the marginal cost of economic security drops for current and future users. In a regime of elastic demand, this diminished cost incentivizes additional users to make use of the network, continuously perpetuating adoption in an ongoing virtuous cycle. Note: While this whitepaper outlines important elements of our vision for the evolution of Chainlink, it is informal and includes few detailed technical specifics. We plan to release focused technical papers on additional features and approaches as they evolve. Furthermore, it is important to emphasize that many elements of the vision presented here (scaling improvements, confidentiality technologies, FSS, etc.) can and will be deployed in preliminary form even before advanced DONs become a basic feature of Chainlink. 1.3 Organization of this Paper We present our security model and notation in Section 2 and outline the Decentralized Oracle Network API in Section 3. In Section 4, we present a number of examples of applications for which DONs provide an appealing deployment platform. Readers can learn most of the key concepts of the paper by reading up to this point. The remainder of the paper contains further details. We describe Fair Sequencing Services (FSS) in Section 5 and the Transaction-Execution Framework (TEF) in Section 6. We describe our approach to trust minimization in Section 7. We consider some important DON deployment requirements, namely incremental rollout of features, dynamic ledger membership, and accountability in Section 8. Finally, in Section 9, we give an overview of our developing approach to incentive design. We conclude in Section 10. To help readers who have limited familiarity with the concepts in this paper, we provide a glossary in Appendix A. We present further detail on the DON interface and functionality in Appendix B and present some example adapters in Appendix C. In Appendix D, we describe a cryptographic primitive for trust-minimized data-source authentication called functional signatures and introduce a new variant called discretized functional signatures. We discuss some considerations bearing on committee selection for DONs in Appendix F.

مقدمة

Conceptual figure showing how a Decentralized Oracle Network can realize basic oracle functionality by relaying off-chain data to a contract

غالبًا ما يُنظر إلى Blockchain oracles اليوم على أنها خدمات لا مركزية ذات هدف واحد: لإعادة توجيه البيانات من الموارد خارج السلسلة إلى blockchains. إنها خطوة قصيرة، على أية حال، من إعادة توجيه البيانات إلى الحوسبة عليها أو تخزينها أو نقلها ثنائي الاتجاه. تبرر هذه الملاحظة فكرة أوسع بكثير عن وظائف oracles. كذلك أيضا تلبية متطلبات الخدمة المتزايدة لـ smart contracts والمتعددة الأوجه بشكل متزايد التقنيات التي تعتمد على شبكات oracle. باختصار، يمكن لـ oracle أن تفعل ذلك وسوف تحتاج إلى ذلك أن تكون واجهة ذات أغراض عامة وثنائية الاتجاه وممكّنة للحوسبة بين الأنظمة onchain والأنظمة خارج السلسلة. يتمثل دور Oracles في النظام البيئي blockchain في التحسين الأداء والوظائف وقابلية التشغيل التفاعلي لـ smart contracts حتى يتمكنوا من ذلك جلب نماذج ثقة جديدة وشفافية إلى العديد من الصناعات. سيأتي هذا التحول من خلال توسيع استخدام smart contracts الهجين، الذي يندمج خصائص blockchains الخاصة مع الإمكانات الفريدة للأنظمة خارج السلسلة مثل oracle الشبكات وبالتالي تحقيق وصول وقوة أكبر بكثير من الأنظمة الموجودة على السلسلة في عزلة. في هذا المستند التقني، نوضح رؤية لما نطلق عليه Chainlink 2.0، وهو تطور لـ Chainlink يتجاوز تصوره الأولي في Chainlink المستند التقني الأصلي [98]. نتوقع دورًا موسعًا بشكل متزايد لشبكات oracle، وهو دور فيه إنها تكمل وتعزز blockchains الحالية والجديدة من خلال توفير اتصال وحساب عالمي سريع وموثوق به ويحافظ على السرية للأنظمة الهجينة smart contracts. نحن نعتقد أن شبكات oracle سوف تتطور لتصبح أدوات مساعدة لتصدير بيانات عالية التكامل من فئة blockchain إلى أنظمة تتجاوز blockchain النظام البيئي. اليوم، Chainlink العقد التي تديرها مجموعة متنوعة من الكيانات تجتمع معًا في شبكات oracle لنقل البيانات إلى smart contract فيما يعرف بالتقارير. يمكننا أن نرى مثل هذا oracle العقد كلجنة مماثلة لتلك الموجودة في الإجماع الكلاسيكي blockchain [72]، ولكن بهدف دعم blockchains الموجودة، بدلاً من توفير وظائف قائمة بذاتها. مع وظائف عشوائية يمكن التحقق منها (VRF) وإعداد التقارير خارج السلسلة (OCR)، Chainlink يتطور بالفعل نحو إطار عمل وبنية تحتية للأغراض العامة لتوفير الموارد الحسابية التي تتطلبها smart contracts وظائف متقدمة. أساس خطتنا لـ Chainlink 2.0 هو ما نسميه أوراكل اللامركزية الشبكات، أو DONs للاختصار. منذ أن قدمنا مصطلح "شبكة oracle" في لقد طورت Chainlink الوثيقة البيضاء [98]، oracles وظائف ووظائف أكثر ثراءً من أي وقت مضى اتساع التطبيق. وفي هذه المقالة، نقدم تعريفًا جديدًا للمصطلح وفقًا لرؤيتنا المستقبلية للنظام البيئي Chainlink. في طريقة العرض هذه، DON عبارة عن شبكة تحتفظ بها لجنة مكونة من Chainlink العقد. متجذر في بروتوكول الإجماع، فإنه يدعم أيًا من مجموعة غير محدودة من وظائف oracle المختارة للنشر بواسطة اللجنة. وبالتالي فإن DON بمثابة طبقة تجريد blockchain، مما يوفر واجهات إلى الموارد خارج السلسلة لكل من smart contracts والأنظمة الأخرى. كما يوفر الوصول إلى موارد الحوسبة خارج السلسلة عالية الكفاءة ولكن لامركزية. بشكل عام، DON يدعم العمليات على السلسلة الرئيسية. هدفها هو تمكين آمنة ومرنةبلي هجين smart contracts، والذي يجمع بين العمليات الحسابية على السلسلة وخارج السلسلة مع الاتصال بالموارد الخارجية. نؤكد أنه حتى مع استخدام اللجان في DONs، فإن Chainlink نفسها يبقى بطبيعته غير مسموح به. DONs بمثابة أساس غير مسموح به إطار عمل يمكن أن تجتمع فيه العقد معًا لتنفيذ شبكات oracle المخصصة أنظمتهم الخاصة لإدراج العقدة، والتي قد تكون مسموحة أو غير مسموح بها. مع DONs كأساس، نخطط للتركيز في Chainlink 2.0 على التقدم في سبعة المجالات الرئيسية: smart contracts الهجين، وتجريد التعقيد، والتوسع، والسرية، وعدالة ترتيب المعاملات، وتقليل الثقة، والأمن القائم على الحوافز (الاقتصاد المشفر). في هذه المقدمة، نقدم لمحة عامة عن اللامركزية شبكات Oracle في القسم 1.1 ثم مجالات الابتكار السبعة الرئيسية لدينا في القسم 1.2. وصفنا تنظيم بقية هذه الورقة في القسم 1.3. 1.1 شبكات أوراكل اللامركزية تم تصميم شبكات أوراكل اللامركزية لتعزيز القدرات وتوسيعها من smart contracts على الهدف blockchain أو السلسلة الرئيسية من خلال الوظائف التي غير متوفر محليا. يفعلون ذلك من خلال توفير الموارد الأساسية الثلاثة الموجودة في أنظمة الحوسبة: الشبكات والتخزين والحساب. يهدف DON إلى العرض تتمتع هذه الموارد بخصائص قوية تتعلق بالسرية والنزاهة والتوافر،1 كما فضلا عن المساءلة. يتم تشكيل DONs من قبل لجان مكونة من oracle العقد التي تتعاون لتحقيق هدف محدد وظيفة أو اختيار إقامة علاقة طويلة الأمد من أجل تقديم خدمات مستمرة للعملاء. تم تصميم DONs بطريقة blockchain بطريقة ملحدة. يعدون بالعمل أداة قوية ومرنة لمطوري التطبيقات لإنشاء دعم خارج السلسلة لـ smart contracts الخاصة بهم على أي سلسلة رئيسية مدعومة. هناك نوعان من الوظائف يدركان قدرات DON: الملفات التنفيذية و محولات. الملفات التنفيذية هي برامج يتم تشغيلها بشكل مستمر وبطريقة لا مركزية على DON. على الرغم من أنها لا تقوم بتخزين أصول السلسلة الرئيسية بشكل مباشر، إلا أنها تتمتع بفوائد مهمة، بما في ذلك الأداء العالي والقدرة على أداء عمليات سرية حساب. تعمل الملفات التنفيذية بشكل مستقل على DON وتؤدي أداءً حتميًا العمليات. وهي تعمل جنبًا إلى جنب مع المحولات التي تربط DON بالموارد الخارجية ويمكن استدعاؤها بواسطة الملفات التنفيذية. المحولات، كما نتصورها لـ DONs، هي أ تعميم المحولات الخارجية في Chainlink اليوم. بينما المحولات الموجودة عادةً ما يتم جلب البيانات من مصادر البيانات فقط، وقد تعمل المحولات بشكل ثنائي الاتجاه؛ في DONs، يمكنهم أيضًا الاستفادة من الحساب المشترك بواسطة DON العقد لتحقيقه ميزات إضافية، مثل تشفير التقارير للاستهلاك الذي يحافظ على الخصوصية قابل للتنفيذ. لتوفير فكرة عن العملية الأساسية لـ DON، يوضح الشكل 1 من الناحية النظرية كيف يمكن لـ DON أن يمكن استخدام DON لإرسال التقارير إلى blockchain وبالتالي تحقيق وظيفة oracle التقليدية الموجودة. ومع ذلك، يمكن أن يوفر DONs العديد من الميزات الإضافية 1"ثالوث وكالة المخابرات المركزية" لأمن المعلومات [123، ص. 26، §2.3.5].شبكات Chainlink الحالية. على سبيل المثال، ضمن الهيكل العام للشكل 1، يمكن للملف القابل للتنفيذ تسجيل بيانات أسعار الأصول التي تم جلبها على DON، باستخدام هذه البيانات حساب، على سبيل المثال، متوسط زائدة لتقاريرها. الشكل 1: شكل مفاهيمي يوضح كمثال كيف يمكن لشبكة Oracle اللامركزية تحقيق وظائف oracle الأساسية، أي ترحيل البيانات خارج السلسلة إلى العقد. ان يستخدم الملف القابل للتنفيذ محولات لجلب البيانات خارج السلسلة، والتي يحسب عليها، ويرسل المخرجات عبر محول آخر إلى الهدف blockchain. (يتم بدء تشغيل المحولات بواسطة التعليمات البرمجية الموجودة في ملف DON، ممثلة بمربعات زرقاء صغيرة؛ تظهر الأسهم اتجاه تدفق البيانات لهذا الغرض مثال محدد.) يمكن للملف القابل للتنفيذ أيضًا القراءة والكتابة إلى DON المحلي تخزين للحفاظ على الحالة و/أو التواصل مع الملفات التنفيذية الأخرى. تتيح الشبكات المرنة والحسابات والتخزين في DONs، كلها ممثلة هنا، مجموعة كبيرة من الروايات التطبيقات. تتمثل إحدى المزايا الرئيسية لـ DONs في قدرتها على تشغيل خدمات blockchain الجديدة. DONs هي وسيلة يمكن من خلالها لشبكات oracle الحالية أن تدعم تطبيقات الخدمة بسرعة وهذا يتطلب اليوم إنشاء شبكات مصممة لهذا الغرض. نعطي عددا من أمثلة على هذه التطبيقات في القسم 4. في القسم 3، نقدم المزيد من التفاصيل حول DONs، مع وصف قدراتها في شروط الواجهة التي يقدمونها للمطورين والمستخدمين. 1.2 سبعة أهداف التصميم الرئيسية نحن هنا نراجع بإيجاز النقاط الرئيسية السبعة المذكورة أعلاه لتطور Chainlink، وهي:الهجين smart contracts: من الأمور المركزية في رؤيتنا لـ Chainlink هي فكرة الأمان الجمع بين المكونات الموجودة على السلسلة وخارجها في smart contracts. نشير إلى العقود تحقيق هذه الفكرة على أنها smart contracts هجينة أو عقود هجينة.2 بلوكتشين ستستمر في لعب دورين حاسمين في الخدمة اللامركزية الأنظمة البيئية: كلاهما المكان الذي يتم فيه تمثيل ملكية العملة المشفرة ومرتكزات قوية للخدمات اللامركزية. ولذلك يجب تمثيل العقود الذكية أو تنفيذها على السلسلة، ولكن قدراتها على السلسلة محدودة للغاية. بحتة رمز العقد على السلسلة بطيء ومكلف ومنعزل وغير قادر على الاستفادة من العالم الحقيقي البيانات ومجموعة متنوعة من الوظائف التي لا يمكن تحقيقها بطبيعتها على السلسلة، بما في ذلك الأشكال المختلفة للحساب السري، وتوليد العشوائية (الزائفة) الآمنة ضد التلاعب بعامل المنجم / validator وما إلى ذلك. لكي يحقق smart contracts إمكاناتهم الكاملة، يتطلب الأمر smart contracts سيتم تصميمه من جزأين: جزء متصل بالسلسلة (والذي نشير إليه عادةً بـ SC) وجزء خارج السلسلة، وهو ملف قابل للتنفيذ يعمل على DON (والذي نشير إليه عادةً بـ تنفيذي). الهدف هو تحقيق تكوين آمن للوظائف الموجودة على السلسلة باستخدام تعدد الخدمات خارج السلسلة التي تهدف DON إلى توفيرها. معا، الجزأين تكوين عقد هجين. نقدم الفكرة من الناحية المفاهيمية في الشكل 2. واليوم بالفعل، Chainlink خدمات 3 مثل خلاصات البيانات وVRFs لا يمكن تحقيقها بأي طريقة أخرى smart contract التطبيقات، التي تتراوح من DeFi إلى NFTs التي تم إنشاؤها بشكل عادل إلى التأمين اللامركزي، كخطوات أولى نحو إطار عمل أكثر عمومية. كخدمات Chainlink التوسع والنمو بشكل أكثر أداءً وفقًا لرؤيتنا الواردة في هذا المستند التقني، وكذلك الأمر بالنسبة لنا ستعمل قوة أنظمة smart contract عبر جميع blockchains. يمكن النظر إلى نقاط التركيز الرئيسية الستة الأخرى في هذا التقرير على أنها تعمل في الخدمة من الأول، وهو شامل للعقود الهجينة. تتضمن هذه التركيزات إزالة المرئية التعقيد من العقود المختلطة، مما يؤدي إلى إنشاء خدمات إضافية خارج السلسلة تمكن وبناء عقود هجينة أكثر قدرة من أي وقت مضى، وفي حالة تقليل الثقة، تعزيز الخصائص الأمنية التي تحققها العقود الهجينة. نترك الفكرة من العقود الهجينة الضمنية في جزء كبير من الورقة، ولكن أي مزيج من يمكن اعتبار منطق MAINCHAIN مع DON بمثابة عقد مختلط. تجريد التعقيد: تم تصميم DONs للاستفادة من اللامركزية أنظمة سهلة للمطورين والمستخدمين من خلال استخلاص الآلات المعقدة في كثير من الأحيان وراء مجموعة خدمات DONs القوية والمرنة. خدمات Chainlink الموجودة لديك بالفعل هذه الميزة. على سبيل المثال، تقدم خلاصات البيانات في Chainlink اليوم واجهات onchain لا تتطلب من المطورين الاهتمام بالتفاصيل على مستوى البروتوكول، مثل الوسائل التي يفرض بها التعرف الضوئي على الحروف (OCR) إعداد التقارير المتفق عليها بين 2 لقد نشأت فكرة تكوين العقود على السلسلة / خارج السلسلة سابقًا في العديد من القيود المقيدة النماذج، على سبيل المثال، أنظمة الطبقة الثانية، المستندة إلى TEE blockchains [80]، وما إلى ذلك. هدفنا هو الدعم والتعميم هذه الأساليب والتأكد من أنها يمكن أن تشمل الوصول إلى البيانات خارج السلسلة والمفاتيح الأخرى oracle الخدمات. تشتمل خدمات 3Chainlink على مجموعة متنوعة من الخدمات والوظائف اللامركزية المتاحة من خلال الشبكة. يتم تقديمها من قبل العديد من مشغلي العقد المكونة من شبكات oracle المختلفة عبر النظام البيئي.الشكل 2: شكل مفاهيمي يصور تكوين العقد على السلسلة / خارج السلسلة. أ هجين smart contract 3⃝يتكون من مكونين متكاملين: متصل بالسلسلة المكون SC 1⃝، المقيم في blockchain، والمكون خارج السلسلة exec 2⃝ذلك ينفذ على DON. يعمل DON كجسر بين المكونين أيضًا مثل ربط العقد المختلط بموارد خارج السلسلة مثل خدمات الويب وغيرها blockchains، والتخزين اللامركزي، وما إلى ذلك. مجموعة لامركزية من العقد. DONs يذهبون إلى أبعد من ذلك بمعنى أنهم يوسعون مجموعة من الخدمات التي يمكن لـ Chainlink أن يقدم للمطورين طبقة تجريد بها واجهات مبسطة مصاحبة للخدمات عالية المستوى. نقدم العديد من الأمثلة التطبيقية في القسم 4 التي تسلط الضوء على هذا النهج. نحن نتصور أن المؤسسات، على سبيل المثال، تستخدم DONs كشكل من أشكال البرامج الوسيطة الآمنة قم بتوصيل أنظمتهم القديمة بـ blockchains. (انظر القسم 4.2.) يؤدي هذا الاستخدام لملخصات DON إلى التخلص من تعقيد ديناميكيات blockchain العامة (الرسوم، وعمليات إعادة التنظيم، وما إلى ذلك). إنه أيضًا يلخص ميزات blockchains المحددة، وبالتالي تمكين المؤسسات من ربط أنظمتها الحالية بمجموعة متزايدة باستمرار من أنظمة blockchain بدون الحاجة إلى خبرة متخصصة في هذه الأنظمة، أو بشكل أعم، في تطوير الأنظمة اللامركزية. في نهاية المطاف، طموحنا هو دفع درجة التجريد التي حققها Chainlink إلى درجة تنفيذ ما نشير إليه بطبقة معدنية لامركزية. مثل هذه الطبقة من شأنه أن يزيل التمييز على السلسلة / خارج السلسلة لجميع فئات المطورين ومستخدمي التطبيقات اللامركزية، مما يسمح بإنشاء واستخدام الخدمات اللامركزية بشكل سلس.لتبسيط عملية التطوير، يمكن للمطورين تحديد وظيفة DApp في الطبقة المعدنية كتطبيق افتراضي في نموذج جهاز موحد. يمكنهم ذلك ثم استخدم مترجم طبقة ميتا لامركزية لإنشاء مثيل DApp تلقائيًا مجموعة من الوظائف اللامركزية المتداخلة التي تمتد على blockchains، DONs، و الخدمات الخارجية. (يمكن أن تكون إحدى هذه الخدمات الخارجية نظامًا مؤسسيًا، مما يجعل الطبقة المعدنية مفيدة للتطبيقات التي تتضمن أنظمة مؤسسية قديمة). يشبه التجميع كيفية قيام المترجمين الحديثين ومجموعات تطوير البرامج (SDKs) دعم المبرمجين العموميين في استخدام الإمكانات الكاملة للأجهزة غير المتجانسة معماريات تتكون من وحدة معالجة مركزية للأغراض العامة وأجهزة متخصصة مثل وحدات معالجة الرسومات، مسرعات التعلم الآلي، أو الجيوب الموثوقة. يعرض الشكل 3 هذه الفكرة على المستوى المفاهيمي. تعد العقود الهجينة smart contracts خطوة أولى على الطريق نحو هذه الرؤية وإلى مفهوم نسميه العقود الوصفية. العقود الوصفية هي تطبيقات مشفرة على اللامركزية طبقة ميتالية وتشمل ضمنيًا منطق السلسلة (smart contracts)، بالإضافة إلى حساب خارج السلسلة والاتصال بين مختلف blockchains وداخل السلسلة الحالية الخدمات. نظرا للحاجة إلى دعم اللغة والمترجم، ونماذج الأمان الجديدة، و ولكن تحقيق المواءمة المفاهيمية والتقنية للتكنولوجيات المتباينة أمر ممكن إن إنشاء طبقة معدنية لامركزية حقيقية هو هدف طموح نطمح إليه على مدى فترة طويلة الأفق الزمني. ومع ذلك فهو نموذج مثالي مفيد يجب أخذه في الاعتبار أثناء القراءة هذه الورقة، ليست مفصلة هنا، ولكنها شيء نخطط للتركيز عليه في عملنا المستقبلي Chainlink. التحجيم: أحد الأهداف ذات الأهمية البارزة في تصميماتنا المتطورة هو تمكين شبكة Chainlink لتلبية احتياجات التوسع المتزايدة للنظام البيئي blockchain. مع تحول ازدحام الشبكة إلى مشكلة متكررة في القائمة غير المسموح بها blockchains [86]، تصميمات blockchain الجديدة والأكثر أداءً تدخل حيز الاستخدام، على سبيل المثال، [103، 120، 203]، بالإضافة إلى تقنيات قياس الطبقة الثانية التكميلية، على سبيل المثال، [5، 12، 121، 141، 169، 186، 187]. يجب أن تحقق خدمات Oracle زمن الاستجابة والإنتاجية التي تلبي متطلبات أداء هذه الأنظمة مع تقليل الرسوم على السلسلة (على سبيل المثال، تكاليف الغاز) لمشغلي العقود والمستخدمين العاديين على حد سواء. مع DONs، Chainlink تهدف الوظيفة إلى المضي قدمًا وتقديم أداء عالٍ بما يكفي للأنظمة المستندة إلى الويب تمامًا. تستمد DONs الكثير من مكاسب أدائها من استخدامها لبروتوكولات الإجماع السريعة أو القائمة على اللجان أو غير المسموح بها، والتي تدمجها مع blockchains إنهم يدعمون. نتوقع تشغيل العديد من DONs ذات التكوينات المختلفة بالتوازي؛ يمكن للتطبيقات اللامركزية والمستخدمين المختلفين التنقل بين المفاضلات في خيارات الإجماع الأساسية وفقا لمتطلبات التطبيق الخاصة بهم. يمكن عرض DONs بشكل فعال كتقنيات الطبقة الثانية. نتوقع أن بين الخدمات الأخرى، DONs ستدعم إطار عمل تنفيذ المعاملات (TEF)، والذي يسهل التكامل الفعال لـ DONs وبالتالي oracles مع غيرها من الأداء العالي أنظمة الطبقة الثانية - على سبيل المثال، rollups، الأنظمة التي تجمع المعاملات خارج السلسلة لتحقيقها تحسينات في الأداء. نقدم TEF في القسم 6.

Conceptual figure showing ideal realization of a decentralized metalayer that abstracts blockchain and DON complexity

الشكل 3: شكل مفاهيمي يوضح الإدراك المثالي لطبقة معدنية لا مركزية. ل لسهولة التطوير، يحدد المطور التطبيق اللامركزي، المميز باللون الوردي، باعتباره تطبيقًا افتراضيًا التطبيق في نموذج الآلة الموحدة يقوم المترجم اللامركزي ذو الطبقة المعدنية تلقائيًا بإنشاء وظائف التشغيل البيني المقابلة: smart contracts (يُشار إليه بواسطة SC)، المنطق (المشار إليه بواسطة exec) على DONs، والمحولات التي تتصل بالخدمات الخارجية المستهدفة، وما إلى ذلك، كما هو موضح في التمييز باللون الأصفر. يوضح الشكل 4 من الناحية النظرية كيف تعمل DONs على تحسين مقياس blockchain (smart contract) من خلال تركيز المعاملات وoracle-معالجة التقارير خارج السلسلة، بدلاً من التركيز عليها سلسلة. هذا التحول في الموقع الرئيسي للحساب يقلل من زمن الوصول للمعاملة الرسوم مع زيادة إنتاجية المعاملات. السرية: توفر Blockchains شفافية غير مسبوقة لـ smart contracts والتطبيقات التي تنفذها. ولكن هناك توتراً أساسياً بين الشفافية والسرية. واليوم، على سبيل المثال، أصبحت عمليات التبادل اللامركزية للمستخدمينالشكل 4: شكل مفاهيمي يوضح كيفية تحسين شبكات أوراكل اللامركزية تحجيم blockchain smart contracts الممكنة. الشكل أ ⃝يظهر تقليدي oracle الهندسة المعمارية. يتم إرسال المعاملات مباشرة إلى blockchain، وكذلك التقارير oracle. وبالتالي فإن blockchain، المميز باللون الأصفر، هو الموقع الرئيسي لمعالجة المعاملات. يوضح الشكل ب⃝ استخدام DON لدعم العقود على blockchain. أ DON المعاملات العملياتية القابلة للتنفيذ جنبًا إلى جنب مع البيانات من الأنظمة الخارجية والأمام النتائج - على سبيل المثال، المعاملات المجمعة أو تغييرات حالة العقد الناتجة عن تأثيرات المعاملات - إلى blockchain. وبالتالي فإن DON، المظلل باللون الأصفر، هو العنصر الرئيسي مكان لمعالجة المعاملات. يتم تسجيل الإجراءات على السلسلة، مما يجعل من السهل مراقبة سلوك التبادل، ولكن أيضًا جعل المعاملات المالية للمستخدمين مرئية للعامة. وبالمثل، يتم نقل البيانات إلى الأجهزة الذكية العقود لا تزال على السلسلة. وهذا يجعل هذه البيانات قابلة للتدقيق بشكل ملائم، ولكنها تعمل أيضًا وهو عامل مثبط لموفري البيانات الراغبين في تزويد smart contracts ببيانات حساسة أو بيانات الملكية. نعتقد أن شبكات oracle ستلعب دورًا محوريًا في تحفيز الجيل التالي الأنظمة التي تجمع بين الشفافية الفطرية لـ blockchains ووسائل حماية السرية الجديدة. وفي هذه الورقة، نوضح كيف سيفعلون ذلك باستخدام ثلاثة أساليب رئيسية: • محولات الحفاظ على السرية: تقنيتان مع التخطيط للنشر في شبكات Chainlink، DECO [234] وTown Crier [233]، قم بتمكين العقد oracle لـ استرداد البيانات من الأنظمة خارج السلسلة بطرق تحمي خصوصية المستخدم وبياناته السرية. سوف يلعبون دورًا رئيسيًا في تصميم المحولات الخاصة بـ DONs. (انظر القسم 3.6.2 للحصول على تفاصيل حول هاتين التقنيتين.) • الحساب السري: يمكن لـ DONs ببساطة إخفاء حساباتهم من الاعتماد على blockchains. باستخدام حساب آمن متعدد الأطراف و/أو بيئات تنفيذ موثوقة، من الممكن أيضًا توفير سرية أقوى في DON العقد حساب البيانات التي لا يمكنهم رؤيتها بأنفسهم.

Example comparing standard mining with Fair Sequencing Services showing how FSS prevents transaction reordering

Conceptual diagram of confidentiality-preserving operations in a DON processing sensitive data through adapters

• دعم أنظمة الطبقة الثانية السرية: تم تصميم TEF لدعم مجموعة متنوعة من أنظمة الطبقة الثانية، والتي يستخدم الكثير منها براهين المعرفة الصفرية لتوفير أشكال مختلفة من سرية المعاملات. نناقش هذه الأساليب في القسم 3 (مع تفاصيل إضافية في القسم 6، الملحق ب.1، والملحق ب.2). يقدم الشكل 5 وجهة نظر مفاهيمية لكيفية تدفق البيانات الحساسة من مصادر خارجية إلى smart contract عن طريق محولات الحفاظ على السرية و حساب سري في DON. الشكل 5: رسم تخطيطي مفاهيمي لعمليات الحفاظ على السرية في DON على البيانات الحساسة (مظللة باللون الأصفر). بيانات المصدر الحساسة (الدوائر السوداء) في الويب يتم استخراج الخوادم إلى DON باستخدام محولات الحفاظ على السرية (الخطوط الزرقاء ذات الأسهم المزدوجة). يتلقى DON البيانات المشتقة (دوائر مجوفة) من هذه المحولات— نتيجة تطبيق وظيفة أو، على سبيل المثال، مشاركة سرية، على المصدر الحساس data. قد يطبق الملف القابل للتنفيذ على DON حسابًا سريًا على البيانات المشتقة لإنشاء تقرير (دائرة مزدوجة)، يتم إرساله عبر محول إلى blockchain. ونحن نعتقد أن الأدوات القوية للتعامل مع البيانات السرية ستفتح المجال أمام الجميع مجموعة من التطبيقات. ومن بين هذه العوامل التمويل اللامركزي (والمركزي) الخاص، والهوية اللامركزية، والإقراض القائم على الائتمان، وتوفير المزيد من الكفاءة والفعالية. بروتوكولات "اعرف عميلك" و"الاعتماد" سهلة الاستخدام، كما نناقش في القسم 4. عدالة الطلب في المعاملات: تصميمات blockchain اليوم بها القليل من الأشياء القذرة سر مفتوح: إنها مركزية بشكل سريع الزوال. يمكن لعمال المناجم وvalidators طلب التحويلالإجراءات التي يختارونها. يمكن أيضًا للمستخدمين التلاعب بأمر المعاملة وظيفة رسوم الشبكة التي يدفعونها (على سبيل المثال، أسعار الغاز في Ethereum) وبالنسبة للبعض المدى من خلال الاستفادة من اتصالات الشبكة السريعة. مثل هذا التلاعب يمكن أن يكون على سبيل المثال، خذ شكل المنافسة الأمامية، حيث يكون هناك ممثل استراتيجي مثل عامل المناجم يراقب معاملة المستخدم ويدرج المعاملة الاستغلالية الخاصة به في معاملة سابقة الموضع في نفس الكتلة - سرقة الأموال بشكل فعال من المستخدم من خلال الاستفادة من المعرفة المسبقة بمعاملة المستخدم. على سبيل المثال، قد يقوم الروبوت بوضع أمر شراء قبل المستخدم. ويمكنه بعد ذلك الاستفادة من الزيادة في أسعار الأصول الناجمة عن تجارة المستخدم. تشغيل بعض الروبوتات في المقدمة مما يضر بالمستخدمين العاديين، وهو ما يشبه التردد العالي التداول في وول ستريت — هو أمر سائد بالفعل وموثق جيدًا [90]، كما هو مرتبط هجمات مثل التشغيل الخلفي [159] ومحاكاة المعاملات الآلية [195]. وقد ظهرت مؤخرًا مقترحات لتنظيم استغلال الطلب من قبل القائمين بالتعدين [110]. تقنيات الطبقة الثانية مثل rollups لا تحل المشكلة، ولكنها مجرد إعادة مركزية الطلب، ووضعه في يد الكيان الذي يقوم بإنشاء rollup. أحد أهدافنا هو تقديم خدمة تسمى "التسلسل العادل" إلى Chainlink الخدمات (FSS) [137]. تساعد FSS مصممي smart contract على ضمان الترتيب العادل لأعمالهم المعاملات وتجنب الهجمات الأمامية والخلفية والهجمات ذات الصلة على معاملات المستخدم بالإضافة إلى أنواع أخرى من المعاملات، مثل oracle إرسال التقرير. الخدمة الثابتة الساتلية يمكّن DON من تنفيذ أفكار مثل المفهوم الدقيق والمؤقت لعدالة النظام المقدم في [144]. وكميزة عرضية، يمكن للخدمة الثابتة الساتلية أيضًا أن تخفض شبكة المستخدمين الرسوم (مثل تكاليف الغاز). باختصار، في الخدمة الثابتة الساتلية، تمر المعاملات عبر DON، بدلاً من الانتشار مباشرة إلى الهدف smart contract. يقوم DON بطلب المعاملات ثم إعادة توجيهها لهم بالعقد. الشكل 6: مثال على مدى فائدة الخدمة الثابتة الساتلية. الشكل أ ⃝يبين كيف يقوم عامل المناجم باستغلاله السلطة المركزية لطلب المعاملات، قد تقوم بتبديل زوج من المعاملات: المعاملة 1⃝ يصل قبل 2⃝، لكن عامل التعدين يقوم بتسلسله بعد 2⃝. في المقابل، يظهر الشكل B⃝ كيف يقوم DON بإضفاء اللامركزية على عملية الطلب بين DON العقد. إذا اكتمل النصاب القانوني تستقبل العقد الصادقة 1⃝قبل 2⃝، يتسبب FSS في ظهور 1⃝قبل 2⃝على السلسلة— منع إعادة ترتيب المُعدنين عن طريق إرفاق أرقام تسلسلية قابلة للتنفيذ بموجب العقد. يقارن الشكل 6 التعدين القياسي مع الخدمة الثابتة الساتلية. ويبين كيف في التعدين القياسي،تتم عملية طلب المعاملات بشكل مركزي مع القائم بالتعدين وبالتالي تخضع لـ التلاعب، مثل إعادة ترتيب زوج من المعاملات فيما يتعلق بوصولها مرات. في المقابل، في FSS، تكون العملية لا مركزية بين العقد DON. على افتراض النصاب القانوني للعقد الصادقة، FSS يساعد على فرض سياسات مثل الترتيب الزمني لل المعاملات، مما يقلل من فرص التلاعب من قبل عمال المناجم والكيانات الأخرى. بالإضافة إلى ذلك، نظرًا لأن المستخدمين لا يحتاجون إلى التنافس للحصول على طلبات تفضيلية بناءً على سعر الغاز، يمكنهم دفع أسعار غاز منخفضة نسبيًا (بينما يمكن تجميع المعاملات من DON على دفعات لتوفير الغاز). تقليل الثقة: هدفنا العام في تصميم DONs هو تسهيل عملية للغاية طبقة دعم جديرة بالثقة لـ smart contracts والأنظمة الأخرى المعتمدة على oracle عن طريق اللامركزية وأدوات التشفير وضمانات الاقتصاد المشفر. DON في حد ذاته لا مركزي، ويمكن للمستخدمين الاختيار من بين أي DON متاح يدعم السلسلة الرئيسية التي يرغبون في تشغيلها أو إنتاج DONs إضافية عليها بلجان العقد التي يثقون بها. ومع ذلك، بالنسبة لبعض التطبيقات، وخاصة smart contracts، يجوز لمستخدمي Chainlink تفضيل نموذج الثقة الذي يتعامل مع السلسلة الرئيسية المدعومة بـ DON على أنها أكثر جدارة بالثقة من DON نفسها. بالنسبة لهؤلاء المستخدمين، لدينا بالفعل أو نخطط لدمجهم في بنية شبكة Chainlink عدد من الآليات التي تمكن العقود على سلسلة رئيسية لتعزيز الضمانات الأمنية المقدمة من DONs، أثناء وجوده في وفي نفس الوقت يتم أيضًا فرض الحماية ضد احتمالية وجود مصادر بيانات تالفة مثل خوادم الويب التي يحصل منها DON على البيانات. نصف هذه الآليات في القسم 7. وهي تقع تحت خمسة عناوين رئيسية: • مصادقة مصدر البيانات: أدوات تمكن موفري البيانات من التوقيع رقميًا بياناتهم وبالتالي تعزيز سلسلة العهدة بين الأصل و عقد الاعتماد. • DON تقارير الأقلية: العلامات الصادرة عن مجموعة فرعية من DON العقد التي لاحظ مخالفات الأغلبية في DON. • حواجز الحماية: المنطق الموجود على السلسلة الرئيسية الذي يكتشف الظروف الشاذة والتوقف المؤقت أو يوقف تنفيذ العقد (أو يستدعي علاجات أخرى). • الحوكمة التي تقلل من الثقة: استخدام تحديثات الإصدار التدريجي لتسهيل التفتيش المجتمعي، بالإضافة إلى التدخلات اللامركزية في حالات الطوارئ من أجل التدخل السريع الاستجابة لفشل النظام. • مصادقة الكيان اللامركزي: استخدام البنية التحتية للمفتاح العام (PKI) من أجل تحديد الكيانات في شبكة Chainlink. يعرض الشكل 7 مخططًا مفاهيميًا لأهدافنا المتعلقة بتقليل الثقة. الأمن القائم على الحوافز (الاقتصاد المشفر): تساعد اللامركزية في إنشاء التقارير عبر العقد oracle على ضمان الأمان حتى في حالة تلف بعض العقد.

Conceptual diagram depicting super-linear scaling in Chainlink staking where briber cost grows faster than combined node deposits

Conceptual depiction of Chainlink trust-minimization goal showing DON and data source trust loci

الشكل 7: تصوير مفاهيمي لهدف تقليل الثقة لدى Chainlink، وهو تقليل حاجة المستخدمين إلى السلوك الصحيح لـ DON ومصادر البيانات مثل الويب الخوادم. تشير النقاط المميزة باللون الأصفر في الشكل إلى مواقع تقليل الثقة: DON و مجموعات فردية أو أقلية من خوادم الويب. تشير النقاط المميزة باللون الوردي إلى مكونات النظام التي تعتبر جديرة بالثقة للغاية من خلال الافتراض: العقود على blockchain والأغلبية من خوادم الويب، أي خوادم الويب في المجمل. لكن من المهم بنفس القدر ضمان أن يكون لدى العقد حافز مالي للتصرف بشكل صحيح. التوقيع المساحي، أي مطالبة العقد بتوفير ودائع الارتباط والقطع (مصادرة) هذه الودائع في حالة سوء السلوك، ستلعب دورًا رئيسيًا في Chainlink. إنه تصميم حوافز مهم تم استخدامه بالفعل في عدد من blockchains، على سبيل المثال، [81، 103، 120، 204]. ومع ذلك، يبدو التخزين في Chainlink مختلفًا تمامًا عن staking في الوضع المستقل blockchains. يهدف التخزين في blockchains إلى منع الهجمات على الإجماع. لديها هدف مختلف في Chainlink: ضمان تسليم تقارير oracle الصحيحة في الوقت المناسب. يجب أن يؤدي نظام staking المصمم جيدًا لشبكة oracle إلى التصدي لهجمات مثل الرشوة غير مربحة للخصم، حتى عندما يكون الهدف هو smart contract ذو مستوى عالٍ القيمة النقدية. نقدم في هذا البحث منهجًا عامًا لـ staking في Chainlink بثلاثة مفاتيح الابتكارات:1. نموذج عدائي قوي يشمل الهجمات التي تم التغاضي عنها في الوقت الحالي النهج. أحد الأمثلة على ذلك هو ما نسميه الرشوة المحتملة. هذا هو شكل من أشكال الرشوة التي تحدد العقد التي تتلقى الرشاوى على أساس مشروط، على سبيل المثال، يقدم رشاوى مضمونة مقدمًا للعقد التي تحددها آلية staking في عشوائي لأدوار معينة (مثل تفعيل الفصل في التقرير). 2. التأثير الخطي الفائق staking، مما يعني بشكل غير رسمي أنه لكي ينجح الخصم، يجب أن تكون لديه ميزانية قدرها مليار دولار أكبر من الودائع المجمعة لجميع oracle العقد. بتعبير أدق، نعني أنه كدالة لـ n، \(B(n) ≫\)dn في a شبكة مكونة من عدد n oracle من العقد لكل منها مبلغ إيداع ثابت $d (بشكل أكثر رسمية، \(B(n) is asymptotically larger in n than \)dn). الشكل 8 يعطي نظرة مفاهيمية ل هذه الخاصية. 3. إطار الحوافز الضمنية (IIF)، وهو نموذج حوافز صممناه من أجله تشمل حوافز قابلة للقياس تجريبيًا تتجاوز الحوافز المودعة بشكل صريح staking الأموال، بما في ذلك فرص الرسوم المستقبلية للعقد. يوسع معهد التمويل الدولي مفهوم حصة تتجاوز ودائع العقدة الصريحة. الشكل 8: رسم تخطيطي مفاهيمي يصور القياس الخطي الفائق في Chainlink staking. ال تنمو الرشوة $B(n) التي يطلبها الخصم بشكل أسرع في n من الودائع المجمعة $dn لجميع العقد oracle. نوضح كيف أن تأثير IIF والخط الفائق staking معًا يؤدي إلى ما نحن عليه استدعاء دورة حميدة من الأمن الاقتصادي لشبكات oracle. عندما يدخل مستخدمون جدد

النظام، وزيادة الأرباح المستقبلية المحتملة من تشغيل Chainlink العقد، و تنخفض التكلفة الحدية للأمن الاقتصادي للمستخدمين الحاليين والمستقبليين. في نظام الطلب المرن، فإن هذه التكلفة المنخفضة تحفز المزيد من المستخدمين على الاستفادة من الشبكة، مما يؤدي إلى إدامة التبني بشكل مستمر في دورة حميدة مستمرة. ملاحظة: على الرغم من أن هذا التقرير يوضح العناصر المهمة لرؤيتنا لتطور Chainlink، إلا أنه غير رسمي ويتضمن القليل من المواصفات الفنية التفصيلية. نحن نخطط ل إصدار أوراق فنية مركزة حول الميزات والأساليب الإضافية مع تطورها. علاوة على ذلك، من المهم التأكيد على أن العديد من عناصر الرؤية المقدمة هنا (تحسينات القياس، وتقنيات السرية، والخدمة الثابتة الساتلية، وما إلى ذلك) يمكن أن يحدث وسوف يحدث تم نشرها في شكل أولي حتى قبل أن تصبح DONs المتقدمة سمة أساسية لـ Chainlink. 1.3 تنظيم هذه الورقة نقدم نموذج الأمان الخاص بنا والترميز في القسم 2 ونحدد اللامركزية Oracle Network API في القسم 3. في القسم 4، نقدم عددًا من الأمثلة على ذلك التطبيقات التي توفر DONs لها نظامًا أساسيًا للنشر جذابًا. يمكن للقراء تعلم معظم المفاهيم الأساسية للورقة من خلال القراءة حتى هذه النقطة. يحتوي الجزء المتبقي من الورقة على مزيد من التفاصيل. وصفنا التسلسل العادل الخدمات (FSS) في القسم 5 وإطار تنفيذ المعاملات (TEF) في القسم 6. نوضح نهجنا لتقليل الثقة في القسم 7. ونأخذ في الاعتبار بعض متطلبات النشر المهمة DON، وهي النشر المتزايد للميزات، وعضوية دفتر الأستاذ الديناميكي، والمساءلة في القسم 8. وأخيرًا، في القسم 9، نقدم نظرة عامة على نهجنا المتطور لتصميم الحوافز. ننتهي في القسم 10. لمساعدة القراء الذين لديهم معرفة محدودة بالمفاهيم الواردة في هذه الورقة، نحن قم بتوفير مسرد في الملحق أ. ونقدم المزيد من التفاصيل حول واجهة DON والوظائف في الملحق ب وتقديم بعض أمثلة المحولات في الملحق ج. في الملحق د، وصفنا طريقة تشفير أولية لمصدر البيانات ذي الثقة المنخفضة تسمى المصادقة بالتوقيعات الوظيفية وتقدم متغيرًا جديدًا يسمى التوقيعات الوظيفية المنفصلة. نناقش بعض الاعتبارات التي تؤثر على اللجنة تحديد DONs في الملحق F.

Conceptual figure showing how DONs improve blockchain smart contract scaling by moving computation off-chain

Conceptual figure depicting on-chain and off-chain contract composition in a hybrid smart contract architecture

Security Model and Goals

Security Model and Goals

A Decentralized Oracle Network is a distinct distributed system that we expect will initially be implemented typically—although not necessarily—by a committee-based consensus protocol and run by a set of oracle nodes. A DON is designed primarily to augment the capabilities of a smart contract on a main chain with oracle reports and other services, but it can provide those same supporting services to other nonblockchain systems, and thus need not be associated with a particular main chain.

The model and properties we consider are therefore largely independent of the use of the particular applications of a DON. 2.1 Current Architectural Model It is important to emphasize that Chainlink today is not a monolithic service, but rather a permissionless framework within which it is possible to launch distinct, independent networks of oracle nodes [77]. Networks have heterogeneous sets of node operators and designs. They may also differ in terms of the types of services they provide, which can include, e.g., data feeds, Proof of Reserves, verifiable randomness, and so forth. Other differences can include the degree of decentralization, size of the network in terms of locked value it supports, and various service-level parameters, such as data frequency and accuracy. Chainlink’s permissionless model encourages the growth of an ecosystem in which providers specialize in the services they are best able to furnish to the community. This model is likely to result in lower costs to users and higher service quality than a model that requires all nodes and networks to provide a full range of services, an approach that can easily devolve into system-wide adoption of the services representing the least common denominator of resources available to nodes. As Chainlink evolves toward DON-based designs in Chainlink 2.0, we continue to support the model of a permissionless, open framework, keeping in view the goal of providing users with a range of service choices that globally result in the best match with particular application requirements. 2.2 Consensus Assumptions We use the term Decentralized Oracle Network to encompass the full functionality of the oracle system we describe: both the data structure that oracle nodes maintain and the core API layered on top of it. We use the term ledger (lower case), denoted by L, to mean the underlying data structure maintained by a DON and used to support the particular services it provides. We emphasize that our DON framework does not treat L as a freestanding system like a blockchain: Its purpose is to support blockchains and other systems. Blockchains are, of course, one way of realizing a trustworthy ledger, but there are others. We expect DONs in many cases to realize their underlying ledgers using Byzantine Fault Tolerant (BFT) systems, which considerably predate blockchains such as Bitcoin [174]. We use BFT-type notation and properties throughout the paper for convenience, although we emphasize that DONs can be realized using permissionless consensus protocols. Conceptually, a ledger L is a bulletin board on which data is linearly ordered. We view a ledger generally as having a few key properties commonly ascribed to blockchains [115]. A ledger is: • Append-only: Data, once added, cannot be removed or modified.

• Public: Anyone can read its contents, which are consistent across time in the view of all users.4 • Available: The ledger can always be written to by authorized writers and read by anyone in a timely way. Alternative properties are possible in the ledger for a DON when realized by a committee. For instance, ledger write access might be restricted to certain users, as might read access for some applications, i.e., the ledger need not be public as defined above. Similarly, ledger rules might permit modification or redaction of data. We don’t explicitly consider such variants in this paper, however. The modular design of DONs can support any of a wide variety of modern BFT protocols, e.g., Hotstuff[231]. The exact choice will depend on trust assumptions and network characteristics among the oracle nodes. A DON could in principle alternatively use a highly performant permissionless blockchain for its ledger in its role supporting an equally scalable layer-2 or blockchain system. Similarly, hybridization is also possible: The DON could in principle be composed of nodes that are validators in an existing blockchain, e.g., in Proof-of-Stake systems in which committees are selected to execute transactions, e.g., [8, 81, 120, 146, 204]. This particular mode of operation requires that nodes operate in a dual-use manner, i.e., operate both as blockchain nodes and DON nodes. (See Section 8.2 for a discussion of techniques to ensure continuity in changing committees and Appendix F for some caveats on random committee selection.) In practice, in modern BFT algorithms, nodes digitally sign messages on the ledger. We assume for convenience that L has an associated public key pkL and that its contents are signed by the corresponding private key. This general notation applies even when data on L are signed using threshold signatures.5 Threshold signatures are convenient, as they enable a persistent identity for a DON even with changes of membership in the nodes running it. (See Appendix B.1.3.) We thus assume that \(sk_L\) is secret-shared in a \((k, n)\)-threshold manner for some security parameter \(k\), e.g., \(k = 2f + 1\) and \(n = 3f + 1\), where \(f\) is the number of potentially faulty nodes. (By choosing \(k\) in this way, we ensure that faulty nodes can neither learn \(sk_L\) nor mount a denial-of-service attack preventing its use.) A message on L takes the form M = (m, z), where m is a string and z a unique sequential index number. Where applicable, we write messages in the form m = ⟨MessageType : payload⟩. The message type MessageType is syntactic sugar that indicates the function of a particular message. 4In cases where a blockchain without finality realizes a ledger, inconsistency is typically abstracted away by disregarding insufficiently deep blocks or “pruning” [115]. 5In practice, some code bases, e.g., LibraBFT [205], a variant of Hotstuff, have currently adopted multi-signatures, rather than threshold signatures, trading offreduced communication complexity for simpler engineering. With some added cost, oracle nodes can append threshold signatures to messages written to L even if the consensus protocol used for L doesn’t employ them.

2.3 Notation We denote the set of \(n\) oracle nodes running the ledger by \(O = \{O_i\}_{i=1}^{n}\). Such a set of nodes is often called a committee. For simplicity, we assume that the set of oracles implementing DON functionality, i.e., services on top of L, is identical with that maintaining L, but they can be distinct. We let \(pk_i\) denote the public key of player \(O_i\), and \(sk_i\) the corresponding private key. Most BFT algorithms require at least \(n = 3f + 1\) nodes, where \(f\) is the number of potentially faulty nodes; remaining nodes are honest, in the sense that they follow the protocol exactly as specified. We refer to the committee O as honest if it meets this requirement, i.e., has greater than a \(2/3\)-fraction of honest nodes. Unless otherwise stated, we assume that O is honest (and a static model of corruption). We use \(pk_O\) / \(sk_O\) interchangeably with \(pk_L\) / \(sk_L\), depending on the context. We let \(\sigma = \text{Sig}_{pk}[m]\) denote a signature on message \(m\) with respect to \(pk\), i.e., using corresponding private key \(sk\). Let \(\text{verify}(pk, \sigma, m) \rightarrow \{false, true\}\) denote a corresponding signature verification algorithm. (We leave key generation implicit throughout the paper.) We use the notation \(S\) to denote a data source and \(\mathcal{S}\) to denote the full set of \(n_S\) sources in a given context. We denote by MAINCHAIN a smart-contract enabled blockchain supported by a DON. We use the term relying contract to denote any smart contract on MAINCHAIN that communicates with a DON, and use the notation SC to denote such a contract. We generally assume that a DON supports a single main chain MAINCHAIN, although it can support multiple such chains, as we show in examples in Section 4. A DON can and typically will support multiple relying contracts on MAINCHAIN. (As noted above, a DON can alternatively support non-blockchain services.) 2.4 Note on Trust Models As noted above, DONs may be built atop committee-based consensus protocols, and we expect they will commonly use such protocols. There are many strong arguments that one of the two alternatives, committee-based or permissionless blockchains, provides stronger security than the other. It is important to recognize that the security of committee-based vs. permissionless decentralized systems is incommensurable. Compromising a PoW or a PoS blockchain via 51% attack requires that an adversary obtain majority resources ephemerally and potentially anonymously, for example by renting hash power in a PoW system. Such attacks in practice have already impacted several blockchains [200, 34]. In contrast, compromising a committee-based system means corrupting a threshold number (typically one-third) of its nodes, where the nodes may be publicly known, well resourced, and trustworthy entities. On the other hand, committee-based systems (as well as “hybrid” permissionless systems that support committees) can support more functionality than strictly per-

missionless systems. This includes the ability to maintain persistent secrets, such as signing and/or encryption keys—one possibility in our designs. We emphasize that DONs can in principle be built atop either a committee-based or permissionless consensus protocol and DON deployers may ultimately choose to adopt either approach. Bolstering trust models: A key feature of Chainlink today is the ability of users to select nodes based on decentralized records of their performance histories, as discussed in Section 3.6.4. The staking mechanism and Implicit-Incentive Framework we introduce in Section 9 together constitute a broadly scoped and rigorous mechanism-design framework that will empower users with a greatly expanded ability to gauge the security of DONs. This same framework will also make it possible for DONs themselves to enforce various security requirements on participating nodes and ensure operation within strong trust models. It is also possible using tools described in this paper for DONs to enforce special trust-model requirements, such as compliance with regulatory requirements. For example, using techniques discussed in Section 4.3, nodes can present evidence of node-operator characteristics, e.g., territory of operation, that can be used to help enforce compliance with, e.g., the General Data Protection Regulation (GDPR) Article 3 (“Territorial Scope”) [105]. Such compliance can otherwise be challenging to meet in decentralized systems [45]. Additionally, in Section 7 we discuss plans to strengthen the robustness of DONs through trust-minimization mechanisms on the main chains they support.

نموذج الأمن والأهداف

تعد شبكة Oracle اللامركزية نظامًا موزعًا متميزًا نتوقع حدوثه في البداية يتم تنفيذها بشكل نموذجي - وإن لم يكن بالضرورة - من خلال لجنة قائمة على أساسها بروتوكول الإجماع ويتم تشغيله بواسطة مجموعة من العقد oracle. تم تصميم DON بشكل أساسي لزيادة إمكانيات smart contract على السلسلة الرئيسية باستخدام تقارير oracle وغيرها من الخدمات، ولكن يمكنها توفير نفس خدمات الدعم لأنظمة أخرى غير blockchain، وبالتالي لا يلزم ربطها بسلسلة رئيسية معينة.

وبالتالي فإن النموذج والخصائص التي نعتبرها مستقلة إلى حد كبير عن استخدام التطبيقات الخاصة بـ DON. 2.1 النموذج المعماري الحالي من المهم التأكيد على أن Chainlink اليوم ليست خدمة متجانسة، بل بالأحرى إطار عمل غير مسموح به يمكن من خلاله إطلاق متميز ومستقل شبكات oracle العقد [77]. تحتوي الشبكات على مجموعات غير متجانسة من مشغلي العقد و التصاميم. وقد يختلفون أيضًا من حيث أنواع الخدمات التي يقدمونها، وهو ما قد يختلف أيضًا تشمل، على سبيل المثال، خلاصات البيانات، وإثبات الاحتياطيات، والعشوائية القابلة للتحقق، وما إلى ذلك. أخرى يمكن أن تشمل الاختلافات درجة اللامركزية وحجم الشبكة من حيث القيمة المقفلة التي يدعمها، ومعلمات مستوى الخدمة المختلفة، مثل تردد البيانات والدقة. يشجع نموذج Chainlink غير المسموح به على نمو النظام البيئي الذي يتخصص مقدمو الخدمة في الخدمات التي هم أكثر قدرة على تقديمها للمجتمع. هذا من المرجح أن يؤدي النموذج إلى تكاليف أقل للمستخدمين وجودة خدمة أعلى من النموذج يتطلب ذلك من جميع العقد والشبكات توفير مجموعة كاملة من الخدمات، وهذا النهج والتي يمكن أن تتحول بسهولة إلى اعتماد على مستوى النظام للخدمات التي تمثل الأقل القاسم المشترك للموارد المتاحة للعقد. مع تطور Chainlink نحو التصميمات المستندة إلى DON في Chainlink 2.0، فإننا نواصل دعم نموذج الإطار المفتوح غير المسموح به، مع مراعاة هدف تزويد المستخدمين بمجموعة من خيارات الخدمة التي تؤدي عالميًا إلى أفضل تطابق مع متطلبات التطبيق الخاصة. 2.2 افتراضات الإجماع نحن نستخدم مصطلح شبكة أوراكل اللامركزية ليشمل الوظائف الكاملة لـ نظام oracle الذي نصفه: كل من بنية البيانات التي تحافظ عليها عقد oracle و واجهة برمجة التطبيقات الأساسية موجودة فوقها. نحن نستخدم مصطلح دفتر الأستاذ (الأحرف الصغيرة)، الذي يُشار إليه بالحرف L، للإشارة إلى البيانات الأساسية البنية التي يحتفظ بها DON وتستخدم لدعم الخدمات المحددة التي تقدمها. نؤكد على أن إطار عملنا DON لا يتعامل مع L كنظام قائم بذاته أ blockchain: الغرض منه هو دعم blockchains والأنظمة الأخرى. بلوكتشين هي، وبطبيعة الحال، هذه إحدى الطرق لتحقيق دفتر أستاذ جدير بالثقة، ولكن هناك طرق أخرى. نحن نتوقع DONs في كثير من الحالات لتحقيق دفاتر الأستاذ الأساسية الخاصة بهم باستخدام Byzantine Fault Tolerant (BFT) الأنظمة، التي تسبق إلى حد كبير blockchain مثل Bitcoin [174]. نحن نستخدم BFT - اكتب التدوين والخصائص في جميع أنحاء الورقة للراحة، على الرغم من أننا أكد على أنه يمكن تحقيق DONs باستخدام بروتوكولات الإجماع غير المسموح بها. من الناحية النظرية، دفتر الأستاذ L عبارة عن لوحة إعلانات يتم ترتيب البيانات عليها خطيًا. نحن ننظر إلى دفتر الأستاذ بشكل عام على أنه يحتوي على بعض الخصائص الأساسية التي تُنسب إليه عادةً blockchains [115]. دفتر الأستاذ هو: • إلحاق فقط: البيانات، بمجرد إضافتها، لا يمكن إزالتها أو تعديلها.• عامة: يمكن لأي شخص قراءة محتوياته، والتي تكون متسقة عبر الزمن في عرض لجميع المستخدمين.4 • متاح: يمكن دائمًا كتابة دفتر الأستاذ بواسطة كتاب معتمدين وقراءته من قبل أي شخص في الوقت المناسب. الخصائص البديلة ممكنة في دفتر الأستاذ لـ DON عند تحقيقها بواسطة a اللجنة. على سبيل المثال، قد يقتصر الوصول إلى الكتابة في دفتر الأستاذ على مستخدمين معينين، مثل قد يكون الوصول للقراءة لبعض التطبيقات، أي أنه لا يلزم أن يكون دفتر الأستاذ عامًا كما هو محدد أعلاه. وبالمثل، قد تسمح قواعد دفتر الأستاذ بتعديل البيانات أو تنقيحها. نحن لا نفعل ذلك ومع ذلك، فكر صراحةً في مثل هذه المتغيرات في هذه الورقة. يمكن للتصميم المعياري لـ DONs أن يدعم أيًا من مجموعة واسعة من BFT الحديثة protocols, e.g., Hotstuff[231]. سيعتمد الاختيار الدقيق على افتراضات الثقة و خصائص الشبكة بين العقد oracle. يمكن لـ DON من حيث المبدأ أن يكون بديلاً استخدم blockchain عالي الأداء بدون إذن لدفتر الأستاذ الخاص به في دوره الداعم طبقة 2 قابلة للتطوير بشكل متساوٍ أو نظام blockchain. وبالمثل، فإن التهجين ممكن أيضًا: يمكن أن يتكون DON من حيث المبدأ من العقد التي هي validators في موجودة blockchain، على سبيل المثال، في أنظمة إثبات الملكية التي يتم فيها اختيار اللجان للتنفيذ المعاملات، على سبيل المثال، [8، 81، 120، 146، 204]. يتطلب وضع التشغيل هذا ذلك تعمل العقد بطريقة الاستخدام المزدوج، أي تعمل كعقد blockchain و DON العقد. (انظر القسم 8.2 لمناقشة التقنيات لضمان الاستمرارية في التغيير اللجان والملحق و لبعض المحاذير بشأن الاختيار العشوائي للجنة.) من الناحية العملية، في خوارزميات BFT الحديثة، تقوم العقد بتوقيع الرسائل رقميًا على دفتر الأستاذ. نحن نفترض من أجل الراحة أن L لديه مفتاح عام مرتبط pkL وأن محتوياته يتم توقيعها بواسطة المفتاح الخاص المقابل. ينطبق هذا التدوين العام حتى عندما يتم توقيع البيانات الموجودة على L باستخدام توقيعات العتبة.5 تعتبر توقيعات العتبة ملائمة، لأنها تتيح هوية ثابتة لـ DON حتى مع تغييرات العضوية العقد التي تعمل عليه. (انظر الملحق ب.1.3.) وبالتالي فإننا نفترض أن skL مشترك بشكل سري بطريقة العتبة (k, n) لبعض معلمات الأمان k، على سبيل المثال، k = 2f + 1 و n = 3f + 1، حيث f هو عدد العقد التي يحتمل أن تكون معيبة. (باختيار k في هذا بهذه الطريقة، نحن نضمن أن العقد المعيبة لا يمكنها تعلم skL ولا تؤدي إلى رفض الخدمة هجوم يمنع استخدامه.) تأخذ الرسالة على L الشكل M = (m, z)، حيث m عبارة عن سلسلة وz فريدة رقم الفهرس التسلسلي. حيثما ينطبق ذلك، نكتب الرسائل في النموذج م = ⟨نوع الرسالة: الحمولة⟩. نوع الرسالة messageType هو السكر النحوي الذي يشير إلى وظيفة رسالة معينة. 4في الحالات التي يحقق فيها blockchain بدون نهائية دفتر الأستاذ، يتم عادةً تجريد التناقض بعيدًا عن طريق تجاهل الكتل العميقة غير الكافية أو "التقليم" [115]. 5In practice, some code bases, e.g., LibraBFT [205], a variant of Hotstuff, have currently adopted التوقيعات المتعددة، بدلاً من توقيعات العتبة، أدى التداول إلى تقليل تعقيد الاتصال هندسة أبسط. مع بعض التكلفة الإضافية، يمكن للعقد oracle إلحاق الحد الأدنى من التوقيعات بالرسائل مكتوبة إلى L حتى لو كان بروتوكول الإجماع المستخدم لـ L لا يستخدمها.2.3 التدوين نشير إلى مجموعة n oracle العقد التي تقوم بتشغيل دفتر الأستاذ بواسطة O = {Oi}n أنا = 1. مثل هذا غالبًا ما تسمى مجموعة العقد باللجنة. للتبسيط، نفترض أن مجموعة oracles التي تنفذ وظيفة DON، أي الخدمات الموجودة أعلى L، متطابقة مع أن الحفاظ على L، ولكن يمكن أن تكون متميزة. نسمح لـ pki بالإشارة إلى المفتاح العام لـ لاعب Oi، والتزلج على المفتاح الخاص المقابل. تتطلب معظم خوارزميات BFT ما لا يقل عن n = 3f + 1 عقد، حيث f هو عدد العقد العقد التي يحتمل أن تكون معيبة. العقد المتبقية صادقة، بمعنى أنها تتبع البروتوكول بالضبط كما هو محدد. ونشير إلى اللجنة يا صادقة إذا استوفت ذلك المتطلبات، أي أن لديها أكثر من 2/3 جزء من العقد الصادقة. ما لم يكن خلاف ذلك ذكرنا، نفترض أن يا صادق (ونموذج ثابت للفساد). نستخدم pkO/ skO بالتبادل مع pkL / skL، اعتمادا على السياق. ندع σ = Sigpk[m] تشير إلى التوقيع على الرسالة m فيما يتعلق بـ pk، أي باستخدام المفتاح الخاص المقابل sk. دع التحقق (pk، σ، m) → {false، true} يشير إلى خوارزمية التحقق من التوقيع المقابلة. (نترك الجيل الرئيسي ضمنيًا في جميع أنحاء الورقة.) نستخدم الرمز S للإشارة إلى مصدر البيانات وS للإشارة إلى المجموعة الكاملة مصادر nS في سياق معين. نشير بواسطة MAINCHAIN إلى تمكين العقد الذكي blockchain مدعوم بـ DON. نستخدم مصطلح عقد الاعتماد للدلالة على أي عقد ذكي عقد على MAINCHAIN الذي يتصل بـ DON، واستخدم الرمز SC لـ تشير إلى مثل هذا العقد. نحن نفترض بشكل عام أن DON يدعم سلسلة رئيسية واحدة MAINCHAIN، على الرغم من أنه يمكن أن يدعم العديد من هذه السلاسل، كما نوضح في الأمثلة في القسم 4. يمكن لـ DON أن يدعم عادةً عقودًا متعددة الاعتماد على MAINCHAIN. (كما كما هو مذكور أعلاه، يمكن أن يدعم DON بدلاً من ذلك الخدمات غير blockchain.) 2.4 ملاحظة حول نماذج الثقة كما هو مذكور أعلاه، قد يتم إنشاء DONs فوق بروتوكولات الإجماع القائمة على اللجنة، ونحن نتوقع أنهم سيستخدمون مثل هذه البروتوكولات بشكل شائع. هناك العديد من الحجج القوية التي يوفر أحد البديلين، القائم على اللجنة أو غير المسموح به blockchains أمان أقوى من الآخر. من المهم أن ندرك أن الأمن يعتمد على اللجنة مقابل عدم الإذن الأنظمة اللامركزية غير قابلة للقياس. المساس بإثبات العمل (PoW) أو إثبات الحصة (PoS) blockchain يتطلب الهجوم بنسبة 51% أن يحصل الخصم على أغلبية الموارد بشكل سريع الزوال و من المحتمل أن يكون مجهول الهوية، على سبيل المثال عن طريق استئجار hash الطاقة في نظام إثبات العمل (PoW). مثل هذا لقد أثرت الهجمات عمليًا بالفعل على العديد من blockchains [200، 34]. في المقابل، إن المساس بالنظام القائم على اللجان يعني إفساد عدد العتبة (عادة الثلث) من عقده، حيث قد تكون العقد معروفة للعامة، ومزودة بموارد جيدة، والجهات الجديرة بالثقة. ومن ناحية أخرى، فإن الأنظمة القائمة على اللجان (وكذلك الأنظمة "الهجينة" غير مسموح بها الأنظمة التي تدعم اللجان) يمكن أن تدعم وظائف أكثر مما هو مطلوب بشكل صارمأنظمة بلا مهمة. يتضمن ذلك القدرة على الحفاظ على الأسرار المستمرة، مثل التوقيع و/أو مفاتيح التشفير — أحد الاحتمالات في تصميماتنا. نؤكد على أنه يمكن من حيث المبدأ بناء DONs على مستوى اللجنة أو قد يختار بروتوكول الإجماع غير المسموح به وموزعي DON في النهاية اعتماده إما النهج. نماذج تعزيز الثقة: إحدى الميزات الرئيسية لـ Chainlink اليوم هي قدرة المستخدمين على ذلك حدد العقد بناءً على السجلات اللامركزية لسجلات أدائها، كما تمت مناقشته في القسم 3.6.4. تشكل آلية staking وإطار الحوافز الضمنية الذي نقدمه في القسم 9 معًا تصميمًا صارمًا وواسع النطاق للآلية إطار عمل من شأنه تمكين المستخدمين بقدرة موسعة بشكل كبير على قياس أمان DONs. هذا الإطار نفسه سيجعل من الممكن أيضًا لـ DONs أنفسهم لفرض متطلبات الأمان المختلفة على العقد المشاركة وضمان التشغيل ضمن نماذج الثقة القوية. من الممكن أيضًا استخدام الأدوات الموضحة في هذا البحث لـ DONs لفرض متطلبات نموذج الثقة الخاصة، مثل الامتثال للمتطلبات التنظيمية. ل على سبيل المثال، باستخدام التقنيات التي تمت مناقشتها في القسم 4.3، يمكن للعقد تقديم دليل على ذلك خصائص مشغل العقدة، على سبيل المثال، منطقة التشغيل، التي يمكن استخدامها للمساعدة فرض الامتثال، على سبيل المثال، المادة 3 من اللائحة العامة لحماية البيانات (GDPR) ("النطاق الإقليمي") [105]. قد يكون مثل هذا الامتثال أمرًا صعبًا يجتمع في الأنظمة اللامركزية [45]. بالإضافة إلى ذلك، نناقش في القسم 7 خططًا لتعزيز قوة DONs من خلال آليات تقليل الثقة في السلاسل الرئيسية التي يدعمونها.

Decentralized Oracle Network Interface and Ca-

Decentralized Oracle Network Interface and Ca-

pabilities Here we briefly sketch the capabilities of DONs in terms of the simple but powerful interface they are designed to realize. Applications on a DON are composed of executables and adapters. An executable is a program whose core logic is a deterministic program, analogous to a smart contract. An executable also has a number of accompanying initiators, programs that call entry points in the executable’s logic when predetermined events occur—e.g., at certain times (like a cron job), when a price crosses a threshold, etc.—much like Keepers (see Section 3.6.3). Adapters provide interfaces to off-chain resources and may be called by either the initiators or core logic in executables. As their behavior may depend on that of external resources, initiators and adapters may behave non-deterministically. We describe the DON developer interface and the functioning of executables and adapters in terms of the three resources typically used to characterize computing systems: networking, compute, and storage. We give a brief overview of each of these resources below and provide more details in Appendix B.

Adapters connecting a DON with different resources including blockchains, web servers, storage, and IoT devices

3.1 Networking Adapters are interfaces through which executables running on a DON can send and receive data from off-DON systems. Adapters may be viewed as a generalization of the adapters used in Chainlink today [20]. Adapters may be bidirectional—i.e., they cannot just pull, but push data from a DON to a web server. They may also leverage distributed protocols as well as cryptographic functionality such as secure multi-party computation. Figure 9: Adapters connecting a DON, denoted DON1, with a range of different resources, including another DON, denoted DON2, a blockchain (main chain) and its mempool, external storage, a web server, and IoT devices (via a web server). Examples of external resources for which adapters might be created are shown in Fig. 9. They include: • Blockchains: An adapter can define how to send transactions to a blockchain and how to read blocks, individual transactions, or other state from it. An adapter can also be defined for a blockchain’s mempool. (See Section 3.5.) • Web servers: Adapters can define APIs through which data may be retrieved from web servers, including legacy systems that are not specially adapted for interfacing with DONs. Such adapters can also include APIs to send data to such servers. The web servers to which a DON connects may serve as gateways to additional resources, such as Internet-of-Things (IoT) devices.

• External storage: An adapter can define methods to read and write to storage services outside the DON, such as a decentralized file system [40, 188] or cloud storage. • Other DONs: Adapters can retrieve and transmit data between DONs. We expect that initial deployments of DONs will include a set of building block adapters for such commonly used external resources and will further allow DON-specific adapters to be published by DON nodes. As smart contract developers write adapters today, we expect that they will build even more powerful adapters using this advanced functionality. We expect that ultimately it will be possible for users to create new adapters in a permissionless manner. Some adapters must be constructed in a way that ensures the persistence and availability of external resources controlled by a DON. For example, cloud storage may require maintenance of a cloud services account. Additionally, a DON can perform decentralized management of private keys on behalf of users (as in, e.g., [160]) and/or executables. Consequently, the DON is capable of controlling resources, such as cryptocurrency, that may be used, e.g., for sending transactions on a target blockchain. See Appendix B.1 for further details on DON adapters, as Appendix C for a few example adapters. 3.2 Computation An executable is the basic unit of code on a DON. An executable is a pair exec = (logic, init). Here, logic is a deterministic program with a number of designated entry points (logic1, logic2, . . . , logicℓ) and init is a set of corresponding initiators (init1, init2, . . . , inite). To ensure the full auditability of the DON, an executable’s logic uses the underlying ledger L for all inputs and outputs. Thus, for instance, any adapter data serving as input to an executable must be stored first on L. Initiators: Initiators in Chainlink today cause event-dependent job executions on Chainlink nodes [21]. Initiators in DONs function in much the same way. A DON initiator, however, is specifically associated with an executable. An initiator may depend on an external event or state, on the current time, or on a predicate on DON state. With their dependency on events, initiators may of course behave non-deterministically (as of course may adapters). An initiator can execute within individual DON nodes and so need not rely on an adapter. (See Example 1 below.) Initiators are an important feature distinguishing executables from smart contracts. Because an executable can run in response to an initiator, it can effectively operate autonomously, as of course by extension can a hybrid contract incorporating the executable. One form of initiators today are Chainlink Keepers, which provide transaction

automation services, triggering smart contract execution—such as liquidation of undercollateralized loans and execution of limit-order trades—based on oracle reports. Conveniently, initiators in DONs may also be viewed as a way of specifying the service agreements that apply to an executable, as they define the circumstances under which the DON must call it. The following example illustrates how initiators work within an executable: Example 1 (Deviation-triggered price feed). A smart contract SC may require fresh price-feed data (see Section 3.6.3) whenever there is a substantial change, e.g., 1%, in the exchange rate between a pair of assets, e.g., ETH-USD. Volatility-sensitive price feeds are supported in Chainlink today, but it is instructive to see how they can be realized on a DON by means of an executable execfeed. The executable execfeed maintains the most recent ETH-USD price r on L, in the form of a sequence of ⟨NewPrice : j, r⟩entries, where j is an index incremented with each price update. An initiator init1 causes each node Oi to monitor the current ETH-USD price for deviations of at least 1% from the most recently stored price r with index j. Upon detection of such a deviation, Oi writes its current view ri of the new price to L using an entry of the form ⟨PriceView : i, j + 1, ri⟩. A second initiator init2 fires when at least k such PriceView-entries with new price values for index j + 1 created by distinct nodes have accumulated on L. Then, init2 invokes an entry point logic2 to compute the median \(\rho\) of the first \(k\) fresh, valid priceview values and writes a fresh value ⟨NewPrice : j + 1, ρ⟩to L . (Operationally, nodes may take turns as designated writers.) A third initiator init3 watches for NewPrice entries on L. Whenever a new report ⟨NewPrice : j, r⟩appears there, it invokes an entry point logic3 that pushes (j, r) to SC using an adapter. As we have noted, an executable is similar in its capabilities to a smart contract. Apart from its higher performance, though, it differs from a typical main chain contract in two essential ways: 1. Confidentiality: An executable can perform confidential computation, i.e., a secret program may process cleartext inputs, or a published program may process secret input data, or a combination of both. In a simple model, secret data can be accessed by DON nodes, which conceal intermediate results and disclose only processed and sanitized values to MAINCHAIN. It is also possible to conceal sensitive data from DONs themselves: DONs are meant to support approaches such as multi-party computation, e.g., [42, 157], and trusted execution environments (TEEs) [84, 133, 152, 229] for this purpose.6 6By extension, keeping executables themselves secret with respect to DON nodes is also possible, although this is only practical today for non-trivial executables using TEEs.

  1. Supporting role: An executable is meant to support smart contracts on a main chain, rather than replace them. An executable has several limitations that a smart contract does not: (a) Trust model: An executable operates within the trust model defined by the DON: Its correct execution relies on the honest behavior of O. (A main chain can, however, provide some guard rails against DON malfeasance, as discussed in Section 7.3.) (b) Asset access: A DON can control an account on a blockchain—and thus control assets on it through an adapter. But a DON cannot authoritatively represent assets created on a main chain, e.g., Ether or ERC20 tokens, since their native chain maintains the authoritative record of their ownership. (c) Lifecycle: DONs may be stood up intentionally with limited lifetimes, as defined by on-chain service level agreements between DONs and the owners of relying contracts. Blockchains, in contrast, are meant to function as permanent archival systems. See Appendix B.2 for further details on DON computation. 3.3 Storage As a committee-based system, a DON can store moderate amounts of data persistently on L at much lower cost than a permissionless blockchain. Additionally, via adapters, DONs can reference external decentralized systems for data storage, e.g., Filecoin [85], and can thereby connect such systems to smart contracts. This option is particularly attractive for bulk data as a means of addressing the pervasive problem of “bloat” in blockchain systems. DONs can thus store data locally or externally for use in their specifically supported services. A DON can additionally make use of such data in a confidential way, computing on data that is: (1) secret-shared across DON nodes or encrypted under a key managed by DON nodes in ways suitable for secure multi-party computation or partial or fully homomorphic encryption; or (2) protected using a trusted execution environment. We expect that DONs will adopt a simple memory-management model common to smart-contract systems: An executable may only write to its own memory. Executables may, however, read from the memory of other executables. See Appendix B.3 for further details on DON storage. 3.4 Transaction-Execution Framework (TEF) DONs are intended to support contracts on a main chain MAINCHAIN (or on multiple main chains). The Transaction-Execution Framework (TEF), discussed in detail

in Section 6, is a general-purpose approach to the efficient execution of a contract SC across MAINCHAIN and a DON. The TEF is intended to support FSS and layer-2 technologies—simultaneously, if desired. Indeed, it is likely to serve as the main vehicle for use of FSS (and for that reason, we do not further discuss FSS in this section). Briefly, in TEF an original target contract SC designed or developed for MAINCHAIN is refactored into a hybrid contract. This refactoring produces the two interoperating pieces of the hybrid contract: a MAINCHAIN contract SCa that we refer to for clarity in the context of TEFs as an anchor contract and an executable execs on a DON. The contract SCa custodies users’ assets, executes authoritative state transitions, and also provides guard rails (see Section 7.3) against failures in the DON. The executable execs sequences transactions and provides associated oracle data for them. It can bundle transactions for SCa in any of a number of ways—e.g., using validity-proof-based or optimistic rollups, confidential execution by the DON, etc. We expect to develop tools that make it easy for developers to partition a contract SC written in a high-level language into pieces of MAINCHAIN and DON logic, SCa and execs respectively, that compose securely and efficiently. Using TEF to integrate high-performance transaction schemes with high-performance oracles is integral to our oracle scaling approach. 3.5 Mempool Services An important application-layer feature that we intend to deploy on DONs in support of FSS and the TEF are Mempool Services (MS). MS may be viewed as an adapter, but one with first-class support. MS provides support for legacy-compatible transaction processing. In this use, MS ingests from a main chain’s mempool those transactions intended for a target contract SC on MAINCHAIN. MS then passes these transactions to an executable on the DON, where they are processed in the desired way. MS data can be used by the DON to compose transactions that can then be passed directly to SC from the DON or to another contract that calls SC. For example, the DON can forward transactions harvested via MS, or it can use MS data to set gas prices for transactions it sends to MAINCHAIN. Because it monitors the mempool, MS can obtain transactions from users interacting directly with SC. Thus users may continue to generate their transactions using legacy software, i.e., applications unaware of the existence of MS and MS-configured contracts. (In this case, SC must be changed to ignore the original transactions and accept only those processed by the MS, so as to avoid double-processing.) For use with a target contract SC, MS can be used with FSS and/or the TEF.

3.6 Stepping Stones: Existing Chainlink Capabilities 3.6.1 Off-Chain Reporting (OCR) Off-Chain Reporting (OCR) [60] is a mechanism in Chainlink for oracle report aggregation and transmission to a relying contract SC. Recently deployed for Chainlink price feed networks, it represents a first step along the path to full DONs. At its core, OCR is a BFT protocol designed to operate in a partially synchronous network. It ensures liveness and correctness in the presence of \(f < n/3\) arbitrarily faulty nodes, guaranteeing the properties of Byzantine reliable broadcast, but it is not a complete BFT consensus protocol. Nodes do not maintain message logs that are consistent in the sense of representing a ledger that is identical in all of their views, and the leader of the protocol may equivocate without violating safety. OCR is currently designed for a particular message type: medianized aggregation of (at least \(2f + 1\)) values reported by participating nodes. It provides a key assurance on the reports it outputs for SC, called attested reports: The median value in an attested report is equal to or lies between values reported by two honest nodes. This property is the key safety condition for OCR. The leader may have some influence on the median value in an attested report, but only subject to this correctness condition. OCR can be extended to message types that aggregate values in different ways. While the Chainlink network’s liveness and correctness goals today do not require OCR to be a full-blown consensus protocol, they do require OCR to provide some additional forms of functionality not present in conventional BFT protocols, most notably: 1. All-or-nothing off-chain report broadcast: OCR ensures that an attested report is made quickly available to all honest nodes or none of them. This is a fairness property that helps ensure that honest nodes have an opportunity to participate in attested report transmission. 2. Reliable transmission: OCR ensures, even in the presence of faulty or malicious nodes, that all OCR reports and messages are transmitted to SC within a certain, pre-defined interval of time. This is a liveness property. 3. Contract-based trust minimization: SC filters out potentially erroneous OCRgenerated reports, e.g., if their reported values deviate significantly from other recently received ones. This is a form of extra-protocol correctness enforcement. All three of these properties will play a natural role in DONs. All-or-nothing offchain (DON) broadcast is an important building block for cryptoeconomic assurances around reliable transmission, which is in turn an essential adapter property. Trust minimization in SC is a type of guard rail, as discussed in Section 7.3. OCR also provides a basis for operational deployment and refinement of BFT protocols in Chainlink’s oracle networks and thus, as noted above, a path to the full functionality of DONs.

3.6.2 DECO and Town Crier DECO [234] and Town Crier [233] are a pair of related technologies currently being developed in Chainlink networks. Most web servers today allow users to connect over a secure channel using a protocol called Transport Layer Security (TLS) [94]. (HTTPS indicates a variant of HTTP that is enabled with TLS, i.e., URLs prefixed with “https” denote use of TLS for security.) Most TLS-enabled servers have a notable limitation, though: They don’t digitally sign data. Consequently, a user or Prover cannot present the data she receives from a server to a third party or Verifier, such as an oracle or smart contract, in a way that ensures the data’s authenticity. Even if a server were to digitally sign data, there remains a problem of confidentiality. A Prover may wish to redact or modify sensitive data before presenting it to a Verifier. Digital signatures are designed specifically to invalidate modified data, however. They thus prevent a Prover from making confidentiality-preserving alterations to data. (See Section 7.1 for more discussion.) DECO and Town Crier are designed to allow a Prover to obtain data from a web server and present it to a Verifier in a way that ensures integrity and confidentiality. The two systems preserve integrity in the sense that they ensure that data presented by the Prover to the Verifier originates authentically from the target server. They support confidentiality in the sense of allowing the Prover to redact or modify data (while still preserving integrity). A key feature of both systems is that they do not require any modifications to a target web server. They can operate with any existing TLS-enabled server. In fact, they are transparent to the server: From the viewpoint of the server, the Prover is establishing an ordinary connection. The two systems have similar goals, but differ in their trust models and implementations as we now briefly explain. DECO makes fundamental use of cryptographic protocols to achieve its integrity and confidentiality properties. While establishing a session with a target server using DECO, the Prover engages at the same time in an interactive protocol with the Verifier. This protocol enables the Prover to prove to the Verifier that it has received a given piece of data D from the server during its current session. The Prover can alternatively present the Verifier with a zero-knowledge proof of some property of D and thus not reveal D directly. In a typical use of DECO, a user or a single node can export data D from a private session with a web server to all of the nodes in a DON. As a result, the full DON can attest to the authenticity of D (or a fact derived from D via a zero-knowledge proof). In addition to the example applications given later in the paper, this capability can be used to amplify high-integrity access to a data source by a DON. Even if only one node has direct access to a data source—due, for instance, to an exclusive arrangement with a data provider—it remains possible for the entire DON to attest to the correctness of

reports emitted by that node. Town Crier relies on the use of a trusted execution environment (TEE) such as Intel SGX. Briefly, a TEE functions as a kind of black box that executes applications in a tamperproof and confidential way. In principle, even the owner of the host on which the TEE is running can neither (undetectably) alter a TEE-protected application nor view the application’s state, which may include secret data. Town Crier can achieve all of the functionality of DECO and more. DECO constrains the Prover to interaction with a single Verifier. In contrast, Town Crier enables a Prover to generate a publicly verifiable proof on data D fetched from a target server, i.e., a proof that anyone, even a smart contract, can verify directly. Town Crier can also securely ingest and make use of secrets (e.g., user credentials). The main limitation of Town Crier is its reliance on TEEs. Production TEEs have recently been shown to have a number of serious vulnerabilities, although the technology is in its infancy and will undoubtedly mature. See Appendices B.2.1 and B.2.2 for further discussion of TEEs. For a few example applications of DECO and Town Crier, see Sections 4.3, 4.5 and 9.4.3 and Appendix C.1. 3.6.3 Existing On-Chain Chainlink Services Chainlink oracle networks provide a number of main services across a multiplicity of blockchains and other decentralized systems today. Further evolution as described in this whitepaper will endow these existing services with additional capabilities and reach. Three examples are: Data feeds: Today, the majority of Chainlink users relying on smart contracts make use of data feeds. These are reports on the current value of key pieces of data according to authoritative off-chain sources. For example, price feeds are feeds reporting the prices of assets—cryptocurrencies, commodities, forex, indexes, equities, etc.—according to exchanges or data-aggregation services. Such feeds today already help secure billions of dollars in on-chain value through their use in DeFi systems such as Aave [147] and Synthetix [208]. Other examples of Chainlink data feeds include weather data for parametric crop insurance [75] and election data [93], among a number of others. The deployment of DONs and other technologies described in this paper will enhance provision of data feeds in Chainlink networks in many ways, including: • Scaling: OCR and subsequently DONs aim to enable Chainlink services to scale dramatically across the many blockchains they support. For example, we expect that DONs will help increase the number of data feeds provided by nodes using Chainlink from 100s to 1000s and beyond. Such scaling will help the Chainlink ecosystem achieve its goal of furnishing data relevant to smart contracts comprehensively and both meeting and anticipating existing and future needs.

• Enhanced security: By storing intermediate reports, DONs will retain records of node behaviors for high-fidelity monitoring and measurement of their performance and accuracy, enabling strong empirical grounding of reputation systems for Chainlink nodes. FSS and the TEF will enable price feeds to be incorporated with transaction data in flexible ways that prevent attacks such as front-running. (Explicit) staking will bolster existing cryptoeconomic protection of the security of data feeds. • Feed agility: As blockchain-agnostic systems (indeed, more broadly, consumeragnostic systems), DONs can facilitate the provision of data feeds to a multiplicity of relying systems. A single DON can push a given feed simultaneously to a set of different blockchains, eliminating the need for per-chain oracle networks and enabling rapid deployment of existing feeds on new blockchains and of additional feeds across currently serviced blockchains. • Confidentiality: The ability to perform generalized computation in a DON enables computations on sensitive data to take place offchain, avoiding on-chain exposure. Additionally, using DECO or Town Crier, it is possible to achieve even stronger confidentiality, allowing report generation based on data that isn’t exposed even to DON nodes. See Section 4.3 and Section 4.5 for examples. Verifiable Random Functions (VRFs): Several types of DApps require a verifiably correct source of randomness to enable verification of their own fair operation. Non-Fungible Tokens (NFTs) are an example. The rarity of NFT features in Aavegotchi [23] and Axie Infinity [35] is determined by Chainlink VRF, as is the distribution of NFTs by means of ticket-based drawings in Ether Cards [102]; the wide variety of gaming DApps whose outcomes are randomized; and unconventional financial instruments, e.g., no-loss savings games such as PoolTogether [89], which allocate funds to random winners. Other blockchain and non-blockchain applications also require secure sources of randomness, including selection of decentralized-system committees and the execution of lotteries. While block hashes can serve as a source of unpredictable randomness, they are vulnerable to manipulation by adversarial miners (and to some extent by users submitting transactions). Chainlink VRF [78] offers a considerably more secure alternative. An oracle has an associated private / public key pair (sk, pk) whose private key is maintained offchain and whose public key pk is published. To output a random value, it applies sk to an unpredictable seed x furnished by a relying contract (e.g., a block hash and DApp-specific parameters) using a function F, yielding y = Fsk(x) along with a proof of correctness. (See [180] for the VRF available on Chainlink.) What makes a VRF verifiable is the fact that with knowledge of pk, it is possible to check the correctness of the proof and therefore of y. The value y is consequently unpredictable to an adversary that cannot predict x or learn sk and infeasible for the service to manipulate.

Chainlink VRF may be viewed as just one of a family of applications that involve custodianship of private keys offchain. More generally, DONs can offer secure, decentralized storage of individual keys for applications and/or users, and combine this capability with generalized computation. The result is a host of applications, of which we give some examples in this paper, including key management for Proof of Reserves (see Section 4.1) and for users’ decentralized credentials (and other digital assets) (see Section 4.3). Keepers: Chainlink Keepers [87] enable developers to write code for decentralized execution of off-chain jobs, generally to trigger execution of relying smart contracts. Before the advent of Keepers, it was common for developers to operate such off-chain logic themselves, creating centralized points of failure (as well as considerable duplicated development effort). Keepers instead provide an easy-to-use framework for decentralized outsourcing of these operations, enabling shorter development cycles and strong assurance of liveness and other security properties. Keepers can support any of a wide variety of triggering goals, including price-dependent liquidation of loans or execution of financial transactions, time-dependent initiation of airdrops or payments in systems with yield harvesting, and so forth. In the DON framework, initiators may be viewed as a generalization of Keepers in several senses. Initiators may make use of adapters, and thus can leverage a modularized library of interfaces to on-chain and off-chain systems, permitting rapid development of secure, sophisticated functionality. Initiators initiate computation in executables, which themselves offer the full versatility of DONs, permitting the wide range of decentralized services we present in this paper for on-chain and off-chain applications. 3.6.4 Node Reputation / Performance History The existing Chainlink ecosystem natively documents the performance histories of contributing nodes on chain. This feature has given rise to a collection of reputationoriented resources that ingest, filter, and visualize performance data on individual node operators and data feeds. Users can reference these resources to make informed decisions in their selection of nodes and to monitor the operation of existing networks. Similar capabilities will help users choose DONs. For example, permissionless marketplaces today such as market.link allow node operators to list their oracle services and attest to their off-chain identities through services such as Keybase [4], which bind the profile of a node in Chainlink to its owner’s existing domain names and social media accounts. Additionally, performance analytics tools, such as those available at market.link and reputation.link, allow users to view statistics on the historical performance of individual nodes, including their average response latency, the deviation of values in their reports from consensus values relayed on chain, revenue generated, jobs fulfilled, and more. These analytics tools also allow users to track the adoption of various oracle networks by other users, a form of

implicit endorsement of the nodes securing such networks. The result is a flat “web of trust” in which, by using particular nodes, high-value decentralized applications create a signal of their trust in those nodes that other users can observe and factor into their own node-selection decisions. With DONs (and initially with OCR) comes a shift in transaction processing and contract activity more generally offchain. A decentralized model for recording node performance remains possible within the DON itself. Indeed, the high performance and data capacity of DONs make it possible to construct records in a fine-grained way and also to perform decentralized computation on these records, yielding trustworthy summaries that can be consumed by reputation services and checkpointed on MAINCHAIN. While it is possible for a DON in principle to misrepresent the behavior of constituent nodes if a large fraction of nodes is corrupted, we note that the collective performance of a DON itself in delivering on-chain data is visible on MAINCHAIN and thus cannot be misrepresented. Additionally, we plan to explore mechanisms that incentivize accurate internal reporting of node behaviors in a DON. For example, by reporting the subset of high-performing nodes that most quickly return data contributing to a report relayed on chain, a DON creates an incentive for nodes to contest incorrect reports: Incorrectly including nodes in this subset means incorrectly excluding nodes that should have been included and therefore invalidly penalizing them. Repeated reporting failures by a DON would also create an incentive for honest nodes to leave the DON. Decentralized compilation of accurate performance histories and the consequent ability of users to identify high-performing nodes and for node operators to build reputations are important distinguishing features of the Chainlink ecosystem. We show in Section 9 how we can reason about them as a key piece of a rigorous and expansive view of the economic security provided by DONs.

واجهة شبكة أوراكل اللامركزية وCa-

القدرات نحن هنا نرسم بإيجاز قدرات DONs من حيث البساطة ولكن القوية الواجهة التي تم تصميمها لتحقيقها. تتكون التطبيقات الموجودة على DON من ملفات تنفيذية ومحولات. الملف القابل للتنفيذ هو برنامج منطقه الأساسي هو برنامج حتمي، مشابه لـ smart contract. يحتوي الملف القابل للتنفيذ أيضًا على عدد من البادئين المصاحبين، وهي البرامج التي تستدعي الدخول نقاط في منطق الملف القابل للتنفيذ عند وقوع أحداث محددة مسبقًا، على سبيل المثال، في أوقات معينة (مثل وظيفة كرون)، عندما يتجاوز السعر الحد الأدنى، وما إلى ذلك - يشبه إلى حد كبير الحراس (انظر القسم 3.6.3). توفر المحولات واجهات للموارد خارج السلسلة ويمكن استدعاؤها بواسطة إما البادئين أو المنطق الأساسي في الملفات التنفيذية. لأن سلوكهم قد يعتمد على ذلك من الموارد الخارجية، قد يتصرف البادئون والمحولون بطريقة غير حتمية. نحن نصف واجهة المطور DON وعمل الملفات التنفيذية و المحولات من حيث الموارد الثلاثة المستخدمة عادةً لوصف أنظمة الحوسبة: الشبكات والحوسبة والتخزين. ونقدم لمحة موجزة عن كل واحدة منها الموارد أدناه وتقديم المزيد من التفاصيل في الملحق ب.

Adapters connecting a DON with different resources including blockchains, web servers, storage, and IoT devices

3.1 الشبكات المحولات هي واجهات يمكن من خلالها إرسال الملفات التنفيذية التي تعمل على DON و تلقي البيانات من أنظمة DON خارج. يمكن النظر إلى المحولات على أنها تعميم لـ المحولات المستخدمة في Chainlink اليوم [20]. قد تكون المحولات ثنائية الاتجاه، أي أنها لا يمكن سحب البيانات فحسب، بل دفعها من DON إلى خادم الويب. يمكنهم أيضًا الاستفادة البروتوكولات الموزعة بالإضافة إلى وظائف التشفير مثل تعدد الأطراف الآمن حساب. الشكل 9: المحولات التي تربط DON، يُشار إليه بـ DON1، مع مجموعة من الموارد المختلفة، بما في ذلك DON آخر، يُشار إليه بـ DON2، وblockchain (السلسلة الرئيسية) وملحقاتها mempool ووحدة التخزين الخارجية وخادم الويب وأجهزة إنترنت الأشياء (عبر خادم الويب). يتم عرض أمثلة للموارد الخارجية التي يمكن إنشاء محولات لها في الشكل 9. وهي تشمل: • Blockchains: يمكن للمحول تحديد كيفية إرسال المعاملات إلى blockchain و كيفية قراءة الكتل أو المعاملات الفردية أو أي حالة أخرى منها. محول يمكن أيضًا تعريفه لمجمع الذاكرة blockchain. (انظر القسم 3.5.) • خوادم الويب: يمكن للمحولات تحديد واجهات برمجة التطبيقات التي يمكن من خلالها استرداد البيانات من خوادم الويب، بما في ذلك الأنظمة القديمة التي لم يتم تكييفها خصيصًا لها التواصل مع DONs. يمكن أن تتضمن هذه المحولات أيضًا واجهات برمجة التطبيقات لإرسال البيانات إليها مثل هذه الخوادم. قد تكون خوادم الويب التي يتصل بها DON بمثابة بوابات إلى موارد إضافية، مثل أجهزة إنترنت الأشياء (IoT).• وحدة التخزين الخارجية: يمكن للمحول تحديد طرق القراءة والكتابة إلى وحدة التخزين خدمات خارج DON، مثل نظام الملفات اللامركزي [40، 188] أو السحابة تخزين. • DONs أخرى: يمكن للمحولات استرداد البيانات ونقلها بين DONs. نتوقع أن تتضمن عمليات النشر الأولية لـ DONs مجموعة من الكتل البرمجية الإنشائية محولات لمثل هذه الموارد الخارجية شائعة الاستخدام وستسمح أيضًا بـ DON-محدد المحولات التي سيتم نشرها بواسطة العقد DON. كما يكتب مطورو smart contract المحولات اليوم، نتوقع أن يقوموا ببناء محولات أكثر قوة باستخدام هذا المتقدم الوظيفة. نتوقع أنه في النهاية سيكون من الممكن للمستخدمين إنشاء محولات جديدة في ملف بطريقة غير مسموح بها. يجب إنشاء بعض المحولات بطريقة تضمن استمرارية وتوافر الموارد الخارجية التي يتحكم فيها DON. على سبيل المثال، قد يكون التخزين السحابي تتطلب صيانة حساب الخدمات السحابية. بالإضافة إلى ذلك، يمكن تنفيذ DON الإدارة اللامركزية للمفاتيح الخاصة نيابة عن المستخدمين (كما في، على سبيل المثال، [160]) و/أو الملفات التنفيذية. وبالتالي، فإن DON قادر على التحكم في الموارد، مثل العملة المشفرة، التي يمكن استخدامها، على سبيل المثال، لإرسال المعاملات على الهدف blockchain. راجع الملحق ب.1 لمزيد من التفاصيل حول محولات DON، كما هو الحال في الملحق ج لعدد قليل محولات المثال. 3.2 الحساب الملف القابل للتنفيذ هو الوحدة الأساسية للتعليمات البرمجية في DON. الملف القابل للتنفيذ هو زوج exec = (المنطق، الحرف الأول). هنا، المنطق هو برنامج حتمي مع عدد من المدخلات المعينة النقاط (logic1، logic2،...، logicℓ) وinit عبارة عن مجموعة من البادئات المقابلة (init1، init2،...، inite). لضمان إمكانية التدقيق الكامل لمنطق الملف القابل للتنفيذ DON يستخدم دفتر الأستاذ الأساسي L لجميع المدخلات والمخرجات. وهكذا، على سبيل المثال، أي محول يجب تخزين البيانات التي تعمل كمدخل للملف القابل للتنفيذ أولاً على L. المبادرون: يتسبب البادئون في Chainlink اليوم في تنفيذ عمليات تنفيذ مهام تعتمد على الحدث Chainlink العقد [21]. تعمل البادئات في DONs بنفس الطريقة تقريبًا. ومع ذلك، فإن البادئ DON يرتبط بشكل خاص بملف قابل للتنفيذ. قد يعتمد البادئ على حدث أو حالة خارجية، في الوقت الحالي، أو على مسند على حالة DON. ومع اعتمادهم على الأحداث، قد يتصرف المبادرون بالطبع بطريقة غير حتمية (وبطبيعة الحال قد محولات). يمكن للبادئ التنفيذ ضمن العقد الفردية DON ولذا لا داعي للاعتماد على المحول. (انظر المثال 1 أدناه.) تعد البادئات ميزة مهمة تميز الملفات التنفيذية عن smart contracts. نظرًا لأن الملف القابل للتنفيذ يمكن تشغيله استجابةً للبادئ، فإنه يمكن أن يعمل بشكل فعال بشكل مستقل، كما هو الحال بالطبع، يمكن لعقد مختلط يتضمن ما هو قابل للتنفيذ. أحد أشكال المبادرين اليوم هو Chainlink Keepers، الذي يوفر المعاملاتخدمات التشغيل الآلي، مما يؤدي إلى تنفيذ smart contract - مثل تصفية القروض غير المضمونة وتنفيذ عمليات التداول ذات الأوامر المحددة - استنادًا إلى تقارير oracle. ومن الملائم أيضًا أن يتم النظر إلى البادئين في DONs كطريقة لتحديد اتفاقيات الخدمة التي تنطبق على الملف القابل للتنفيذ، لأنها تحدد الظروف في ظلها والذي يجب أن يطلق عليه DON. يوضح المثال التالي كيفية عمل البادئين ضمن ملف قابل للتنفيذ: المثال 1 (موجز الأسعار الناتج عن الانحراف). قد يتطلب smart contract SC طازجًا بيانات تغذية الأسعار (انظر القسم 3.6.3) عندما يكون هناك تغيير جوهري، على سبيل المثال، 1%، في سعر الصرف بين زوج من الأصول، على سبيل المثال، ETH-USD. سعر حساس للتقلب يتم دعم الخلاصات في Chainlink اليوم، ولكن من المفيد أن نرى كيف يمكن أن تكون كذلك تم تحقيقه على DON عن طريق ملف تنفيذي قابل للتنفيذ. يحتفظ الملف التنفيذي القابل للتنفيذ بأحدث سعر لـ ETH-USD r على L، في شكل تسلسل ⟨NewPrice : j، r⟩entries، حيث j هو مؤشر متزايد بـ كل تحديث للسعر. يتسبب البادئ init1 في قيام كل عقدة Oi بمراقبة السعر الحالي لـ ETH-USD انحرافات لا تقل عن 1٪ من أحدث سعر مخزن r مع الفهرس j. على عند اكتشاف مثل هذا الانحراف، يكتب Oi وجهة نظره الحالية ri للسعر الجديد إلى L باستخدام إدخال النموذج ⟨PriceView : i, j + 1, ri⟩. يتم تشغيل البادئ الثاني عند تشغيل إدخالات PriceView على الأقل بسعر جديد تراكمت قيم الفهرس j + 1 التي تم إنشاؤها بواسطة العقد المميزة على L. ثم، init2 يستدعي منطق نقطة الدخول 2 لحساب الوسيط ρ لقيم عرض الأسعار الجديدة والصالحة الأولى k ويكتب قيمة جديدة ⟨NewPrice : j + 1, ρ⟩to L . (من الناحية التشغيلية، العقد قد يتناوبون ككتاب معينين.) يراقب البادئ الثالث init3 إدخالات NewPrice على L. كلما ظهر تقرير جديد ⟨سعر جديد: يظهر j, r⟩ هناك، وهو يستدعي منطق نقطة الدخول 3 الذي يدفع (j, r) إلى SC باستخدام محول. وكما لاحظنا، فإن الملف القابل للتنفيذ يشبه في قدراته smart contract. وبصرف النظر عن أدائها العالي، فهي تختلف عن عقد السلسلة الرئيسية النموذجي بطريقتين أساسيتين: 1. السرية: يمكن للملف القابل للتنفيذ إجراء عمليات حسابية سرية، أي أن برنامجًا سريًا قد يعالج مدخلات نص واضح، أو قد يقوم برنامج منشور بمعالجة بيانات الإدخال السرية، أو مزيج من الاثنين معا. في نموذج بسيط، يمكن للبيانات السرية يمكن الوصول إليها عن طريق العقد DON، والتي تخفي النتائج المتوسطة وتكشف فقط القيم المعالجة والمعقمة إلى MAINCHAIN. من الممكن أيضًا إخفاء البيانات الحساسة عن DONs أنفسهم: DONs تهدف إلى دعم الأساليب مثل كحساب متعدد الأطراف، على سبيل المثال، [42، 157]، وبيئات التنفيذ الموثوقة (TEEs) [84، 133، 152، 229] لهذا الغرض.6 6بالإضافة إلى ذلك، من الممكن أيضًا الحفاظ على سرية الملفات التنفيذية فيما يتعلق بالعقد DON، على الرغم من أن هذا أمر عملي فقط اليوم بالنسبة للملفات التنفيذية غير التافهة التي تستخدم TEEs.2. الدور الداعم: الملف القابل للتنفيذ يهدف إلى دعم smart contracts على الملف الرئيسي سلسلة، بدلا من استبدالها. يحتوي الملف القابل للتنفيذ على العديد من القيود التي أ smart contract لا: (أ) نموذج الثقة: يعمل الملف القابل للتنفيذ ضمن نموذج الثقة المحدد بواسطة DON: يعتمد تنفيذها الصحيح على السلوك الصادق لـ O. (A main ومع ذلك، يمكن للسلسلة توفير بعض حواجز الحماية ضد DON المخالفات، كما تمت مناقشته في القسم 7.3.) (ب) الوصول إلى الأصول: يمكن لـ DON التحكم في حساب على blockchain - وبالتالي السيطرة على الأصول عليه من خلال محول. لكن DON لا يمكن أن يكون بشكل رسمي تمثل الأصول التي تم إنشاؤها على سلسلة رئيسية، على سبيل المثال، Ether أو ERC20 tokens، منذ ذلك الحين تحتفظ سلسلتهم الأصلية بالسجل الرسمي لملكيتهم. (ج) دورة الحياة: قد يتم إيقاف DONs عمدًا مع فترات حياة محدودة، كما يتم تحديدها من خلال اتفاقيات مستوى الخدمة على السلسلة بين DONs والمالكين من الاعتماد على العقود. في المقابل، تهدف سلاسل الكتل إلى العمل أنظمة أرشفة دائمة. راجع الملحق ب.2 لمزيد من التفاصيل حول حساب DON. 3.3 التخزين باعتباره نظامًا قائمًا على اللجان، يستطيع DON تخزين كميات معتدلة من البيانات بشكل مستمر على L بتكلفة أقل بكثير من blockchain غير المسموح به. بالإضافة إلى ذلك، عبر المحولات، يمكن لـ DONs الرجوع إلى الأنظمة اللامركزية الخارجية لتخزين البيانات، على سبيل المثال، Filecoin [85]، وبالتالي يمكن توصيل هذه الأنظمة بـ smart contracts. هذا الخيار على وجه الخصوص جذابة للبيانات المجمعة كوسيلة لمعالجة مشكلة "الانتفاخ" المنتشرة في العالم أنظمة blockchain. وبالتالي يمكن لـ DONs تخزين البيانات محليًا أو خارجيًا لاستخدامها في الخدمات المدعومة بشكل خاص. يمكن لـ DON أيضًا الاستفادة من هذه البيانات بطريقة سرية، الحوسبة على البيانات التي: (1) تمت مشاركتها بشكل سري عبر عقد DON أو مشفرة بموجب مفتاح تتم إدارته بواسطة العقد DON بطرق مناسبة للحساب الآمن متعدد الأطراف أو التشفير المتماثل الجزئي أو الكامل؛ أو (2) محمي باستخدام تنفيذ موثوق به بيئة. نتوقع أن يتبنى DONs نموذجًا بسيطًا لإدارة الذاكرة شائعًا أنظمة العقود الذكية: لا يجوز كتابة الملف القابل للتنفيذ إلا في ذاكرته الخاصة. الملفات التنفيذية ومع ذلك، يمكن قراءتها من ذاكرة الملفات التنفيذية الأخرى. راجع الملحق ب.3 لمزيد من التفاصيل حول تخزين DON. 3.4 إطار تنفيذ المعاملات (TEF) DONs تهدف إلى دعم العقود على سلسلة رئيسية MAINCHAIN (أو على سلاسل رئيسية متعددة). تمت مناقشة إطار تنفيذ المعاملات (TEF) بالتفصيلفي القسم 6، هو نهج للأغراض العامة للتنفيذ الفعال للعقد SC عبر MAINCHAIN وDON. والمقصود من TEF هو دعم الخدمة الثابتة الساتلية (FSS) والطبقة الثانية التقنيات - في وقت واحد، إذا رغبت في ذلك. في الواقع، من المرجح أن تكون بمثابة الوسيلة الرئيسية لاستخدام الخدمة الثابتة الساتلية (ولهذا السبب، فإننا لا نناقش الخدمة الثابتة الساتلية بشكل أكبر في هذا القسم). باختصار، في TEF، تم تصميم أو تطوير عقد SC الأصلي لـ MAINCHAIN يتم إعادة هيكلتها في عقد هجين. تنتج عملية إعادة البناء هذه العملين المتداخلين أجزاء من العقد المختلط: عقد MAINCHAIN SCa الذي نشير إليه للتوضيح في سياق TEFs كعقد أساسي وعقد تنفيذي قابل للتنفيذ على DON. ال يتولى عقد SCa حراسة أصول المستخدمين، وتنفيذ عمليات نقل الحالة الرسمية، وأيضًا يوفر قضبان حماية (انظر القسم 7.3) ضد الأعطال في DON. التنفيذيين القابل للتنفيذ تسلسل المعاملات ويوفر بيانات oracle المرتبطة بها. يمكن أن حزمة معاملات SCa بأي من الطرق العديدة - على سبيل المثال، باستخدام إثبات الصلاحية أو rollups متفائل، والتنفيذ السري بواسطة DON، وما إلى ذلك. نتوقع تطوير أدوات تسهل على المطورين تقسيم العقد SC مكتوبة بلغة عالية المستوى إلى أجزاء من منطق MAINCHAIN وDON وSCa و execs على التوالي، والتي يتم الإنشاء بشكل آمن وفعال. استخدام TEF لدمج أنظمة المعاملات عالية الأداء مع الأداء العالي يعد oracles جزءًا لا يتجزأ من نهجنا في التوسع oracle. 3.5 خدمات ميمبول إحدى ميزات طبقة التطبيق المهمة التي نعتزم نشرها على DONs لدعمها FSS وTEF هما خدمات Mempool (MS). يمكن النظر إلى MS كمحول، ولكن مع دعم من الدرجة الأولى. يوفر MS الدعم لمعالجة المعاملات المتوافقة مع التراث. في هذا الاستخدام، MS يستوعب من مجموعة ذكريات السلسلة الرئيسية تلك المعاملات المخصصة لعقد مستهدف SC على مينشين. يقوم MS بعد ذلك بتمرير هذه المعاملات إلى ملف قابل للتنفيذ على DON، حيث تتم معالجتها بالطريقة المطلوبة. يمكن استخدام بيانات MS بواسطة DON لإنشاء المعاملات التي يمكن بعد ذلك تمريرها مباشرة إلى SC من DON أو إلى عقد آخر يدعو SC. على سبيل المثال، يمكن لـ DON إعادة توجيه المعاملات يتم حصادها عبر MS، أو يمكنها استخدام بيانات MS لتحديد أسعار الغاز للمعاملات التي ترسلها مينشين. ولأنه يراقب مجمع الذاكرة، يستطيع MS الحصول على المعاملات من المستخدمين الذين يتفاعلون مباشرة مع SC. وبالتالي يمكن للمستخدمين الاستمرار في إنشاء معاملاتهم باستخدام البرامج القديمة، أي التطبيقات غير المدركة لوجود MS وMS العقود. (في هذه الحالة، يجب تغيير SC لتجاهل المعاملات الأصلية و تقبل فقط تلك التي تتم معالجتها بواسطة MS، وذلك لتجنب المعالجة المزدوجة.) للاستخدام مع العقد المستهدف SC، يمكن استخدام MS مع FSS و/أو TEF.3.6 نقطة الانطلاق: قدرات Chainlink الموجودة 3.6.1 التقارير خارج السلسلة (OCR) تعد التقارير خارج السلسلة (OCR) [60] آلية في Chainlink لتجميع التقارير oracle ونقلها إلى عقد معتمد SC. تم نشره مؤخرًا بسعر Chainlink شبكات التغذية، فهي تمثل خطوة أولى على الطريق إلى DONs الكاملة. في جوهره، يعد التعرف الضوئي على الحروف (OCR) بمثابة بروتوكول BFT مصمم للعمل بشكل متزامن جزئيًا شبكة. إنه يضمن الحيوية والصحة في وجود f < n/3 بشكل تعسفي العقد المعيبة التي تضمن خصائص البث البيزنطي الموثوق به، لكنها ليست كذلك بروتوكول إجماع BFT كامل. لا تحتفظ العقد بسجلات الرسائل الموجودة متسقة بمعنى تمثيل دفتر أستاذ متطابق في جميع وجهات نظرهم، ويجوز لقائد البروتوكول المراوغة دون انتهاك السلامة. تم تصميم تقنية التعرف الضوئي على الحروف (OCR) حاليًا لنوع معين من الرسائل: التجميع المتوسط لـ (على الأقل 2f +1) القيم التي أبلغت عنها العقد المشاركة. ويوفر ضمانًا أساسيًا بشأن وتسمى التقارير التي تخرجها لـ SC التقارير المعتمدة: القيمة المتوسطة في الشهادة التقرير يساوي أو يقع بين القيم التي تم الإبلاغ عنها بواسطة عقدتين صادقتين. هذه الخاصية شرط السلامة الرئيسي للتعرف الضوئي على الحروف. قد يكون للقائد بعض التأثير على الوسيط القيمة في تقرير مصدق، ولكن تخضع فقط لشرط الصحة هذا. يمكن التعرف الضوئي على الحروف يمكن توسيعها لتشمل أنواع الرسائل التي تجمع القيم بطرق مختلفة. في حين أن أهداف حيوية وصحة الشبكة Chainlink اليوم لا تتطلب ذلك نظرًا لأن تقنية التعرف الضوئي على الحروف (OCR) عبارة عن بروتوكول إجماع كامل، فإنها تتطلب تقنية التعرف الضوئي على الحروف (OCR) لتوفير بعض الأشكال الإضافية من الوظائف غير الموجودة في بروتوكولات BFT التقليدية، وأبرزها: 1. بث تقرير الكل أو لا شيء خارج السلسلة: يضمن التعرف الضوئي على الحروف (OCR) أن التقرير المصدق أصبح متاحًا بسرعة لجميع العقد الصادقة أو لا شيء منهم. هذا هو الإنصاف خاصية تساعد على ضمان حصول العقد الصادقة على فرصة المشاركة في نقل التقرير الموثق. 2. نقل موثوق: يضمن التعرف الضوئي على الحروف (OCR)، حتى في حالة وجود خلل أو ضار العقد، حيث يتم نقل جميع تقارير ورسائل التعرف الضوئي على الحروف إلى SC خلال فترة معينة، فترة زمنية محددة مسبقا. هذه خاصية حيوية. 3. تقليل الثقة على أساس العقد: تقوم SC بتصفية التقارير التي يحتمل أن تكون خاطئة من خلال التعرف الضوئي على الحروف، على سبيل المثال، إذا كانت قيمها المُبلغ عنها تنحرف بشكل كبير عن القيم الأخرى تلك التي تم استلامها مؤخرًا. يعد هذا أحد أشكال تطبيق صحة البروتوكول الإضافي. ستلعب كل هذه الخصائص الثلاثة دورًا طبيعيًا في DONs. يعد بث الكل أو لا شيء خارج السلسلة (DON) لبنة بناء مهمة لضمانات الاقتصاد المشفر حول ناقل الحركة الموثوق به، والذي يعد بدوره خاصية محول أساسية. الثقة إن التقليل في SC هو نوع من حاجز الحماية، كما تمت مناقشته في القسم 7.3. يوفر التعرف الضوئي على الحروف (OCR) أيضًا أساسًا للنشر التشغيلي وتحسين بروتوكولات BFT في شبكات oracle الخاصة بـ oracle وبالتالي، كما هو مذكور أعلاه، مسارًا إلى التنفيذ الكامل وظائف DONs.3.6.2 ديكو وتاون كريير DECO [234] وTown Crier [233] هما زوج من التقنيات ذات الصلة التي يتم حاليًا تطويرها تم تطويره في شبكات Chainlink. تسمح معظم خوادم الويب اليوم للمستخدمين بالاتصال عبر قناة آمنة باستخدام بروتوكول يُسمى أمان طبقة النقل (TLS) [94]. (HTTPS يشير إلى متغير HTTP الذي تم تمكينه باستخدام TLS، أي أن عناوين URL التي تسبقها "https" تشير إلى استخدام TLS للأمان.) على الرغم من ذلك، فإن معظم الخوادم التي تدعم TLS لديها قيود ملحوظة: فهي لا تقوم بالتوقيع رقميًا data. وبالتالي، لا يمكن للمستخدم أو المُثبت تقديم البيانات التي يتلقاها من الخادم إلى طرف ثالث أو جهة التحقق، مثل oracle أو smart contract، بطريقة تضمن صحة البيانات. وحتى لو قام الخادم بتوقيع البيانات رقميًا، تظل هناك مشكلة تتعلق بالسرية. قد يرغب المُثبت في تنقيح البيانات الحساسة أو تعديلها قبل تقديمها إلى أ المتحقق. ومع ذلك، تم تصميم التوقيعات الرقمية خصيصًا لإبطال البيانات المعدلة. وبالتالي، فإنها تمنع المُثبِّت من إجراء تعديلات للحفاظ على السرية إلى البيانات. (انظر القسم 7.1 لمزيد من المناقشة.) تم تصميم DECO وTown Crier للسماح للمثبت بالحصول على البيانات من الويب الخادم وتقديمها إلى جهة التحقق بطريقة تضمن النزاهة والسرية. يحافظ النظامان على النزاهة بمعنى أنهما يضمنان أن البيانات المقدمة من قبل ينشأ المثبت إلى المدقق بشكل أصلي من الخادم الهدف. إنهم يدعمون السرية بمعنى السماح للمحقق بتنقيح البيانات أو تعديلها (في حين لا يزال الحفاظ على النزاهة). الميزة الرئيسية لكلا النظامين هي أنهما لا يتطلبان أي تعديلات على أي منهما خادم الويب المستهدف. يمكنهم العمل مع أي خادم موجود يدعم TLS. في الواقع، فهي شفافة بالنسبة للخادم: من وجهة نظر الخادم، يكون Prover كذلك إنشاء اتصال عادي. لدى النظامين أهداف متشابهة، لكنهما يختلفان في نماذج الثقة وتطبيقاتهما كما نوضح الآن بإيجاز. يستخدم DECO بشكل أساسي بروتوكولات التشفير لتحقيق سلامته وخصائص السرية. أثناء إنشاء جلسة مع خادم مستهدف باستخدام DECO، يشارك Prover في نفس الوقت في بروتوكول تفاعلي مع المتحقق. يتيح هذا البروتوكول للمحقق أن يثبت للمدقق أنه قد استلمه جزء معين من البيانات D من الخادم أثناء جلسته الحالية. يستطيع البرهان وبدلاً من ذلك، قدم للمدقق دليلاً على عدم المعرفة ببعض خصائص D وبالتالي لا تكشف د مباشرة. في الاستخدام النموذجي لـ DECO، يمكن لمستخدم أو عقدة واحدة تصدير البيانات D من عقدة خاصة جلسة مع خادم الويب لجميع العقد في DON. ونتيجة لذلك، يمكن DON الكامل يشهد على صحة D (أو حقيقة مشتقة من D عبر إثبات المعرفة الصفرية). بالإضافة إلى أمثلة التطبيقات الواردة لاحقًا في هذه الورقة، يمكن أن تكون هذه الإمكانية يُستخدم لتضخيم الوصول عالي التكامل إلى مصدر البيانات بواسطة DON. حتى لو عقدة واحدة فقط لديه إمكانية الوصول المباشر إلى مصدر البيانات، على سبيل المثال، بسبب اتفاق حصري معه مزود البيانات - يظل من الممكن لـ DON بأكمله أن يشهد على صحةالتقارير المنبعثة من تلك العقدة. يعتمد Town Crier على استخدام بيئة تنفيذ موثوقة (TEE) مثل Intel سغس. باختصار، يعمل TEE كنوع من الصندوق الأسود الذي ينفذ التطبيقات في ملف واحد طريقة سرية ومضادة للتلاعب. من حيث المبدأ، حتى صاحب المضيف الذي لا يمكن لـ TEE قيد التشغيل (بشكل غير قابل للاكتشاف) تغيير تطبيق محمي بـ TEE ولا عرض حالة التطبيق، والتي قد تتضمن بيانات سرية. يمكن لـ Town Crier تحقيق جميع وظائف DECO والمزيد. يقيد DECO المُثبت على التفاعل مع مدقق واحد. في المقابل، تاون كراير تمكن مُثبت لإنشاء دليل يمكن التحقق منه بشكل عام على البيانات D التي تم جلبها من خادم مستهدف، أي دليل على أن أي شخص، حتى smart contract، يمكنه التحقق مباشرة. يستطيع تاون كريير وأيضًا استيعاب الأسرار واستخدامها بشكل آمن (على سبيل المثال، بيانات اعتماد المستخدم). القيد الرئيسي في Town Crier هو اعتمادها على TEEs. TEEs الإنتاج لديها وقد ثبت مؤخرًا أنها تحتوي على عدد من نقاط الضعف الخطيرة، على الرغم من أن التكنولوجيا لا تزال في مهدها وسوف تنضج بلا شك. انظر الملحقين B.2.1 وB.2.2 للاطلاع على مزيد من المناقشة حول TEEs. للحصول على بعض الأمثلة على تطبيقات DECO وTown Crier، راجع الأقسام 4.3 و4.5 و9.4.3 والملحق ج.1. 3.6.3 الخدمات الموجودة على السلسلة Chainlink توفر شبكات Chainlink oracle عددًا من الخدمات الرئيسية عبر عدد كبير من blockchains والأنظمة اللامركزية الأخرى اليوم. مزيد من التطور كما هو موضح في هذا المستند التقني، ستمنح هذه الخدمات الحالية إمكانات وميزات إضافية الوصول. ثلاثة أمثلة هي: خلاصات البيانات: اليوم، يعتمد غالبية مستخدمي Chainlink على smart contracts. استخدام خلاصات البيانات. هذه تقارير عن القيمة الحالية للأجزاء الرئيسية من البيانات وفقًا لذلك إلى مصادر موثوقة خارج السلسلة. على سبيل المثال، خلاصات الأسعار هي خلاصات تبلغ عن الأسعار الأصول - العملات المشفرة، والسلع، والعملات الأجنبية، والمؤشرات، والأسهم، وما إلى ذلك - وفقًا لـ خدمات التبادل أو تجميع البيانات. تساعد مثل هذه الخلاصات اليوم بالفعل في تأمين المليارات من الدولارات من القيمة على السلسلة من خلال استخدامها في أنظمة DeFi مثل Aave [147] و سينثيتيكس [208]. تتضمن الأمثلة الأخرى لخلاصات بيانات Chainlink بيانات الطقس لـ التأمين على المحاصيل البارامترية [75] وبيانات الانتخابات [93]، من بين عدد آخر. سيؤدي نشر DONs والتقنيات الأخرى الموضحة في هذه المقالة إلى تحسين توفير خلاصات البيانات في شبكات Chainlink بعدة طرق، بما في ذلك: • القياس: يهدف التعرف الضوئي على الحروف (OCR) ومن ثم DONs إلى تمكين خدمات Chainlink على نطاق واسع بشكل كبير عبر العديد من blockchains التي يدعمونها. على سبيل المثال، نتوقع أن DONs سيساعد في زيادة عدد خلاصات البيانات التي توفرها العقد التي تستخدمها Chainlink من 100 إلى 1000 وما بعدها. سيساعد هذا القياس Chainlink يحقق النظام البيئي هدفه المتمثل في توفير البيانات ذات الصلة بـ smart contracts بشكل شامل وتلبية وتوقع الاحتياجات الحالية والمستقبلية.• أمان محسّن: من خلال تخزين التقارير المتوسطة، سيحتفظ DONs بالسجلات سلوكيات العقدة لمراقبة عالية الدقة وقياس أدائها ودقتها، مما يتيح أسسًا تجريبية قوية لأنظمة السمعة للعقد Chainlink. وسيعمل FSS وTEF على تمكين دمج خلاصات الأسعار مع بيانات المعاملات بطرق مرنة تمنع الهجمات مثل التشغيل الأمامي. (صريح) staking سيعزز الحماية الاقتصادية المشفرة الحالية للأمن من خلاصات البيانات. • سرعة التغذية: نظرًا لأن blockchain أنظمة غير محددة (في الواقع، على نطاق أوسع، أنظمة غير محددة للمستهلك)، فإن DON يمكن أن تسهل توفير خلاصات البيانات لعدد كبير من الأشخاص من أنظمة الاعتماد. يمكن لـ DON واحد أن يدفع خلاصة معينة في وقت واحد إلى مجموعة من blockchains المختلفة، مما يلغي الحاجة إلى شبكات oracle لكل سلسلة و تمكين النشر السريع للخلاصات الموجودة على blockchains الجديدة والإضافية الخلاصات عبر blockchains التي تتم خدمتها حاليًا. • السرية: تتيح القدرة على إجراء عمليات حسابية معممة في DON إجراء العمليات الحسابية على البيانات الحساسة خارج السلسلة، مما يتجنب إجراء العمليات الحسابية على السلسلة التعرض. بالإضافة إلى ذلك، باستخدام DECO أو Town Crier، من الممكن تحقيقه وسرية أكبر، مما يسمح بإنشاء التقارير بناءً على بيانات غير موجودة يتعرض حتى لعقد DON. انظر القسم 4.3 والقسم 4.5 للحصول على أمثلة. وظائف عشوائية يمكن التحقق منها (VRFs): تتطلب العديد من أنواع التطبيقات اللامركزية (DApps) مصدرًا عشوائيًا صحيحًا يمكن التحقق منه لتمكين التحقق من عملها العادل. تعتبر الرموز غير القابلة للاستبدال (NFTs) مثالاً على ذلك. يتم تحديد ندرة ميزات NFT في Aavegotchi [23] وAxie Infinity [35] بواسطة Chainlink VRF، كما هو الحال مع التوزيع من NFTs عن طريق الرسومات المستندة إلى التذاكر في بطاقات الأثير [102]؛ مجموعة واسعة من تطبيقات الألعاب اللامركزية التي تكون نتائجها عشوائية؛ والأدوات المالية غير التقليدية، على سبيل المثال، ألعاب الادخار بدون خسارة مثل PoolTogether [89]، والتي تخصص الأموال الفائزين عشوائي. تتطلب التطبيقات الأخرى blockchain وغير blockchain أيضًا أمانًا مصادر العشوائية، بما في ذلك اختيار لجان النظام اللامركزي و تنفيذ اليانصيب. على الرغم من أن الكتلة hashes يمكن أن تكون بمثابة مصدر للعشوائية التي لا يمكن التنبؤ بها، إلا أنها عرضة للتلاعب من قبل القائمين بالتعدين المنافسين (وإلى حد ما من قبل المستخدمين الذين يرسلون المعاملات). يقدم Chainlink VRF [78] بديلاً أكثر أمانًا إلى حد كبير. ان يحتوي oracle على زوج مفاتيح خاص/عام مرتبط (sk, pk) يتم الاحتفاظ بمفتاحه الخاص خارج السلسلة ويتم نشر مفتاحه العام pk. لإخراج قيمة عشوائية، فإنه يطبق sk على بذرة x غير متوقعة مقدمة من عقد الاعتماد (على سبيل المثال، كتلة hash) والمعلمات الخاصة بـ DApp) باستخدام الدالة F، مما يؤدي إلى y = Fsk(x) مع a دليل على صحة. (راجع [180] للتعرف على VRF المتوفر على Chainlink.) ما الذي يجعل VRF الذي يمكن التحقق منه هو حقيقة أنه من خلال معرفة pk، من الممكن التحقق من صحة الدليل وبالتالي صحة y. وبالتالي فإن القيمة y لا يمكن التنبؤ بها بالنسبة لـ an خصم لا يمكنه التنبؤ بـ x أو تعلم sk ولا يمكن للخدمة التلاعب به.Chainlink يمكن النظر إلى VRF على أنه مجرد واحد من مجموعة من التطبيقات التي تتضمن رعاية المفاتيح الخاصة خارج السلسلة. وبشكل أكثر عمومية، يمكن لـ DONs توفير الأمان، التخزين اللامركزي للمفاتيح الفردية للتطبيقات و/أو المستخدمين والجمع بينها هذه القدرة مع الحساب المعمم. والنتيجة هي مجموعة من التطبيقات، من والتي نعطيها بعض الأمثلة في هذه الورقة، بما في ذلك الإدارة الرئيسية لإثبات الاحتياطيات (انظر القسم 4.1) وبالنسبة لبيانات الاعتماد اللامركزية للمستخدمين (وغيرها من البيانات الرقمية). الأصول) (انظر القسم 4.3). الحراس: Chainlink Keepers [87] يمكّن المطورين من كتابة التعليمات البرمجية للأنظمة اللامركزية تنفيذ المهام خارج السلسلة، بشكل عام لتحفيز تنفيذ الاعتماد على smart contracts. قبل ظهور Keepers، كان من الشائع بالنسبة للمطورين تشغيل مثل هذه الخدمات خارج السلسلة المنطق نفسه، مما يخلق نقاط فشل مركزية (فضلاً عن جهود تطوير مكررة كبيرة). يوفر Keepers بدلاً من ذلك إطار عمل سهل الاستخدام لـ الاستعانة بمصادر خارجية لامركزية لهذه العمليات، مما يتيح دورات تطوير أقصر و ضمان قوي للحيوية والخصائص الأمنية الأخرى. يمكن للحافظين دعم أي لمجموعة واسعة من الأهداف المحفزة، بما في ذلك تصفية القروض المعتمدة على السعر أو تنفيذ المعاملات المالية، وبدء عمليات الإنزال الجوي أو المدفوعات التي تعتمد على الوقت في الأنظمة التي تعتمد على حصاد المحصول، وما إلى ذلك. في إطار عمل DON، يمكن النظر إلى البادئين على أنهم تعميم لـ Keepers بعدة معانٍ. يمكن للبادئين الاستفادة من المحولات، وبالتالي يمكنهم الاستفادة من أ مكتبة نمطية من الواجهات للأنظمة الموجودة على السلسلة وخارجها، مما يسمح بسرعة تطوير وظائف آمنة ومتطورة. يبدأ المبادرون الحساب في الملفات التنفيذية، والتي توفر بحد ذاتها التنوع الكامل لـ DONs، مما يسمح بالنطاق الواسع مجموعة من الخدمات اللامركزية التي نقدمها في هذه الورقة للتطبيقات المتصلة بالسلسلة وخارجها. 3.6.4 سمعة العقدة / تاريخ الأداء يوثق النظام البيئي الحالي Chainlink أصلاً تاريخ أداء العقد المساهمة على السلسلة. وقد أدت هذه الميزة إلى ظهور مجموعة من الموارد الموجهة نحو السمعة والتي تستوعب بيانات الأداء وتصفيتها وتصورها على الأفراد. مشغلي العقدة وخلاصات البيانات. يمكن للمستخدمين الرجوع إلى هذه الموارد لجعلها على علم اتخاذ القرارات في اختيار العقد ومراقبة تشغيل الشبكات الحالية. ستساعد الإمكانيات المماثلة المستخدمين على اختيار DONs. على سبيل المثال، تسمح الأسواق غير المسموح بها اليوم مثلmarket.link بالعقدة يقوم المشغلون بإدراج خدمات oracle الخاصة بهم والشهادة على هوياتهم خارج السلسلة من خلال خدمات مثل Keybase [4]، والتي تربط ملف تعريف العقدة في Chainlink بـها أسماء النطاقات الحالية للمالك وحسابات الوسائط الاجتماعية. بالإضافة إلى ذلك، الأداء تسمح أدوات التحليلات، مثل تلك المتاحة علىmarket.link وreputation.link للمستخدمين لعرض إحصائيات حول الأداء التاريخي للعقد الفردية، بما في ذلك متوسط زمن الاستجابة، وانحراف القيم في تقاريرهم عن القيم المتفق عليها يتم ترحيلها على السلسلة، والإيرادات المولدة، والوظائف التي تم إنجازها، والمزيد. أدوات التحليل هذه أيضًا السماح للمستخدمين بتتبع اعتماد شبكات oracle المختلفة من قبل مستخدمين آخرين، وهو شكل من أشكالتأييد ضمني للعقد التي تؤمن هذه الشبكات. والنتيجة هي "شبكة مسطحة من". الثقة" التي يتم من خلالها إنشاء تطبيقات لامركزية عالية القيمة باستخدام عقد معينة إشارة إلى ثقتهم في تلك العقد التي يمكن للمستخدمين الآخرين مراقبتها وأخذها في الاعتبار قرارات اختيار العقدة الخاصة. مع DONs (وفي البداية مع التعرف الضوئي على الحروف) يأتي تحول في معالجة المعاملات و نشاط العقد بشكل عام خارج السلسلة. نموذج لامركزي لتسجيل العقدة يظل الأداء ممكنًا داخل DON نفسه. والواقع أن الأداء العالي وسعة البيانات DONs تجعل من الممكن إنشاء سجلات بطريقة دقيقة الطريقة وأيضًا لإجراء عمليات حسابية لا مركزية على هذه السجلات، مما ينتج عنه ملخصات جديرة بالثقة يمكن أن تستهلكها خدمات السمعة ويتم فحصها مينشين. في حين أنه من الممكن أن يقوم DON من حيث المبدأ بتحريف سلوك العقد المكونة في حالة تلف جزء كبير من العقد، إلا أننا نلاحظ أن المجموعة أداء DON نفسه في تقديم البيانات على السلسلة مرئي على MAINCHAIN وبالتالي لا يمكن تحريفها. بالإضافة إلى ذلك، نحن نخطط لاستكشاف الآليات التي تحفيز إعداد تقارير داخلية دقيقة عن سلوكيات العقدة في DON. على سبيل المثال، من خلال الإبلاغ عن المجموعة الفرعية من العقد عالية الأداء التي تقوم بإرجاع البيانات المساهمة بشكل أسرع إلى تقرير تم ترحيله على السلسلة، يُنشئ DON حافزًا للعقد للاعتراض على الخطأ التقارير: تضمين العقد بشكل غير صحيح في هذه المجموعة الفرعية يعني استبعاد العقد بشكل غير صحيح كان ينبغي إدراجها وبالتالي معاقبتهم بشكل غير صحيح. سيؤدي فشل الإبلاغ المتكرر بواسطة DON أيضًا إلى خلق حافز للعقد الصادقة لمغادرة DON. التجميع اللامركزي لسجلات الأداء الدقيقة وما يترتب على ذلك قدرة المستخدمين على تحديد العقد عالية الأداء ومشغلي العقد للبناء تعد السمعة من السمات المميزة المهمة للنظام البيئي Chainlink. نحن أظهر في القسم 9 كيف يمكننا التفكير فيها باعتبارها جزءًا أساسيًا من خطة صارمة ودقيقة نظرة موسعة للأمن الاقتصادي الذي توفره DONs.

Decentralized Services Enabled by Decentralized

Decentralized Services Enabled by Decentralized

Oracle Networks To illustrate the versatility of DONs and how they enable a host of new services, we present five examples of DON-based applications in this section and describe the hybrid contracts that realize them: (1) Proof of Reserves, a form of cross-chain service; (2) Interfacing with enterprise / legacy systems, that is, creating a middleware-based abstraction layer that facilitates development of blockchain applications with minimal blockchain-specific code or expertise; (3) Decentralized identity, tools enabling users to obtain and manage their own identity documents and credentials; (4) Priority channels, a service that ensures timely inclusion of critical-infrastructure transactions (e.g., oracle reports) on a blockchain; and (5) Confidentiality-preserving DeFi, that is, financial smart contracts that conceal the sensitive data of participating parties. Here, we

use SC to denote the MAINCHAIN part of a hybrid contract and describe the DON component separately or in terms of an executable exec. 4.1 Proof of Reserves For many applications, it is useful to relay state between or among blockchains. A popular application of such services is cryptocurrency wrapping. Wrapped coins such as WBTC [15] are becoming a popular asset in Decentralized Finance (DeFi). They involve depositing the “wrapped” backing asset on its source blockchain MAINCHAIN(1) and creating a corresponding token on a different, target blockchain MAINCHAIN(2). For example, WBTC is an ERC20 token on the Ethereum blockchain that corresponds to BTC on the Bitcoin blockchain. Because contracts on MAINCHAIN(2) do not have direct visibility into MAINCHAIN(1), they must rely explicitly or implicitly on an oracle to report on deposits of the wrapped asset in a smart contract, producing what is sometimes called a Proof of Reserves. In WBTC [15], for example, custodian BitGo holds BTC and issues WBTC, with the Chainlink network providing Proofs of Reserve [76]. A DON can itself provide a Proof of Reserves. With a DON, however, it is possible to go further. A DON can manage secrets and, through use of appropriate adapters, can transact on any desired blockchain. Consequently, it is possible for the DON to act as one among a number of custodians—or even as a sole, decentralized custodian—for a wrapped asset. DONs can thereby serve as a platform to enhance the security of existing services that use Proofs of Reserves. For example, suppose that MAINCHAIN(1) is Bitcoin and MAINCHAIN(2) is Ethereum. On MAINCHAIN(2), a contract SC issues tokens representing wrapped BTC. The DON controls a BTC address addr(1) DON. To wrap BTC, then, a user U sends X BTC from addr(1) U to addr(1) DON along with a MAINCHAIN(2)-address addr(2) U . The DON monitors addr(1) DON via an adapter to MAINCHAIN(1). On observing U’s deposit, with sufficiently high-probability confirmation, it sends a message to SC via an adapter to MAINCHAIN(2). This message instructs SC to mint X tokens for addr(2) U . For U to release X tokens, the reverse happens. On MAINCHAIN(1), however, addr(1) DON sends X BTC to addr(1) U (or to another address, if thus requested by the user). These protocols can be adapted, of course, to work with exchanges, rather than directly with users. 4.2 Interfacing with Enterprise / Legacy Systems DONs can serve as bridges between and among blockchains, as in the example of Proof of Reserves, but another objective is for them to act as bidirectional bridges between blockchains and legacy systems [176] or blockchain-like systems such as central bank digital currencies [30]. Enterprises face a number of challenges in connecting their existing systems and processes to decentralized systems, including:

• Blockchain agility: Blockchain systems change rapidly. An enterprise may confront the rapid new appearance or rise in popularity of blockchains on which counterparties wish to conduct transactions, but for which the enterprise has no support in its existing infrastructure. In general, blockchains’ dynamism makes it difficult for individual enterprises to remain abreast of the full ecosystem. • Blockchain-specific development resources: For many organizations, hiring or incubating cutting-edge blockchain expertise is difficult, particularly in view of the challenge of agility. • Private-key management: Managing private keys for blockchains or cryptocurrencies requires operational expertise distinct from that of traditional cybersecurity practices and unavailable to many enterprises. • Confidentiality: Enterprises are leery of exposing their sensitive and proprietary data on chain. To address the first three of these difficulties, developers can simply use a DON as a secure middleware layer to enable enterprise systems to read from or write to blockchains. The DON can abstract away detailed technical considerations such as gas dynamics, chain reorganization, and so forth, for both developers and users. By presenting a streamlined blockchain interface to enterprise systems, a DON can thus considerably simplify the development of blockchain-aware enterprise applications, removing the burden from enterprises of acquiring or incubating blockchain-specific development resources. Such use of DONs is especially attractive in that it enables enterprise developers to create smart-contract applications that are largely blockchain agnostic. As a result, the larger the set of blockchains for which a DON is instrumented to act as middleware, the larger the set of blockchains to which enterprise users can gain easy access. Developers can port applications from existing blockchains to new ones with minimal modification to their internally developed applications. To address the additional problem of confidentiality, developers can appeal to the tools we introduce in this paper and expect to deploy in support of DON applications. These include DECO and Town Crier Section 3.6.2 as well as confidentiality-preserving API modifications discussed in Section 7.1.2 and a number of application-specific approaches covered in the remainder of this section. These DON systems can provide high-integrity, on-chain attestations about enterprise system state without revealing sensitive enterprise source data on chain. 4.3 Decentralized Identity Decentralized identity is a general term for the notion that users should be able to obtain and manage their own credentials, rather than relying on third parties to do so. Decentralized credentials are attestations to attributes or assertions of the holder,

which are often called claims. Credentials are digitally signed by entities, often called issuers, that can authoritatively associate claims with users. In most proposed schemes, claims are associated with a Decentralized Identifier (DID), a universal identifier for a given user. Credentials are bound to a public key whose private key the user holds. The user can thus prove possession of a claim using her private key. Visionary as decentralized identity is, existing and proposed schemes, e.g., [14, 92, 129, 216], have three severe limitations: • Lack of legacy compatibility: Existing decentralized identity systems rely on a community of authorities, called issuers, to produce DID credentials. Because existing web services do not generally digitally sign data, issuers must be launched as special-purpose systems. Because there is no incentive to do this without a decentralized-identity ecosystem, a chicken-and-the-egg problem results. In other words, it’s unclear how to bootstrap an issuer ecosystem. • Unworkable key management: Decentralized identity systems require users to manage private keys, something that experience with cryptocurrency has shown to be an unworkable onus. It is estimated that some 4,000,000 Bitcoin have been lost forever because of key management failures [194], and many users store their crypto assets with exchanges [193], thereby undermining decentralization. • Lack of privacy-preserving Sybil resistance: A basic security requirement of applications such as voting, fair allocation of tokens during token sales, etc. is that users be unable to assert multiple identities. Existing decentralized identity proposals require users to reveal their real-world identities in order to achieve such Sybil resistance, thereby undermining important privacy assurances. It is possible to address these problems using a combination of a committee of nodes performing distributed computation within a DON and the use of tools such as DECO or Town Crier, as shown in a system called CanDID [160]. DECO or Town Crier can by design turn existing web services without modification into confidentiality-preserving credential issuers. They enable a DON to export relevant data for this purpose into a credential while concealing sensitive data that should not appear in the credential. In addition, to facilitate key recovery for users, thus addressing the key-management problem, a DON can allow users to store private keys in secret-shared form. Users can recover their keys by proving to the nodes in the DON—similarly, using Town Crier or DECO—an ability to log into accounts with a set of predetermined web providers (e.g., Twitter, Google, Facebook). The benefit of using Town Crier or DECO, as opposed to OAUTH, is user privacy. Those two tools enable a user to avoid revealing to the DON a web provider identifier—from which real-world identities can often be derived. Finally, to provide Sybil resistance, as shown in [160], it is possible for a DON to perform a privacy-preserving transformation of unique real-world identifiers for users (e.g., Social Security Numbers (SSNs)) into on-chain identifiers upon user registration.

The system can thereby detect duplicate registrations without sensitive data such as SSNs being revealed to individual DON nodes.7 A DON can provide any of these services on behalf of external decentralized identity systems on permissionless or permissioned blockchains, e.g., instances of Hyperledger Indy [129]. Example application: KYC: Decentralized identity holds promise as a means to streamline requirements for financial applications on blockchains while improving user privacy. Two challenges it can help address are accreditation and compliance obligations under anti-money-laundering / know-your-customer (AML / KYC) regulations. AML regulations in many countries require financial institutions (and other businesses) to establish and verify the identities of individuals and businesses with which they perform transactions. KYC forms one component of a financial institution’s broader AML policy, which also typically involves monitoring user behaviors and watching fund flows, among other things. KYC typically involves user presentation of identity credentials in some form (e.g., entry into an online web form, holding up an identity document in front of a user’s face in a video session, etc.). Secure creation of and presentation of decentralized credentials could in principle be a beneficial alternative in several respects, namely by: (1) Making the KYC process more efficient for users and financial institutions, because once a credential is obtained, it could be presented seamlessly to any financial institution; (2) Reducing fraud by reducing opportunities for identity theft through compromise of personally identifiable information (PII) and spoofing during video verification; and (3) Reducing the risk of PII compromise in financial institutions, as users retain control of their own data. Given the multi-billion-dollar penalties paid by financial institutions for AML compliance failures, and the many financial institutions spending millions of dollars annually on KYC, improvements could yield considerable savings for financial institutions and, by extension, for consumers [196]. While the traditional financial sector is slow to adopt new compliance tools, DeFi systems are increasingly embracing it [43]. Example application: Under-collateralized loans: Most DeFi applications that support lending today originate only fully collateralized loans. These are loans made to borrowers who deposit cryptocurrency assets of value exceeding that of the loans. Interest has arisen recently in what the DeFi community generally refers to as undercollateralized loans. These, by contrast, are loans for which the corresponding collateral has value that is less than that of the principal of the loan. Under-collateralized loans resemble loans often made by traditional financial institutions. Rather than relying on deposited collateral as a guarantee of loan repayment, they instead base lending decisions on the credit histories of borrowers. 7This transformation relies on a distributed pseudorandom function (PRF).

Under-collateralized loans constitute a nascent but growing part of the DeFi lending market. They rely upon mechanisms like those employed by traditional financial institutions, such as legal contracts [91]. An essential requirement for their growth will be the ability to furnish data on user creditworthiness—a key factor in conventional lending decisions—to DeFi systems in a way that provides strong integrity, i.e., assurance of correct data. A DON-enabled decentralized identity system would enable would-be borrowers to generate high-assurance credentials attesting to their creditworthiness while preserving the confidentiality of sensitive information. Specifically, borrowers can generate these credentials based on records from authoritative online sources while exposing only the data attested to by the DON, without exposing other, potentially sensitive data. For example, a borrower can generate a credential indicating that her credit score with a set of credit bureaus exceeds a particular threshold (e.g., 750), without revealing her precise score or any other data in her records. Additionally, if desired, such credentials can be generated anonymously, i.e., the user’s name can be treated as sensitive data and itself not exposed to oracle nodes or in her decentralized credential. The credential itself can be used on chain or offchain, depending on the application. In summary, a borrower can provide essential information to lenders on their credit histories with strong integrity and without risk of exposure of unnecessary, sensitive data. A borrower can also provide a variety of other confidentiality-preserving credentials helpful in making lending decisions. For example, credentials can attest to a borrower’s possession of (off-chain) assets, as we show in our next example. Example application: Accreditation: Many jurisdictions limit the class of investor to which unregistered securities may be sold. For example, in the U.S., SEC Regulation D stipulates that to be accredited for such investment opportunities, an individual must possess a net worth of $1 million, meet certain minimum income requirements, or have certain professional qualifications [209, 210]. Current accreditation processes are cumbersome and inefficient, often requiring a letter of attestation from an accountant, or similar evidence. A decentralized identity system would enable users to generate credentials from existing online financial services accounts that prove compliance with accreditation regulations, facilitating a more efficient and privacy-preserving KYC process. The privacy-preserving properties of DECO and Town Crier, moreover, would allow these credentials to be generated with a strong assurance of integrity without directly revealing details of a user’s financial status. For example, a user could generate a credential proving that she has a net worth of at least $1 million without revealing any additional information about her financial status. 4.4 Priority Channels Priority channels are a useful new service that is easy to build using a DON. Their

Priority channel diagram showing a miner guarantee for transaction ordering to protect against MEV

goal is to deliver select, high-priority transactions in a timely way on MAINCHAIN during periods of network congestion. Priority channels may be viewed as a form of futures contract on block space and thus as a cryptocommodity, a term coined as part of Project Chicago [61, 136]. Priority channels are intended specifically for miners to enable infrastructure services, such as oracles, governance functions for contracts, etc.—not for ordinary userlevel activities such as financial transactions. In fact, as designed here, a priority channel implemented by less than 100% of the mining power in the network can only provide loose bounds on delivery times, preventing its use for highly speed-dependent goals such as front-running. Figure 10: A priority channel is a guarantee by a miner M—or, more generally, a set of miners M—to a user U that her transaction \(\tau\) will be mined within D blocks of inclusion in the mempool. A contract SC can use DON monitoring to enforce the service terms of the channel. A priority channel takes the form of an agreement between a miner or set of miners (or mining pools) M that provides the channel and a user U that pays a fee for access. M agrees that when U submits a transaction \(\tau\) to the mempool (with any gas price,

but a pre-agreed-upon gas limit), M will place it on chain within the next D blocks.8 The idea is depicted schematically in Fig. 10. Priority-channel contract description: A priority channel may be realized as a hybrid smart contract roughly as follows. We let SC denote the logic on MAINCHAIN and that on the DON by exec. SC accepts a deposit / stake \(d from M and an advance payment \)p from U. A DON executable exec monitors the mempool, triggering on placement of a transaction by U. It sends a success message to SC if U submits a transaction that M mines in a timely way and a failure message in case of a service failure. SC sends payment $p to M given a success message and sends all remaining funds, including $d, to U if it receives a failure message. Upon successful termination, it releases deposit $d to M. The miner M can of course provide priority channels simultaneously to multiple users and can open a priority channel with U for a pre-agreed-upon number of messages. 4.5 Confidentiality-Preserving DeFi / Mixicles Today, DeFi applications [1] provide little to no confidentiality for users: All transactions are visible on chain. Various zero-knowledge-based approaches, e.g., [149, 217], can provide transaction privacy, and the TEF is general enough to support them. But these approaches are not comprehensive, and do not, for example, typically conceal the asset on which a transaction is based. The broad set of computational tools we ultimately intend to support in DONs will enable privacy in a number of different ways that can plug such gaps, helping complement the privacy assurances of other systems. For example, Mixicles, a confidentialitypreserving DeFi instrument proposed by Chainlink Labs researchers [135], can conceal the asset type backing a financial instrument, and fit very naturally into the DON framework. Mixicles are most easily explained in terms of their use to realize a simple binary option. A binary option is a financial instrument in which two users, which we’ll refer to here for consistency with [135] as players, bet on an event with two possible outcomes, e.g., whether or not an asset exceeds a target price at a predesignated time. The following example illustrates the idea. Example 2. Alice and Bob are parties to a binary option based on the value of an asset called Carol’s Bubble Token (CBT). Alice bets that CBT will have a market price of at least 250 USD at time T = noon on 21 June 2025; Bob bets the reverse. Each player deposits 100 ETH by a prespecified deadline. The player with the winning position receives 200 ETH (i.e., gains 100 ETH). 8D must of course be large enough to ensure that M can comply with high probability. For instance, if M controls 20% of the mining power in the network, it might choose D = 100, ensuring a failure probability of ≈2 × 10−10, i.e., less than one in a billion.

Diagram of basic Mixicle showing on-chain secrecy with private oracle reporting

Given an existing Chainlink oracle network O, it is easy to implement a smart contract SC that realizes the agreement in Example 2. The two players each deposit 100 ETH in SC. Sometime after T, a query q is sent to O requesting the price r of CBT at time T. O sends a report r of this price to SC. SC then sends money to Alice if \(r \geq 250\) and Bob if not. This approach, however, reveals \(r\) on chain—making it easy for an observer to deduce the asset underlying the binary option. In the terminology of Mixicles, it is helpful to think conceptually of the outcome of SC in terms of a Switch that transmits a binary value computed as a predicate switch(\(r\)). In our example, switch(\(r\)) = 0 if \(r \geq 250\); given this outcome, Alice wins. Otherwise switch(r) = 1 and Bob wins. A DON can realize a basic Mixicle as a hybrid contract by running an executable exec that computes switch(r) and reports it on chain to SC. We show this construction in Fig. 11. Figure 11: Diagram of basic Mixicle in Example 2. To provide on-chain secrecy for report r, and thus the asset underlying the binary option, the oracle sends to the contract SC via Switch only the binary value switch(r). We specify an adapter ConfSwitch in Appendix C.3 that makes it easy to achieve this goal in a DON. The basic idea behind ConfSwitch is quite simple. Instead of reporting the value r, ConfSwitch reports only the binary switch value switch(r). SC can be designed to make a correct payment based on switch(r) alone, and switch(r) by itself reveals no information about the underlying asset—CBT in our example. Additionally, by placing a ciphertext on (q, r) on the ledger encrypted under pkaud, the public key of an auditor, the adapter ConfSwitch creates a confidentiality-preserving audit trail. The basic Mixicle we’ve chosen for simplicity to describe here conceals only the asset and bet behind the binary option in our example. A full-blown Mixicle [135] can provide two forms of confidentiality. It conceals from observers: (1) What event the players bet on (i.e., q and r) but also (2) Which player won the bet. Since Mixicles are executed on MAINCHAIN, either one player would need to relay switch(r) from the DON to MAINCHAIN, or an executable exec could be created that

is triggered on output by ConfSwitch and calls another adapter to send switch(r) to MAINCHAIN. A third, subtle type of confidentiality is also worth considering. In a basic implementation of ConfSwitch, O is running the adapter on the DON and thus learns the asset—CBT in our example—and thus the nature of the binary option. As discussed in Appendix C.3, however, it is additionally possible to use DECO or Town Crier to conceal even this information from O. In this case, the O learns no more information than a public observer of SC. For further details on Mixicles, we refer readers to [135].

الخدمات اللامركزية التي تم تمكينها من خلال اللامركزية

شبكات أوراكل لتوضيح مدى تعدد استخدامات DONs وكيفية تمكينها لمجموعة من الخدمات الجديدة، نقدم خمسة أمثلة للتطبيقات المستندة إلى DON في هذا القسم ونصفها العقود الهجينة التي تحققها: (1) إثبات الاحتياطيات، وهو شكل من أشكال الخدمة عبر السلسلة؛ (2) التفاعل مع أنظمة المؤسسة/الأنظمة القديمة، أي إنشاء نظام قائم على البرمجيات الوسيطة طبقة تجريد تسهل تطوير تطبيقات blockchain بأقل قدر ممكن blockchain-رمز أو خبرة محددة؛ (3) الهوية اللامركزية، الأدوات التي تمكن المستخدمين من ذلك الحصول على وثائق الهوية وبيانات الاعتماد الخاصة بهم وإدارتها؛ (4) القنوات ذات الأولوية، خدمة تضمن تضمين معاملات البنية التحتية الحيوية في الوقت المناسب (على سبيل المثال، oracle التقارير) على blockchain؛ و(5) الحفاظ على السرية DeFi، أي الشؤون المالية smart contracts التي تخفي البيانات الحساسة للأطراف المشاركة. هنا، نحن

استخدم SC للإشارة إلى جزء MAINCHAIN من العقد المختلط ووصف DON مكون بشكل منفصل أو من حيث exec القابل للتنفيذ. 4.1 إثبات الاحتياطيات بالنسبة للعديد من التطبيقات، من المفيد ترحيل الحالة بين أو بين blockchains. أ التطبيق الشائع لمثل هذه الخدمات هو تغليف العملات المشفرة. عملات ملفوفة من هذا القبيل نظرًا لأن WBTC [15] أصبحت أحد الأصول الشائعة في التمويل اللامركزي (DeFi). هم تتضمن إيداع الأصل الداعم "المغلف" على مصدره blockchain MAINCHAIN(1) وإنشاء token مطابق على هدف مختلف blockchain MAINCHAIN(2). على سبيل المثال، WBTC هو ERC20 token على Ethereum blockchain الذي يتوافق إلى BTC على Bitcoin blockchain. نظرًا لأن العقود الموجودة على MAINCHAIN(2) ليس لها رؤية مباشرة في MAINCHAIN(1)، يجب عليهم الاعتماد صراحةً أو ضمنًا على oracle للإبلاغ عن رواسب التغليف الأصل في smart contract، مما يؤدي إلى إنتاج ما يسمى أحيانًا إثبات الاحتياطيات. في WBTC [15]، على سبيل المثال، يحتفظ الحافظ BitGo بـ BTC ويصدر WBTC، مع Chainlink شبكة تقدم إثباتات الاحتياطي [76]. يمكن لـ DON أن يقدم في حد ذاته إثباتًا للاحتياطيات. مع DON، فمن الممكن للذهاب أبعد من ذلك. يستطيع DON إدارة الأسرار، ومن خلال استخدام المحولات المناسبة، يمكن التعامل على أي blockchain المطلوب. وبالتالي، من الممكن أن يقوم DON بالتصرف كواحد من بين عدد من أمناء الحفظ - أو حتى كوصي وحيد لا مركزي - لـ أصل ملفوف. وبالتالي يمكن أن يكون DONs بمثابة منصة لتعزيز أمان الخدمات الحالية التي تستخدم إثباتات الاحتياطيات. على سبيل المثال، لنفترض أن MAINCHAIN(1) هو Bitcoin وأن MAINCHAIN(2) هو Ethereum. في MAINCHAIN(2)، يصدر عقد SC tokens الذي يمثل BTC المغلف. DON يتحكم في عنوان عنوان BTC(1) DON. لتغليف BTC، يرسل المستخدم U X BTC منه العنوان(1) ش إلى العنوان (1) DON مع عنوان العنوان الرئيسي (2) MAINCHAIN(2)(2) ش . شاشات DON العنوان(1) DON عبر محول إلى MAINCHAIN(1). عند ملاحظة إيداع U، مع تأكيد عالي الاحتمال بدرجة كافية، فإنه يرسل رسالة إلى SC عبر محول إلى مينشين(2). توجه هذه الرسالة SC إلى سك X tokens لـ addr(2) ش . لكي تقوم U بإصدار X tokens، يحدث العكس. على MAINCHAIN(1)، ومع ذلك، العنوان(1) DON يرسل X BTC إلى العنوان(1) U (أو إلى عنوان آخر، إذا طلب المستخدم ذلك). يمكن بالطبع تكييف هذه البروتوكولات للعمل مع البورصات، وليس بشكل مباشر مع المستخدمين. 4.2 التفاعل مع أنظمة المؤسسات / الأنظمة القديمة يمكن أن تكون DONs بمثابة جسور بين blockchains وفيما بينها، كما في مثال الإثبات من الاحتياطيات، ولكن الهدف الآخر هو أن تكون بمثابة جسور ثنائية الاتجاه بينهما blockchains والأنظمة القديمة [176] أو blockchain الأنظمة المشابهة مثل البنك المركزي العملات الرقمية [30]. تواجه الشركات عددًا من التحديات في ربط أنظمتها الحالية و العمليات للأنظمة اللامركزية، بما في ذلك:• مرونة سلسلة الكتل: تتغير أنظمة سلسلة الكتل بسرعة. قد تواجه المؤسسة المظهر الجديد السريع أو ترتفع شعبيتها blockchains يرغب الأطراف المقابلة في إجراء المعاملات، ولكن ليس لدى المؤسسة أي منها الدعم في البنية التحتية القائمة. بشكل عام، ديناميكية blockchains هي التي تصنع فمن الصعب على المؤسسات الفردية أن تظل على اطلاع على النظام البيئي الكامل. • موارد التطوير الخاصة بـ Blockchain: بالنسبة للعديد من المؤسسات، يعد توظيف أو احتضان الخبرات المتطورة blockchain أمرًا صعبًا، لا سيما في ضوء تحدي خفة الحركة. • إدارة المفتاح الخاص: تتطلب إدارة المفاتيح الخاصة لـ blockchain أو العملات المشفرة خبرة تشغيلية متميزة عن تلك الخاصة بالأمن السيبراني التقليدي الممارسات وغير متاحة للعديد من الشركات. • السرية: تخشى الشركات الكشف عن معلوماتها الحساسة وملكيتها البيانات على السلسلة. لمعالجة الثلاثة الأولى من هذه الصعوبات، يمكن للمطورين ببساطة استخدام DON كطبقة وسيطة آمنة لتمكين أنظمة المؤسسة من القراءة منها أو الكتابة إليها blockchains. يمكن لـ DON تجريد الاعتبارات الفنية التفصيلية مثل ديناميكيات الغاز، وإعادة تنظيم السلسلة، وما إلى ذلك، لكل من المطورين والمستخدمين. بواسطة من خلال تقديم واجهة blockchain مبسطة لأنظمة المؤسسة، يمكن لـ DON بالتالي تبسيط عملية تطوير تطبيقات المؤسسات المدركة blockchain إلى حد كبير، مما يزيل العبء عن المؤسسات المتمثل في الحصول على موارد التطوير المحددة أو احتضانها blockchain. يعد هذا الاستخدام لـ DONs جذابًا بشكل خاص لأنه يمكّن مطوري المؤسسات من ذلك إنشاء تطبيقات العقود الذكية التي تكون blockchain حيادية إلى حد كبير. ونتيجة لذلك، أكبر مجموعة blockchains التي تم تجهيز DON لها لتكون بمثابة برامج وسيطة، أكبر مجموعة blockchains التي يمكن لمستخدمي المؤسسة الوصول إليها بسهولة. المطورين يمكن نقل التطبيقات من blockchains الموجودة إلى تطبيقات جديدة بأقل قدر من التعديل لتطبيقاتهم المطورة داخليًا. ولمعالجة المشكلة الإضافية المتعلقة بالسرية، يمكن للمطورين اللجوء إلى الأدوات التي نقدمها في هذه الورقة ونتوقع نشرها لدعم تطبيقات DON. وتشمل هذه DECO وTown Crier القسم 3.6.2 بالإضافة إلى الحفاظ على السرية تعديلات واجهة برمجة التطبيقات (API) التي تمت مناقشتها في القسم 7.1.2 وعدد من الأساليب الخاصة بالتطبيقات التي تمت تغطيتها في الجزء المتبقي من هذا القسم. يمكن أن توفر أنظمة DON هذه شهادات عالية النزاهة على السلسلة حول حالة نظام المؤسسة دون الكشف عنها بيانات مصدر المؤسسة الحساسة على السلسلة. 4.3 الهوية اللامركزية الهوية اللامركزية هي مصطلح عام لفكرة أن المستخدمين يجب أن يكونوا قادرين على ذلك الحصول على بيانات الاعتماد الخاصة بهم وإدارتها، بدلاً من الاعتماد على أطراف ثالثة للقيام بذلك هكذا. أوراق الاعتماد اللامركزية هي شهادات على سمات أو تأكيدات صاحبها،والتي غالبا ما تسمى المطالبات. يتم توقيع بيانات الاعتماد رقميًا من قبل الكيانات، والتي غالبًا ما تسمى المصدرون، الذين يمكنهم ربط المطالبات بشكل رسمي بالمستخدمين. في معظم المخططات المقترحة، ترتبط المطالبات بمعرف لامركزي (DID)، وهو معرف عالمي لـ مستخدم معين. ترتبط بيانات الاعتماد بمفتاح عام يحمل المستخدم مفتاحه الخاص. وبالتالي يمكن للمستخدم إثبات حيازة المطالبة باستخدام مفتاحه الخاص. الرؤية باعتبارها هوية لامركزية هي المخططات الحالية والمقترحة، على سبيل المثال، [14، 92، 129، 216]، لها ثلاثة قيود شديدة: • عدم التوافق مع التراث: تعتمد أنظمة الهوية اللامركزية الحالية على أ مجتمع السلطات، الذي يطلق عليه جهات الإصدار، لإنتاج بيانات اعتماد DID. لان لا تقوم خدمات الويب الحالية عمومًا بتوقيع البيانات رقميًا، ويجب إطلاق جهات الإصدار كأنظمة ذات أغراض خاصة. لأنه لا يوجد حافز للقيام بذلك دون النظام البيئي اللامركزي للهوية، ينتج عنه مشكلة الدجاجة والبيضة. في غيرها بعبارة أخرى، من غير الواضح كيفية تمهيد النظام البيئي للمصدر. • إدارة المفاتيح غير العملية: تتطلب أنظمة الهوية اللامركزية من المستخدمين القيام بذلك إدارة المفاتيح الخاصة، وهو ما أظهرته تجربة العملات المشفرة ليكون عبئا غير عملي. تشير التقديرات إلى وجود حوالي 4,000,000 Bitcoin فقدت إلى الأبد بسبب فشل إدارة المفاتيح [194]، ويقوم العديد من المستخدمين بتخزين ملفاتهم الأصول المشفرة مع البورصات [193]، مما يقوض اللامركزية. • عدم وجود مقاومة Sybil للحفاظ على الخصوصية: أحد المتطلبات الأمنية الأساسية للتطبيقات مثل التصويت، والتخصيص العادل لـ tokens خلال مبيعات token، وما إلى ذلك هو أن لا يتمكن المستخدمون من تأكيد هويات متعددة. تتطلب مقترحات الهوية اللامركزية الحالية من المستخدمين الكشف عن هوياتهم الحقيقية من أجل تحقيق ذلك مقاومة Sybil، مما يقوض ضمانات الخصوصية المهمة. من الممكن معالجة هذه المشكلات باستخدام مجموعة من لجنة العقد إجراء عمليات حسابية موزعة داخل DON واستخدام أدوات مثل DECO أو Town Crier، كما هو موضح في نظام يسمى CanDID [160]. يمكن لـ DECO أو Town Crier حسب التصميم تشغيل خدمات الويب الحالية دون تعديل إلى جهات إصدار أوراق الاعتماد التي تحافظ على السرية. إنها تمكن DON من التصدير ذات الصلة البيانات لهذا الغرض إلى بيانات اعتماد مع إخفاء البيانات الحساسة التي لا ينبغي ذلك تظهر في بيانات الاعتماد. بالإضافة إلى ذلك، لتسهيل استرداد المفاتيح للمستخدمين، وبالتالي معالجة إدارة المفاتيح المشكلة، DON يمكن أن يسمح للمستخدمين بتخزين المفاتيح الخاصة في نموذج مشترك سري. يمكن للمستخدمين استعادة مفاتيحهم عن طريق إثبات العقد الموجودة في DON - وبالمثل، باستخدام Town Crier أو DECO - القدرة على تسجيل الدخول إلى الحسابات مع مجموعة من موفري الويب المحددين مسبقًا (على سبيل المثال، تويتر، جوجل، فيسبوك). فائدة استخدام Town Crier أو DECO، بدلاً من OAUTH، هي خصوصية المستخدم. تمكّن هاتان الأداتان المستخدم من تجنب الكشف لـ DON معرف مزود الويب - والذي غالبًا ما يمكن استخلاص هويات العالم الحقيقي منه. أخيرًا، لتوفير مقاومة Sybil، كما هو موضح في [160]، من الممكن لـ DON أن إجراء تحويل للحفاظ على الخصوصية لمعرفات العالم الحقيقي الفريدة للمستخدمين (على سبيل المثال، أرقام الضمان الاجتماعي (SSNs)) في المعرفات الموجودة على السلسلة عند تسجيل المستخدم.وبالتالي يمكن للنظام اكتشاف التسجيلات المكررة بدون بيانات حساسة مثل يتم الكشف عن أرقام الضمان الاجتماعي إلى العقد الفردية DON.7 يمكن لـ DON تقديم أي من هذه الخدمات نيابة عن الهوية اللامركزية الخارجية الأنظمة الموجودة على blockchains غير المسموح بها أو المسموح بها، على سبيل المثال، مثيلات Hyperledger إندي [129]. مثال للتطبيق: KYC: الهوية اللامركزية تبشر بالخير كوسيلة لتحقيق ذلك تبسيط متطلبات التطبيقات المالية على blockchains مع تحسين المستخدم الخصوصية. هناك تحديان يمكن أن تساعد في معالجتهما، وهما التزامات الاعتماد والامتثال بموجب لوائح مكافحة غسل الأموال / معرفة عميلك (AML / KYC). تتطلب لوائح مكافحة غسل الأموال في العديد من البلدان من المؤسسات المالية (وغيرها من الشركات) تحديد هويات الأفراد والشركات التي تتعامل معها والتحقق منها. يقومون بالمعاملات. يشكل "اعرف عميلك" (KYC) أحد مكونات المؤسسة المالية سياسة مكافحة غسيل الأموال الأوسع نطاقًا، والتي تتضمن أيضًا عادةً مراقبة سلوكيات المستخدم ومراقبة تدفقات الأموال، من بين أمور أخرى. تتضمن عملية اعرف عميلك (KYC) عادةً تقديم المستخدم لبيانات اعتماد الهوية بشكل ما (على سبيل المثال، الدخول إلى نموذج ويب عبر الإنترنت، مع رفع وثيقة هوية أمام وجه المستخدم في جلسة فيديو، وما إلى ذلك). تأمين إنشاء وعرض بيانات الاعتماد اللامركزية يمكن من حيث المبدأ أن يكون بديلاً مفيدًا في عدة جوانب، وبالتحديد من خلال: (1) التصنيع تعتبر عملية "اعرف عميلك" (KYC) أكثر كفاءة للمستخدمين والمؤسسات المالية، لأنه بمجرد وبعد الحصول على بيانات الاعتماد، يمكن تقديمها بسهولة إلى أي مؤسسة مالية؛ (2) الحد من الاحتيال عن طريق تقليل فرص سرقة الهوية من خلال التسوية ومعلومات التعريف الشخصية (PII) والانتحال أثناء التحقق بالفيديو؛ و (3) تقليل مخاطر تعرض معلومات تحديد الهوية الشخصية للخطر في المؤسسات المالية، مع احتفاظ المستخدمين بالسيطرة من بياناتهم الخاصة. ونظراً للعقوبات التي تبلغ مليارات الدولارات والتي تدفعها المؤسسات المالية بسبب الإخفاق في الامتثال لمكافحة غسل الأموال، وإنفاق العديد من المؤسسات المالية ملايين الدولارات سنوياً على "اعرف عميلك"، فإن التحسينات يمكن أن تحقق وفورات كبيرة للمؤسسات المالية وبالتالي، للمستهلكين [196]. في حين أن القطاع المالي التقليدي بطيء لاعتماد أدوات امتثال جديدة، تتبنى أنظمة DeFi هذه الأداة بشكل متزايد [43]. مثال على التطبيق: القروض غير المضمونة: معظم تطبيقات DeFi التي دعم الإقراض اليوم تنشأ فقط القروض المضمونة بالكامل. هذه هي القروض المقدمة للمقترضين الذين يقومون بإيداع أصول العملات المشفرة بقيمة تتجاوز قيمة القروض. لقد نشأ الاهتمام مؤخرًا بما يشير إليه مجتمع DeFi عمومًا بالقروض غير المضمونة. هذه، على النقيض من ذلك، هي القروض التي لها ضمانات المقابلة أن تكون قيمته أقل من أصل القرض. القروض غير المضمونة تشبه القروض التي غالبا ما تقدمها المؤسسات المالية التقليدية. بدلا من الاعتماد على الضمانات المودعة كضمان لسداد القرض، فإنهم بدلاً من ذلك يعتمدون على الإقراض القرارات المتعلقة بالتاريخ الائتماني للمقترضين. 7 يعتمد هذا التحويل على دالة عشوائية زائفة موزعة (PRF).تشكل القروض غير المضمونة جزءًا ناشئًا ولكنه متنامي من سوق الإقراض DeFi. وهي تعتمد على آليات مثل تلك التي تستخدمها المؤسسات المالية التقليدية المؤسسات، مثل العقود القانونية [91]. مطلب أساسي لنموهم ستكون القدرة على تقديم بيانات حول الجدارة الائتمانية للمستخدم - وهو عامل رئيسي في قرارات الإقراض التقليدية - لأنظمة DeFi بطريقة توفر نزاهة قوية، على سبيل المثال، ضمان البيانات الصحيحة. إن نظام الهوية اللامركزي الذي يدعم DON سيمكن المقترضين المحتملين من إنشاء بيانات اعتماد عالية الضمان تشهد على جدارتها الائتمانية مع الحفاظ عليها سرية المعلومات الحساسة. وعلى وجه التحديد، يمكن للمقترضين إنشاء هذه تعتمد بيانات الاعتماد على سجلات من مصادر موثوقة عبر الإنترنت مع الكشف فقط عن البيانات الموثقة بواسطة DON، دون الكشف عن بيانات أخرى قد تكون حساسة. ل على سبيل المثال، يمكن للمقترض إنشاء بيانات اعتماد تشير إلى أن درجة الائتمان الخاصة به تبلغ درجة تتجاوز مجموعة مكاتب الائتمان حدًا معينًا (على سبيل المثال، 750)، دون الكشف عنها النتيجة الدقيقة أو أي بيانات أخرى في سجلاتها. بالإضافة إلى ذلك، إذا رغبت في ذلك، أوراق الاعتماد هذه يمكن إنشاؤها بشكل مجهول، أي أنه يمكن التعامل مع اسم المستخدم على أنه بيانات حساسة وهي نفسها غير معرضة للعقد oracle أو في بيانات اعتمادها اللامركزية. الاعتماد نفسها يمكن استخدامها على السلسلة أو خارج السلسلة، اعتمادًا على التطبيق. باختصار، يمكن للمقترض تقديم معلومات أساسية للمقرضين بشأن ائتمانهم تاريخ يتمتع بنزاهة قوية ودون التعرض لخطر التعرض لأشياء حساسة وغير ضرورية data. ويمكن للمقترض أيضًا تقديم مجموعة متنوعة من بيانات الاعتماد الأخرى التي تحافظ على السرية مفيدة في اتخاذ قرارات الإقراض. على سبيل المثال، يمكن أن تشهد بيانات الاعتماد على المقترض حيازة الأصول (خارج السلسلة)، كما نوضح في مثالنا التالي. مثال على التطبيق: الاعتماد: تحدد العديد من الولايات القضائية فئة المستثمر التي يمكن بيع الأوراق المالية غير المسجلة لها. على سبيل المثال، في الولايات المتحدة، SEC تنص اللائحة د على أنه لكي يتم اعتمادك لمثل هذه الفرص الاستثمارية، أ يجب أن يمتلك الفرد قيمة صافية قدرها مليون دولار، أو يستوفي بعض متطلبات الحد الأدنى للدخل، أو أن يكون لديه مؤهلات مهنية معينة [209، 210]. الاعتماد الحالي العمليات مرهقة وغير فعالة، وغالبًا ما تتطلب خطاب تصديق من محاسب أو ما شابه ذلك. سيمكن نظام الهوية اللامركزي المستخدمين من إنشاء بيانات الاعتماد من حسابات الخدمات المالية الحالية عبر الإنترنت التي تثبت الامتثال للاعتماد اللوائح التنظيمية، وتسهيل عملية "اعرف عميلك" (KYC) الأكثر كفاءة والحفاظ على الخصوصية. ال علاوة على ذلك، فإن خصائص الحفاظ على الخصوصية الخاصة بـ DECO وTown Crier، ستسمح بذلك سيتم إنشاء بيانات الاعتماد مع ضمان قوي بالنزاهة دون الكشف بشكل مباشر عن تفاصيل الوضع المالي للمستخدم. على سبيل المثال، يمكن للمستخدم إنشاء بيانات اعتماد إثبات أن ثروتها الصافية لا تقل عن مليون دولار دون الكشف عن أي مبلغ إضافي معلومات عن وضعها المالي. 4.4 القنوات ذات الأولوية تعتبر القنوات ذات الأولوية خدمة جديدة مفيدة يسهل إنشاؤها باستخدام DON. بهم

Diagram of basic Mixicle showing on-chain secrecy with private oracle reporting

Priority channel diagram showing a miner guarantee for transaction ordering to protect against MEV

الهدف هو تقديم معاملات مختارة وذات أولوية عالية في الوقت المناسب على MAINCHAIN خلال فترات ازدحام الشبكة. يمكن النظر إلى القنوات ذات الأولوية كشكل من أشكال العقود الآجلة على مساحة الكتلة وبالتالي كسلعة مشفرة، وهو مصطلح تمت صياغته كجزء لمشروع شيكاغو [61، 136]. القنوات ذات الأولوية مخصصة خصيصًا للقائمين بالتعدين لتمكين خدمات البنية التحتية، مثل oracles، ووظائف إدارة العقود، وما إلى ذلك - وليس للأنشطة العادية على مستوى المستخدم مثل المعاملات المالية. في الواقع، كما هو مصمم هنا، أولوية يمكن تنفيذ القناة بأقل من 100% من طاقة التعدين في الشبكة فقط توفر حدودًا فضفاضة على أوقات التسليم، مما يمنع استخدامها بشكل كبير يعتمد على السرعة أهداف مثل الجري الأمامي. الشكل 10: القناة ذات الأولوية هي ضمان من قبل عامل التعدين M - أو بشكل عام أ مجموعة من عمال المناجم M—إلى المستخدم U الذي سيتم تعدين معاملته τ ضمن الكتل D من التضمين في mempool. يمكن لعقد SC استخدام مراقبة DON لفرض شروط خدمة القناة. تأخذ القناة ذات الأولوية شكل اتفاقية بين القائم بالتعدين أو مجموعة من المعدنين (أو مجمعات التعدين) M التي توفر القناة والمستخدم U الذي يدفع رسوم الوصول. يوافق M على أنه عندما يرسل U معاملة τ إلى مجموعة الذاكرة (مع أي سعر للغاز،ولكن بحد الغاز المتفق عليه مسبقًا)، سيضعه M على السلسلة ضمن الكتل D التالية.8 تم توضيح الفكرة بشكل تخطيطي في الشكل 10. وصف عقد قناة الأولوية: يمكن تحقيق القناة ذات الأولوية باعتبارها الهجين smart contract تقريبًا على النحو التالي. نسمح لـ SC بالإشارة إلى المنطق الموجود على MAINCHAIN وذلك على DON بواسطة exec. تقبل SC إيداعًا/حصة \(d from M and an advance payment \)p من الولايات المتحدة DON يقوم exec القابل للتنفيذ بمراقبة مجمع الذاكرة، مما يؤدي إلى تشغيل المعاملة بواسطة U. يرسل رسالة نجاح إلى SC إذا أرسل U معاملة قام M بالتنقيب فيها طريقة في الوقت المناسب ورسالة فشل في حالة فشل الخدمة. ترسل SC الدفع $p إلى M مع إعطاء رسالة نجاح وترسل جميع الأموال المتبقية، بما في ذلك $d، إلى U إذا تلقى رسالة فشل. عند الإنهاء الناجح، فإنه إيداع الإصدارات $d إلى M. يمكن لعامل التعدين M بالطبع توفير قنوات ذات أولوية متعددة في وقت واحد المستخدمين ويمكنهم فتح قناة ذات أولوية مع U لعدد متفق عليه مسبقًا من الرسائل. 4.5 الحفاظ على السرية DeFi / المختلطات اليوم، توفر تطبيقات DeFi [1] القليل من السرية للمستخدمين: جميع المعاملات مرئية على السلسلة. مختلف المناهج القائمة على المعرفة الصفرية، على سبيل المثال، [149، 217]، يمكن أن توفر خصوصية المعاملات، وTEF عام بما يكفي لدعمها. لكن هذه الأساليب ليست شاملة، ولا تخفي، على سبيل المثال، عادة الأصول التي تعتمد عليها الصفقة. المجموعة الواسعة من الأدوات الحسابية التي نعتزم دعمها في النهاية في DONs تمكين الخصوصية بعدد من الطرق المختلفة التي يمكنها سد هذه الثغرات، مما يساعد في استكمال ضمانات الخصوصية للأنظمة الأخرى. على سبيل المثال، يمكن لـ Mixicles، وهي أداة للحفاظ على السرية DeFi اقترحها Chainlink الباحثون في المختبرات [135]، إخفاء نوع الأصل الذي يدعم الأداة المالية، ويتناسب بشكل طبيعي جدًا مع DON إطار العمل. يتم شرح Mixicles بسهولة أكبر من حيث استخدامها لتحقيق ثنائي بسيط الخيار. الخيار الثنائي هو أداة مالية فيها مستخدمان، وسنقوم بذلك قم بالرجوع هنا للتأكد من الاتساق مع [135] كلاعبين، يراهنون على حدث مع احتمالين النتائج، على سبيل المثال، ما إذا كان الأصل يتجاوز السعر المستهدف في وقت محدد مسبقًا أم لا. المثال التالي يوضح الفكرة. مثال 2. أليس وبوب طرفان في خيار ثنائي يعتمد على قيمة الأصل يُسمى رمز فقاعة كارول (CBT). تراهن أليس على أن سعر السوق للـ CBT سيكون عند ما لا يقل عن 250 دولارًا أمريكيًا في الوقت T = ظهر يوم 21 يونيو 2025؛ يراهن بوب على العكس. كل لاعب إيداع 100 ETH في الموعد النهائي المحدد مسبقًا. اللاعب ذو المركز الفائز يتلقى 200 ETH (أي يكسب 100 ETH). يجب أن يكون 8D كبيرًا بما يكفي لضمان توافق M مع الاحتمالية العالية. ل على سبيل المثال، إذا كان M يتحكم في 20% من طاقة التعدين في الشبكة، فقد يختار D = 100، مما يضمن احتمال الفشل ≈2 × 10−10، أي أقل من واحد في المليار.نظرًا لوجود شبكة Chainlink oracle O، فمن السهل تنفيذ شبكة ذكية عقد SC الذي يحقق الاتفاق في المثال 2. يقوم اللاعبان بإيداع كل منهما 100 إيثيريوم في SC. في وقت ما بعد T، يتم إرسال استعلام q إلى O لطلب سعر r يرسل CBT في الوقت T. O تقريرًا بهذا السعر إلى SC. ثم يرسل SC الأموال إلى أليس إذا ص ≥250 وبوب إذا لم يكن كذلك. ومع ذلك، يكشف هذا النهج عن السلسلة، مما يجعل الأمر سهلاً للمراقب لاستنتاج الأصول الكامنة وراء الخيار الثنائي. في مصطلحات Mixicles، من المفيد التفكير بشكل مفاهيمي في النتيجة من SC من حيث المحول الذي ينقل قيمة ثنائية محسوبة كمسند التبديل (ص). في مثالنا، Switch(r) = 0 إذا r ≥250؛ وبالنظر إلى هذه النتيجة، تفوز أليس. وإلا فإن التبديل (ص) = 1 ويفوز بوب. يمكن لـ DON أن يحقق Mixicle أساسي كعقد مختلط عن طريق تشغيل ملف قابل للتنفيذ exec الذي يحسب التبديل (r) ويبلغ عنه في السلسلة إلى SC. نعرض هذا البناء في الشكل 11. الشكل 11: رسم تخطيطي لـ Mixicle الأساسي في المثال 2. لتوفير السرية على السلسلة التقرير r، وبالتالي الأصل الذي يقوم عليه الخيار الثنائي، يرسل oracle إلى عقد SC عبر التبديل فقط مفتاح القيمة الثنائية (ص). لقد قمنا بتحديد محول ConfSwitch في الملحق C.3 الذي يجعل من السهل تحقيق ذلك هدف في DON. الفكرة الأساسية وراء ConfSwitch بسيطة للغاية. بدلا من الإبلاغ القيمة r، تقوم ConfSwitch بالإبلاغ فقط عن قيمة التبديل الثنائي (r). يمكن أن يكون SC مصممة لإجراء الدفع الصحيح بناءً على المفتاح (r) وحده، والمفتاح (r) بمفرده لا يكشف عن أي معلومات حول الأصل الأساسي — CBT في مثالنا. بالإضافة إلى ذلك، عن طريق وضع نص مشفر على (q, r) على دفتر الأستاذ المشفر تحت pkaud، المفتاح العام لـ مدققًا، يقوم المحول ConfSwitch بإنشاء مسار تدقيق يحافظ على السرية. إن Mixicle الأساسي الذي اخترناه للبساطة لوصفه هنا يخفي فقط الأصول والرهان وراء الخيار الثنائي في مثالنا. علبة Mixicle كاملة [135] توفير شكلين من السرية. ويخفي عن الناظرين: (1) ما حدث يراهن اللاعبون على (أي q وr) ولكن أيضًا (2) اللاعب الذي فاز بالرهان. نظرًا لأنه يتم تنفيذ Mixicles على MAINCHAIN، فسيحتاج أي من اللاعبين إلى التتابع قم بالتبديل (r) من DON إلى MAINCHAIN، أو يمكن إنشاء ملف exec قابل للتنفيذ لذلك

يتم تشغيله عند الإخراج بواسطة ConfSwitch ويستدعي محولًا آخر لإرسال المفتاح (r) إليه مينشين. وهناك نوع ثالث دقيق من السرية يستحق النظر فيه أيضًا. في التنفيذ الأساسي لـ ConfSwitch، يقوم O بتشغيل المحول على DON وبالتالي يتعلم الأصول - CBT في مثالنا - وبالتالي طبيعة الخيار الثنائي. كما نوقش ومع ذلك، في الملحق C.3، من الممكن أيضًا استخدام DECO أو Town Crier من أجل قم بإخفاء هذه المعلومات حتى عن O. وفي هذه الحالة، لن يتعلم O المزيد من المعلومات من المراقب العام للSC. لمزيد من التفاصيل حول Mixicles، نحيل القراء إلى [135].

Fair Sequencing Services

Fair Sequencing Services

One important service that we expect DONs will offer that leverages their networking, computation, and storage capabilities is called Fair Sequencing Services (FSS). Although FSS may be viewed simply as an application realized within the DON framework, we highlight it as a service that we believe will be in high demand across blockchains, and which we expect the Chainlink network to support actively. When executed on public blockchain networks, many of today’s DeFi applications reveal information that can be exploited by users to their own benefit, analogous to the kind of insider leaks and manipulation opportunities that are pervasive in existing markets [64, 155]. FSS instead paves the way toward a fair DeFi ecosystem. FSS helps developers to build DeFi contracts that are protected from market manipulation resulting from information leakage. Given the problems we highlight below, FSS is especially attractive for layer-2 services and fits within the framework for such services that we discuss in Section 6. The challenge: In existing permissionless systems, transactions are ordered entirely at the discretion of miners. In permissioned networks, the validator nodes may exert the same power. This is a form of largely unrecognized ephemeral centralization in otherwise decentralized systems. A miner can (temporarily) censor transactions for its own benefit [171] or reorder them to maximize its own gain, a notion called minerextractable value (MEV) [90]. The term MEV is slightly deceptive: It does not refer only to value that miners can capture: Some MEV can be captured by ordinary users. Because miners have more power than ordinary users, however, MEV represents an upper bound on the amount of value any entity can obtain through adversarial reordering and complementary transaction insertion. Even when miners order transactions simply based on fees (gas), without manipulation, users themselves can manipulate gas prices to advantage their transactions over those of less sophistication. Daian et al. [90] document and quantify ways in which bots (not miners) take advantage of gas dynamics in a way that harms users of DeFi systems today and how MEV even threatens the stability of the underlying consensus layer in a blockchain. Other examples of transaction-order manipulation surface regularly, e.g., [50, 154].

New transaction-processing methods such as rollups are a very promising approach to the scaling problems of high-throughput blockchains. They do not, however, address the problem of MEV. Instead, they shift it to the entity that generates the rollup. That entity, whether the operator of a smart contract or a user furnishing a (zk-)rollup with a validity proof, has the power to order and insert transactions. In other words, rollups swap MEV for REV: Rollup-Extractable Value. MEV affects upcoming transactions that have been submitted to the mempool but are not yet committed on chain. Information about such transactions is broadly available in the network. Miners, validators, and ordinary network participants can therefore exploit this knowledge and create dependent transactions. In addition, miners and validators may influence the order of those transactions that they commit themselves and exploit this to their advantage. The problem of undue influence by leaders on transaction ordering in consensus protocols has been known in the literature since the 1990s [71, 190], but no satisfying solutions have been realized in practice so far [97]. The main reason is that proposed solutions—at least until very recently—cannot readily be integrated with public blockchains, as they rely on the content of transactions remaining secret until after their ordering has been determined. Fair Sequencing Services (FSS) overview: DONs will provide tools to decentralize transaction ordering and implement it according to a policy specified by a relying contract creator, ideally one that is fair, and not advantaging actors who wish to manipulate transaction ordering. Collectively, these tools constitute FSS. FSS includes three components. The first is monitoring of transactions. In FSS, oracle nodes in O both monitor the mempool of MAINCHAIN and (if desired) permit off-chain submission of transactions through a specialized channel. The second is sequencing of transactions. The nodes in O order transactions for a relying contract according to a policy defined for that contract. The third is posting of transactions. After the transactions are ordered, the nodes in O jointly send the transactions to the main chain. The potential benefits of FSS include: • Order-fairness: FSS includes tools to help developers ensure that transactions input to a particular contract are ordered in a way that does not give an unfair advantage to well-resourced and/or technically savvy users. Ordering policies can be specified for this purpose. • Reduction or elimination of information leaks: By ensuring that network participants cannot exploit knowledge about upcoming transactions, FSS can abate or eliminate attacks like front-running that are based on information available in the network before transactions are committed. Preventing exploitation of such leakage ensures that adversarial transactions which depend on original pending transactions cannot enter the ledger before the original transactions are committed.

• Reduced transaction cost: By eliminating players’ need for speed in submitting their transactions to a smart contract, FSS can greatly reduce the cost of transaction processing. • Priority ordering: FSS can automatically give critical transactions special priority ordering. For example, in order to prevent front-running attacks against oracle reports, e.g., [79], FSS can insert an oracle report into a stream of transactions retroactively. An overarching goal of the FSS in DONs is to empower DeFi creators to realize fair financial systems, that is, systems that don’t advantage particular users (or miners) over others on the basis of speed, insider knowledge, or ability to perform technical manipulation. While a crisp, general notion of fairness is elusive, and perfect fairness in any reasonable sense is unachievable, FSS aims to provide developers with a powerful set of tools so that they can enforce policies that help meet their design goals for DeFi. We note that while the main goal of FSS is to act as a fair sequencing service for the MAINCHAIN that DONs target, some of the same fairness desiderata that FSS guarantees can also be appropriate for (decentralized) protocols that are run among DON parties. Thus, FSS can be viewed more broadly as a service provided by a subset of DON nodes to fairly sequence not only transactions sent by users of MAINCHAIN but also transactions (i.e., messages) shared among other DON nodes. In this section, we will focus primarily on the goal of sequencing MAINCHAIN transactions. Section organization: In Section 5.1, we describe two high-level applications that motivate the design of FSS: preventing front-running of oracle reports and preventing front-running of user transactions. We then provide more details on the design of FSS in Section 5.2. Section 5.3 describes examples of fair ordering guarantees and means to achieve them. Finally, Section 5.4 and Section 5.5 discuss network-level threats to such policies and means to address them, respectively for network flooding and Sybil attacks. 5.1 The Front-Running Problem To explain the goals and design of FSS, we describe two general forms of front-running attacks and the limitations of existing solutions. Front-running exemplifies a class of transaction-ordering attacks: There are a number of related attacks such as backrunning and sandwiching (front-running plus back-running) [237] that we don’t cover here, but which FSS also helps address. 5.1.1 Oracle Front-Running In their traditional role of providing off-chain data to blockchain applications, oracles become a natural target for front-running attacks.

Consider the common design pattern of using an oracle to supply various price feeds to an on-chain exchange: periodically (say every hour), the oracle collects price data for different assets and sends these to an exchange contract. These price-data transactions present obvious arbitrage opportunities: For example, if the newest oracle report lists a much higher price for some asset, an adversary could front-run the oracle report to buy up assets and immediately resell them once the oracle’s report is processed. Speed bumps and retroactive pricing: A natural solution to the oracle frontrunning problem is to give oracle reports special priority over other transactions. For example, oracle reports could be sent with high fees to encourage miners to process them first. But this will not prevent front-running if the arbitrage opportunity is high, nor can it prevent arbitrage by the miners themselves. Some exchanges have thus resorted to implementing more heavyweight “speedbumps,” such as queuing user transactions for a number of blocks before processing them, or retroactively adjusting prices when a new oracle report arrives. The disadvantages of these solutions are that they add complexity to the exchange implementation, increase storage requirements and thus transaction costs, and disrupt the user experience as asset exchanges are only confirmed after a significant time period. Piggybacking: Before moving on to FSS, we discuss piggybacking, a quite simple and elegant solution to the oracle front-running problem. It is not applicable to address front-running in other scenarios, however. In short, instead of periodically sending reports to the on-chain contract, oracles publish signed reports that users append to their transactions when buying or selling on-chain assets. The exchange then simply checks that the report is valid and fresh (e.g., the oracle can sign a range of blocks for which the report is valid), and extracts the relevant price feed from it. This simple approach has a number of advantages over the above “speed bump” approach: (1) The exchange contract need not keep state of price feeds, which should lead to lower transaction costs; (2) As oracle reports are posted on chain on a byneed basis, oracles can generate more frequent updates (e.g., every minute), thereby minimizing arbitrage opportunities from front-running a report9; (3) Transactions can be validated immediately, as they always include a fresh price feed. The approach is not perfect, however. First, this piggybacking solution puts the onus on the exchange’s users to fetch up-to-date oracle reports and attach them to their transactions. Second, while piggybacking minimizes arbitrage opportunities, it cannot fully prevent them without affecting the liveness of the on-chain contract. Indeed, if an oracle report is valid until some block number n, then a transaction submitted to block n + 1 would require a new valid report. Due to inherent delays in the propagation of reports from oracles to users, the new report that is valid for block n + 1 would have 9Arbitrage is only worthwhile if the exploitable difference in asset prices exceeds the extraneous fees required to buy and sell the assets, e.g., those collected by miners and the exchange.

to be publicized some period before block n + 1 is mined, say at block n −k, thereby creating a sequence of k blocks where a short-lived arbitrage opportunity exists. We now describe how FSS gets around these limitations. Prioritizing oracle reports with FSS: FSS can address the oracle front-running problem by building upon the above piggybacking solution, but pushing the additional work of augmenting transactions with oracle reports to the Decentralized Oracle Network. At a high level, oracle nodes collect transactions destined for an on-chain exchange, agree on a real-time price feed, and post the price feed along with the collected transactions to the main-chain contract. Conceptually, one can think of this approach as a “data-augmented transaction batching”, where the oracle ensures that an up-to-date price feed is always added to transactions. FSS solutions can be implemented transparently to the exchange’s users, and with minimal changes to contract logic, as we describe in more detail in Section 5.2. Ensuring that fresh oracle reports are always prioritized over user transactions is just one example of an ordering policy that FSS can adopt and enforce. Policies of FSS for ensuring order fairness are described more generally in Section 5.3. 5.1.2 Front-Running User Transactions We now turn to front-running in generic applications, where the defense method above does not work. The problem can be captured broadly through the following scenario: An adversary sees some user transaction tx1 sent into the P2P network and injects its own adversarial transaction tx2, so that tx2 is processed before tx1 (e.g., by paying a higher transaction fee). For instance, this kind of front-running is common among bots that exploit arbitrage opportunities in DeFi systems [90] and has affected users of various decentralized applications [101]. Imposing a fair order among the transactions processed on the blockchain addresses this problem. More fundamentally, seeing the details of tx1 is sometimes not even necessary and knowledge of its mere existence may allow an adversary to front-run tx1 through its own tx2 and defraud the innocent user that created tx1. For example, the user might be known to trade a particular asset at regular times. Preventing such attacks requires mitigations that avoid leakage of metadata as well [62]. Some solutions for this problem exist, but they introduce delays and usability concerns. From network-order to finalized-order with FSS: Opportunities for front-running arise because existing systems have no mechanisms to ensure that the order in which transactions appear on chain respects the order of events and the information flow outside the network. This represents a problem arising from deficiencies in the implementation of applications (e.g., trading platforms) on a blockchain. Ideally, one would ensure that transactions are committed on the blockchain in the same order as they were created and sent to the blockchain’s P2P network. But since the blockchain network

Fair Sequencing Services general schematic showing transaction flow from users through DON to main chain

is distributed, no such order can be captured. FSS therefore introduces mechanisms to safeguard against violations of fairness, which arise only because of the distributed nature of the blockchain network. 5.2 FSS Details Figure 12: Order-fair mempool with two different transaction paths: direct and mempool-based. Fig. 12 shows a general schematic of the FSS. For ensuring fairness, the DON providing FSS must interfere with the flow of transactions as they enter MAINCHAIN. Adjustments to clients, to smart contracts on MAINCHAIN, or to both may be necessary. At a high level, processing of transactions by FSS can be decomposed into three phases, described below: (1) Transaction monitoring; (2) Transaction sequencing; and (3) Transaction posting. Depending on the ordering method used for transaction sequencing, additional protocol steps are needed, as described in the next section. 5.2.1 Transaction Processing Transaction monitoring: We envision two different approaches for FSS to monitor user transactions destined for a specific smart contract, direct and mempool-based: • Direct: The direct approach is conceptually simplest, but requires changes to user clients so that transactions are sent directly to the Decentralized Oracle

Network nodes, rather than to the nodes of the main chain. The DON collects user transactions destined to a specific smart contract SC and orders them based on some ordering policy. The DON then sends the ordered transactions to the smart contract on the main chain. Some ordering mechanisms also require the direct approach because the user that creates a transaction must cryptographically protect it before sending it to FSS. • Mempool-based: To facilitate the integration of FSS with legacy clients, the DON can use Mempool Services (MS) to monitor the main chain’s mempool and collect transactions. Direct transmission is likely to be the preferred implementation for many contracts, and we believe it should be fairly practical in many cases. We briefly discuss how existing DApps could be minimally modified to support direct transmission while preserving a good user experience. We describe approaches using Ethereum and MetaMask [6] since these are the most popular choices today, but the mentioned techniques should extend to other chains and wallets. A recent Ethereum Improvement Proposal, “EIP-3085: Wallet add Ethereum chain RPC method” [100], will make it easy to target custom Ethereum chains (using a different CHAIN ID than that of MAINCHAIN to prevent replay attacks) from MetaMask and other browserbased wallets. After implementation of this proposal, a DApp seeking to use a DON would simply add a single method call to their front-end to be able to directly transmit transactions to any DON exposing an Ethereum-compatible API. In the meantime, “EIP-712: Ethereum typed structured data hashing and signing” [49] provides a slightly more involved but already widely deployed alternative, where a DApp user can use MetaMask to sign structured data specifying a DON transaction. The DApp can send this signed structured data to the DON. Finally, we note that hybrid approaches are also possible. For example, legacy clients can continue to send transactions into the main chain’s mempool, but critical transactions (e.g., oracle reports) are sent to DON nodes directly (in particular, the set of nodes providing oracle reports such as price-feed updates and the set of nodes providing FSS may overlap or be identical). Transaction sequencing: The main purpose of FSS is to guarantee that user transactions are ordered according to a pre-defined policy. The nature of this policy will depend on the application’s needs and the types of unfair transaction orderings that it aims to prevent. Since FSS on the DON is capable of processing data and maintaining local state, they may impose an arbitrary sequencing policy based on the information that is available at the oracles. The particular ordering policies and their implementation are discussed subsequently in Section 5.3.

Transaction posting: After collecting and ordering user transactions, received either directly from users or collected from the mempool, the DON sends these transactions to the main chain. As such, a DON’s interactions with the main chain remain subject to (potentially unfair) transaction ordering governed by the main chain’s miners. To harness the benefits of decentralized transaction ordering, the target smart contract SC thus has to be designed to treat the DON as a “first-class” citizen. We distinguish two approaches: • DON-only contracts: The simplest design option is to have the main chain smart contract SC only accept transactions that have been processed by the DON. This ensures that the smart contract processes transactions in the order proposed by the DON, but de-facto restricts the smart contract to operating in a committeebased system (i.e., the DON committee now has ongoing power to determine the ordering and inclusion of transactions). • Dual-class contracts: A preferred, more granular design has the main chain smart contract SC accept transactions originating both from the DON and from legacy users,10 but places traditional “speed bumps” on transactions that were not processed by the DON. For example, transactions from the DON may be processed immediately, whereas legacy transactions get “buffered” by the smart contract for a fixed period of time. Other standard mechanisms for preventing front-running such as commit-reveal schemes or VDFs [53] could also be applied to legacy transactions. This ensures that DON-ordered transactions do get processed in the order agreed upon, without giving the DON the unwanted power to censor transactions. As the imposition of transaction ordering by FSS requires that transactions are aggregated “off-chain,” this solution is naturally combined with other aggregation techniques that aim to reduce on-chain processing costs. For example, after collecting and ordering transactions, the DON may send these transactions to the main chain as a single “batched transaction” (e.g., a rollup), thereby reducing the aggregate transaction fee. Enforcing the transaction order: Whether in a DON-only or dual-class design, the main chain smart contract SC and the DON have to be co-designed so as to guarantee that the DON’s transaction ordering is upheld. Here also, we envision different design options: • Sequence numbers: The DON can append a sequence number to each transaction, and send these transactions into the main chain’s mempool. The main 10If the DON’s transaction monitoring is based on the mempool, legacy transactions must be distinguishable from DON transactions so that they are not collected by the DON, e.g., via a special tag embedded in the transaction or by specifying a particular gas price, e.g. DON transactions have gas prices below a certain threshold.

chain smart contract SC ignores transactions that arrive “out-of-sequence.” We note that in this setting, the main-chain miners can decide to ignore the DON’s transaction ordering, thereby causing transactions to fail. It is possible by keeping (expensive) state for SC to enforce correct transaction ordering, somewhat analogously to how TCP buffers out-of-order packets until missing packets are received. • Transaction nonces: For many blockchains, and in particular for Ethereum, the above sequence-numbering approach can leverage built-in transaction nonces to enforce that the main-chain smart contract SC processes transactions in sequence. Here, the DON nodes send transactions to the main chain through a single mainchain account, protected with a key shared among the DON nodes. The account’s transaction nonce ensures that transactions are mined and processed in the correct order. • Aggregate transactions: The DON can aggregate multiple transactions in a rollup (or in a bundle similar to a rollup). The main-chain smart contract needs to be designed to handle such aggregate transactions. • Aggregate transactions with a main chain proxy: Here, the DON similarly bundles transactions into one “meta-transaction” for the main chain, but relies on a custom proxy smart contract to unpack the transactions and relay them to the target contract SC. This technique can be useful for legacy compatibility. Metatransactions act like rollups but differ in that they consist of an uncompressed list of transactions posted once to the main chain. The last design has the advantage of seamlessly supporting user transactions that are themselves proxied through a main chain contract before reaching the DON’s target contract SC. For example, consider a user who sends a transaction to some wallet contract, which in turn sends an internal transaction to SC. Assigning a sequence number to such a transaction would be tricky, unless the user’s wallet contract is specially designed to forward the sequence number with every internal transaction to SC. Similarly, such internal transactions cannot be easily aggregated into a metatransaction that is sent directly to SC. We discuss further design considerations for such proxied transactions below. 5.2.2 Transaction Atomicity Our discussion thus far has implicitly assumed that transactions interact with a single on-chain smart contract (e.g., a user sends a buy request to an exchange). Yet, in systems such as Ethereum, a single transaction can consist of multiple internal transactions, e.g., one smart contract calling a function in another contract. Below, we describe two high-level strategies for sequencing “multi-contract” transactions, while preserving the atomicity of the transaction (i.e., the sequence of actions prescribed by the transaction are all executed in the correct order, or not at all).

Strong atomicity: The simplest solution is to apply FSS, as described above, directly to entire “multi-contract” transactions. That is, users send their transactions into the network and FSS monitors, sequences, and posts these transactions to the main chain. This approach is technically simple, but has one potential limitation: If a user transaction interacts with two contracts SC1 and SC2 that both want to leverage fair sequencing services, then the sequencing policy of these two contracts has to be consistent. That is, given two different transactions tx1 and tx2 that each interacts with both SC1 and SC2, it must not be the case that the policy of SC1 orders tx1 before tx2 whereas the policy of SC2 prescribes the opposite order. For the vast majority of scenarios of interest, we envision that the sequencing policies adopted by different contracts will be consistent. For example, both SC1 and SC2 may want transactions to be ordered by their approximate arrival time in the mempool, and SC1 may further want certain oracle reports to always be delivered first. As the latter oracle report transactions do not interact with SC2, the policies are consistent. Weak atomicity: In its full generality, FSS could be applied at the level of individual internal transactions. Consider transactions of the form tx = { ˜txpre, ˜txSC, ˜txpost}, consisting of some initial transaction(s) ˜txpre, which results in an internal transaction ˜txSC to SC, which in turn issues internal transaction(s) ˜txpost. The sequencing policy of SC might determine how the internal transaction ˜txSC has to be ordered with respect to other transactions sent to SC, but leave open the sequencing order for ˜txpre and ˜txpost. Given the intrinsics of transaction processing in systems such as Ethereum, developing a sequencing service that targets specific internal transactions is not straightforward. With a specially designed contract SC, this may be realizable as follows: 1. The transaction tx is sent into the network and mined (without any sequencing performed by FSS). The initial ˜txpre is executed, and calls ˜txSC. 2. SC does not execute ˜txSC and returns. 3. FSS monitors internal transactions to SC, sequences them, and posts them back to SC (i.e., by sending transactions ˜txSC directly to SC). 4. SC processes the transactions ˜txSC received from FSS, and issues internal transactions ˜txpost that result from ˜txSC. With this approach, transactions are not executed fully atomically (i.e., the original transaction tx gets broken up into multiple on-chain transactions), but the ordering of internal transactions is preserved. This solution entails a number of design constraints. For example, ˜txpre cannot assume that ˜txSC and ˜txpost will be executed. Moreover, SC should be designed so as to execute transactions ˜txSC and ˜txpost on behalf of a certain user, even though they were

sent by FSS. For these reasons, the more coarse-grained “Strong Atomicity” solution above is likely preferable in practice. For respecting more complex dependencies, involving multiple transactions and their respective internal transactions, the transaction scheduler of FSS may contain elaborate functions that resemble those found in transaction managers of relational database managers. 5.3 Fair Transaction Sequencing Here we discuss two notions of fairness for transaction sequencing and the corresponding implementations, which may be realized by FSS: order-fairness based on a policy imposed by FSS and secure causality preservation, which requires additional cryptographic methods in FSS. Order-fairness: Order-fairness is a notion of temporal fairness in consensus protocols that has first been introduced formally by Kelkar et al. [144]. Kelkar et al. aim to achieve a form of natural policy in which transactions are ordered based on the time they are first received by the DON (or the P2P network, in the case of a mempool-based FSS). In a decentralized system, however, different nodes may see transactions arrive in a different order. Establishing a total order on all transactions is the very problem solved by the consensus protocol underlying MAINCHAIN. Kelkar et al. [144] therefore introduce a weaker notion that can be achieved with the help of a Decentralized Oracle Network, called “block-order fairness.” It groups the transactions that the DON has received during a time interval into a “block” and inserts all transactions of the block concurrently and at the same position (i.e., height) into MAINCHAIN. They are thus ordered together and must be executable in parallel, without creating any conflicts among them. Roughly speaking, orderfairness then states that if a large fraction of nodes see transaction \(\tau_1\) before \(\tau_2\), then \(\tau_1\) will be sequenced before or in the same block as \(\tau_2\). By imposing such a coarse granularity on transaction order, the opportunities for front-running and other orderrelated attacks are greatly reduced. Kelkar et al. propose a family of protocols called Aequitas [144], which address different deployment models, including synchronous, partially synchronous, and asynchronous network settings. Aequitas protocols impose significant communication overhead relative to basic BFT consensus and are therefore not ideal for practical use. We believe, however, that practical variants of Aequitas will emerge that can be used for transaction sequencing in FSS and other applications. Some related schemes have already been proposed that have less accompanying formalism and weaker properties, e.g., [36, 151, 236], but better practical performance. These schemes can be supported in FSS as well. It is also worth noting that the term “fairness” appears elsewhere in the blockchain literature with a different meaning, namely fairness in the sense of opportunity for

miners proportional to their committed resources [106, 181] or for validators in terms of equal opportunity [153]. Secure causality preservation: The most widely known approach to prevent frontrunning and other ordering violations in distributed platforms relies on cryptographic techniques. Their common feature is to hide the transaction data itself, waiting until the order at the consensus layer has been established, and to reveal the transaction data later for processing. This preserves the causal order among the transactions that are executed by the blockchain. The relevant security notions and cryptographic protocols have been developed considerably before the advent of blockchains [71, 190]. The security conditions of “input causality” [190] and “secure causality preservation” [71, 97] require formally that no information about a transaction becomes known before the position of this transaction in the global order has been determined. An adversary must not be able to infer any information until that time, in a cryptographically strong sense. One can distinguish four cryptographic techniques to preserve causality: • Commit-reveal protocols [29, 142, 145]: Instead of a transaction being announced in the clear, only a cryptographic commitment to the transaction is broadcast. After all committed but hidden transactions have been ordered (in early blockchain systems on MAINCHAIN itself, but here by FSS), the sender must open the commitment and reveal the transaction data within a predetermined time interval. The network then verifies that the opening satisfies the earlier commitment. The origins of this method date prior to the advent of blockchains. Although it is particularly simple, the approach introduces considerable drawbacks and is not easy to employ for two reasons. First, since only the commitment exists at the level of the ordering protocol, the semantics of the transaction cannot be validated during consensus. An additional round-trip to the client is required. More severely, though, weighs the possibility that no opening may ever arrive, which could amount to a denial-of-service attack. Furthermore, it is difficult to determine whether the opening is valid in a consistent, distributed manner because all participants must agree on whether the opening arrived in time. • Commit-reveal protocols with delayed recovery [145]: One challenge with the commit-reveal approach is that a client may commit to a transaction speculatively and reveal it later only if subsequent transactions make it profitable. A recent variant of the commit-reveal approach improves the resilience against this kind of misbehavior. In particular, the TEX protocol [145] addresses this problem using a clever approach in which encrypted transactions include a decryption key obtainable by computing a verifiable delay function (VDF) [53, 221]. If a client fails to decrypt her transaction in a timely way, others in the system will decrypt it on her behalf by solving a moderately hard cryptographic puzzle.

• Threshold encryption [71, 190]: This method exploits that the DON may perform threshold-cryptographic operations. Assume FSS maintains an encryption public key pkO and the oracles share the corresponding private key among themselves. Clients then encrypt transactions under pkO and send them to FSS. FSS orders transactions on the DON, then decrypts them, and finally injects them into MAINCHAIN in the fixed order. Encryption therefore ensures that ordering is not based on the transaction content, but that the data itself is available when needed. This method was originally proposed by Reiter and Birman [190] and later refined by Cachin et al. [71], where it was integrated with a permissioned consensus protocol. More recent work has explored the use of threshold cryptography as a consensus-level mechanism for generic messages [33, 97] and for general computations with shared data [41]. Compared to commit-reveal protocols, threshold encryption prevents simple denialof-service attacks (although care is required given the computational cost of decryption). It lets the DON proceed autonomously, at its own speed and without waiting for further client actions. Transactions may be validated immediately after they have been decrypted. Moreover, clients encrypt all transactions with one key for the DON and the communication pattern remains the same as with other transactions. Managing the threshold key securely and with changing nodes in O, however, may pose additional difficulties. • Committed secret sharing [97]: Instead of encrypting the transaction data under a key held by the DON, the client may also secret-share it for the nodes in O. Using a hybrid, computationally secure secret sharing scheme, the transaction is encrypted first using a symmetric cipher with a random key. Only the corresponding symmetric key is shared and the ciphertext is submitted to the DON. The client must send one key share to each node in O using a separately encrypted message. The remaining protocol steps are the same as with threshold encryption, except that the transaction data is decrypted with the symmetric algorithm after reconstructing the per-transaction key from its shares. This method does not require setup or management of a public-key cryptosystem associated with the DON. However, the clients must be aware of the nodes in O and communicate in a secure context with each one of them, which places additional burden on the clients. Although the cryptographic methods offer complete protection against information leaking from submitted transactions to the network, they do not conceal metadata. For example, an IP address or an Ethereum address of the sender could still be used by an adversary to perform front-running and other attacks. Various privacy-enhancing techniques deployed at the network layer, e.g., [52, 95, 107], or the transaction layer, e.g., [13, 65], would be needed to accomplish this goal. The impact of a particular piece of metadata, namely to which contract a transaction is sent, can be (partially) concealed

through multiplexing many contracts on the same DON. Cryptographic concealment of transactions per se also doesn’t prevent prioritization of transactions by corrupted DON nodes in collusion with transaction senders. Secure causality as guaranteed by cryptographic protocols complement the orderfairness guarantees for any policy, and we intend to explore a combination of the two methods, where this is possible. If an adversary cannot gain significant advantage from observing metadata, the secure causality-preservation protocols could be used alongside a na¨ıve ordering approach as well. For example, oracle nodes can write transactions to L as soon as they receive them, without duplication. Transactions would then be ordered according to their appearance on L and subsequently decrypted. We also plan to consider the use of TEEs as a way to help enforce fair ordering; for example, Tesseract [44] may be viewed as achieving a form of causal ordering, but one strengthened by the ability of the TEE to process transactions in explicit form while retaining their confidentiality. 5.4 Network-Layer Considerations So far, our description of FSS has mainly focused on the problem of enforcing that the finalized order of transactions matches their observed order in the network. Hereafter, we consider fairness issues that could arise at the network layer itself. High-frequency traders in conventional electronic marketplaces invest considerable resources to obtain superior network speed [64], and traders in cryptocurrency exchanges exhibit similar behavior [90]. Network speed confers an advantage both in observing the transactions of other parties and in submitting competing transactions. One remedy deployed in practice and popularized in the book Flash Boys [155] is the “speed bump” introduced initially in the IEX exchange [128] and later in other exchanges [179] (with mixed results [19]). This mechanism imposes a delay (350 microseconds in IEX) on access to the market, with the aim of neutralizing advantages in speed. Empirical evidence, e.g. [128], supports its efficacy in decreasing certain trading costs for ordinary investors. FSS can be used simply to implement an asymmetrical speed bump—one that delays incoming transactions. Budish, Cramton, and Shim [64] argue that exploitation of advantages in speed is inescapable in continuous-time markets, and argue for a structural remedy in the form of batch-auction-based markets. But this approach has not taken hold broadly in existing trading platforms. Conventional trading systems are centralized, typically receiving transactions through a single network connection. In a decentralized system, by contrast, it is possible to observe transaction propagation from multiple vantage points. Consequently, it is possible to observe behaviors such as network flooding in a P2P network. We intend to explore network-layer approaches to FSS that help developers to specify policies prohibiting such undesirable network behaviors.

5.5 Entity-Level Fairness Policies Order-fairness and secure causality aim at enforcing an ordering on transactions that respects the time when they were created and first submitted to the network. A limitation of this notion of fairness is that it does not prevent attacks in which an adversary gains an advantage by flooding a system with many transactions, a strategy observed in the wild as a way to perform effective transaction sniping in token sales [159] and to create congestion resulting in liquidation of collateralized debt positions (CDPs) [48]. In other words, order-fairness enforces fairness with respect to transactions, not players. As shown in the CanDID system [160], it is possible to use oracle tools such as DECO or Town Crier in conjunction with a committee of nodes (such as a DON) to achieve various forms of Sybil-resistance while protecting privacy. Users can register identities and provide evidence of their uniqueness without disclosing the identities themselves. Sybil-resistant credentials offer a possible approach to enriching transaction-ordering policies in a way that would limit opportunities for flooding attacks. For example, a token sale might permit only one transaction per registered user, where registration requires a proof of uniqueness of a national identifier, such as a Social Security Number. Such an approach isn’t foolproof, but may prove a useful policy to mitigate transactionflooding attacks.

خدمات التسلسل العادل

إحدى الخدمات المهمة التي نتوقع أن تقدمها DONs والتي تعمل على تعزيز إمكانات الشبكات والحوسبة والتخزين الخاصة بها تسمى خدمات التسلسل العادل (FSS). على الرغم من أنه قد يُنظر إلى الخدمة الثابتة الساتلية (FSS) ببساطة على أنها تطبيق تم تحقيقه ضمن إطار عمل DON، إلا أننا نسلط الضوء عليها كخدمة نعتقد أنها ستحظى بطلب مرتفع عبر جميع أنحاء العالم blockchains، والتي نتوقع أن تدعمها شبكة Chainlink بشكل نشط. عند تنفيذها على شبكات blockchain العامة، فإن العديد من تطبيقات DeFi الحالية الكشف عن المعلومات التي يمكن استغلالها من قبل المستخدمين لمصلحتهم الخاصة، على غرار هذا النوع من التسريبات الداخلية وفرص التلاعب السائدة في الوقت الحالي الأسواق [64، 155]. بدلاً من ذلك، تمهد خدمة FSS الطريق نحو نظام بيئي عادل DeFi. الخدمة الثابتة الساتلية يساعد المطورين على إنشاء عقود DeFi محمية من التلاعب بالسوق الناتجة عن تسرب المعلومات. وبالنظر إلى المشاكل التي نسلط الضوء عليها أدناه، فإن FSS كذلك جذابة بشكل خاص لخدمات الطبقة الثانية وتناسبها في إطار هذه الخدمات التي نناقشها في القسم 6. التحدي: في الأنظمة الحالية غير المسموح بها، يتم طلب المعاملات بالكامل حسب تقدير عمال المناجم. في الشبكات المرخصة، قد يتم تطبيق العقد validator نفس القوة. وهذا شكل من أشكال المركزية المؤقتة غير المعترف بها إلى حد كبير في خلاف ذلك الأنظمة اللامركزية. يمكن لعامل التعدين (مؤقتًا) فرض رقابة على المعاملات الخاصة به المنفعة الخاصة [171] أو إعادة ترتيبها لتعظيم مكاسبها الخاصة، وهي فكرة تسمى القيمة القابلة للاستخراج (MEV) [90]. مصطلح MEV خادع بعض الشيء: فهو لا يشير فقط للقيمة التي يمكن لعمال المناجم التقاطها: يمكن للمستخدمين العاديين التقاط بعض MEV. نظرًا لأن القائمين بالتعدين يتمتعون بقدرة أكبر من القوة التي يتمتع بها المستخدمون العاديون، فإن MEV تمثل حدًا أعلى لمقدار القيمة التي يمكن لأي كيان الحصول عليها من خلال إعادة الترتيب التنافسي وإدخال المعاملات التكميلية. حتى عندما يقوم عمال المناجم بطلب المعاملات ببساطة على أساس الرسوم (الغاز)، وبدون تلاعب، يمكن للمستخدمين أنفسهم التلاعب بأسعار الغاز لتفضيل معاملاتهم على المعاملات الأقل تعقيدًا. ديان وآخرون. [90] توثيق وقياس الطرق التي تتخذها الروبوتات (وليس عمال المناجم) الاستفادة من ديناميكيات الغاز بطريقة تضر مستخدمي أنظمة DeFi اليوم وكيف حتى أن MEV يهدد استقرار طبقة الإجماع الأساسية في blockchain. تظهر أمثلة أخرى للتلاعب بأوامر المعاملات بانتظام، على سبيل المثال، [50، 154].تعد أساليب معالجة المعاملات الجديدة مثل rollups طريقة واعدة للغاية لمشاكل تحجيم الإنتاجية العالية blockchains. ومع ذلك، فإنها لا تعالج مشكلة MEV. وبدلاً من ذلك، يقومون بنقله إلى الكيان الذي يقوم بإنشاء rollup. ذلك الكيان، سواء كان مشغل smart contract أو مستخدمًا يقدم (zk-)rollup مع إثبات الصلاحية، لديه القدرة على طلب وإدراج المعاملات. بمعنى آخر، rollups مبادلة MEV بـ REV: القيمة المجمعة القابلة للاستخراج. تؤثر MEV على المعاملات القادمة التي تم إرسالها إلى مجمع الذاكرة لكن لم يلتزموا بعد بالسلسلة. المعلومات حول مثل هذه المعاملات على نطاق واسع المتاحة في الشبكة. يمكن لعمال المناجم وvalidators والمشاركين العاديين في الشبكة ولذلك استغلال هذه المعرفة وإنشاء المعاملات التابعة. بالإضافة إلى ذلك، قد يؤثر القائمون بالتعدين وvalidator على ترتيب تلك المعاملات التي يقومون بها أنفسهم ويستغلون ذلك لصالحهم. مشكلة التأثير غير المبرر من قبل القادة على طلب المعاملات بالإجماع البروتوكولات معروفة في الأدبيات منذ التسعينيات [71، 190]، ولكن لا يوجد مرض مرضي لقد تم تنفيذ الحلول عمليًا حتى الآن [97]. والسبب الرئيسي هو أن الحلول المقترحة - على الأقل حتى وقت قريب جدًا - لا يمكن دمجها بسهولة مع الجمهور blockchains، حيث يعتمدون على بقاء محتوى المعاملات سريًا إلى ما بعد تم تحديد ترتيبهم. نظرة عامة على خدمات التسلسل العادل (FSS): ستوفر DONs أدوات لتحقيق اللامركزية في طلب المعاملات وتنفيذها وفقًا لسياسة محددة من خلال الاعتماد منشئ العقد، ومن الأفضل أن يكون عادلاً، ولا يفيد الجهات الفاعلة التي ترغب في ذلك التلاعب في ترتيب المعاملات. وتشكل هذه الأدوات مجتمعة الخدمة الثابتة الساتلية. يتضمن FSS ثلاثة مكونات. الأول هو مراقبة المعاملات. في الخدمة الثابتة الساتلية، oracle العقد الموجودة في O كلاهما تراقب مجمع ذاكرة MAINCHAIN وتسمح (إذا رغبت في ذلك) تقديم المعاملات خارج السلسلة من خلال قناة متخصصة. والثاني هو تسلسل المعاملات. العقد في معاملات أمر O لعقد الاعتماد وفقا للسياسة المحددة لهذا العقد. والثالث هو نشر المعاملات. بعد طلب المعاملات، تقوم العقد الموجودة في O بإرسال المعاملات بشكل مشترك إلى السلسلة الرئيسية. تشمل الفوائد المحتملة للخدمة الثابتة الساتلية ما يلي: • عدالة الطلب: تشتمل الخدمة الثابتة الساتلية (FSS) على أدوات لمساعدة المطورين على ضمان إتمام المعاملات يتم طلب الإدخال في عقد معين بطريقة لا تعطي ظلمًا ميزة للمستخدمين ذوي الموارد الجيدة و/أو الأذكياء تقنيًا. سياسات الطلب يمكن تحديدها لهذا الغرض. • الحد من تسرب المعلومات أو القضاء عليه: من خلال ضمان عدم تمكن المشاركين في الشبكة من استغلال المعرفة المتعلقة بالمعاملات القادمة، يمكن للخدمات المالية الثابتة أن تخفف أو القضاء على الهجمات مثل التشغيل الأمامي التي تعتمد على المعلومات المتوفرة في الشبكة قبل تنفيذ المعاملات. منع استغلال مثل هذه ويضمن التسرب المعاملات الخصومة التي تعتمد على الأصل المعلق لا يمكن للمعاملات إدخال دفتر الأستاذ قبل تنفيذ المعاملات الأصلية.• انخفاض تكلفة المعاملات: من خلال القضاء على حاجة اللاعبين إلى السرعة في الإرسال معاملاتهم إلى smart contract، FSS يمكن أن تقلل بشكل كبير من تكلفة معالجة المعاملات. • ترتيب الأولويات: يمكن للخدمات المالية الثابتة (FSS) أن تمنح المعاملات الهامة أولوية خاصة تلقائيًا الطلب. على سبيل المثال، لمنع الهجمات الأولية ضد oracle التقارير، على سبيل المثال، [79]، يمكن لخدمة FSS إدراج تقرير oracle في تدفق المعاملات بأثر رجعي. الهدف الشامل لـ FSS في DONs هو تمكين DeFi منشئي المحتوى من تحقيق العدالة الأنظمة المالية، أي الأنظمة التي لا تفيد مستخدمين معينين (أو عمال المناجم) على الآخرين على أساس السرعة أو المعرفة الداخلية أو القدرة على الأداء الفني التلاعب. في حين أن المفهوم العام الواضح للعدالة بعيد المنال، فإن العدالة الكاملة موجودة أي معنى معقول لا يمكن تحقيقه، تهدف FSS إلى تزويد المطورين بأداة قوية مجموعة من الأدوات حتى يتمكنوا من فرض السياسات التي تساعد في تحقيق أهداف التصميم الخاصة بهم لـ DeFi. نلاحظ أنه على الرغم من أن الهدف الرئيسي لـ FSS هو العمل كخدمة تسلسل عادلة MAINCHAIN الذي تستهدفه DONs، بعضًا من نفس العدالة التي ترغب فيها FSS يمكن أن تكون الضمانات مناسبة أيضًا للبروتوكولات (اللامركزية) التي يتم تشغيلها فيما بينها DON الحفلات. وبالتالي، يمكن النظر إلى الخدمة الثابتة الساتلية (FSS) على نطاق أوسع باعتبارها خدمة تقدمها مجموعة فرعية من DON العقد للتسلسل العادل ليس فقط للمعاملات المرسلة من قبل مستخدمي MAINCHAIN ولكن أيضًا المعاملات (أي الرسائل) المشتركة بين عقد DON الأخرى. في هذا القسم، سنركز في المقام الأول على هدف تسلسل معاملات MAINCHAIN. تنظيم القسم: في القسم 5.1، نصف تطبيقين عاليي المستوى يحفزان تصميم FSS: منع التشغيل الأمامي لتقارير oracle ومنع التشغيل الأمامي لمعاملات المستخدم. ثم نقدم المزيد من التفاصيل حول تصميم الخدمة الثابتة الساتلية في القسم 5.2. يصف القسم 5.3 أمثلة على ضمانات ووسائل النظام العادل لتحقيقها. أخيرًا، يناقش القسم 5.4 والقسم 5.5 التهديدات على مستوى الشبكة مثل هذه السياسات والوسائل لمعالجتها، على التوالي لفيضانات الشبكة وسيبيل الهجمات. 5.1 مشكلة التشغيل الأمامي لشرح أهداف وتصميم FSS، وصفنا شكلين عامين من السباق الأمامي الهجمات والقيود المفروضة على الحلول القائمة. الجري في المقدمة يمثل فئة من هجمات طلب المعاملات: هناك عدد من الهجمات ذات الصلة مثل الهجوم الخلفي والتداخل (التشغيل الأمامي بالإضافة إلى التشغيل الخلفي) [237] التي لا نغطيها هنا، ولكن الذي FSS يساعد أيضا على معالجة. 5.1.1 أوراكل للتشغيل الأمامي في دورهم التقليدي المتمثل في توفير البيانات خارج السلسلة لتطبيقات blockchain، oracles تصبح هدفا طبيعيا للهجمات الأمامية.ضع في اعتبارك نمط التصميم الشائع لاستخدام oracle لتوفير خلاصات الأسعار المختلفة إلى بورصة على السلسلة: بشكل دوري (على سبيل المثال كل ساعة)، يقوم oracle بجمع بيانات الأسعار لـ أصول مختلفة ويرسلها إلى عقد الصرف. هذه المعاملات بيانات الأسعار تقديم فرص واضحة للمراجحة: على سبيل المثال، إذا كان أحدث تقرير oracle يسرد سعر أعلى بكثير لبعض الأصول، يمكن للخصم أن يتقدم بتقرير oracle إلى شراء الأصول وإعادة بيعها على الفور بمجرد معالجة تقرير oracle. مطبات السرعة والتسعير بأثر رجعي: الحل الطبيعي لمشكلة التشغيل الأمامي oracle هو إعطاء تقارير oracle أولوية خاصة على المعاملات الأخرى. ل على سبيل المثال، يمكن إرسال تقارير oracle برسوم عالية لتشجيع القائمين بالتعدين على المعالجة لهم أولا. ولكن هذا لن يمنع التقدم إذا كانت فرصة المراجحة عالية، ولا يمكنها منع المراجحة من قبل عمال المناجم أنفسهم. وبالتالي، لجأت بعض البورصات إلى تنفيذ "مطبات سريعة" أكثر ثقلاً، مثل وضع معاملات المستخدم في قائمة الانتظار لعدد من الكتل قبل المعالجة. لهم، أو تعديل الأسعار بأثر رجعي عند وصول تقرير oracle جديد. عيوب هذه الحلول هي أنها تضيف تعقيدًا إلى تنفيذ التبادل، زيادة متطلبات التخزين وبالتالي تكاليف المعاملات، وتعطيل تجربة المستخدم حيث لا يتم تأكيد تبادل الأصول إلا بعد فترة زمنية طويلة. الحمولة على الظهر: قبل الانتقال إلى الخدمة الثابتة الساتلية (FSS)، نناقش مسألة التحميل على الظهر، وهي طريقة بسيطة للغاية حل أنيق لمشكلة التشغيل الأمامي oracle. لا ينطبق على معالجة ومع ذلك، في المقدمة في سيناريوهات أخرى. باختصار، بدلاً من إرسال التقارير بشكل دوري إلى العقد الموجود على السلسلة، oracles نشر التقارير الموقعة التي يلحقها المستخدمون بمعاملاتهم عند الشراء أو البيع الأصول على السلسلة. تقوم البورصة بعد ذلك بالتحقق ببساطة من أن التقرير صالح وحديث (على سبيل المثال، يمكن لـ oracle التوقيع على نطاق من الكتل التي يكون التقرير صالحًا لها)، والمقتطفات تغذية السعر ذات الصلة منه. يتمتع هذا الأسلوب البسيط بعدد من المزايا مقارنة بـ "مطب السرعة" المذكور أعلاه المنهج: (1) لا يحتاج عقد الصرف إلى الحفاظ على حالة الأسعار، وهو ما ينبغي يؤدي إلى انخفاض تكاليف المعاملات؛ (2) بما أن تقارير oracle يتم نشرها على السلسلة على أساس الحاجة، يمكن لـ oracles إنشاء تحديثات أكثر تكرارًا (على سبيل المثال، كل دقيقة)، وبالتالي تقليل فرص المراجحة من خلال إعداد التقرير مسبقًا9؛ (3) يمكن المعاملات سيتم التحقق من صحتها على الفور، لأنها تتضمن دائمًا موجزًا جديدًا للأسعار. لكن النهج ليس مثاليا. أولاً، يضع هذا الحل البديل المسؤولية تقع على عاتق مستخدمي البورصة لجلب تقارير oracle المحدثة وإرفاقها بملفاتهم المعاملات. وثانيا، في حين أن الاعتماد على الفائض من شأنه أن يقلل من فرص المراجحة، فإنه لا يفعل ذلك منعها تمامًا دون التأثير على حيوية العقد الموجود على السلسلة. في الواقع، إذا تقرير oracle صالح حتى رقم الكتلة n، ثم يتم إرسال المعاملة للحظر سيتطلب n + 1 تقريرًا صالحًا جديدًا. بسبب التأخير المتأصل في نشر التقارير من oracles إلى المستخدمين، فإن التقرير الجديد الصالح للكتلة n + 1 سيكون له 9. لا تكون المراجحة جديرة بالاهتمام إلا إذا كان الفارق القابل للاستغلال في أسعار الأصول يتجاوز الفارق الدخيل. الرسوم المطلوبة لشراء وبيع الأصول، على سبيل المثال، تلك التي يتم جمعها من قبل عمال المناجم والبورصة.ليتم نشرها في فترة ما قبل استخراج الكتلة n + 1، على سبيل المثال في الكتلة n -k، وبالتالي إنشاء سلسلة من الكتل k حيث توجد فرصة للمراجحة قصيرة الأجل. نحن صف الآن كيف يتغلب FSS على هذه القيود. تحديد أولويات تقارير oracle مع FSS: يمكن لـ FSS معالجة التشغيل الأمامي oracle المشكلة من خلال البناء على الحل البديل المذكور أعلاه، ولكن مع دفع الحل الإضافي العمل على زيادة المعاملات من خلال تقارير oracle إلى شبكة Oracle اللامركزية. على مستوى عالٍ، تجمع العقد oracle المعاملات الموجهة للتبادل على السلسلة، الاتفاق على موجز الأسعار في الوقت الفعلي، ونشر موجز الأسعار جنبًا إلى جنب مع المعاملات المجمعة في عقد السلسلة الرئيسية. من الناحية النظرية، يمكن للمرء أن يفكر في هذا النهج باعتباره "تجميع المعاملات المعززة بالبيانات"، حيث يضمن oracle أن يتم تحديث تتم إضافة خلاصة الأسعار دائمًا إلى المعاملات. يمكن تنفيذ حلول الخدمة الثابتة الساتلية (FSS) بشفافية لمستخدمي البورصة، ومع الحد الأدنى من التغييرات في منطق العقد، كما نوضح بمزيد من التفصيل في القسم 5.2. ضمان إن تقارير oracle الجديدة التي يتم منحها الأولوية دائمًا على معاملات المستخدم هي مجرد مثال واحد لسياسة الطلب التي يمكن لـ FSS اعتمادها وتنفيذها. سياسات FSS لضمان النظام يتم وصف العدالة بشكل أكثر عمومية في القسم 5.3. 5.1.2 معاملات المستخدم التي يتم تشغيلها مسبقًا ننتقل الآن إلى التشغيل الأمامي في التطبيقات العامة، حيث طريقة الدفاع أعلاه لا يعمل. يمكن التقاط المشكلة على نطاق واسع من خلال السيناريو التالي: يرى الخصم بعض معاملات المستخدم tx1 مرسلة إلى شبكة P2P ويقوم بحقنها معاملتها الخصومة tx2، بحيث تتم معالجة tx2 قبل tx1 (على سبيل المثال، عن طريق الدفع رسوم معاملة أعلى). على سبيل المثال، هذا النوع من التقدم شائع بين الروبوتات التي تستغل فرص المراجحة في أنظمة DeFi [90] وقد أثرت على مستخدمي التطبيقات اللامركزية المختلفة [101]. فرض نظام عادل بين المعاملات معالجتها على blockchain يعالج هذه المشكلة. والأهم من ذلك، أن رؤية تفاصيل tx1 ليست ضرورية في بعض الأحيان إن المعرفة بمجرد وجودها قد تسمح للخصم بتشغيل tx1 من خلاله امتلاك tx2 والاحتيال على المستخدم البريء الذي أنشأ tx1. على سبيل المثال، يمكن للمستخدم أن يكون معروفًا بتداول أصل معين في أوقات منتظمة. يتطلب منع مثل هذه الهجمات عمليات التخفيف التي تتجنب تسرب بيانات التعريف أيضًا [62]. بعض الحلول لهذه المشكلة موجودة، ولكنها تسبب تأخيرات ومخاوف بشأن سهولة الاستخدام. من ترتيب الشبكة إلى الترتيب النهائي مع الخدمة الثابتة الساتلية: فرص للتقدم للأمام تنشأ لأن الأنظمة القائمة ليس لديها آليات لضمان النظام الذي تظهر المعاملات على نحو متسلسلة فيما يتعلق بترتيب الأحداث وتدفق المعلومات خارج الشبكة. يمثل هذا مشكلة ناشئة عن أوجه القصور في تنفيذ التطبيقات (على سبيل المثال، منصات التداول) على blockchain. من الناحية المثالية، يمكن للمرء أن يفعل ذلك تأكد من تنفيذ المعاملات على blockchain بنفس الترتيب الذي كانت عليه تم إنشاؤها وإرسالها إلى شبكة P2P الخاصة بـ blockchain. ولكن منذ شبكة blockchain

Fair Sequencing Services general schematic showing transaction flow from users through DON to main chain

يتم توزيعها، ولا يمكن التقاط مثل هذا الطلب. لذلك يقدم FSS الآليات للحماية من انتهاكات العدالة، التي تنشأ فقط بسبب التوزيع طبيعة شبكة blockchain. 5.2 تفاصيل الخدمة الثابتة الساتلية الشكل 12: مجموعة ذاكرة عادلة للطلب مع مسارين مختلفين للمعاملات: مباشر و على أساس mempool. ويبين الشكل 12 مخططاً عاماً للخدمة الثابتة الساتلية. لضمان العدالة، يجب أن يتداخل DON الذي يوفر خدمة FSS مع تدفق المعاملات عند دخولها إلى MAINCHAIN. قد يكون من الضروري إجراء تعديلات على العملاء، على smart contracts على MAINCHAIN، أو على كليهما. على مستوى عالٍ، يمكن تقسيم معالجة المعاملات بواسطة الخدمة الثابتة الساتلية (FSS) إلى ثلاثة المراحل الموضحة أدناه: (1) مراقبة المعاملات؛ (2) تسلسل المعاملات؛ و (3) ترحيل المعاملات. اعتمادًا على طريقة الطلب المستخدمة لتسلسل المعاملات، هناك حاجة إلى خطوات بروتوكول إضافية، كما هو موضح في القسم التالي. 5.2.1 معالجة المعاملات مراقبة المعاملات: نحن نتصور طريقتين مختلفتين لرصد الخدمة الثابتة الساتلية معاملات المستخدم المخصصة لـ smart contract محدد ومباشر ومستند إلى مجمع الذاكرة: • المباشر: النهج المباشر هو أبسط من الناحية المفاهيمية، ولكنه يتطلب إجراء تغييرات عليه عملاء المستخدمين بحيث يتم إرسال المعاملات مباشرة إلى Oracle اللامركزيةعقد الشبكة، بدلاً من عقد السلسلة الرئيسية. يتم تجميع DON معاملات المستخدم الموجهة إلى smart contract SC محددة وأوامرها بناءً على ذلك على بعض سياسة الطلب. يقوم DON بعد ذلك بإرسال المعاملات المطلوبة إلى smart contract على السلسلة الرئيسية. تتطلب بعض آليات الطلب أيضًا النهج المباشر لأن المستخدم الذي يقوم بإنشاء المعاملة يجب أن يكون مشفرًا حمايته قبل إرساله إلى FSS. • مستند إلى Mempool: لتسهيل تكامل FSS مع العملاء القديمين، DON يمكن استخدام Mempool Services (MS) لمراقبة مجمع الذاكرة الخاص بالسلسلة الرئيسية وجمعه المعاملات. من المرجح أن يكون النقل المباشر هو التنفيذ المفضل للعديد من العقود، ونعتقد أنه ينبغي أن يكون عمليًا إلى حد ما في كثير من الحالات. نناقش بإيجاز كيف يمكن تعديل التطبيقات اللامركزية الحالية إلى الحد الأدنى لدعمها النقل المباشر مع الحفاظ على تجربة مستخدم جيدة. وصفنا النهج استخدام Ethereum وMetaMask [6] نظرًا لأن هذه هي الخيارات الأكثر شيوعًا اليوم، ولكن يجب أن تمتد التقنيات المذكورة إلى السلاسل والمحافظ الأخرى. حديثة Ethereum اقتراح التحسين، "EIP-3085: تضيف المحفظة Ethereum طريقة سلسلة RPC" [100]، سيجعل من السهل استهداف سلاسل Ethereum المخصصة (باستخدام معرف سلسلة مختلف عن تلك الخاصة بـ MAINCHAIN لمنع هجمات إعادة التشغيل) من MetaMask والمحافظ الأخرى المستندة إلى المتصفح. بعد تنفيذ هذا الاقتراح، يسعى تطبيق DApp إلى استخدام DON سيضيف ببساطة استدعاء أسلوب واحد إلى الواجهة الأمامية ليتمكن من الإرسال مباشرة المعاملات إلى أي DON يعرض واجهة برمجة التطبيقات المتوافقة مع Ethereum. في هذه الأثناء، "EIP-712: Ethereum البيانات المنظمة المكتوبة hash للتوقيع والتوقيع" [49] يوفر قليلاً بديل أكثر مشاركة ولكنه منتشر بالفعل على نطاق واسع، حيث يمكن لمستخدم DApp استخدامه MetaMask لتوقيع البيانات المنظمة التي تحدد معاملة DON. يمكن للتطبيق اللامركزي إرسال وقعت هذه البيانات المنظمة على DON. وأخيرا، نلاحظ أن النهج الهجين ممكن أيضا. على سبيل المثال، التراث يمكن للعملاء الاستمرار في إرسال المعاملات إلى مجمع ذكريات السلسلة الرئيسية، ولكن الأمر بالغ الأهمية يتم إرسال المعاملات (على سبيل المثال، تقارير oracle) إلى العقد DON مباشرة (على وجه الخصوص، مجموعة من العقد توفر تقارير oracle مثل تحديثات موجز الأسعار ومجموعة العقد قد يتداخل توفير الخدمة الثابتة الساتلية (FSS) أو يكون متطابقًا). تسلسل المعاملات: الغرض الرئيسي من FSS هو ضمان ترتيب معاملات المستخدم وفقًا لسياسة محددة مسبقًا. طبيعة هذه السياسة سوف تعتمد على احتياجات التطبيق وأنواع أوامر المعاملات غير العادلة التي يقدمها يهدف إلى منع. نظرًا لأن FSS الموجود على DON قادر على معالجة البيانات والحفاظ على الحالة المحلية، فقد يفرضون سياسة تسلسل تعسفية بناءً على المعلومات الموجودة متاح على oracles. تتم مناقشة سياسات الطلب الخاصة وتنفيذها لاحقًا في القسم 5.3.ترحيل المعاملات: بعد جمع وترتيب معاملات المستخدم، سواء المستلمة مباشرة من المستخدمين أو التي تم جمعها من مجمع الذاكرة، يرسل DON هذه المعاملات إلى السلسلة الرئيسية. وعلى هذا النحو، تظل تفاعلات DON مع السلسلة الرئيسية قائمة تخضع لطلبات المعاملات (التي قد تكون غير عادلة) والتي يحكمها القائمون بالتعدين في السلسلة الرئيسية. للاستفادة من فوائد طلب المعاملات اللامركزية، الهدف ذكي وبالتالي، يجب تصميم عقد SC بحيث يعامل DON كمواطن من "الدرجة الأولى". نحن التمييز بين نهجين: • DON- العقود فقط: أبسط خيار للتصميم هو جعل السلسلة الرئيسية ذكية لا يقبل عقد SC إلا المعاملات التي تمت معالجتها بواسطة DON. هذا يضمن أن smart contract يعالج المعاملات بالترتيب الذي يقترحه DON، ولكن بحكم الأمر الواقع يقيد smart contract للعمل في نظام قائم على اللجنة (على سبيل المثال، تتمتع لجنة DON الآن بسلطة مستمرة لتحديد ترتيب وإدراج المعاملات). • العقود ذات الفئة المزدوجة: التصميم المفضل والأكثر تفصيلاً يحتوي على السلسلة الرئيسية الذكية يقبل عقد SC المعاملات الناشئة من DON ومن التراث المستخدمين،10 ولكنها تضع "مطبات السرعة" التقليدية على المعاملات التي لم تتم معالجتها بواسطة DON. على سبيل المثال، قد تتم معالجة المعاملات من DON على الفور، بينما يتم "تخزين" المعاملات القديمة بواسطة smart contract لـ فترة زمنية محددة. آليات قياسية أخرى لمنع التشغيل الأمامي مثل مخططات الكشف عن الالتزام أو VDFs [53] يمكن أيضًا تطبيقها على الإصدارات القديمة المعاملات. وهذا يضمن معالجة المعاملات المطلوبة DON الأمر المتفق عليه، دون إعطاء DON السلطة غير المرغوب فيها للرقابة المعاملات. نظرًا لأن فرض طلب المعاملات بواسطة الخدمة الثابتة الساتلية (FSS) يتطلب تجميع المعاملات "خارج السلسلة"، فمن الطبيعي أن يتم دمج هذا الحل مع تقنيات التجميع الأخرى التي تهدف إلى تقليل تكاليف المعالجة على السلسلة. على سبيل المثال، بعد جمع و لطلب المعاملات، قد يرسل DON هذه المعاملات إلى السلسلة الرئيسية باعتبارها "معاملة مجمعة" واحدة (على سبيل المثال، rollup)، مما يقلل من إجمالي المعاملة رسوم. تنفيذ أمر المعاملة: سواء كان في تصميم DON فقط أو تصميم ثنائي الفئة، يجب أن يتم تصميم السلسلة الرئيسية smart contract SC وDON بشكل مشترك لضمان دعم طلب المعاملات الخاص بـ DON. وهنا أيضًا، نتصور مختلفًا خيارات التصميم: • الأرقام التسلسلية: يمكن لـ DON إلحاق رقم تسلسلي بكل معاملة، وإرسال هذه المعاملات إلى مجمع ذكريات السلسلة الرئيسية. الرئيسي 10إذا كانت مراقبة معاملات DON تعتمد على مجمع الذاكرة، فيجب تمييز المعاملات القديمة عن معاملات DON بحيث لا يتم جمعها بواسطة DON، على سبيل المثال، عبر علامة خاصة جزءا لا يتجزأ من الصفقة أو عن طريق تحديد سعر معين للغاز، على سبيل المثال. DON المعاملات بها غاز الأسعار تحت عتبة معينة.تتجاهل السلسلة smart contract SC المعاملات التي تصل "خارج التسلسل". نحن لاحظ أنه في هذا الإعداد، يمكن للقائمين بالتعدين في السلسلة الرئيسية أن يقرروا تجاهل DON طلب المعاملات، مما يؤدي إلى فشل المعاملات. من الممكن عن طريق الاحتفاظ بحالة (باهظة الثمن) لـ SC فرض ترتيب المعاملات الصحيح إلى حد ما بشكل مشابه لكيفية قيام بروتوكول TCP بتخزين الحزم خارج الترتيب حتى تصبح الحزم المفقودة تلقى. • المعاملات nonces: بالنسبة للعديد من blockchains، وعلى وجه الخصوص لـ Ethereum، يمكن لنهج الترقيم التسلسلي أعلاه الاستفادة من المعاملة المضمنة nonces فرض أن السلسلة الرئيسية smart contract SC تعالج المعاملات بالتسلسل. هنا، ترسل العقد DON المعاملات إلى السلسلة الرئيسية من خلال حساب mainchain واحد، محمي بمفتاح مشترك بين العقد DON. الحساب تضمن المعاملة nonce استخراج المعاملات ومعالجتها بالترتيب الصحيح. • تجميع المعاملات: يمكن لـ DON تجميع معاملات متعددة في rollup (أو في حزمة مشابهة لـ rollup). يجب أن تكون السلسلة الرئيسية smart contract مصممة للتعامل مع مثل هذه المعاملات الإجمالية. • تجميع المعاملات باستخدام وكيل السلسلة الرئيسية: هنا، يقوم DON بالمثل بتجميع المعاملات في "معاملة تعريفية" واحدة للسلسلة الرئيسية، ولكنها تعتمد على الوكيل المخصص smart contract لتفريغ المعاملات وترحيلها إلى العقد المستهدف SC. يمكن أن تكون هذه التقنية مفيدة للتوافق القديم. تعمل المعاملات الوصفية مثل rollup ولكنها تختلف من حيث أنها تتكون من ملف غير مضغوط قائمة المعاملات المنشورة مرة واحدة على السلسلة الرئيسية. يتمتع التصميم الأخير بميزة دعم معاملات المستخدم بسلاسة هم أنفسهم وكيلون من خلال عقد السلسلة الرئيسية قبل الوصول إلى هدف DON عقد SC. على سبيل المثال، فكر في مستخدم يرسل معاملة إلى بعض المحافظ العقد، والذي بدوره يرسل معاملة داخلية إلى SC. تعيين تسلسل سيكون رقم مثل هذه المعاملة صعبًا، ما لم يكن عقد محفظة المستخدم كذلك مصمم خصيصًا لإعادة توجيه الرقم التسلسلي مع كل معاملة داخلية إلى SC. وبالمثل، لا يمكن تجميع هذه المعاملات الداخلية بسهولة في معاملة وصفية يتم إرسالها مباشرة إلى SC. نناقش المزيد من اعتبارات التصميم ل مثل هذه المعاملات بالوكالة أدناه. 5.2.2 الذرية الصفقة لقد افترضت مناقشتنا حتى الآن ضمنيًا أن المعاملات تتفاعل مع واحدة على السلسلة smart contract (على سبيل المثال، يرسل المستخدم طلب شراء إلى البورصة). ومع ذلك، في أنظمة مثل Ethereum، يمكن أن تتكون المعاملة الواحدة من معاملات داخلية متعددة، على سبيل المثال، واحدة smart contract تستدعي وظيفة في عقد آخر. أدناه، نحن وصف استراتيجيتين رفيعتي المستوى لتسلسل المعاملات "متعددة العقود"، بينما الحفاظ على ذرية المعاملة (أي تسلسل الإجراءات المنصوص عليها من قبل يتم تنفيذ جميع المعاملات بالترتيب الصحيح، أو لا يتم تنفيذها على الإطلاق).الذرية القوية: الحل الأبسط هو تطبيق الخدمة الثابتة الساتلية، كما هو موضح أعلاه، مباشرة على المعاملات "متعددة العقود" بأكملها. أي أن المستخدمين يرسلون معاملاتهم في الشبكة ويقوم FSS بمراقبة وتسلسل هذه المعاملات ونشرها على السلسلة الرئيسية. هذا الأسلوب بسيط من الناحية الفنية، ولكن له قيد محتمل واحد: إذا كان المستخدم تتفاعل المعاملة مع عقدين SC1 وSC2 يرغب كلاهما في الاستفادة بشكل عادل خدمات التسلسل، فإن سياسة التسلسل لهذين العقدين يجب أن تكون متسقة. وهذا يعني أنه في ضوء معاملتين مختلفتين tx1 وtx2 يتفاعل كل منهما معهما لكل من SC1 وSC2، يجب ألا تكون سياسة SC1 هي التي تطلب tx1 قبل tx2 في حين أن سياسة SC2 تنص على الأمر المعاكس. بالنسبة للغالبية العظمى من السيناريوهات محل الاهتمام، فإننا نتصور أن سياسات التسلسل المعتمدة في العقود المختلفة ستكون متسقة. على سبيل المثال، كل من SC1 وSC2 قد ترغب في أن يتم ترتيب المعاملات حسب وقت وصولها التقريبي إلى مجمع الذاكرة، وقد يرغب SC1 أيضًا في تسليم تقارير معينة oracle أولاً دائمًا. كما معاملات التقرير oracle الأخيرة لا تتفاعل مع SC2، والسياسات متسقة. الذرية الضعيفة: في عموميتها الكاملة، يمكن تطبيق الخدمة الثابتة الساتلية على المستوى الفردي المعاملات الداخلية. خذ بعين الاعتبار المعاملات بالصيغة tx = {˜txpre, ˜txSC, ˜txpost}، والتي تتكون من بعض العناصر الأولية المعاملة (المعاملات) ˜txpre، والتي تؤدي إلى معاملة داخلية ˜txSC إلى SC، والتي بدورها يصدر المعاملة (المعاملات) الداخلية ˜txpost. قد تحدد سياسة التسلسل الخاصة بـ SC كيفية القيام بذلك يجب أن يتم طلب المعاملة الداخلية ˜txSC فيما يتعلق بالمعاملات الأخرى المرسلة إلى SC، ولكن اترك ترتيب التسلسل مفتوحًا لـ "txpre" و"txpost". نظرًا لجوهر معالجة المعاملات في أنظمة مثل Ethereum، فإن تطوير خدمة تسلسل تستهدف معاملات داخلية محددة ليس بالأمر السهل. مع عقد SC المصمم خصيصًا، يمكن تحقيق ذلك على النحو التالي: 1. يتم إرسال المعاملة tx إلى الشبكة واستخراجها (بدون أي تسلسل يؤديها FSS). يتم تنفيذ الأمر ˜txpre الأولي، ويستدعي ˜txSC. 2. SC لا ينفذ "txSC" ويعود. 3. يقوم FSS بمراقبة المعاملات الداخلية إلى SC، وتسلسلها، ثم إرسالها مرة أخرى إلى SC (أي عن طريق إرسال المعاملات ˜txSC مباشرة إلى SC). 4. تقوم SC بمعالجة المعاملات ˜txSC المستلمة من FSS، وتصدر المعاملات الداخلية ˜txpost الناتجة عن ˜txSC. باستخدام هذا النهج، لا يتم تنفيذ المعاملات بشكل ذري بالكامل (أي النسخة الأصلية يتم تقسيم المعاملة tx إلى معاملات متعددة على السلسلة)، ولكن ترتيب يتم الحفاظ على المعاملات الداخلية. يتضمن هذا الحل عددًا من قيود التصميم. على سبيل المثال، لا يمكن لـ txpre افترض أنه سيتم تنفيذ ˜txSC و ˜txpost. وعلاوة على ذلك، ينبغي تصميم SC بحيث تنفيذ المعاملات ˜txSC و ˜txpost نيابة عن مستخدم معين، على الرغم من أنها كانت كذلكأرسلت بواسطة FSS. لهذه الأسباب، الحل الأكثر خشونة هو "الذرية القوية". من المرجح أن يكون ما سبق هو الأفضل في الممارسة العملية. لاحترام التبعيات الأكثر تعقيدًا، والتي تتضمن معاملات متعددة و المعاملات الداخلية الخاصة بكل منها، قد يحتوي برنامج جدولة المعاملات في FSS وظائف معقدة تشبه تلك الموجودة في مديري المعاملات العلائقية مديري قواعد البيانات. 5.3 تسلسل المعاملات العادلة نناقش هنا فكرتين للعدالة فيما يتعلق بتسلسل المعاملات والتطبيقات المقابلة، والتي يمكن أن تحققها الخدمة الثابتة الساتلية: عدالة الطلب على أساس سياسة ما تفرضها الخدمة الثابتة الساتلية (FSS) والحفاظ على العلاقة السببية الآمنة، الأمر الذي يتطلب طرق تشفير إضافية في الخدمة الثابتة الساتلية (FSS). عدالة النظام: عدالة النظام هي فكرة العدالة الزمنية في بروتوكولات الإجماع تم تقديمه رسميًا لأول مرة بواسطة Kelkar et al. [144]. كيلكار وآخرون. تهدف إلى تحقيق شكل من أشكال السياسة الطبيعية التي تتم فيها المعاملات تم طلبها بناءً على وقت استلامها لأول مرة بواسطة DON (أو شبكة P2P، في حالة FSS المستندة إلى mempool). لكن الأمر مختلف في النظام اللامركزي قد ترى العقد وصول المعاملات بترتيب مختلف. إنشاء النظام الإجمالي في جميع المعاملات هي المشكلة نفسها التي تم حلها من خلال بروتوكول الإجماع الأساسي مينشين. كيلكار وآخرون. [144] لذلك يقدم فكرة أضعف يمكن أن تكون تم تحقيقه بمساعدة شبكة أوراكل اللامركزية، والتي تسمى "عدالة أوامر الكتلة". يقوم بتجميع المعاملات التي تلقاها DON خلال فترة زمنية في ملف "block" ويقوم بإدراج جميع معاملات الكتلة بشكل متزامن وفي نفس الموضع (أي الارتفاع) إلى MAINCHAIN. وبالتالي يتم ترتيبها معًا ويجب أن تكون قابلة للتنفيذ بالتوازي، دون خلق أي صراعات فيما بينها. بشكل تقريبي، تنص عدالة الطلب على أنه إذا رأى جزء كبير من العقد المعاملة τ1 قبل τ2، إذن سيتم تسلسل τ1 قبل أو في نفس الكتلة مثل τ2. بفرض مثل هذه الخشنة التفاصيل المتعلقة بأمر المعاملة، تقل فرص الهجوم الأمامي والهجمات الأخرى المتعلقة بالأمر بشكل كبير. كيلكار وآخرون. يقترح عائلة من البروتوكولات تسمى Aequitas [144]، والتي تعالج نماذج نشر مختلفة، بما في ذلك إعدادات الشبكة المتزامنة والمتزامنة جزئيًا وغير المتزامنة. تفرض بروتوكولات Aequitas أعباء اتصال كبيرة مقارنة بالإجماع الأساسي BFT وبالتالي فهي ليست مثالية للاستخدام العملي. ومع ذلك، نعتقد أن المتغيرات العملية لـ Aequitas ستظهر والتي يمكن استخدامها لتسلسل المعاملات في الخدمة الثابتة الساتلية والتطبيقات الأخرى. بعض المخططات ذات الصلة لديها تم بالفعل اقتراحها والتي تحتوي على شكليات أقل وخصائص أضعف، على سبيل المثال، [36، 151، 236]، لكن الأداء العملي أفضل. يمكن دعم هذه المخططات في الخدمة الثابتة الساتلية كذلك. ومن الجدير بالذكر أيضًا أن مصطلح "العدالة" يظهر في مكان آخر في blockchain الأدب ذو معنى مختلف، وهو الإنصاف بمعنى الفرصةالقائمين بالتعدين يتناسب مع مواردهم الملتزم بها [106، 181] أو validators من حيث تكافؤ الفرص [153]. تأمين الحفاظ على السببية: يعتمد الأسلوب الأكثر شهرة لمنع التجاوزات وانتهاكات الطلب الأخرى في الأنظمة الأساسية الموزعة على التشفير التقنيات. السمة المشتركة بينهما هي إخفاء بيانات المعاملة نفسها، والانتظار حتى تم إنشاء الطلب في طبقة الإجماع والكشف عن بيانات المعاملة لاحقا للمعالجة. وهذا يحافظ على الترتيب السببي بين المعاملات التي تتم تم تنفيذه بواسطة blockchain. مفاهيم الأمان وبروتوكولات التشفير ذات الصلة تم تطويرها بشكل كبير قبل ظهور blockchains [71، 190]. تتطلب الشروط الأمنية الخاصة بـ "سببية الإدخال" [190] و"الحفاظ على السببية الآمنة" [71، 97] رسميًا عدم معرفة أي معلومات حول المعاملة قبل أن يتم تحديد موقع هذه الصفقة في النظام العالمي. يجب ألا يتمكن الخصم من استنتاج أي معلومات حتى ذلك الوقت بطريقة مشفرة شعور قوي. يمكن للمرء أن يميز بين أربع تقنيات تشفير للحفاظ على العلاقة السببية: • بروتوكولات الكشف عن الالتزام [29، 142، 145]: بدلاً من الإعلان عن المعاملة في الوضوح، يتم بث فقط التزام التشفير بالمعاملة. بعد أن يتم طلب جميع المعاملات الملتزمة ولكن المخفية (في أوائل blockchain الأنظمة الموجودة على MAINCHAIN نفسها، ولكن هنا بواسطة FSS)، يجب على المرسل فتح الالتزام والكشف عن بيانات المعاملة خلال فترة زمنية محددة مسبقًا. ثم تتحقق الشبكة من أن الافتتاح يفي بالالتزام السابق. ال تعود أصول هذه الطريقة إلى ما قبل ظهور blockchains. وعلى الرغم من بساطة هذا النهج بشكل خاص، إلا أنه ينطوي على عيوب كبيرة وليس من السهل استخدامه لسببين. أولاً، بما أن الالتزام موجود فقط على مستوى بروتوكول الطلب، فإن دلالات المعاملة لا يمكن التحقق من صحتها أثناء الإجماع. رحلة إضافية ذهابًا وإيابًا إلى العميل مطلوب. لكن الأمر الأكثر خطورة هو احتمال عدم فتح أبوابها قد تصل إلى أي وقت مضى، الأمر الذي قد يصل إلى مستوى هجوم رفض الخدمة. علاوة على ذلك، فإنه من الصعب تحديد ما إذا كان الافتتاح صالحًا بشكل متسق وموزع بطريقة لأنه يجب على جميع المشاركين الاتفاق على ما إذا كان الافتتاح قد وصل أم لا الوقت. • بروتوكولات الكشف عن الالتزام مع تأخير الاسترداد [145]: أحد التحديات مع نهج الالتزام والكشف هو أن العميل قد يلتزم بمعاملة مضاربة ويكشف عنها لاحقًا فقط إذا كانت المعاملات اللاحقة تجعلها مربحة. أ يعمل البديل الأخير من نهج الكشف عن الالتزام على تحسين المرونة ضد هذا نوع من سوء السلوك. وعلى وجه الخصوص، يعالج بروتوكول TEX [145] هذه المشكلة باستخدام أسلوب ذكي تتضمن فيه المعاملات المشفرة مفتاح فك التشفير يمكن الحصول عليها عن طريق حساب دالة تأخير يمكن التحقق منها (VDF) [53، 221]. إذا كان العميل إذا فشلت في فك تشفير معاملتها في الوقت المناسب، فسيقوم الآخرون في النظام بفك التشفير نيابة عنها عن طريق حل لغز تشفير صعب إلى حد ما.• تشفير العتبة [71، 190]: تستغل هذه الطريقة ما قد يؤديه DON عمليات عتبة التشفير. افترض أن FSS يحتفظ بتشفير عام يتشارك المفتاحان pkO وoracles المفتاح الخاص المقابل فيما بينهما. يقوم العملاء بعد ذلك بتشفير المعاملات بموجب pkO وإرسالها إلى FSS. أوامر الخدمة الثابتة الساتلية المعاملات على DON، ثم يقوم بفك تشفيرها وإدخالها أخيرًا في MAINCHAIN بالترتيب الثابت. التشفير بالتالي يضمن أن الطلب لا يعتمد على محتوى المعاملة، بل على أن البيانات نفسها تكون متاحة متى مطلوب. تم اقتراح هذه الطريقة في الأصل بواسطة رايتر وبيرمان [190] وتم تحسينها لاحقًا بواسطة Cachin et al. [71]، حيث تم دمجه بإجماع مسموح به البروتوكول. لقد استكشفت الأعمال الحديثة استخدام تشفير العتبة كطريقة آلية على مستوى الإجماع للرسائل العامة [33، 97] وللحسابات العامة مع البيانات المشتركة [41]. بالمقارنة مع بروتوكولات كشف الالتزام، يمنع تشفير العتبة هجمات رفض الخدمة البسيطة (على الرغم من أن الحذر مطلوب نظرًا للتكلفة الحسابية لفك التشفير). فهو يتيح لـ DON المضي قدمًا بشكل مستقل وبسرعته الخاصة وبدون ذلك في انتظار المزيد من إجراءات العميل. يمكن التحقق من صحة المعاملات فورًا بعد فك تشفيرها. علاوة على ذلك، يقوم العملاء بتشفير كافة المعاملات باستخدام أداة واحدة مفتاح DON ويظل نمط الاتصال كما هو مع الآخرين المعاملات. إدارة مفتاح العتبة بشكل آمن ومع تغيير العقد ومع ذلك، قد يطرح صعوبات إضافية. • المشاركة السرية الملتزم بها [97]: بدلاً من تشفير بيانات المعاملة تحتها المفتاح الذي يحتفظ به DON، يجوز للعميل أيضًا مشاركته سرًا للعقد الموجودة في O. باستخدام نظام مشاركة سري مختلط وآمن حسابيًا، تتم المعاملة يتم تشفيره أولاً باستخدام تشفير متماثل بمفتاح عشوائي. تتم مشاركة المفتاح المتماثل المقابل فقط ويتم إرسال النص المشفر إلى DON. يجب على العميل إرسال مشاركة مفتاح واحدة إلى كل عقدة في O باستخدام رسالة مشفرة بشكل منفصل. خطوات البروتوكول المتبقية هي نفسها كما هو الحال مع العتبة التشفير، إلا أنه يتم فك تشفير بيانات المعاملة بطريقة متماثلة الخوارزمية بعد إعادة بناء مفتاح كل معاملة من مشاركاتها. لا تتطلب هذه الطريقة إعداد أو إدارة نظام تشفير المفتاح العام المرتبطة بـ DON. ومع ذلك، يجب أن يكون العملاء على علم بالعقد الموجودة في O والتواصل في سياق آمن مع كل واحد منهم في أي مكان عبء إضافي على العملاء. على الرغم من أن طرق التشفير توفر حماية كاملة ضد المعلومات تتسرب من المعاملات المقدمة إلى الشبكة، فهي لا تخفي البيانات الوصفية. ل على سبيل المثال، لا يزال من الممكن استخدام عنوان IP أو عنوان Ethereum الخاص بالمرسل خصمًا لأداء الهجمات الأمامية والهجمات الأخرى. تعزيز الخصوصية المختلفة التقنيات المنتشرة في طبقة الشبكة، على سبيل المثال، [52، 95، 107]، أو طبقة المعاملات، على سبيل المثال، [13، 65]، ستكون هناك حاجة لتحقيق هذا الهدف. تأثير قطعة معينة من الممكن إخفاء البيانات الوصفية (جزئيًا)، أي العقد الذي يتم إرسال المعاملة إليهمن خلال مضاعفة العديد من العقود على نفس DON. إخفاء التشفير المعاملات في حد ذاتها لا تمنع أيضًا تحديد أولويات المعاملات عن طريق التالف DON العقد المتواطئة مع مرسلي المعاملات. إن السببية الآمنة التي تضمنها بروتوكولات التشفير تكمل ضمانات عدالة الطلب لأي سياسة، ونحن نعتزم استكشاف مزيج من الاثنين الأساليب، حيثما كان ذلك ممكنا. إذا لم يتمكن الخصم من الحصول على ميزة كبيرة منه ومن خلال مراقبة البيانات الوصفية، يمكن استخدام بروتوكولات الحفاظ على العلاقة السببية الآمنة جنبًا إلى جنب نهج الطلب الساذج أيضًا. على سبيل المثال، يمكن للعقد oracle كتابة المعاملات إلى L بمجرد استلامها، دون ازدواجية. المعاملات ستكون بعد ذلك تم طلبها وفقًا لظهورها على L وتم فك تشفيرها لاحقًا. ونخطط أيضًا للنظر في استخدام TEEs كوسيلة للمساعدة في فرض النظام العادل؛ ل على سبيل المثال، يمكن النظر إلى Tesseract [44] على أنه يحقق شكلاً من أشكال الترتيب السببي، ولكن أحد معززة بقدرة TEE على معالجة المعاملات بشكل واضح أثناء الحفاظ على سريتهم. 5.4 اعتبارات طبقة الشبكة حتى الآن، ركز وصفنا للخدمة الثابتة الساتلية (FSS) بشكل أساسي على مشكلة فرض ذلك يتطابق الترتيب النهائي للمعاملات مع ترتيبها الملحوظ في الشبكة. الآخرة، نحن نأخذ في الاعتبار مشكلات العدالة التي قد تنشأ في طبقة الشبكة نفسها. يستثمر المتداولون عالي التردد في الأسواق الإلكترونية التقليدية قدرًا كبيرًا من المال الموارد اللازمة للحصول على سرعة شبكة فائقة [64]، ويظهر المتداولون في بورصات العملات المشفرة سلوكًا مشابهًا [90]. تمنح سرعة الشبكة ميزة في كل من مراقبة معاملات الأطراف الأخرى وتقديم المعاملات المتنافسة. أحد العلاجات التي تم نشرها عمليًا وتم نشرها في كتاب Flash Boys [155] هو "مطب السرعة" الذي تم تقديمه في البداية في بورصة IEX [128] ولاحقًا في بورصات أخرى التبادلات [179] (مع نتائج مختلطة [19]). وتفرض هذه الآلية تأخيرا (350 ميكروثانية في IEX) على الوصول إلى السوق، وذلك بهدف تحييد المزايا في السرعة. الأدلة التجريبية، على سبيل المثال. [128]، يدعم فعاليته في تقليل تداولات معينة التكاليف بالنسبة للمستثمرين العاديين. يمكن استخدام FSS ببساطة لتنفيذ نظام غير متماثل مطب السرعة - الذي يؤخر المعاملات الواردة. يرى بوديش وكرامتون وشيم [64] أن استغلال المزايا في السرعة لا مفر منه في الأسواق المستمرة، ويجادلون من أجل علاج هيكلي في شكل من أشكال الأسواق القائمة على المزاد دفعة واحدة. لكن هذا النهج لم يترسخ على نطاق واسع في منصات التداول الحالية. أنظمة التداول التقليدية مركزية، وعادة ما تتلقى المعاملات من خلالها اتصال شبكة واحدة. على النقيض من ذلك، في النظام اللامركزي، من الممكن مراقبة انتشار المعاملة من نقاط مراقبة متعددة. وبالتالي، من الممكن ملاحظة سلوكيات مثل غمر الشبكة في شبكة P2P. نحن ننوي لاستكشاف أساليب طبقة الشبكة للخدمة الثابتة الساتلية (FSS) التي تساعد المطورين على تحديد السياسات حظر مثل هذه السلوكيات الشبكة غير المرغوب فيها.5.5 سياسات العدالة على مستوى الكيان تهدف عدالة النظام والسببية الآمنة إلى فرض أمر على المعاملات يحترم الوقت الذي تم فيه إنشائها وإرسالها لأول مرة إلى الشبكة. أحد القيود على فكرة العدالة هذه هو أنها لا تمنع الهجمات التي يقوم بها الخصم تكتسب ميزة من خلال إغراق النظام بالعديد من المعاملات، وهي استراتيجية تمت ملاحظتها في البرية كوسيلة لإجراء عمليات قنص فعالة للمعاملات في token المبيعات [159] ول خلق ازدحام يؤدي إلى تصفية مراكز الديون المضمونة (CDPs) [48]. وبعبارة أخرى، فإن عدالة النظام تفرض العدالة فيما يتعلق بالمعاملات، وليس اللاعبين. كما هو موضح في نظام CanDID [160]، من الممكن استخدام أدوات oracle مثل DECO أو Town Crier بالاشتراك مع لجنة العقد (مثل DON) لتحقيق أشكال مختلفة من مقاومة العرافة مع حماية الخصوصية. يمكن للمستخدمين تسجيل الهويات وتقديم دليل على تفردهم دون الكشف عن الهويات نفسها. توفر بيانات الاعتماد المقاومة لـ Sybil طريقة محتملة لإثراء طلب المعاملات السياسات بطريقة من شأنها أن تحد من فرص الهجمات الفيضانات. على سبيل المثال، أ token قد يسمح البيع بمعاملة واحدة فقط لكل مستخدم مسجل، حيث يتم التسجيل يتطلب إثباتًا على تفرد المعرف الوطني، مثل رقم الضمان الاجتماعي. مثل هذا النهج ليس مضمونا، ولكنه قد يكون سياسة مفيدة للتخفيف من هجمات غمر المعاملات.

The DON Transaction-Execution Framework

The DON Transaction-Execution Framework

(DON-TEF) DONs will provide oracle and decentralized-resource support for layer-2 solutions within what we call the Decentralized Oracle Network Transaction-Execution Framework (DONTEF) or TEF for short. Today, the frequency of updates to DeFi contracts is limited by main chain latencies, e.g., the 10-15 second average block interval in Ethereum [104]—as well as the cost of pushing large amounts of data on chain and limited computational/tx throughput— motivating scaling approaches such as sharding [148, 158, 232] and layer-2 execution [5, 12, 121, 141, 169, 186, 187]. Even blockchains with much faster transaction times, e.g., [120], have proposed scaling strategies that involve off-chain computation [168]. TEF is meant to act as a layer-2 resource for any such layer-1 / MAINCHAIN systems. Using TEF, DONs can support faster updates in a MAINCHAIN contract while retaining the key trust assurances provided by the main chain. TEF can support any of a number of layer-2 execution techniques and paradigms, including rollups,11 optimistic rollups, Validium, etc., as well as a threshold trust model in which DON nodes execute transactions. The TEF is complementary to FSS and intended to support it. In other words, any application running in the TEF can use FSS. 11Often called “zk-rollups,” a misnomer, as they do not necessarily need zero-knowledge proofs.

6.1 TEF Overview The TEF is a design pattern for the construction and execution of a performant hybrid smart contract SC. In accordance with the main idea behind hybrid smart contracts, TEF involves a decomposition of SC into two pieces: (1) What we call in the TEF context an anchor contract SCa on MAINCHAIN and (2) DON logic exect that we call the TEF executable. We use SC here to denote the logical contract implemented by the combination of SCa and exect. (As noted above, we expect to develop compiler tools to decompose a contract SC automatically into these components.) The TEF executable exect is the engine that processes users’ transactions in SC. It can execute in a performant way, as it runs on the DON. It has several functions: • Transaction ingestion: exect receives or fetches users’ transactions. It can do so directly, i.e., through transaction submission on the DON, or via the MAINCHAIN mempool using MS. • Fast transaction execution: exect processes transactions involving assets within SC. It does so locally, i.e., on the DON. • Fast and low-cost oracle / adapter access: exect has native access to oracle reports and other adapter data leading to, e.g., faster, cheaper, and more accurate asset pricing than MAINCHAIN execution. Moreover, off-chain oracle access reduces the oracle’s operational cost, hence the cost of using the system, by avoiding expensive on-chain storage. • Syncing: exect periodically pushes updates from DON onto MAINCHAIN, updating SCa. The anchor contract is the MAINCHAIN front end of SC. As the higher-trust component of SC, it serves several purposes: • Asset custody: Users’ funds are deposited into, held in, and withdrawn from SCa. • Syncing verification: SCa may verify the correctness of state updates when exect syncs, e.g., SNARKs attached to rollups. • Guard rails: SCa may include provisions to protect against corruption or failures in exect. (See Section 7 for more details.) In TEF, users’ funds are custodied on MAINCHAIN, meaning the DON is itself noncustodial. Depending on the choice of syncing mechanism (see below), users may need to trust the DON only for accurate oracle reports and timely syncing with MAINCHAIN. The resulting trust model is very similar to that for order-book-based DEXes, e.g., [2], which today generally include an off-chain component for order matching and an onchain component for clearing and settlement.

Transaction Execution Framework schematic showing mempool, clearing, and settlement flow

To use the vocabulary of payment systems, one may think of exect as the component of SC responsible for clearing, while SCa handles settlement. See Fig. 13 for a schematic depiction of TEF. Figure 13: TEF schematic. In this example, transactions pass through the mempool of MAINCHAIN via MS to the DON. TEF benefits: TEF carries three main benefits: • High performance: SC inherits the DON’s much higher throughput than MAINCHAIN for both transactions and oracle reports. Additionally, exect can process transactions faster and respond to oracle reports in a more timely way than an implementation on MAINCHAIN alone. • Lower fees: The process of syncing is less time-sensitive than transaction processing, and transactions can be sent from the DON to MAINCHAIN in batches. Consequently, the per-transaction on-chain fees (e.g., gas costs) with this approach are much lower than for a contract that runs only on MAINCHAIN. • Confidentiality: The confidentiality mechanisms of the DON can be brought to bear on SC.

TEF limitations: One limitation of TEF is that it does not support instantaneous withdrawals, as they occur only on MAINCHAIN: Upon sending a withdrawal request to SCa, a user may need to wait for exect to perform a state update that includes the withdrawal transaction before it can be approved. We discuss some partial remedies, however, in Section 6.2. Another limitation of TEF is that it does not support atomic composition of DeFi contracts on MAINCHAIN, specifically the ability to route assets through multiple DeFi contracts in a single transaction. TEF can, however, support such atomicity among DeFi contracts running on the same DON. We also discuss some ways to address this problem in Section 6.2. 6.2 Transaction Routing Transactions for SC can be sent by users directly to the DON or can be routed through the mempool in MAINCHAIN (via FSS). There are four distinct transaction types, each of which requires different handling: Within-contract transactions: Because it sidesteps the complications of gas dynamics, TEF provides SC more flexibility in its handling of transactions than would be available in a layer-1 contract. For example, while a mempool transaction in Ethereum can be overwritten by a fresh transaction with a higher gas price, SC can treat a transaction that operates on assets within SC as authoritative as soon as it becomes visible in the mempool. Consequently, SC need not wait for a transaction to be confirmed within a block, resulting in considerably reduced latency. Proxying: A user may wish to send a transaction \(\tau\) to SC via a wallet contract or other contract on MAINCHAIN. It is possible for the DON to simulate execution of \(\tau\) on MAINCHAIN to determine whether it results in a follow-on transaction to SC. If so, \(\tau\) can be sequenced with other transactions for SC that do. There are a few possibilities for how the DON identifies such transactions: (1) The DON can simulate all transactions in the mempool (an expensive approach); (2) Certain contracts or contract types, e.g., wallets, can be listed for monitoring by the DON; or (3) Users can annotate transactions for DON inspection. Matters become more complicated when a single transaction interacts with two contracts, SC1 and SC2, both of which use Fair Sequencing Services and have incompatible ordering policies. The DON might, for example, sequence \(\tau\) at the latest time that is compatible with both. Deposits: A transaction depositing a MAINCHAIN asset into SC needs to be confirmed in a block before SC can treat it as valid. When it detects the mining of a transaction that sends assets (e.g., Ether) into SCa, exect can instantly confirm the

deposit. For example, it can apply a current oracle-reported price on the DON to the asset. Withdrawals: As noted above, a limitation of TEF is that withdrawals cannot always be executed instantaneously. In a rollup-type execution model, the withdrawal request must be sequenced with other transactions, i.e., rolled up, in order to be safely processed. There are, however, some partial remedies to this limitation. If the DON can quickly compute a rollup validity proof up to the withdrawal transaction, then observing a user's transaction \(\tau\) in the mempool exect can send a stateupdate transaction \(\tau'\) for \(\tau\) at a higher gas price, a kind of beneficial front-running. Provided that \(\tau\) isn't mined before \(\tau'\) reaches the mempool, \(\tau'\) will precede \(\tau\), and \(\tau\) will effect an approved withdrawal. In a TEF variant where the DON is relied upon to compute state updates (see the threshold signing variant below), the DON can alternatively determine off-chain whether \(\tau\) ought to be approved given the state of SC upon its execution. The DON can then send a transaction \(\tau'\) that approves withdrawal \(\tau\)—without effecting a full state update. If this approach isn’t possible, or in cases where it doesn’t succeed, a DON-initiated transaction \(\tau'\) can send funds to the user in response to \(\tau\) so that the user need not initiate an additional transaction. 6.3 Syncing The TEF executable exect periodically pushes updates from DON to MAINCHAIN, updating the state of SCa in a process we refer to as syncing. Syncing may be thought of as propagation of layer-2 transactions to layer-1, so TEF can draw on any of a number of existing techniques for this purpose, including rollups [5, 12, 16, 69], optimistic rollups [10, 11, 141], Validium [201], or basic threshold signing, e.g., threshold BLS, Schnorr, or ECDSA [24, 54, 116, 202]. In principle, trusted execution environments can also attest to the correctness of state changes, offering a much more performant alternative to rollups, but with a hardware-dependent trust model. (See, e.g., [80].) Below we compare these syncing options with respect to three key properties in TEF: • Data availability: Where is the state of SC stored? At least three options are available in TEF: on the MAINCHAIN, on a DON, or by some third-party storage providers such as IPFS. They achieve different security guarantees, availability levels, and performance profiles. Briefly, storing state on the MAINCHAIN enables on-chain auditability and eliminates reliance on any party for state availability; on the other hand, storing state off-chain can reduce storage cost and improve throughput, at the cost of trusting storage providers (DON or third parties) for data availability. Of course, flexible models that combine these options are also possible. We indicate the required form of data availability in Table 1.

• Correctness guarantees: How does SCa ascertain the correctness of the updates pushed by exect? This affects the computational load on exect and SCa and the syncing latency (see below). • Latency: Syncing latency has three contributing factors: (1) The time taken for exect to generate a syncing transaction \(\tau_{\text{sync}}\); (2) The time taken for \(\tau_{\text{sync}}\) to be confirmed on MAINCHAIN; and (3) The time for \(\tau_{\text{sync}}\) to take effect on SCa. In TEF, latency is particularly important for withdrawals (but less so for within-contract transactions) because withdrawals necessarily require an (at least partial) state sync. Syncing options Data availability Correctness guarantees Latency Rollup [5, 12, 16, 69] On-chain Validity proofs Time taken to generate validity proofs (e.g., minutes in current systems) Validium [201] Off-chain Validity proofs Same as above Optimistic rollup [10, 11, 141] On-chain Fraud proofs Length of the challenge period (e.g., days or weeks) Threshold signing [24, 54, 116, 202] Flexible Threshold signatures by DON Instantaneous Trusted execution environments [80] Flexible Hardware-based attestations Instantaneous Table 1: Various syncing options in TEF and their properties. Table 1 summarizes these properties in the five main syncing options in TEF. (Note that we do not intend to compare these technologies as standalone layer-2 scaling solutions. For that we refer readers to e.g., [121].) Now we discuss each syncing option. Rollups: A rollup [69] is a protocol in which the state transition effected by a batch of transactions is computed off-chain. The state change is then propagated onto MAINCHAIN. To implement rollups, the anchor smart contract SCa stores a compact representation Rstate (e.g., a Merkle root) of the actual state. To sync, exect sends \(\tau_{\text{sync}}\) = (T, R′ state) to SCa where T is the set of the transactions it processed since the last

sync and R′ state is the compact representation of the new state calculated by applying transactions in T to the previous state Rstate. There are two popular variants that differ in how SCa verifies state updates in \(\tau_{\text{sync}}\). The first, (zk-)rollups, attach a succinct argument of correctness, sometimes called a validity proof, for the transition Rstate →R′ state. To implement this variant, exect computes and submits the validity proof (e.g., a zk-SNARK proof) along with \(\tau_{\text{sync}}\), proving that R′ state is the result of applying T to the current state of SCa. The anchor contract accepts the state update only after it has verified the proof. Optimistic rollups do not include arguments of correctness, but have staking and challenge procedures that facilitate distributed verification of state transitions. For this rollup variant, SCa tentatively accepts \(\tau_{\text{sync}}\) assuming it is correct (hence the optimism) but \(\tau_{\text{sync}}\) does not take effect until after a challenge period, during which any party monitoring MAINCHAIN can identify erroneous state updates and inform SCa to take necessary actions (e.g., to rollback the state and inflict a penalty on exect.) Both rollup variants achieve on-chain data availability, as transactions are posted on-chain, from which the full state can be constructed. The latency of zk-rollups is dominated by the time needed to generate validity proofs, which typically is on the order of minutes in existing systems [16] and will likely see improvements over time. Optimistic rollups, on the other hand, have a higher latency (e.g., days or weeks) because the challenge period needs to be long enough for fraud proofs to work. The implication of slow confirmation is subtle and sometimes specific to the scheme, so that a thorough analysis is out of scope. For instance, certain schemes consider payment transactions as “trustless final” [109] before the state update is confirmed, since a regular user could verify a rollup much more quickly than the MAINCHAIN. Validium: Validium is a form of (zk-)rollup that makes data available off-chain only and does not maintain all data on MAINCHAIN. Specifically, exect sends only the new state and the proof but not transactions to SCa. With Validium-style syncing, exect and the DON that executes it are the only parties that store the complete state and that execute transactions. As with zk-rollups, syncing latency is dominated by validity proof generation time. Unlike zk-rollups, however, Validium style syncing reduces the storage cost and increases the throughput. Threshold signing by DON: Assuming a threshold of DON nodes is honest, a simple and fast syncing option is to have DON nodes collectively sign the new state. This approach can support both on-chain and off-chain data availability. Note that if users trust DON for oracle updates, they do not need to trust it more for accepting state updates, as they are already in a threshold trust model. Another benefit of threshold signing is low latency. Support for new transaction signature formats as proposed in EIP-2938 [70] and known as account abstraction would make threshold signing considerably easier to implement, as it would eliminate the need for threshold ECDSA, which involves considerably more complex protocols (e.g., [116, 117, 118])

than alternatives such as threshold Schnorr [202] or BLS [55] signatures. Trusted Execution Environments (TEEs): TEEs are isolated execution environments (usually realized by hardware) that aim to provide strong security protections for programs running inside. Some TEEs (e.g., Intel SGX [84]) can produce proofs, known as attestations, that an output is correctly computed by a specific program for a particular input12. A TEE-based variant of TEF syncing can be implemented by replacing proofs in (zk-)rollups or Validium with TEE attestations using techniques from [80]. Compared to zero-knowledge proofs used in rollups and Validium, TEEs are much more performant. Compared to threshold signing, TEEs remove the complexity of generating threshold ECDSA signatures as there need in principle be only one TEE involved. Using TEEs does, however, introduce extra hardware-dependent trust assumptions. One can also combine TEEs with threshold signing to create resilience against compromise of a fraction of TEE instances, although this protective measure reintroduces the complexity of generating threshold ECDSA signatures. Additional flexibility: These syncing options can be refined to provide more flexibility in the following ways. • Flexible triggering: TEF application can determine the conditions under which syncing is triggered. For example, syncing can be batch-based, e.g., occur after every N transactions, time-based, e.g., every 10 blocks, or event-based, e.g., occur whenever target asset prices move significantly. • Partial syncing: It is possible and in some cases desirable (e.g., with rollups, partial syncing can reduce latency) for exect to provide fast syncing of small amounts of state, performing full syncing perhaps only periodically. For example, exect can approve a withdrawal request by updating a user’s balance in SCa without otherwise updating MAINCHAIN state. 6.4 Reorgs Blockchain reorganizations resulting from network instability or even from 51%-attacks can pose a threat to the integrity of a main chain. In practice, adversaries have used them to mount double-spending attacks [34]. While such attacks on major chains are challenging to mount, they remain feasible for some chains [88]. Because it operates independently of MAINCHAIN, a DON offers the interesting possibility of observing and providing some protections against reorgs associated with attacks. For example, a DON can report to a relying contract SC on MAINCHAIN the existence of a competing fork of some threshold length \(\tau\). The DON can additionally 12Supplementary details can be found in Appendix B.2.1. They are not required for understanding.

provide proof—in either a PoW or PoS setting—of the existence of such a fork. The contract SC can implement suitable defensive actions, such as suspending further transaction execution for a period of time (e.g., to allow exchanges to blacklist double-spent assets). Note that although an adversary mounting a 51%-attack can seek to censor reports from a DON, a countermeasure in SC is to require periodic reports from the DON in order to process transactions (i.e., a heartbeat) or to require a fresh report to validate a high-value transaction. While such forking alerts are in principle a general service the DON can provide for any of a number of purposes, our plan is to incorporate them with the TEF.

إطار عمل تنفيذ المعاملات DON

(DON-TEF) ستوفر DONs oracle ودعم الموارد اللامركزية لحلول الطبقة الثانية داخل ما نسميه إطار عمل تنفيذ المعاملات لشبكة أوراكل اللامركزية (DONTEF) أو TEF للاختصار. اليوم، أصبح تكرار التحديثات لعقود DeFi محدودًا بزمن استجابة السلسلة الرئيسية، على سبيل المثال، متوسط الفاصل الزمني للكتلة 10-15 ثانية في Ethereum [104] - بالإضافة إلى تكلفة دفع كميات كبيرة من البيانات على السلسلة وإنتاجية حسابية/إرسالية محدودة— تحفيز أساليب التوسع مثل التجزئة [148، 158، 232] وتنفيذ الطبقة الثانية [5، 12، 121، 141، 169، 186، 187]. حتى blockchains تتميز بأوقات معاملات أسرع بكثير، على سبيل المثال، [120]، اقترحوا إستراتيجيات قياس تتضمن عمليات حسابية خارج السلسلة [168]. والمقصود من TEF هو أن يكون بمثابة مورد الطبقة الثانية لأي من أنظمة الطبقة الأولى / MAINCHAIN. باستخدام TEF، يمكن لـ DONs دعم التحديثات الأسرع في عقد MAINCHAIN أثناء الاحتفاظ بضمانات الثقة الرئيسية التي تقدمها السلسلة الرئيسية. TEF يمكن أن تدعم أي عدد من تقنيات ونماذج تنفيذ الطبقة الثانية، بما في ذلك rollups,11 متفائل rollups، Validium، وما إلى ذلك، بالإضافة إلى نموذج عتبة الثقة الذي DON العقد تنفذ المعاملات. يعتبر TEF مكملاً للخدمة الثابتة الساتلية ويهدف إلى دعمها. وبعبارة أخرى، أي يمكن للتطبيق الذي يعمل في TEF استخدام FSS. 11غالبًا ما يطلق عليها "zk-rollups"، وهي تسمية خاطئة، لأنها لا تحتاج بالضرورة إلى إثباتات المعرفة الصفرية.

Transaction Execution Framework schematic showing mempool, clearing, and settlement flow

6.1 نظرة عامة على TEF TEF هو نمط تصميمي لبناء وتنفيذ سيارة هجينة عالية الأداء smart contract SC. وفقًا للفكرة الرئيسية وراء الهجين smart contracts، يتضمن TEF أ تحلل SC إلى قطعتين: (1) ما نسميه في سياق TEF مرساة عقد SCa على MAINCHAIN و(2) DON المنطق باستثناء أننا نطلق على TEF القابل للتنفيذ. نستخدم SC هنا للإشارة إلى العقد المنطقي الذي يتم تنفيذه من خلال الجمع بين SCa ونتوقع. (كما هو مذكور أعلاه، نتوقع تطوير أدوات التحويل البرمجي لتحليل ملف التعاقد مع SC تلقائيًا في هذه المكونات.) إن الملف القابل للتنفيذ TEF هو المحرك الذي يعالج معاملات المستخدمين في SC. ذلك يمكن تنفيذه بطريقة فعالة، لأنه يعمل على DON. لديها عدة وظائف: • استيعاب المعاملات: يتم استلام أو جلب معاملات المستخدمين. يمكنها أن تفعل ذلك مباشرة، أي من خلال تقديم المعاملة على DON، أو عبر MAINCHAIN mempool باستخدام MS. • تنفيذ المعاملات بسرعة: تنفيذ المعاملات التي تنطوي على الأصول داخل SC. ويتم ذلك محليًا، أي على DON. • وصول سريع ومنخفض التكلفة إلى oracle / الوصول إلى المحول: يتمتع بإمكانية الوصول الأصلي إلى تقارير oracle وبيانات المحول الأخرى التي تؤدي، على سبيل المثال، إلى أصول أسرع وأرخص وأكثر دقة التسعير من تنفيذ MAINCHAIN. علاوة على ذلك، يتم تقليل الوصول خارج السلسلة oracle التكلفة التشغيلية لـ oracle، وبالتالي تكلفة استخدام النظام، عن طريق تجنب تخزين باهظ الثمن على السلسلة. • المزامنة: يتم إرسال التحديثات بشكل دوري من DON إلى MAINCHAIN، وتحديث SCa. عقد التثبيت هو الواجهة الأمامية لـ MAINCHAIN ​​لـ SC. وباعتباره عنصر الثقة الأعلى في SC، فإنه يخدم عدة أغراض: • حفظ الأصول: يتم إيداع أموال المستخدمين والاحتفاظ بها وسحبها من SCA. • التحقق من المزامنة: قد تتحقق SCa من صحة تحديثات الحالة عند الضرورة عمليات المزامنة، على سبيل المثال، SNARKs المرفقة بـ rollups. • حواجز الحماية: قد تتضمن SCa أحكامًا للحماية من الفساد أو الفشل في التنفيذ. (انظر القسم 7 لمزيد من التفاصيل.) في TEF، يتم حفظ أموال المستخدمين على MAINCHAIN، مما يعني أن DON هو في حد ذاته غير وصاية. اعتمادا على اختيار آلية المزامنة (انظر أدناه)، قد يحتاج المستخدمون للوثوق في DON فقط للحصول على تقارير oracle الدقيقة والمزامنة في الوقت المناسب مع MAINCHAIN. نموذج الثقة الناتج مشابه جدًا لنموذج DEXes القائم على دفتر الطلبات، على سبيل المثال، [2]، والتي تشتمل اليوم بشكل عام على مكون خارج السلسلة لمطابقة الطلبات ومكون onchain للمقاصة والتسوية.لاستخدام مفردات أنظمة الدفع، يمكن للمرء أن يفكر في "التوقع" باعتباره المكون SC مسؤولة عن المقاصة، في حين تتولى SCA التسوية. انظر الشكل 13 للحصول على رسم تخطيطي تصوير TEF. الشكل 13: تخطيطي TEF. في هذا المثال، تمر المعاملات عبر مجمع الذاكرة من MAINCHAIN عبر MS إلى DON. فوائد TEF: يحمل TEF ثلاث فوائد رئيسية: • الأداء العالي: يرث SC إنتاجية DON الأعلى بكثير من MAINCHAIN لكل من المعاملات وتقارير oracle. بالإضافة إلى ذلك، يمكن لـ Exect معالجة المعاملات بشكل أسرع والاستجابة لتقارير oracle بطريقة أكثر توقيتًا من التنفيذ على MAINCHAIN ​​وحده. • رسوم أقل: تعتبر عملية المزامنة أقل حساسية للوقت من معالجة المعاملات، ويمكن إرسال المعاملات من DON إلى MAINCHAIN ​​على دفعات. وبالتالي، فإن الرسوم لكل معاملة على السلسلة (على سبيل المثال، تكاليف الغاز) مع هذا النهج أقل بكثير من العقد الذي يتم تشغيله فقط على MAINCHAIN. • السرية: يمكن جلب آليات السرية الخاصة بـ DON إلى تحمل على SC.

قيود TEF: أحد قيود TEF هو أنه لا يدعم اللحظية عمليات السحب، حيث أنها تتم فقط على شبكة MAINCHAIN: عند إرسال طلب السحب إلى SCa، قد يحتاج المستخدم إلى الانتظار حتى يتم إجراء تحديث الحالة الذي يتضمن معاملة السحب قبل أن تتم الموافقة عليها. نناقش بعض العلاجات الجزئية، ومع ذلك، في القسم 6.2. هناك قيود أخرى على TEF وهي أنه لا يدعم التركيب الذري لـ DeFi العقود على MAINCHAIN، وتحديدًا القدرة على توجيه الأصول عبر عدة DeFi العقود في صفقة واحدة. ومع ذلك، يمكن لـ TEF دعم هذه الذرية بين DeFi العقود التي تعمل على نفس DON. نناقش أيضًا بعض الطرق لمعالجة هذا الأمر المشكلة في القسم 6.2. 6.2 توجيه المعاملات يمكن للمستخدمين إرسال المعاملات الخاصة بـ SC مباشرة إلى DON أو يمكن توجيهها عبر مجمع الذاكرة في MAINCHAIN (عبر FSS). هناك أربعة أنواع مختلفة من المعاملات، لكل منها والتي تتطلب معالجة مختلفة: المعاملات ضمن العقد: ونظرًا لأنه يتجنب تعقيدات ديناميكيات الغاز، فإن TEF يوفر لشركة SC مرونة أكبر في التعامل مع المعاملات مما قد تكون عليه متوفر في عقد الطبقة الأولى. على سبيل المثال، أثناء معاملة mempool في Ethereum يمكن استبدالها بمعاملة جديدة بسعر غاز أعلى، يمكن لـ SC التعامل مع المعاملة التي تعمل على الأصول داخل SC باعتبارها معاملة موثوقة بمجرد أن تصبح مرئية في المذكرة. وبالتالي، لا تحتاج SC إلى الانتظار حتى يتم تأكيد المعاملة داخل كتلة، مما أدى إلى انخفاض كبير في زمن الوصول. الوكيل: قد يرغب المستخدم في إرسال معاملة τ إلى SC عبر عقد محفظة أو عقد آخر على MAINCHAIN. من الممكن أن يقوم DON بمحاكاة تنفيذ τ على MAINCHAIN لتحديد ما إذا كان سيؤدي إلى معاملة متابعة إلى SC. إذا كان الأمر كذلك، فيمكن تسلسل τ مع معاملات أخرى لـ SC تقوم بذلك. هناك عدد قليل إمكانيات كيفية تحديد DON لمثل هذه المعاملات: (1) يمكن لـ DON محاكاة جميع المعاملات في mempool (نهج مكلف)؛ (2) بعض العقود أو يمكن إدراج أنواع العقود، على سبيل المثال، المحافظ، للمراقبة بواسطة DON؛ أو (3) يمكن للمستخدمين قم بإضافة تعليق توضيحي للمعاملات الخاصة بفحص DON. تصبح الأمور أكثر تعقيدًا عندما تتفاعل معاملة واحدة مع اثنتين العقود، SC1 وSC2، وكلاهما يستخدم خدمات التسلسل العادل ولديهما سياسات طلب غير متوافقة. قد يقوم DON، على سبيل المثال، بالتسلسل τ في آخر وقت الذي يتوافق مع كليهما. الودائع: يجب تأكيد المعاملة التي تقوم بإيداع أصل MAINCHAIN في SC في كتلة قبل أن تتمكن SC من التعامل معها على أنها صالحة. عندما يكتشف التعدين أ المعاملة التي ترسل الأصول (على سبيل المثال، الأثير) إلى SCa، يمكن أن تؤكد على الفورإيداع. على سبيل المثال، يمكن تطبيق السعر الحالي الذي تم الإبلاغ عنه oracle على DON على الأصول. عمليات السحب: كما هو مذكور أعلاه، فإن أحد قيود TEF هو أنه لا يمكن دائمًا تنفيذ عمليات السحب على الفور. في نموذج التنفيذ من النوع rollup، يتم السحب يجب أن يكون الطلب متسلسلًا مع المعاملات الأخرى، أي أن يتم تجميعه، حتى يكون آمنًا معالجتها. ومع ذلك، هناك بعض العلاجات الجزئية لهذا القيد. إذا كان DON يمكنه حساب إثبات صحة rollup بسرعة حتى معاملة السحب، فإن مراقبة معاملة المستخدم τ في مجموعة الذاكرة باستثناء يمكن أن ترسل معاملة تحديث الحالة τ ′ لـ τ بسعر غاز أعلى، وهو نوع من التشغيل المسبق المفيد. بشرط ألا يتم تعدين τ قبل أن تصل τ ′ إلى مجمع الذاكرة، فإن τ ′ ستسبق τ، و τ سوف يؤدي إلى انسحاب معتمد. في متغير TEF حيث يتم الاعتماد على DON لحساب تحديثات الحالة (راجع متغير توقيع العتبة أدناه)، يمكن لـ DON تحديد خارج السلسلة بدلاً من ذلك ما إذا كان يجب الموافقة على τ نظرًا لحالة SC عند تنفيذها. DON يمكن بعد ذلك إرسال معاملة τ ′ توافق على السحب τ — دون إجراء كامل تحديث الدولة. إذا لم يكن هذا النهج ممكنًا، أو في الحالات التي لم ينجح فيها، فسيتم بدء DON يمكن للمعاملة τ ′ إرسال أموال إلى المستخدم ردًا على τ بحيث لا يحتاج المستخدم بدء معاملة إضافية. 6.3 المزامنة يقوم الملف القابل للتنفيذ TEF بدفع التحديثات بشكل دوري من DON إلى MAINCHAIN، تحديث حالة SCa في عملية نشير إليها بالمزامنة. يمكن التفكير في المزامنة كانتشار لمعاملات الطبقة الثانية إلى الطبقة الأولى، لذلك يمكن لـ TEF الاعتماد على أي رقم التقنيات الموجودة لهذا الغرض، بما في ذلك rollups [5، 12، 16، 69]، متفائلة rollups [10، 11، 141]، Validium [201]، أو توقيع الحد الأساسي، على سبيل المثال، عتبة BLS، شنور، أو ECDSA [24، 54، 116، 202]. من حيث المبدأ، بيئات التنفيذ الموثوقة يمكن أيضًا أن يشهد على صحة تغييرات الحالة، مما يوفر أداءً أفضل بكثير بديل لـ rollups، ولكن مع نموذج ثقة يعتمد على الأجهزة. (انظر، على سبيل المثال، [80].) نقارن أدناه خيارات المزامنة هذه فيما يتعلق بثلاث خصائص رئيسية في تيف: • توفر البيانات: أين يتم تخزين حالة SC؟ هناك ثلاثة خيارات على الأقل متوفر في TEF: على MAINCHAIN، أو على DON، أو عن طريق وحدة تخزين خارجية مقدمي الخدمات مثل IPFS. إنها تحقق ضمانات أمنية وتوافرًا مختلفًا المستويات وخصائص الأداء. باختصار، يتم تمكين حالة التخزين على MAINCHAIN إمكانية التدقيق على السلسلة ويلغي الاعتماد على أي طرف فيما يتعلق بتوفر الحالة؛ من ناحية أخرى، يمكن أن يؤدي تخزين الحالة خارج السلسلة إلى تقليل تكلفة التخزين وتحسينه الإنتاجية، على حساب موفري خدمات التخزين الموثوقين (DON أو الجهات الخارجية). توفر البيانات. وبطبيعة الحال، هناك أيضًا نماذج مرنة تجمع بين هذه الخيارات ممكن. نشير إلى الشكل المطلوب لتوافر البيانات في الجدول 1.• ضمانات الصحة: كيف تتأكد هيئة الرقابة المالية من صحة التحديثات مدفوعة بالتنفيذ؟ يؤثر هذا على الحمل الحسابي على exect وSCa و مزامنة الكمون (انظر أدناه). • الكمون: هناك ثلاثة عوامل مساهمة في زمن الاستجابة للمزامنة: (1) الوقت المستغرق لتوقع إنشاء معاملة مزامنة τsync؛ (2) الوقت المستغرق لـ τsync للتأكيد على MAINCHAIN؛ و (3) الوقت المناسب لتفعيل المزامنة SCA. في TEF، يعد زمن الوصول مهمًا بشكل خاص لعمليات السحب (لكنه أقل أهمية بالنسبة لعمليات السحب). المعاملات ضمن العقد) لأن عمليات السحب تتطلب بالضرورة (على الأقل جزئي) مزامنة الحالة. المزامنة خيارات البيانات التوفر صحة الضمانات الكمون التراكمي [5، 12، 16، 69] على السلسلة إثباتات الصلاحية الوقت المستغرق لتوليد إثباتات الصلاحية (على سبيل المثال، الدقائق في الأنظمة الحالية) فاليديوم [201] خارج السلسلة إثباتات الصلاحية نفس ما ورد أعلاه متفائل rollup [10، 11، 141] على السلسلة أدلة الاحتيال طول التحدي فترة (على سبيل المثال، أيام أو أسابيع) توقيع العتبة [24، 54، 116، 202] مرنة توقيعات العتبة بواسطة DON لحظية بيئات التنفيذ الموثوقة [80] مرنة على أساس الأجهزة الشهادات لحظية الجدول 1: خيارات المزامنة المختلفة في TEF وخصائصها. يلخص الجدول 1 هذه الخصائص في خيارات المزامنة الرئيسية الخمسة في TEF. (ملاحظة أننا لا ننوي مقارنة هذه التقنيات كقياس مستقل للطبقة الثانية الحلول. ولهذا نحيل القراء إلى، على سبيل المثال، [121].) الآن نناقش كل خيار من خيارات المزامنة. التجميعات: rollup [69] هو بروتوكول يتم فيه انتقال الحالة بواسطة يتم حساب مجموعة المعاملات خارج السلسلة. ثم يتم نشر تغيير الحالة على مينشين. لتنفيذ rollups، يقوم المرساة smart contract SCa بتخزين تمثيل مضغوط Rstate (على سبيل المثال، جذر Merkle) للحالة الفعلية. للمزامنة، يرسل exext τsync = (ت، ر' State) إلى SCa حيث T هي مجموعة المعاملات التي تمت معالجتها منذ آخر مرةالمزامنة وR' الحالة هي التمثيل المضغوط للحالة الجديدة المحسوبة عن طريق التطبيق المعاملات في T إلى الحالة السابقة Rstate. هناك نوعان مختلفان شائعان يختلفان في كيفية قيام SCa بالتحقق من تحديثات الحالة في τsync. الأول، (zk-)rollups، يرفق حجة موجزة للصحة، تسمى أحيانًا دليل صحة للانتقال Rstate →R′ الدولة. لتنفيذ هذا البديل، توقع يحسب ويقدم إثبات الصلاحية (على سبيل المثال، إثبات zk-SNARK) مع τsync، إثبات أن R' الحالة هي نتيجة تطبيق T على الحالة الحالية لـ SCa. المرساة لا يقبل العقد تحديث الحالة إلا بعد التحقق من الدليل. لا تتضمن rollups المتفائلة حجج الصحة، ولكنها تحتوي على staking و إجراءات التحدي التي تسهل التحقق الموزع من تحولات الحالة. لهذا متغير rollup، يقبل SCa مبدئيًا τsync على افتراض أنه صحيح (وبالتالي التفاؤل) لكن τsync لا يصبح ساري المفعول إلا بعد فترة التحدي التي يستطيع خلالها أي طرف يمكن لمراقبة MAINCHAIN تحديد تحديثات الحالة الخاطئة وإبلاغ SCa لاتخاذها الإجراءات الضرورية (على سبيل المثال، التراجع عن الحالة وإيقاع عقوبة على التنفيذ.) يحقق كلا المتغيرين rollup توفر البيانات على السلسلة، حيث يتم ترحيل المعاملات على السلسلة، والتي يمكن من خلالها بناء الحالة الكاملة. زمن الوصول لـ zk-rollups هو يهيمن عليها الوقت اللازم لإنشاء أدلة الصلاحية، والتي عادةً ما تكون على ترتيب الدقائق في الأنظمة الحالية [16] ومن المرجح أن تشهد تحسينات بمرور الوقت. من ناحية أخرى، تتمتع rollups المتفائلة بزمن وصول أعلى (على سبيل المثال، أيام أو أسابيع) لأن فترة التحدي يجب أن تكون طويلة بما يكفي حتى تنجح إثباتات الاحتيال. ال إن الآثار المترتبة على التأكيد البطيء تكون خفية وفي بعض الأحيان خاصة بالمخطط، لذلك التحليل الشامل خارج النطاق. على سبيل المثال، بعض المخططات تأخذ بعين الاعتبار الدفع المعاملات باعتبارها "نهائية غير موثوق بها" [109] قبل تأكيد تحديث الحالة، نظرًا لأن يمكن للمستخدم العادي التحقق من rollup بسرعة أكبر بكثير من MAINCHAIN. فاليديوم: Validium هو شكل من أشكال (zk-)rollup الذي يجعل البيانات متاحة خارج السلسلة فقط ولا يحتفظ بجميع البيانات الموجودة على MAINCHAIN. على وجه التحديد، exect يرسل الجديد فقط الدولة والدليل ولكن ليس المعاملات إلى SCa. مع المزامنة على غرار Validium، توقع وDON الذي ينفذها هما الطرفان الوحيدان اللذان يخزنان الحالة الكاملة و التي تنفذ المعاملات. كما هو الحال مع zk-rollups، تهيمن الصلاحية على زمن وصول المزامنة وقت توليد الإثبات. على عكس zk-rollups، فإن مزامنة نمط Validium تقلل من تكلفة التخزين ويزيد من الإنتاجية. توقيع الحد بواسطة DON: بافتراض أن عتبة العقد DON صادقة، أ خيار المزامنة البسيط والسريع هو جعل العقد DON توقع بشكل جماعي على الحالة الجديدة. يمكن أن يدعم هذا النهج توفر البيانات على السلسلة وخارجها. لاحظ أنه إذا يثق المستخدمون في DON لتحديثات oracle، ولا يحتاجون إلى الوثوق بها أكثر لقبولها تحديثات الحالة، لأنها موجودة بالفعل في نموذج ثقة العتبة. فائدة أخرى من توقيع العتبة هو الكمون المنخفض. دعم تنسيقات توقيع المعاملات الجديدة مثل المقترح في EIP-2938 [70] والمعروف باسم تجريد الحساب من شأنه أن يجعل العتبة التوقيع أسهل بكثير في التنفيذ، لأنه من شأنه أن يلغي الحاجة إلى العتبة ECDSA، والذي يتضمن بروتوكولات أكثر تعقيدًا إلى حد كبير (على سبيل المثال، [116، 117، 118])من البدائل مثل عتبة Schnorr [202] أو BLS [55] التوقيعات. بيئات التنفيذ الموثوقة (TEEs): TEEs هي بيئات تنفيذ معزولة (يتم تحقيقها عادةً بواسطة الأجهزة) تهدف إلى توفير حماية أمنية قوية للبرامج التي تعمل بالداخل. يمكن لبعض TEEs (على سبيل المثال، Intel SGX [84]) إنتاج أدلة، المعروفة باسم الشهادات، والتي يتم حساب المخرجات بشكل صحيح بواسطة برنامج محدد مدخلات معينة12. يمكن تنفيذ متغير قائم على TEE لمزامنة TEF بواسطة استبدال البراهين في (zk-)rollups أو Validium بشهادات TEE باستخدام التقنيات من [80]. بالمقارنة مع براهين المعرفة الصفرية المستخدمة في rollups وValidium، فإن TEEs أكثر أهمية أكثر أداء. بالمقارنة مع توقيع العتبة، فإن TEEs تزيل التعقيد توليد توقيعات عتبة ECDSA حيث يلزم من حيث المبدأ أن يكون هناك TEE واحد فقط المعنية. ومع ذلك، فإن استخدام TEEs يقدم افتراضات ثقة إضافية تعتمد على الأجهزة. يمكن للمرء أيضًا الجمع بين TEEs وتوقيع العتبة لخلق المرونة ضد التنازل عن جزء صغير من حالات TEE، على الرغم من أن هذا الإجراء الوقائي يعيد تقديم تعقيد إنشاء توقيعات عتبة ECDSA. مرونة إضافية: يمكن تحسين خيارات المزامنة هذه لتوفير المزيد من المرونة بالطرق التالية. • التشغيل المرن: يمكن لتطبيق TEF تحديد الظروف التي يتم بموجبها يتم تشغيل المزامنة. على سبيل المثال، يمكن أن تكون المزامنة مبنية على دفعات، على سبيل المثال، يمكن أن تتم بعد ذلك كل N من المعاملات، على أساس الوقت، على سبيل المثال، كل 10 كتل، أو على أساس الحدث، على سبيل المثال، تحدث كلما تحركت أسعار الأصول المستهدفة بشكل كبير. • المزامنة الجزئية: من الممكن، وفي بعض الحالات، مرغوبة (على سبيل المثال، مع rollups، يمكن أن تؤدي المزامنة الجزئية إلى تقليل زمن الوصول) لتوفير مزامنة سريعة للملفات الصغيرة كميات من الحالة، وإجراء المزامنة الكاملة ربما بشكل دوري فقط. على سبيل المثال، يمكن الموافقة على طلب السحب عن طريق تحديث رصيد المستخدم في SCa دون تحديث حالة MAINCHAIN. 6.4 يعيد التنظيم عمليات إعادة تنظيم Blockchain الناتجة عن عدم استقرار الشبكة أو حتى من هجمات 51٪ يمكن أن يشكل تهديدًا لسلامة السلسلة الرئيسية. ومن الناحية العملية، استخدم الخصوم لهم لشن هجمات الإنفاق المزدوج [34]. في حين أن مثل هذه الهجمات على السلاسل الرئيسية هي من الصعب تركيبها، تظل ممكنة بالنسبة لبعض السلاسل [88]. نظرًا لأنه يعمل بشكل مستقل عن MAINCHAIN، فإن DON يقدم الميزات المثيرة للاهتمام إمكانية مراقبة وتوفير بعض الحماية ضد عمليات إعادة التنظيم المرتبطة بها الهجمات. على سبيل المثال، يمكن لـ DON أن يبلغ عقدًا معتمدًا SC على MAINCHAIN ​​بوجود شوكة منافسة بطول حد معين τ. يمكن لـ DON بالإضافة إلى ذلك 12يمكن الاطلاع على التفاصيل التكميلية في الملحق ب.2.1. ليست مطلوبة للتفاهم.

تقديم دليل - سواء في إعداد إثبات العمل (PoW) أو إثبات الحصة (PoS) - على وجود مثل هذه الشوكة. ال يمكن لعقد SC تنفيذ إجراءات دفاعية مناسبة، مثل تعليق تنفيذ المزيد من المعاملات لفترة من الوقت (على سبيل المثال، للسماح للتبادلات بإدراج عمليات الإنفاق المزدوج في القائمة السوداء الأصول). لاحظ أنه على الرغم من أن الخصم الذي يشن هجومًا بنسبة 51% يمكنه أن يسعى إلى فرض الرقابة التقارير من DON، الإجراء المضاد في SC هو طلب تقارير دورية من DON لمعالجة المعاملات (أي نبضات القلب) أو لطلب تقرير جديد التحقق من صحة صفقة ذات قيمة عالية. في حين أن تنبيهات التفرع هذه هي من حيث المبدأ خدمة عامة يمكن أن يقدمها DON ولأي عدد من الأغراض، فإن خطتنا هي دمجها مع TEF.

Trust Minimization

Trust Minimization

As a decentralized system with participation from a heterogeneous set of entities, the Chainlink network provides strong protection against failures in both liveness (availability) and safety (report integrity). Most decentralized systems, however, vary in the degree to which their constituent components are themselves decentralized. This is true even of large systems, where limited decentralization among miners [32] and intermediaries [51] has long been present. The goal of any decentralization effort is trust minimization: We seek to reduce the adverse effects of systemic corruption or failure within the Chainlink network, even that due to a malicious DON. Our guiding principle is the Principle of Least Privilege [197]. System components and actors within the system should have privileges strictly scoped to allow only for the successful completion of their assigned roles. Here we lay out several concrete mechanisms for Chainlink to adopt in its drive toward ever-greater trust minimization. We characterize these mechanisms in terms of the loci, i.e., system components, in which they are rooted, shown in Fig. 14. We address each locus in a respective subsection. 7.1 Data-Source Authentication Current operating models for oracles are constrained by the fact that few data sources digitally sign the data they omit, in large part because TLS does not natively sign data. TLS does make use of digital signatures in its “handshake” protocol (to establish a shared key between a server and client). HTTPS-enabled servers thus have certificates on public keys that can in principle serve to sign data, but they do not generally use these certificates to support data signing. Consequently, the security of a DON, as in today’s oracle networks, relies on oracle nodes faithfully relaying data from a data source to a contract. An important long-term component of our vision for trust minimization in Chainlink involves stronger data-source authentication through support of tools and standards for data signing. Data signing can help enforce end-to-end integrity guarantees. In principle, if a contract accepts as input a piece of data D signed directly by a data

Loci of trust-minimizing mechanisms in the Chainlink network showing data quality, node selection, and oracle report verification

Figure 14: Loci of trust-minimizing mechanisms discussed in this section. 1⃝Data sources provide data to the 2⃝DON, which relays a function of the data to a dependent 3⃝smart contract. Additionally, the DON or the oracle network includes 4⃝node management smart contracts on MAINCHAIN for, e.g., compensating nodes, guard rails, and so forth. source, then the oracle network cannot feasibly tamper with D. Various encouraging efforts to enable such signing of data have emerged, including OpenID Connect, which is designed primarily for user authentication [9], TLS-N, an academic project aiming to extend TLS [191] by repurposing TLS certificates, and TLS Evidence Extensions [63]. While OpenID Connect has seen some adoption, however, TLS Evidence Extensions and TLS-N have yet to see adoption. Another potential avenue of data-source authentication is to use publishers’ own Signed HTTP Exchanges (SXG) [230], which they can cache on content-delivery networks as part of the Accelerated Mobile Pages (AMP) protocol [225]. The Chrome mobile browser displays the content from AMP-cached SXGs as if they were served from their publishers’ own network domains instead of the cache-server domain. This branding incentive, coupled with the relative ease of enabling it using services like CloudFlare’s Real URL [83] and Google’s amppackager [124], may lead to widespread adoption of SXGs in cached news content, which would enable a simple, tamper-resistant way for Chainlink oracles to trigger on newsworthy events reported in valid SXGs. While AMP-cached SXGs from news publishers would not be useful for high-tempo applications like reports on trading data, they could be a secure source for custom contracts pertaining to real-world events like extreme weather or election outcomes. We believe that simple deployment, mature tools, and flexibility will be vital to accelerating data-source signing. Enabling data providers to use Chainlink nodes as an authenticated API front end seems a promising approach. We intend to create an

option for nodes to function in this mode, with or without participation in the network as a full-blown oracle. We refer to this capability as authenticated data origination (ADO). By using Chainlink nodes with ADO, data sources will be able to benefit from the experience and tools developed by the Chainlink community in adding digital signing capabilities to their existing suite of off-chain APIs. Should they choose to run their nodes as oracles, they can additionally open up potential new revenue streams under the same model as existing data providers, e.g., Kraken [28], Kaiko [140], and others, that run Chainlink nodes to sell API data on chain. 7.1.1 The Limitations of Authenticated Data Origination Digital signing by data sources, while it can help strengthen authentication, isn’t sufficient per se to accomplish all of the natural security or operational goals of an oracle network. To begin with, a given piece of data D must still be relayed in a robust and timely way from a data source to smart contract or other data consumer. That is, even in an ideal setting in which all data is signed using keys pre-programmed into dependent contracts, a DON would still be needed to communicate the data reliably from sources to contracts. Additionally, there are a number of cases in which contracts or other oracle-data consumers want access to authenticated output of various functions computed over source data for two main reasons: • Confidentiality: A data source API may provide sensitive or proprietary data that needs to be redacted or sanitized before it is made publicly visible on chain. Any modification to signed data, however, invalidated the signature. Put another way, na¨ıve ADO and data sanitization are incompatible. We show in Example 3 how the two can be reconciled through an enhanced form of ADO. • Data source faults: Both errors and failures can affect data sources, and digital signatures address neither problem. From its inception [98], Chainlink has already included a mechanism to remediate such faults: redundancy. The reports issued by oracle networks typically represent the combined data of multiple sources. We now discuss schemes we are exploring in the ADO setting to enhance the confidentiality of source data and to combine data from multiple sources securely. 7.1.2 Confidentiality Data sources may not anticipate and make available the full gamut of APIs desired by users. Specifically, users may wish to access pre-processed data to help ensure confidentiality. The following example illustrates the problem.

Example 3. Alice wishes to obtain a decentralized identity (DID) credential stating that she is over 18 years of age (and thus can, for instance, take out a loan). To do so, she needs to prove this fact about her age to a DID credential issuer. Alice hopes to use data from her state’s Department of Motor Vehicles (DMV) website for the purpose. The DMV has a record of her birthdate and will emit a digitally signed attestation A on it of the following form: A = {Name: Alice, DoB: 02/16/1999}. In this example, the attestation A may be sufficient for Alice to prove to the DID credential issuer that she’s over 18. But it needlessly leaks sensitive information: Alice’s exact DoB. Ideally, what Alice would like from the DMV instead is a signature on a simple statement A′ that “Alice is over 18 years of age.” In other words, she wants the output of a function G on her birthdate X, where (informally), A′ = G(X) = True if CurrentDate −X ≥18 years; otherwise, G(X) = False. To generalize, Alice would like to be able to request from the data source a signed attestation A′ of the form: A′ = {Name: Alice, Func:G(X), Result: True}, where G(X) denotes a specification of a function G and its input(s) X. We envision that a user should be able to provide a desired G(X) as input with her request for a corresponding attestation A′. Note that the data source’s attestation A′ must include the specification G(X) to ensure that A′ is correctly interpreted. In the above example, G(X) defines the meaning of the Boolean value in A′ and thus that True signifies the subject of the attestation is over 18 years of age. We refer to flexible queries in which a user can specify G(X) as functional queries. In order to support use cases like that in Example 3, as well as those involving queries directly from contracts, we intend to include support for functional queries involving simple functions G as part of ADO. 7.1.3 Combining Source Data To reduce on-chain costs, contracts are generally designed to consume combined data from multiple sources, as illustrated in the following example. Example 4 (Medianizing price data). To provide a price feed, i.e., the value of one asset (e.g., ETH) with respect to another (e.g., USD), an oracle network will generally obtain current prices from a number of sources, such as exchanges. The oracle network typically sends to a dependent contract SC the median of these values. In an environment with data signing, a correctly functioning oracle network obtains from data sources \(S = \{S_1, \ldots, S_{n_S}\}\) a sequence of values \(V = \{v_1, v_2, \ldots, v_{n_S}\}\) from \(n_S\) sources with accompanying source-specific signatures \(\Sigma = \{\sigma_1, \sigma_2, \ldots, \sigma_{n_S}\}\). Upon verifying the signatures, it transmits the price \(v = \text{median}(V)\) to SC.

Unfortunately, there is no simple way for an oracle network to transmit the median value \(v\) in Example 4 to SC along with a succinct proof \(\sigma^*\) that \(v\) was correctly computed over signed inputs. A na¨ıve approach would be to encode in SC the public keys of all \(n_S\) data sources. The oracle network would then relay \((V, \Sigma)\) and allow SC to compute the median of \(V\). This, however, would result in a proof \(\sigma\) of size \(O(n_S)\)—i.e., \(\sigma^*\) would not be succinct. It would also incur high gas costs for SC, which would need to verify all signatures in \(\Sigma\). Use of SNARKs, in contrast, enables a succinct proof of correctly combined authenticated source values. It may be workable in practice, but imposes fairly high computational costs on the prover, and somewhat high gas costs on chain. Use of Town Crier is also a possibility, but requires the use of TEEs, which does not suit all users’ trust models. A helpful concept in which to frame solutions to the general problem of signing combined data from sources is a cryptographic tool known as functional signatures [59, 132]. Briefly, functional signatures allow a signer to delegate signing capability, such that the delegatee can only sign messages in the range of a function F chosen by the signer. We show in Appendix D how this functional constraint can serve to bound the range of report values emitted by a DON as a function of the values signed by data sources. We also introduce a new primitive, called a discretized functional signature, that includes a relaxed requirement for accuracy, but is potentially much more performant than approaches such as SNARKs. The problem of combining data sources in a way that includes source authentication of outputs also applies to data aggregators, e.g., CoinCap, CoinMarketCap, CoinGecko, CryptoCompare, etc., which obtain data from a multiplicity of exchanges, which they weight based on volumes, using methodologies that they in some cases make public and are in other cases proprietary. An aggregator that wishes to publish a value with source authentication faces the same challenge as a collection of nodes aggregating source data. 7.1.4 Processing Source Data Sophisticated smart contracts are likely to depend on custom aggregate statistics over primary data sources, such as volatility in recent price history over many assets, or text and photographs from news about pertinent events. Because computation and bandwidth are relatively cheap in a DON, these statistics— even complex machine-learning models with many inputs—can be processed economically, as long as any output value destined for a blockchain is sufficiently concise. For computationally intensive jobs where DON participants may have differing views on complex inputs, extra rounds of communication between the DON participants may be required to establish consensus on the inputs before computing the result. As long as the final value is fully determined by the inputs, once input consensus is established each participant can simply compute the value and broadcast it to the other

participants with their partial signature, or send it to an aggregator. 7.2 DON Trust Minimization We envision two main ways of minimizing the trust placed in components of the DON: failover clients and minority reports. 7.2.1 Failover Clients Adversarial models in the cryptography and distributed systems literature typically consider an adversary capable of corrupting (i.e., compromising) a subset of nodes, e.g., fewer than one-third for many BFT protocols. It is commonly observed, however, that if all nodes run identical software, an adversary that identifies a fatal exploit could in principle compromise all nodes more or less simultaneously. This setting is often referred to as a software monoculture [47]. Various proposals for automatically diversifying software and software configurations have been put forth to address the problem, e.g., [47, 113]. As noted in [47], however, software diversity is a complex issue and requires careful consideration. Software diversification, for example, can result in worse security than a monoculture if it increases a system’s attack surface and thus its possible vectors of attack in excess of the security benefits it offers. We believe that support for robust failover clients—i.e., clients to which nodes can switch in the face of a catastrophic event—is an especially attractive form of software diversification. Failover clients do not increase the number of potential vectors of attack, as they are not deployed as mainline software. They offer clear benefits, however, as a second line of defense. We intend to support failover clients in DONs as a key means of reducing their dependence for security on a single client. Chainlink already has in place a robust system of failover clients. Our approach involves maintaining previous, battle-tested client versions. Today, for example, Chainlink nodes with Off-Chain Reporting (OCR) as their primary client include support for Chainlink’s previous FluxMonitor system if needed. Having been in use for some time, FluxMonitor has received security audits and field testing. It provides the same functionality as OCR, just at higher cost—a cost only incurred on an as-needed basis. 7.2.2 Minority Reports Given a sufficiently large minority set \(O_{\text{minority}}\)—a fraction of honest nodes that observe malfeasance by the majority—it can be helpful for them to generate a minority report. This is a parallel report or flag, relayed to a dependent contract SC on-chain by \(O_{\text{minority}}\). SC can make use of this flag according to its own contract-specific policy. For example, for a contract in which safety is more important than liveness or responsiveness, a minority report might cause the contract to request supplementary reports from another DON, or trigger a circuit breaker (see the next section).

Minority reports can play an important role even when the majority is honest, because any report-aggregation scheme, even if it uses functional signatures, must operate in a threshold manner, to ensure resilience against oracle or data failure. In other words, it must be possible to produce a valid report based on the inputs of \(k_S < n_S\) oracles, for some threshold \(k_S\). This means a corrupted DON has some latitude in manipulating report values by selecting its preferred \(k_S\) values among the \(n_S\) reported in \(V\) by the full set of oracles, even if all sources are honest. For example, suppose that nS = 10 and kS = 7 in a system that uses a functional signature to authenticate computation of median over V for the USD price of ETH. Suppose that five sources report a price of \(500, while the other five report \)1000. Then by medianizing the lowest 7 reports, the DON can output a valid value v = $500, and by medianizing the highest, it can output v = $1000. By enhancing the DON protocol so that all nodes are aware of which data was available, and which data was used to construct a report, nodes could detect and flag statistically significant tendencies to favor one set of reports over another, and produce a minority report as a result. 7.3 Guard Rails Our trust model for DONs treats MAINCHAIN as a higher-security, higher-privilege system than DONs. (While this trust model may not always hold true, it is easier to adapt the resulting mechanism to situations where the DON is the higher security platform than vice versa.) A natural trust minimization strategy thus involves the implementation of monitoring and failsafe mechanisms in smart contracts—either in a MAINCHAIN front end for a DON or directly in a dependent contract SC. We refer to these mechanisms as guard rails, and enumerate some of the most important here: • Circuit breakers: SC may pause or halt state updates as a function either of characteristics of the state updates themselves (e.g., large variance across sequential reports) or based on other inputs. For example, a circuit breaker might trip in cases where oracle reports vary implausibly over time. A circuit breaker might also be tripped by a minority report. Thus, circuit breakers can prevent DONs from making grossly erroneous reports. Circuit breakers can provide time for additional interventions to be considered or exercised. One such intervention is escape hatches. • Escape hatches: Under adverse circumstances, as identified by a set of custodians, community token holders, or other bodies of trustees, a contract may invoke an emergency facility sometimes called an escape hatch [163]. An escape hatch causes SC to shut down in some manner and/or terminates pending and possibly future transactions. For example, it may return custodied funds to users [17]),

may terminate contract terms [162], or may cancel pending and/or future transactions [173]. Escape hatches can be deployed in any type of contract, not just one that relies on a DON, but they are of interest as a potential buffer against DON malfeasance. • Failover: In systems where SC relies on the DON for essential services, it is possible for SC to provide failover mechanisms that ensure service continuation even in the case of DON failure or misbehavior. For example, in the TEF (Section 6), the anchor contract SCa may provide dual interfaces where both on-chain and off-chain execution interfaces are supported for certain critical operations (e.g., withdrawal), or for ordinary transactions, with a suitable delay to prevent frontrunning of DON transactions. In cases where data sources sign data, users could also furnish reports to SCa when the DON fails to do so. Fraud proofs, as proposed for various forms of optimistic rollup (see Section 6.3), are similar in flavor and complementary to the mechanisms we enumerate above. They too provide a form of on-chain monitoring and protection against potential failures in off-chain system components. 7.4 Trust-Minimized Governance Like all decentralized systems, the Chainlink network requires governance mechanisms to adjust parameters over time, respond to emergencies, and guide its evolution. Some of these mechanisms currently reside on MAINCHAIN, and may continue to do so even with the deployment of DONs. One example is the payment mechanism for oracle node providers (DON nodes). DON front end contracts on MAINCHAIN contain additional mechanisms, such as guard rails, that may be subject to periodic modification. We foresee two classes of governance mechanisms: evolutionary and emergency. Evolutionary governance: Many modifications to the Chainlink ecosystem are such that their implementation is not a matter of urgency: Performance improvements, feature enhancements, (non-urgent) security upgrades, and so forth. As Chainlink progressively moves toward even more participants in its governance, we expect many or most such changes to be ratified by the community of a specific DON affected by those changes. In the interim, and perhaps ultimately as a parallel mechanism, we believe that a notion of temporal least privilege can be a useful means of implementing evolutionary governance. Very simply, the idea is for changes to deploy gradually, ensuring the community an opportunity to respond to them. For example, migration to a new MAINCHAIN contract can be constrained so that the new contract must be deployed at least thirty days before activation.

Emergency governance: Exploitable or exploited vulnerabilities in MAINCHAIN contracts or other forms of liveness or safety failures may require immediate intervention to ensure against catastrophic outcomes. Our intention is to support a multisig intervention mechanism in which, to ensure against malfeasance by any organization, signers will be dispersed across organizations. Ensuring consistent availability of signers and timely access to appropriate chains of command for authorization of emergency changes will clearly require careful operational planning and regular review. These challenges are similar to those involved in testing other cybersecurity incident-response capabilities [134], with a similar need to combat common problems like vigilance decrement [223]. The governance of DONs differs from that of many decentralized systems in its potential degree of heterogeneity. Each DON may have distinct data sources, executables, service-level requirements such as uptime, and users. The Chainlink network’s governance mechanisms must be flexible enough to accommodate such variations in operational goals and parameters. We are actively exploring design ideas and plan to publish research on this topic in the future. 7.5 Public-Key Infrastructure With progressive decentralization will come the need for a robust identification of network participants, including DON nodes. In particular, Chainlink requires a strong Public-Key Infrastructure (PKI). A PKI is a system that binds keys to identities. For example, a PKI undergirds the Internet’s system of secure connections (TLS): When you connect to a website via HTTPS (e.g., https://www.chainlinklabs.com) and a lock appears in your browser, that means that the public key of the domain owner has been bound to that owner by an authority—specifically, through a digital signature in a so-called certificate. A hierarchical system of certificate authorities (CAs), whose toplevel root authorities are hardwired into popular browsers, helps ensure that certificates are issued only to the legitimate owners of domains. We expect that Chainlink will eventually make use of decentralized name services, initially the Ethereum Name Service (ENS) [22], as the foundation for our PKI. As its name suggests, ENS is analogous to DNS, the Domain Name System that maps (human-readable) domain names to IP addresses on the internet. ENS, however, instead maps human-readable Ethereum names to blockchain addresses. Because ENS operates on the Ethereum blockchain, barring key compromise, tampering with its namespace is in principle as difficult as tampering with the contract administering it and/or the underlying blockchain. (DNS, in contrast, has historically been vulnerable to spoofing, hijacking, and other attacks.) We have registered data.eth with ENS on the Ethereum mainnet, and intend to establish it as a root namespace under which the identities of oracle data services and other Chainlink network entities reside. Domains in ENS are hierarchical, meaning that each domain may contain references to other names under it. Subdomains in ENS can serve as a way to organize and

delegate trust. The main role of data.eth will be to serve as an on-chain directory service for data feeds. Traditionally, developers and users of oracles have used off-chain sources (e.g., websites like docs.chain.link or data.chain.link, or social networks such as Twitter) to publish and obtain oracle data feed addresses (such as the ETH-USD price feed). With a highly trustworthy root namespace such as data.eth, it is possible instead to establish a mapping of eth-usd.data.eth to, e.g., the smart contract address of an on-chain oracle network aggregator for the ETH-USD price feed. This would create a secure path for anyone to refer to the blockchain as the source of truth for that data feed of that price/name pair (ETH-USD). Consequently, such use of ENS realizes two benefits unavailable in off-chain data sources: • Strong security: All changes and updates to the domain are recorded immutably and secured cryptographically, as opposed to text addresses on a website, which enjoy neither of these two security properties. • Automated on-chain propagation: Updates to the underlying address of a datafeed’s smart contract can trigger notifications that propagate to dependent smart contracts and can, for example, automatically update dependent contracts with the new addresses.13 Namespaces like ENS, however, do not automatically validate legitimate ownership of asserted names. Thus, for example, if the namespace includes the entry ⟨“Acme Oracle Node Co.”, addr⟩, then a user obtains the assurance that addr belongs to the claimant of the name Acme Oracle Node Co. Without additional mechanisms around namespace administration, however, she does not obtain assurance that the name belongs to an entity legitimately called Acme Oracle Node Co. in a meaningful real world sense. Our approach to validation of names, i.e., ensuring their ownership by corresponding, legitimate real-world entities, relies on several components. Today, Chainlink Labs effectively acts as a CA for the Chainlink network. While Chainlink Labs will continue to validate names, our PKI will evolve into a more decentralized model in two ways: • Web-of-trust model: The decentralized counterpart of a hierarchical PKI is often referred to as a web-of-trust.14 Variants have been proposed since the 1990s, e.g., [98], and a number of researchers have observed that blockchains can facilitate use of the idea, e.g., [227] by recording certificates in a globally consistent ledger. We are exploring variants of this model to validate the identities of entities in the Chainlink network in a more decentralized way. 13A dependent contract can optionally include a predetermined delay to allow for manual inspection and intervention by dependent-contract administrators. 14A term coined by Phil Zimmermann for PGP [238].

• Linkage to validating data: Today, a substantial amount of oracle node performance data is visible on-chain, and thus archivally bound to node addresses. Such data may be viewed as enriching an identity in the PKI by providing historical evidence of its (reliable) participation in the network. Additionally, tools for decentralized identity based on DECO and Town Crier [160] enable nodes to accumulate credentials derived from real-world data. As just one example, a node operator can attach a credential to its PKI identity that proves possession of a Dun and Bradstreet rating. These supplementary forms of validation can supplement staking in creating assurance of the security of the network. An oracle node with an established real-world identity may be viewed as having stake in a system deriving from its reputation. (See Section 4.3 and Section 9.6.3.) A final requirement for the Chainlink PKI is secure bootstrapping, i.e., securely publishing the root name for the Chainlink network, currently data.eth (analogously to hardwiring of top-level domains in browsers). In other words, how do Chainlink users determine that data.eth is indeed the top-level domain associated with the Chainlink project? The solution to this problem for the Chainlink network is multi-pronged and may involve: • Adding a TXT record [224] to our domain record for chain.link that specifies data.eth as the root domain for the Chainlink ecosystem. (Chainlink thus implicitly leverages the PKI for internet domains to validate its root ENS domain.) • Linking to data.eth from Chainlink’s existing website, e.g., from https://docs.chain.link. (Another implicit use of the PKI for internet domains.) • Making the use of data.eth known via various documents, including this whitepaper. • Posting data.eth publicly on our social-media channels, such as Twitter, and the Chainlink blog [18]. • Placing a large quantity of LINK under the control of the same registrant address as data.eth.

التقليل من الثقة

باعتباره نظامًا لا مركزيًا بمشاركة مجموعة غير متجانسة من الكيانات، فإن توفر شبكة Chainlink حماية قوية ضد حالات الفشل في كل من الحيوية (التوفر) والسلامة (تكامل التقرير). ومع ذلك، تختلف معظم الأنظمة اللامركزية الدرجة التي تكون فيها المكونات المكونة لها هي نفسها لا مركزية. هذا وهذا ينطبق حتى على الأنظمة الكبيرة، حيث اللامركزية محدودة بين القائمين بالتعدين [32] و الوسطاء [51] موجودون منذ فترة طويلة. الهدف من أي جهد لتحقيق اللامركزية هو تقليل الثقة: نسعى إلى تقليل الثقة الآثار السلبية للفساد النظامي أو الفشل داخل شبكة Chainlink، حتى تلك بسبب DON الخبيثة. المبدأ التوجيهي لدينا هو مبدأ الامتياز الأقل [197]. يجب أن تتمتع مكونات النظام والجهات الفاعلة داخل النظام بامتيازات محددة النطاق بشكل صارم للسماح فقط بإكمال الأدوار المخصصة لهم بنجاح. نعرض هنا العديد من الآليات الملموسة التي يجب على Chainlink اعتمادها في مسيرتها نحو تقليل الثقة بشكل أكبر من أي وقت مضى. نحن نميز هذه الآليات من حيث للمواقع، أي مكونات النظام، التي تتجذر فيها، كما هو موضح في الشكل 14. نحن معالجة كل موضع في القسم الفرعي المعني. 7.1 مصادقة مصدر البيانات نماذج التشغيل الحالية لـ oracles مقيدة بحقيقة قلة مصادر البيانات قم بالتوقيع رقميًا على البيانات التي حذفوها، ويرجع ذلك إلى حد كبير إلى أن TLS لا يوقع أصلاً data. يستخدم TLS التوقيعات الرقمية في بروتوكول "المصافحة" الخاص به (لتأسيس مفتاح مشترك بين الخادم والعميل). وبالتالي فإن الخوادم التي تدعم HTTPS لديها شهادات على المفاتيح العامة التي يمكن من حيث المبدأ أن تعمل على توقيع البيانات، لكنها لا تستخدم بشكل عام هذه الشهادات لدعم توقيع البيانات. وبالتالي، فإن أمان DON، مثل في شبكات oracle اليوم، يعتمد على oracle العقد التي تنقل البيانات بأمانة من البيانات مصدر للعقد. يتضمن أحد المكونات المهمة طويلة المدى لرؤيتنا لتقليل الثقة في Chainlink مصادقة أقوى لمصدر البيانات من خلال دعم الأدوات والمعايير لتوقيع البيانات. يمكن أن يساعد توقيع البيانات في فرض ضمانات السلامة الشاملة. من حيث المبدأ، إذا كان العقد يقبل كمدخل قطعة من البيانات D موقعة مباشرة بواسطة البيانات

Loci of trust-minimizing mechanisms in the Chainlink network showing data quality, node selection, and oracle report verification

الشكل 14: مواقع آليات تقليل الثقة التي تمت مناقشتها في هذا القسم. 1⃝البيانات توفر المصادر البيانات إلى 2⃝DON، الذي ينقل وظيفة البيانات إلى تابع 3⃝smart contract. بالإضافة إلى ذلك، تتضمن شبكة DON أو oracle 4⃝ عقدة إدارة smart contracts على MAINCHAIN، على سبيل المثال، العقد التعويضية، والحماية القضبان، وما إلى ذلك. المصدر، فإن شبكة oracle لا يمكنها التلاعب بـ D. العديد من المشجعات وقد ظهرت جهود لتمكين مثل هذا التوقيع على البيانات، بما في ذلك OpenID Connect، الذي تم تصميمه بشكل أساسي لمصادقة المستخدم [9]، TLS-N، وهو مشروع أكاديمي يهدف إلى قم بتمديد TLS [191] عن طريق إعادة استخدام شهادات TLS وامتدادات أدلة TLS [63]. على الرغم من أن OpenID Connect قد شهد بعض التبني، إلا أن TLS Evidence Extensions و TLS-N لم يتم اعتمادهما بعد. هناك طريقة أخرى محتملة للتحقق من مصدر البيانات وهي استخدام مصادر البيانات الخاصة بالناشرين تبادلات HTTP الموقعة (SXG) [230]، والتي يمكنهم تخزينها مؤقتًا على شبكات تسليم المحتوى كجزء من بروتوكول Accelerated Mobile Pages (AMP) [225]. يعرض متصفح Chrome للجوال المحتوى من SXGs المخزنة مؤقتًا لـ AMP كما لو تم تقديمها منه مجالات الشبكة الخاصة بالناشرين بدلاً من مجال خادم ذاكرة التخزين المؤقت. قد يؤدي حافز العلامة التجارية هذا، إلى جانب السهولة النسبية لتمكينه باستخدام خدمات مثل عنوان URL الحقيقي الخاص بـ CloudFlare [83] وGoogle amppackager [124]، إلى اعتماد واسع النطاق لـ SXGs في محتوى الأخبار المخزن مؤقتًا، مما قد يؤدي إلى تمكين عملية بسيطة ومقاومة للتلاعب طريقة لـ Chainlink oracles لتشغيل الأحداث الجديرة بالنشر التي تم الإبلاغ عنها في SXGs الصالحة. في حين أن ملفات SXG المخزنة مؤقتًا لـ AMP من ناشري الأخبار لن تكون مفيدة للإيقاع العالي التطبيقات مثل التقارير الخاصة ببيانات التداول، يمكن أن تكون مصدرًا آمنًا للتخصيص العقود المتعلقة بأحداث العالم الحقيقي مثل الطقس القاسي أو نتائج الانتخابات. نحن نؤمن بأن النشر البسيط والأدوات الناضجة والمرونة ستكون أمرًا حيويًا تسريع توقيع مصدر البيانات. تمكين موفري البيانات من استخدام العقد Chainlink كـ تبدو الواجهة الأمامية لواجهة برمجة التطبيقات (API) المصادق عليها بمثابة نهج واعد. نحن نعتزم إنشاءخيار للعقد للعمل في هذا الوضع، مع أو بدون المشاركة في الشبكة باعتباره oracle كاملًا. ونحن نشير إلى هذه القدرة على أنها إنشاء بيانات موثقة (أدو). باستخدام عقد Chainlink مع ADO، ستتمكن مصادر البيانات من الاستفادة من الخبرة والأدوات التي طورها مجتمع Chainlink في الإضافة الرقمية إمكانات التوقيع على مجموعتهم الحالية من واجهات برمجة التطبيقات خارج السلسلة. هل يجب أن يختاروا الركض؟ عقدها كـ oracles، يمكنها بالإضافة إلى ذلك فتح مصادر دخل جديدة محتملة وفقًا لنفس النموذج مثل موفري البيانات الحاليين، على سبيل المثال، Kraken [28]، Kaiko [140]، و والبعض الآخر، الذي يقوم بتشغيل Chainlink العقد لبيع بيانات API على السلسلة. 7.1.1 القيود المفروضة على إنشاء البيانات المصادق عليها التوقيع الرقمي من خلال مصادر البيانات، على الرغم من أنه يمكن أن يساعد في تعزيز المصادقة، إلا أنه لا يكفي في حد ذاته لتحقيق جميع الأهداف الأمنية أو التشغيلية الطبيعية لـ oracle شبكة. للبدء، يجب أن يتم نقل جزء معين من البيانات بطريقة قوية وفي الوقت المناسب من مصدر البيانات إلى smart contract أو مستهلك بيانات آخر. أي حتى في إعداد مثالي يتم فيه توقيع جميع البيانات باستخدام مفاتيح مبرمجة مسبقًا لتصبح تابعة العقود، ستظل هناك حاجة إلى DON لتوصيل البيانات بشكل موثوق من المصادر إلى العقود. بالإضافة إلى ذلك، هناك عدد من الحالات التي تكون فيها العقود أو بيانات oracle الأخرى يريد المستهلكون الوصول إلى المخرجات المصادق عليها لمختلف الوظائف المحسوبة مصدر البيانات لسببين رئيسيين: • السرية: قد توفر واجهة برمجة تطبيقات مصدر البيانات بيانات حساسة أو خاصة التي يجب تنقيحها أو تطهيرها قبل أن تصبح مرئية للعامة على السلسلة. ومع ذلك، فإن أي تعديل على البيانات الموقعة يبطل التوقيع. ضع آخر الطريقة، ADO السذاجة وتعقيم البيانات غير متوافقة. نعرض في المثال 3 كيف يمكن التوفيق بين الاثنين من خلال نموذج محسّن من ADO. • أخطاء مصدر البيانات: يمكن أن تؤثر الأخطاء والفشل على مصادر البيانات، ولا تعالج التوقيعات الرقمية أي مشكلة. منذ بدايتها [98]، Chainlink لديها لقد أدرجت بالفعل آلية لمعالجة مثل هذه الأخطاء: التكرار. عادةً ما تمثل التقارير الصادرة عن شبكات oracle البيانات المجمعة المتعددة مصادر. نناقش الآن المخططات التي نستكشفها في إعداد ADO لتعزيز سرية البيانات المصدر ودمج البيانات من مصادر متعددة بشكل آمن. 7.1.2 السرية قد لا تتوقع مصادر البيانات النطاق الكامل لواجهات برمجة التطبيقات المطلوبة وتتيحه من قبل المستخدمين. وعلى وجه التحديد، قد يرغب المستخدمون في الوصول إلى البيانات المعالجة مسبقًا للمساعدة في ضمان ذلك السرية. يوضح المثال التالي المشكلة.مثال 3. ترغب أليس في الحصول على بيانات اعتماد الهوية اللامركزية (DID). أن عمرها يتجاوز 18 عامًا (وبالتالي يمكنها، على سبيل المثال، الحصول على قرض). للقيام به لذا، فهي بحاجة إلى إثبات هذه الحقيقة المتعلقة بعمرها إلى جهة إصدار أوراق اعتماد اضطراب الشخصية الانفصامية. تأمل أليس في استخدام البيانات من إدارة المركبات الآلية (DMV) في ولايتها موقع الكتروني لهذا الغرض. لدى DMV سجل بتاريخ ميلادها وسوف ينبعث منها ملف شهادة موقعة رقميا (أ) عليها بالنموذج التالي: أ = {الاسم: أليس، DoB: 16/02/1999}. في هذا المثال، قد تكون الشهادة A كافية لإثبات أليس لاضطراب الشخصية الانفصامية مصدر أوراق الاعتماد أن عمرها يزيد عن 18 عامًا. لكنها تسرب معلومات حساسة بلا داعٍ: معلومات أليس DoB بالضبط. من الناحية المثالية، ما تريده أليس من DMV بدلاً من ذلك هو التوقيع على ملف عبارة بسيطة أ′ مفادها أن "عمر أليس يزيد عن 18 عامًا." وبعبارة أخرى، فهي تريد إخراج الدالة G في تاريخ ميلادها X، حيث (بشكل غير رسمي)، A′ = G(X) = True if التاريخ الحالي −X ≥18 سنة؛ وبخلاف ذلك، G(X) = خطأ. للتعميم، تود أليس أن تكون قادرة على طلب توقيع من مصدر البيانات الإقرار "أ" من النموذج: A′ = {الاسم: أليس، الوظيفة:G(X)، النتيجة: صحيح}، حيث تشير G(X) إلى مواصفات الدالة G ومدخلاتها (مدخلاتها) X. نحن نتصور أن المستخدم يجب أن يكون قادرًا على تقديم G(X) المطلوب كمدخل مع طلبه للحصول على الشهادة المقابلة أ'. لاحظ أن شهادة مصدر البيانات A′ يجب أن تتضمن المواصفات G(X) الخاصة بها تأكد من تفسير A′ بشكل صحيح. في المثال أعلاه، يحدد G(X) المعنى للقيمة المنطقية في A′ وبالتالي فإن True يدل على موضوع الشهادة يزيد عمره عن 18 عامًا. نشير إلى الاستعلامات المرنة التي يمكن للمستخدم من خلالها تحديد G(X) كاستعلامات وظيفية. من أجل دعم حالات الاستخدام مثل تلك الموجودة في المثال 3، بالإضافة إلى تلك التي تتضمن استعلامات مباشرة من العقود، نعتزم تضمين الدعم للاستفسارات الوظيفية التي تنطوي على وظائف بسيطة G كجزء من ADO. 7.1.3 الجمع بين بيانات المصدر لتقليل التكاليف على السلسلة، تم تصميم العقود بشكل عام لاستهلاك البيانات المجمعة من مصادر متعددة، كما هو موضح في المثال التالي. المثال 4 (توسيط بيانات الأسعار). لتوفير تغذية الأسعار، أي قيمة واحدة الأصل (على سبيل المثال، ETH) فيما يتعلق بأصل آخر (على سبيل المثال، الدولار الأمريكي)، فإن شبكة oracle ستتم بشكل عام الحصول على الأسعار الحالية من عدد من المصادر، مثل البورصات. شبكة oracle يرسل عادةً إلى العقد التابع SC متوسط هذه القيم. في بيئة تحتوي على توقيع البيانات، يتم الحصول على شبكة oracle تعمل بشكل صحيح من مصادر البيانات S = {S1, . . . , SnS} سلسلة من القيم V = {v1, v2, . . . ، vnS} من مصادر nS المصاحبة للتوقيعات الخاصة بالمصدر Σ = {σ1, σ2, . . . ، σnS}. على التحقق من التوقيعات، فإنه ينقل السعر v = الوسيط (V ) إلى SC.لسوء الحظ، لا توجد طريقة بسيطة لشبكة oracle لنقل الوسيط القيمة v في المثال 4 إلى SC مع دليل موجز σ∗ أنه تم حساب v بشكل صحيح على المدخلات الموقعة. قد يكون النهج الساذج هو تشفير المفاتيح العامة لجميع مصادر بيانات nS في SC. ستقوم الشبكة oracle بعد ذلك بترحيل (V, Σ) وتسمح لـ SC بحساب متوسط ​​V . ومع ذلك، قد يؤدي هذا إلى إثبات σ للحجم O(nS) — أي أن σ∗ لن يكون موجزًا. كما أنه سيتكبد تكاليف غاز عالية بالنسبة لشركة SC، والتي ستحتاج إلى التحقق من جميع التوقيعات فيها Σ. في المقابل، يتيح استخدام SNARKs دليلاً موجزًا ​​لقيم المصدر الموثقة المدمجة بشكل صحيح. قد يكون الأمر قابلاً للتطبيق في الممارسة العملية، لكنه يفرض نسبة عالية إلى حد ما التكاليف الحسابية على المُثبِّت، وتكاليف الغاز المرتفعة إلى حدٍ ما على السلسلة. استخدام يعد Town Crier أيضًا احتمالًا، ولكنه يتطلب استخدام TEEs، وهو ما لا يناسب الجميع نماذج ثقة المستخدمين. أحد المفاهيم المفيدة التي يمكن من خلالها وضع حلول للمشكلة العامة المتمثلة في توقيع البيانات المجمعة من المصادر هو أداة التشفير المعروفة باسم التوقيعات الوظيفية [59، 132]. باختصار، تسمح التوقيعات الوظيفية للموقّع بتفويض القدرة على التوقيع، على هذا النحو يمكن للمفوض فقط التوقيع على الرسائل في نطاق الوظيفة F التي اختارها الموقع. نوضح في الملحق د كيف يمكن لهذا القيد الوظيفي أن يعمل على تقييد النطاق لقيم التقرير المنبعثة من DON كدالة للقيم الموقعة بواسطة مصادر البيانات. نقدم أيضًا بدائيًا جديدًا، يُسمى التوقيع الوظيفي المنفصل، والذي يتضمن متطلبًا مريحًا للدقة، ولكنه من المحتمل أن يكون أكثر أداءً من الأساليب مثل SNARKs. مشكلة دمج مصادر البيانات بطريقة تتضمن توثيق المصدر من المخرجات تنطبق أيضًا على مجمعي البيانات، على سبيل المثال، CoinCap، وCoinMarketCap، وCoinGecko، CryptoCompare، وما إلى ذلك، التي تحصل على البيانات من عدد كبير من البورصات، والتي تقوم بها الوزن على أساس المجلدات، باستخدام المنهجيات التي يعلنونها في بعض الحالات وتكون في حالات أخرى مملوكة. المجمع الذي يرغب في نشر قيمة معه تواجه مصادقة المصدر نفس التحدي الذي تواجهه مجموعة من العقد المجمعة بيانات المصدر. 7.1.4 معالجة بيانات المصدر من المرجح أن تعتمد smart contracts المتطورة على إحصائيات مجمعة مخصصة مصادر البيانات الأولية، مثل التقلبات في تاريخ الأسعار الحديث على العديد من الأصول، أو النصوص والصور من الأخبار حول الأحداث ذات الصلة. نظرًا لأن الحساب وعرض النطاق الترددي رخيصان نسبيًا في DON، فإن هذه الإحصائيات — حتى نماذج التعلم الآلي المعقدة التي تحتوي على العديد من المدخلات - يمكن معالجتها اقتصاديًا، طالما أن أي قيمة مخرجات مخصصة لـ blockchain موجزة بدرجة كافية. بالنسبة للمهام الحسابية المكثفة حيث قد يختلف المشاركون في DON وجهات النظر حول المدخلات المعقدة، قد تكون هناك حاجة إلى جولات إضافية من الاتصال بين المشاركين في DON للتوصل إلى توافق في الآراء حول المدخلات قبل حساب النتيجة. وطالما تم تحديد القيمة النهائية بالكامل من خلال المدخلات، بمجرد التوصل إلى إجماع على المدخلات، يمكن لكل مشارك ببساطة حساب القيمة وبثها إلى الآخرالمشاركين مع توقيعهم الجزئي، أو إرساله إلى المجمع. 7.2 DON تقليل الثقة نحن نتصور طريقتين رئيسيتين لتقليل الثقة الموضوعة في مكونات DON: عملاء تجاوز الفشل وتقارير الأقلية. 7.2.1 عملاء تجاوز الفشل النماذج العدائية في علم التشفير وأدبيات الأنظمة الموزعة عادةً النظر في وجود خصم قادر على إفساد (أي المساومة) مجموعة فرعية من العقد، على سبيل المثال، أقل من الثلث للعديد من بروتوكولات BFT. ومع ذلك، فمن الملاحظ عادة، أنه إذا كانت جميع العقد تشغل برنامجًا متطابقًا، فإن الخصم الذي يتعرف على استغلال مميت يمكن أن يفعل ذلك من حيث المبدأ، فإنه يؤدي إلى تسوية جميع العقد بشكل أو بآخر في وقت واحد. هذا الإعداد في كثير من الأحيان يشار إليها باسم الثقافة الأحادية البرمجية [47]. تم طرح مقترحات مختلفة للتنويع التلقائي للبرامج وتكوينات البرامج لمعالجة المشكلة، على سبيل المثال، [47، 113]. كما هو مذكور في [47]، ومع ذلك، يعد تنوع البرامج مسألة معقدة وتتطلب دراسة متأنية. على سبيل المثال، قد يؤدي تنويع البرمجيات إلى ظروف أمنية أسوأ من الثقافة الأحادية يزيد من سطح هجوم النظام وبالتالي يزيد من ناقلات الهجوم المحتملة المزايا الأمنية التي تقدمها. نحن نؤمن بأن دعم عملاء تجاوز الفشل الأقوياء — أي العملاء الذين تنتمي إليهم العقد يمكن أن يتحول في مواجهة حدث كارثي - وهو شكل جذاب بشكل خاص تنويع البرمجيات. لا يقوم عملاء تجاوز الفشل بزيادة عدد المتجهات المحتملة للهجوم، حيث لم يتم نشرها كبرامج رئيسية. أنها توفر فوائد واضحة، ومع ذلك، كخط دفاع ثان. نعتزم دعم عملاء تجاوز الفشل في DONs كـ وسيلة رئيسية لتقليل اعتمادهم على عميل واحد للأمان. Chainlink لديه بالفعل نظام قوي لعملاء تجاوز الفشل. نهجنا يتضمن الحفاظ على إصدارات العميل السابقة التي تم اختبارها في المعركة. اليوم، على سبيل المثال، Chainlink العقد مع التقارير خارج السلسلة (OCR) كعميلها الأساسي تتضمن الدعم لنظام FluxMonitor السابق الخاص بـ Chainlink إذا لزم الأمر. وقد تم استخدامها لبعض بمرور الوقت، تلقت FluxMonitor عمليات تدقيق أمنية واختبارات ميدانية. وهو يوفر نفس الشيء وظيفة مثل التعرف الضوئي على الحروف، بتكلفة أعلى - وهي تكلفة يتم تكبدها فقط على أساس الحاجة. 7.2.2 تقارير الأقليات بالنظر إلى وجود أقلية كبيرة بما فيه الكفاية في مجموعة "الأهمية" - وهي جزء صغير من العقد الصادقة التي تراقب المخالفات من قبل الأغلبية - فقد يكون من المفيد بالنسبة لهم إنشاء أقلية تقرير. هذا عبارة عن تقرير أو علامة موازية، يتم ترحيلها إلى عقد تابع لـ SC على السلسلة بواسطة الأومية. يمكن للجنة العليا الاستفادة من هذا العلم وفقًا لسياستها الخاصة بالعقد. على سبيل المثال، بالنسبة للعقد الذي تكون فيه السلامة أكثر أهمية من الحيوية أو الاستجابة، قد يؤدي تقرير الأقلية إلى مطالبة العقد بتقارير تكميلية من DON آخر، أو قم بتشغيل قاطع الدائرة الكهربائية (انظر القسم التالي).يمكن لتقارير الأقلية أن تلعب دوراً هاماً حتى عندما تكون الأغلبية صادقة، لأن أي نظام لتجميع التقارير، حتى لو كان يستخدم التوقيعات الوظيفية، يجب أن يكون كذلك تعمل بطريقة عتبة، لضمان المرونة ضد oracle أو فشل البيانات. في وبعبارة أخرى، يجب أن يكون من الممكن إنتاج تقرير صالح بناءً على مدخلات kS < nS oracles، بالنسبة لبعض العتبات kS. وهذا يعني أن DON تالف به بعض خط العرض في معالجة قيم التقرير عن طريق تحديد قيم kS المفضلة له من بين تم الإبلاغ عن nS في V بواسطة المجموعة الكاملة من oracles، حتى لو كانت جميع المصادر صادقة. على سبيل المثال، لنفترض أن nS = 10 وkS = 7 في نظام يستخدم وظيفة التوقيع لمصادقة حساب الوسيط على V لسعر ETH بالدولار الأمريكي. لنفترض أن خمسة مصادر أبلغت عن سعر \(500, while the other five report \)1000. ثم من خلال توسط التقارير السبعة الأدنى، يمكن لـ DON إخراج قيمة صالحة v = $500، ومن خلال توسط الأعلى، يمكن إخراج v = 1000 دولار. من خلال تعزيز بروتوكول DON بحيث تكون جميع العقد على علم بالبيانات الموجودة المتاحة، والبيانات التي تم استخدامها لإنشاء تقرير، يمكن للعقد اكتشافها ووضع علامة عليها ميول ذات دلالة إحصائية لتفضيل مجموعة واحدة من التقارير على أخرى، وإنتاجها تقرير أقلية نتيجة لذلك. 7.3 قضبان الحراسة نموذج الثقة الخاص بنا لـ DONs يعامل MAINCHAIN باعتباره أمانًا أعلى وامتيازًا أعلى النظام من DONs. (على الرغم من أن نموذج الثقة هذا قد لا يكون صحيحًا دائمًا، إلا أنه أسهل لتكييف الآلية الناتجة مع المواقف التي يكون فيها DON هو الأمان الأعلى منصة وليس العكس.) وبالتالي، تتضمن إستراتيجية تقليل الثقة الطبيعية تنفيذ آليات المراقبة والتأمين من الفشل في smart contracts — إما في الواجهة الأمامية لـ MAINCHAIN لـ DON أو مباشرة في عقد تابع SC. ونشير إلى هذه الآليات باسم قضبان الحماية، ونذكر بعضًا من أهمها هنا: • قواطع الدائرة: قد تقوم SC بإيقاف تحديثات الحالة مؤقتًا أو إيقافها كوظيفة لأي من خصائص تحديثات الحالة نفسها (على سبيل المثال، التباين الكبير عبر التسلسل التقارير) أو بناءً على مدخلات أخرى. على سبيل المثال، قد يتعطل قاطع الدائرة الكهربائية الحالات التي تختلف فيها تقارير oracle بشكل غير معقول بمرور الوقت. قد يكون قاطع الدائرة الكهربائية أيضا أن تتعثر من خلال تقرير الأقلية. وبالتالي، يمكن أن تمنع قواطع الدائرة DONs من تقديم تقارير خاطئة بشكل صارخ. يمكن أن توفر قواطع الدائرة الوقت اللازم للنظر في تدخلات إضافية أو تمارس. أحد هذه التدخلات هو فتحات الهروب. • فتحات الهروب: في ظل الظروف المعاكسة، كما تحددها مجموعة من الأمناء أو أصحاب token المجتمع أو هيئات الأمناء الأخرى، قد يتم استدعاء العقد منشأة الطوارئ تسمى أحيانًا فتحة الهروب [163]. فتحة الهروب يتسبب في إغلاق SC بطريقة ما و/أو إنهاء الأمر المعلق وربما المعاملات المستقبلية. على سبيل المثال، قد تقوم بإرجاع الأموال المحفوظة إلى المستخدمين [17])،يجوز له إنهاء شروط العقد [162]، أو يجوز له إلغاء المعاملات المعلقة و/أو المعاملات المستقبلية [173]. يمكن نشر فتحات الهروب في أي نوع من العقود، وليس فقط واحدة تعتمد على DON، ولكنها ذات أهمية كمنطقة عازلة محتملة ضد DON المخالفات. • تجاوز الفشل: في الأنظمة التي تعتمد فيها SC على DON للخدمات الأساسية، من الممكن أن توفر SC آليات تجاوز الفشل التي تضمن استمرار الخدمة حتى في حالة DON الفشل أو سوء السلوك. على سبيل المثال، في TEF (القسم 6)، قد يوفر عقد الارتساء SCa واجهات مزدوجة حيث يمكن لكل من السلسلة و يتم دعم واجهات التنفيذ خارج السلسلة لبعض العمليات الهامة (على سبيل المثال، السحب)، أو للمعاملات العادية، مع تأخير مناسب لمنع التشغيل الأولي لمعاملات DON. في الحالات التي تقوم فيها مصادر البيانات بالتوقيع على البيانات، يمكن للمستخدمين ذلك قم أيضًا بتقديم التقارير إلى SCa عندما يفشل DON في القيام بذلك. أدلة الاحتيال، كما هو مقترح لأشكال مختلفة من التفاؤل rollup (انظر القسم 6.3)، متشابهة في النكهة ومكملة للآليات التي ذكرناها أعلاه. هم توفر أيضًا شكلاً من أشكال المراقبة والحماية على السلسلة ضد الأعطال المحتملة في مكونات النظام خارج السلسلة. 7.4 الحوكمة قليلة الثقة مثل كافة الأنظمة اللامركزية، تتطلب شبكة Chainlink آليات حوكمة لضبط المعلمات مع مرور الوقت، والاستجابة لحالات الطوارئ، وتوجيه تطورها. بعض هذه الآليات موجودة حاليًا على MAINCHAIN، وقد تستمر افعل ذلك حتى مع نشر DONs. أحد الأمثلة على ذلك هو آلية الدفع لموفري العقد oracle (DON العقد). DON العقود الأمامية على MAINCHAIN تحتوي على آليات إضافية، مثل حواجز الحماية، التي قد تخضع للفحص الدوري التعديل. نتوقع فئتين من آليات الحكم: التطورية والطارئة. الحكم التطوري: العديد من التعديلات على النظام البيئي Chainlink موجودة بحيث لا يكون تنفيذها مسألة ملحة: تحسينات الأداء، تحسينات الميزات، وترقيات الأمان (غير العاجلة)، وما إلى ذلك. مع تحرك Chainlink تدريجيًا نحو المزيد من المشاركين في إدارتها، نتوقع وجود عدد كبير أو يجب أن يتم التصديق على معظم هذه التغييرات من قبل مجتمع DON المحدد المتأثر بتلك التغييرات التغييرات. في هذه الأثناء، وربما في نهاية المطاف كآلية موازية، نعتقد أن فكرة الامتياز الزمني الأقل يمكن أن تكون وسيلة مفيدة لتنفيذ الحكم التطوري. بكل بساطة، الفكرة هي نشر التغييرات تدريجيًا، وضمان ذلك فرصة للمجتمع للرد عليها. على سبيل المثال، الهجرة إلى مكان جديد يمكن تقييد عقد MAINCHAIN بحيث يجب نشر العقد الجديد قبل ثلاثين يومًا على الأقل من التنشيط.إدارة الطوارئ: نقاط الضعف القابلة للاستغلال أو المستغلة في MAINCHAIN قد تتطلب العقود أو غيرها من أشكال الفشل في الحياة أو السلامة تدخلاً فوريًا لضمان عدم حدوث نتائج كارثية. هدفنا هو دعم multisig آلية التدخل التي من خلالها، لضمان ضد المخالفات من قبل أي منظمة، سيتم توزيع الموقعين عبر المنظمات. ضمان التوافر المستمر للموقعين والوصول في الوقت المناسب إلى التسلسل القيادي المناسب للتصريح بحالات الطوارئ من الواضح أن التغييرات ستتطلب تخطيطًا تشغيليًا دقيقًا ومراجعة منتظمة. هذه التحديات مماثلة لتلك المشاركة في اختبار الاستجابة لحوادث الأمن السيبراني الأخرى القدرات [134]، مع حاجة مماثلة لمكافحة المشاكل الشائعة مثل انخفاض اليقظة [223]. تختلف إدارة DONs عن العديد من الأنظمة اللامركزية في الدرجة المحتملة من عدم التجانس. قد يحتوي كل DON على مصادر بيانات مميزة، وملفات قابلة للتنفيذ، ومتطلبات مستوى الخدمة مثل وقت التشغيل، والمستخدمين. شبكة Chainlink ويجب أن تكون آليات الإدارة مرنة بما يكفي لاستيعاب مثل هذه الاختلافات الأهداف والمعايير التشغيلية. نحن نستكشف بنشاط أفكار التصميم ونخطط لذلك نشر بحث حول هذا الموضوع في المستقبل. 7.5 البنية التحتية للمفتاح العام ومع اللامركزية التقدمية ستأتي الحاجة إلى تحديد قوي لـ المشاركون في الشبكة، بما في ذلك العقد DON. على وجه الخصوص، Chainlink يتطلب قويًا البنية التحتية للمفتاح العام (PKI). PKI هو نظام يربط المفاتيح بالهويات. ل على سبيل المثال، تدعم البنية التحتية للمفاتيح العمومية (PKI) نظام الاتصالات الآمنة (TLS) على الإنترنت: متى تتصل بموقع ويب عبر HTTPS (على سبيل المثال، https://www.chainlinklabs.com) و يظهر القفل في متصفحك، وهذا يعني أن المفتاح العام لمالك النطاق موجود تم ربطها بهذا المالك من خلال سلطة ما - على وجه التحديد، من خلال التوقيع الرقمي في ما يسمى بالشهادة. يساعد النظام الهرمي للمراجع المصدقة (CAs)، التي تم ربط سلطاتها الجذرية ذات المستوى الأعلى في المتصفحات الشائعة، على ضمان أن الشهادات يتم إصدارها فقط للمالكين الشرعيين للنطاقات. نتوقع أن يستفيد Chainlink في النهاية من خدمات الأسماء اللامركزية، في البداية Ethereum خدمة الأسماء (ENS) [22]، كأساس لبنية المفاتيح العمومية الخاصة بنا. كما يشير اسمها إلى أن ENS يشبه DNS، وهو نظام اسم المجال الذي يقوم بالتخطيط (يمكن قراءتها بواسطة الإنسان) إلى عناوين IP على الإنترنت. ومع ذلك، يقوم ENS بدلاً من ذلك بتعيين أسماء Ethereum القابلة للقراءة بواسطة الإنسان إلى عناوين blockchain. لأن إنس يعمل على Ethereum blockchain، باستثناء التسوية الرئيسية، والتلاعب به تعتبر مساحة الاسم من حيث المبدأ صعبة مثل التلاعب بالعقد الذي يديرها و/أو blockchain الأساسي. (في المقابل، كان نظام أسماء النطاقات (DNS) عرضة للخطر تاريخياً للانتحال والاختطاف والهجمات الأخرى.) لقد قمنا بتسجيل data.eth مع ENS على الشبكة الرئيسية Ethereum، ونعتزم القيام بذلك قم بتأسيسها كمساحة اسم جذر يتم بموجبها تحديد هويات خدمات البيانات oracle و توجد كيانات شبكة Chainlink أخرى. المجالات في ENS هرمية، مما يعني أن كل مجال قد يحتوي على مراجع إلى غير ذلك من الأسماء تحته. يمكن أن تكون النطاقات الفرعية في ENS بمثابة وسيلة لتنظيم وتفويض الثقة. سيكون الدور الرئيسي لـ data.eth هو العمل كخدمة دليل على السلسلة خلاصات البيانات. تقليديًا، استخدم مطورو ومستخدمو oracles مصادر خارج السلسلة (على سبيل المثال، مواقع الويب مثل docs.chain.link أو data.chain.link، أو الشبكات الاجتماعية مثل Twitter) لنشر والحصول على عناوين خلاصة البيانات oracle (مثل سعر ETH-USD تغذية). باستخدام مساحة اسم جذر جديرة بالثقة للغاية مثل data.eth، من الممكن بدلاً من ذلك إنشاء تعيين لـ eth-usd.data.eth، على سبيل المثال، العنوان smart contract لمجمع شبكة oracle على السلسلة لموجز أسعار ETH-USD. هذا من شأنه إنشاء مسار آمن لأي شخص للإشارة إلى blockchain كمصدر الحقيقة تغذية البيانات الخاصة بزوج السعر/الاسم (ETH-USD). ونتيجة لذلك، مثل هذا الاستخدام لـ ENS يحقق فائدتين غير متوفرتين في مصادر البيانات خارج السلسلة: • أمان قوي: يتم تسجيل كافة التغييرات والتحديثات التي يتم إجراؤها على المجال بشكل ثابت وتأمينها بطريقة مشفرة، على عكس العناوين النصية الموجودة على موقع الويب، والتي لا تتمتع بأي من هاتين الخاصيتين الأمنيتين. • النشر الآلي على السلسلة: يمكن أن تؤدي التحديثات على العنوان الأساسي لملف البيانات smart contract إلى تشغيل إشعارات تنتشر إلى الأجهزة الذكية التابعة العقود، ويمكنه، على سبيل المثال، تحديث العقود التابعة تلقائيًا باستخدام العناوين الجديدة.13 ومع ذلك، فإن مساحات الأسماء مثل ENS لا تتحقق تلقائيًا من صحة الملكية الشرعية من الأسماء المؤكدة. وبالتالي، على سبيل المثال، إذا كانت مساحة الاسم تتضمن الإدخال ⟨"شركة Acme Oracle Node Co."، العنوان⟩، ثم يحصل المستخدم على تأكيد بأن العنوان ينتمي إلى المدعي بالاسم Acme Oracle Node Co. بدون آليات إضافية حول إدارة مساحة الاسم، ومع ذلك، فهي لا تحصل على تأكيد بأن الاسم ينتمي إلى كيان بشكل قانوني تسمى Acme Oracle Node Co. بالمعنى الحقيقي للمعنى. يعتمد نهجنا في التحقق من صحة الأسماء، أي ضمان ملكيتها من قبل كيانات العالم الحقيقي الشرعية المقابلة، على عدة مكونات. اليوم، Chainlink مختبرات يعمل بشكل فعال كمرجع مصدق لشبكة Chainlink. بينما ستستمر Chainlink المختبرات وللتحقق من صحة الأسماء، ستتطور البنية التحتية للمفاتيح العمومية (PKI) الخاصة بنا إلى نموذج أكثر لامركزية بطريقتين: • نموذج شبكة الثقة: يُشار غالبًا إلى النظير اللامركزي لبنية المفاتيح العمومية الهرمية باسم شبكة الثقة. وقد تم اقتراح متغيرات منذ التسعينيات، على سبيل المثال، [98]، وقد لاحظ عدد من الباحثين أن blockchains يمكنها تسهيل استخدام الفكرة، على سبيل المثال، [227] من خلال تسجيل الشهادات بطريقة متسقة عالميًا دفتر الأستاذ. نحن نستكشف المتغيرات لهذا النموذج للتحقق من هويات الكيانات في شبكة Chainlink بطريقة أكثر لامركزية. يمكن أن يتضمن العقد التابع 13A بشكل اختياري تأخيرًا محددًا مسبقًا للسماح بالفحص اليدوي والتدخل من قبل مسؤولي العقود التابعة. 14مصطلح صاغه فيل زيمرمان لـ PGP [238].• الارتباط بالتحقق من صحة البيانات: اليوم، هناك قدر كبير من بيانات أداء العقدة oracle مرئية على السلسلة، وبالتالي مرتبطة أرشيفيًا بعناوين العقد. يمكن النظر إلى مثل هذه البيانات على أنها إثراء للهوية في البنية التحتية للمفاتيح العمومية من خلال تقديم دليل تاريخي على مشاركتها (الموثوقة) في الشبكة. بالإضافة إلى الأدوات للهوية اللامركزية المستندة إلى DECO وTown Crier [160] تمكين العقد لتجميع بيانات الاعتماد المستمدة من بيانات العالم الحقيقي. وكمثال واحد فقط، أ يمكن لمشغل العقدة إرفاق بيانات اعتماد بهوية PKI الخاصة به والتي تثبت الحيازة من تصنيف دون وبرادستريت. يمكن لهذه الأشكال التكميلية من التحقق من الصحة ملحق staking في إنشاء ضمان أمان الشبكة. قد يُنظر إلى العقدة oracle ذات الهوية الواقعية الراسخة على أنها تمتلك حصة في نظام مستمد من سمعتها. (انظر القسم 4.3 والقسم 9.6.3.) الشرط النهائي لـ Chainlink PKI هو التمهيد الآمن، أي بشكل آمن نشر اسم الجذر لشبكة Chainlink، حاليًا data.eth (قياسيًا لتوصيل نطاقات المستوى الأعلى في المتصفحات). بمعنى آخر، كيف يفعل مستخدمو Chainlink تحديد أن data.eth هو بالفعل نطاق المستوى الأعلى المرتبط بـ Chainlink المشروع؟ الحل لهذه المشكلة لشبكة Chainlink متعدد الجوانب و قد تشمل: • إضافة سجل TXT [224] إلى سجل النطاق الخاص بنا لـ chain.link الذي يحدد data.eth باعتباره المجال الجذر للنظام البيئي Chainlink. (Chainlink وبالتالي يعزز ضمنيًا البنية التحتية للمفاتيح العامة (PKI) لنطاقات الإنترنت للتحقق من صحة مجال ENS الجذري الخاص به.) • الارتباط بـ data.eth من موقع Chainlink الحالي، على سبيل المثال، من https://docs.chain.link. (استخدام ضمني آخر لـ PKI لنطاقات الإنترنت.) • جعل استخدام data.eth معروفًا من خلال وثائق مختلفة، بما في ذلك هذه الوثيقة التقنية. • نشر data.eth علنًا على قنوات التواصل الاجتماعي الخاصة بنا، مثل Twitter و المدونة Chainlink [18]. • وضع كمية كبيرة من LINK تحت سيطرة نفس عنوان المسجل مثل data.eth.

DON Deployment Considerations

DON Deployment Considerations

While not a part of our core design, there are several important technical considerations in the realization of DONs that deserve treatment here.

8.1 Rollout Approach This paper lays out an ambitious vision of advanced Chainlink functionality whose realization will require solutions to many challenges along the way. This whitepaper identifies some challenges, but unanticipated ones are sure to arise. We plan to implement elements of this vision in an incremental fashion over an extended period of time. Our expectation is that DONs will initially launch with support for specific pre-built components built collaboratively by teams within the Chainlink community. The intention is that broader uses of DONs, e.g., the ability to launch arbitrary executables, will see support at a later time. One reason for such caution is that composition of smart contracts can have complex, unintended, and dangerous side effects, as recent flash-loan-based attacks have for instance shown [127, 189]. Similarly, composition of smart contracts, adapters, and executables will require extreme care. In our initial deployment of DONs, we plan to include only a pre-built set of templatized executables and adapters. This will enable study of the compositional security of these functionalities using formal methods [46, 170] and other approaches. It will also simplify pricing: Functionality pricing can be established by DON nodes on a perfunctionality basis, rather than through generalized metering, an approach adopted in, e.g., [156]. We also expect the Chainlink community to take part in the creation of additional templates, combining various adapters and executables into increasingly useful decentralized services that can be run by hundreds, if not thousands of individual DONs. Additionally, this approach can help prevent state bloat, i.e., the need for DON nodes to retain an unworkable amount of state in working memory. This problem is already arising in permissionless blockchains, motivating approaches such as “stateless clients” (see, e.g., [206]). It can be more acute in higher throughput systems, motivating an approach in which a DON deploys only state-size-optimized executables. As DONs evolve and mature and include robust guard rails, as discussed in Section 7, cryptoeconomic and reputation-based security mechanisms as discussed in Section 9, and other features that provide a high degree of assurance for DON users, we also expect to develop a framework and tools to facilitate broader launch and use of DONs by the community. Ideally, these tools will enable a collection of node operators to come together as an oracle network and launch their own DONs in a permissionless or self-service manner, meaning that they can do so unilaterally. 8.2 Dynamic DON Membership The set of nodes running a given DON may change over time. There are two approaches to key management for skL given dynamic membership in O. The first is to update shares of skL held by the nodes upon changes in membership, while keeping pkL unchanged. This approach, explored in [41, 161, 198], has the merit of not requiring that relying parties update pkL.

The classical technique of share resharing, introduced in [122], provides a simple and efficient way of realizing such share updates. It enables a secret to be transferred between one set of nodes O(1) and a second, possibly intersecting one O(2). In this approach, each node O(1) i performs a (k(2), n(2)) secret sharing of its secret share across nodes in O(2) for n(2) = |O(2)| and desired (possibly new) threshold k(2). Various verifiable secret sharing (VSS) schemes [108] can provide security against an adversary that actively corrupts nodes, i.e., introduces malicious behavior into the protocol. Techniques in [161] aim to do so while reducing communication complexity and providing resilience against failures in cryptographic hardness assumptions. A second approach is to update the ledger key pkL. This has the benefit of forward security: Compromise of old shares of pkL (i.e., former committee nodes) would not result in compromise of the current key. Updates to pkL, however, carry two drawbacks: (1) Data encrypted under pkL needs to be re-encrypted during a key refresh and (2) Key updates need to be propagated to relying parties. We intend to explore both approaches, as well as hybridizations of the two. 8.3 DON Accountability As with existing Chainlink oracle networks, DONs will include mechanisms for accountability, i.e., recording, monitoring, and enforcing correct node behavior. DONs will have much more substantial data capacity than many existing permissionless blockchains, particularly given their ability to connect to external decentralized storage. Consequently, they will be able to record nodes’ performance history in detail, allowing for more fine-grained accountability mechanisms. For example, off-chain computation of asset prices may involve inputs that are discarded before a median result is sent on chain. In a DON, these intermediate results could be recorded. Misbehavior or performance lapses by individual nodes in a DON can thus be remedied or penalized on the DON in a fine-grained way. We have additionally discussed approaches to building guard rails in Section 7.3 that address the contract-specific impact of systemic failures. It is also important, however, to have failsafe mechanisms for DONs themselves, i.e., protections against systemic, potentially catastrophic DON failures, specifically forking / equivocation and service-level agreement (SLA) failures, as we now explain. Forking / equivocation: Given sufficiently many faulty nodes, a DON can fork or equivocate, producing two distinct, inconsistent blocks or sequences of blocks in L. Because a DON digitally signs the contents of L, however, it is possible to leverage a main chain MAINCHAIN to prevent and/or penalize equivocation. The DON can periodically checkpoint state from L in an audit contract on MAINCHAIN. If its future state deviates from a checkpointed state, a user / auditor can present proof of this misbehavior to the audit contract. Such proof can be used to generate an alert or penalize DON nodes via slashing in the contract. This latter approach introduces an incentive design problem similar to that for specific oracle feeds, and can build on our work outlined in Section 9.

Enforcing service-level agreements: While DONs are not necessarily meant to run indefinitely, it is important that they adhere to service level agreements (SLAs) with their users. Basic SLA enforcement is possible on a main chain. For example, DON nodes might commit to maintaining the DON until a certain date, or to providing advance notice of service termination (e.g., three months’ notice). A contract on MAINCHAIN can provide basic cryptoeconomic SLA enforcement. For example, the SLA contract can slash DON-deposited funds if checkpoints are not provided at required intervals. A user can deposit funds and challenge the DON to prove that a checkpoint correctly represents a sequence of valid blocks (in a manner analogous to, e.g. [141]). Of course, block production does not equate with transaction processing, but the SLA contract can also serve to enforce the latter. For example, in the legacy-compatible version of FSS in which transactions are fetched from the mempool (see Section 5.2), transactions are eventually mined and placed on chain. A user can prove DON malfeasance by furnishing the SLA contract with a transaction that was mined but wasn’t transmitted by the DON for processing by the target contract within the appropriate interval of time.15 It is also possible to prove the existence of and penalize more fine-grained SLA failures, including errors in computation using executables (via, e.g., the mechanisms for proving correct off-chain state transactions outlined in Section 6.3) or failure to run executables based on initiators visible on a DON, failure to relay data on the DON to MAINCHAIN in a timely way, and so forth.

DON اعتبارات النشر

على الرغم من أنها ليست جزءًا من تصميمنا الأساسي، إلا أن هناك العديد من الاعتبارات الفنية المهمة في تحقيق DONs التي تستحق العلاج هنا.

8.1 نهج الطرح تضع هذه الورقة رؤية طموحة لوظيفة Chainlink المتقدمة التي وسيتطلب تحقيق ذلك حلولاً للعديد من التحديات على طول الطريق. هذه الورقة البيضاء يحدد بعض التحديات، ولكن من المؤكد أن تظهر تحديات غير متوقعة. ونحن نخطط لتنفيذ عناصر هذه الرؤية بطريقة تدريجية على مدار فترة زمنية فترة زمنية ممتدة. توقعاتنا هي أن DONs سيتم إطلاقه في البداية مع دعم لمكونات محددة معدة مسبقًا تم إنشاؤها بشكل تعاوني بواسطة فرق داخل Chainlink المجتمع. والقصد من ذلك هو أن الاستخدامات الأوسع لـ DONs، على سبيل المثال، القدرة على إطلاق الملفات التنفيذية التعسفية، وسوف نرى الدعم في وقت لاحق. أحد أسباب هذا الحذر هو أن تكوين smart contracts يمكن أن يكون له آثار جانبية معقدة وغير مقصودة وخطيرة، كما حدث مؤخرًا مع الهجمات المعتمدة على القروض السريعة على سبيل المثال هو مبين [127، 189]. وبالمثل، فإن تكوين smart contracts، والمحولات، و سوف تتطلب الملفات التنفيذية عناية فائقة. في النشر الأولي لـ DONs، نخطط لتضمين فقط مجموعة معدة مسبقًا من الملفات التنفيذية والمحولات النموذجية. وهذا سيمكن من دراسة الأمن التركيبي من هذه الوظائف باستخدام الأساليب الرسمية [46، 170] وغيرها من الأساليب. سوف تبسيط التسعير أيضًا: يمكن تحديد تسعير الوظائف من خلال DON العقد على أساس الأداء الوظيفي، وليس من خلال القياس العام، وهو النهج المعتمد في، على سبيل المثال، [156]. نتوقع أيضًا أن يشارك مجتمع Chainlink في الإنشاء من القوالب الإضافية، والجمع بين مختلف المحولات والملفات التنفيذية في شكل متزايد خدمات لامركزية مفيدة يمكن تشغيلها بواسطة مئات، إن لم يكن الآلاف من الأفراد DONs. بالإضافة إلى ذلك، يمكن أن يساعد هذا الأسلوب في منع انتفاخ الحالة، أي الحاجة إلى DON العقد للاحتفاظ بكمية غير قابلة للتطبيق من الحالة في الذاكرة العاملة. هذه المشكلة تنشأ بالفعل في blockchains غير المسموح بها، مما يحفز الأساليب مثل "عديمي الجنسية". العملاء" (راجع، على سبيل المثال، [206]). يمكن أن يكون أكثر حدة في أنظمة الإنتاجية العالية، مما يحفز أسلوب يقوم من خلاله DON بنشر الملفات التنفيذية المحسنة لحجم الحالة فقط. نظرًا لأن DON تتطور وتنضج وتتضمن حواجز حماية قوية، كما تمت مناقشته في القسم 7، وآليات الأمان المستندة إلى الاقتصاد المشفر والسمعة كما تمت مناقشتها في القسم 9، والميزات الأخرى التي توفر درجة عالية من الضمان لمستخدمي DON، فإننا ونتوقع أيضًا تطوير إطار عمل وأدوات لتسهيل إطلاقه واستخدامه على نطاق أوسع DONs من قبل المجتمع. ومن الناحية المثالية، ستمكن هذه الأدوات مجموعة من مشغلي العقد للاجتماع معًا كشبكة oracle وإطلاق DONs الخاصة بهم بطريقة غير مسموح بها أو بطريقة الخدمة الذاتية، مما يعني أنه يمكنهم القيام بذلك من جانب واحد. 8.2 العضوية الديناميكية DON قد تتغير مجموعة العقد التي تعمل على DON مع مرور الوقت. هناك نهجان للإدارة الرئيسية لـ skL نظرًا للعضوية الديناميكية في O. الأول هو تحديث حصص skL التي تحتفظ بها العقد عند حدوث تغييرات في العضوية، مع الحفاظ على pkL دون تغيير. وهذا النهج، الذي تم استكشافه في [41، 161، 198]، له ميزة عدم مطالبة الأطراف المعتمدة بتحديث pkL.توفر التقنية الكلاسيكية لإعادة مشاركة المشاركة، والتي تم تقديمها في [122]، طريقة بسيطة وطريقة فعالة لتحقيق تحديثات المشاركة هذه. أنها تمكن من نقل سر بين مجموعة واحدة من العقد O(1) والثانية، وربما تتقاطع مع O(2). في هذا النهج، كل عقدة O(1) أنا ينفذ (k(2), n(2)) مشاركة سرية لحصته السرية عبر العقد في O(2) لـ n(2) = |O(2)| والعتبة المطلوبة (ربما الجديدة) k (2). يمكن لأنظمة المشاركة السرية المختلفة (VSS) التي يمكن التحقق منها [108] أن توفر الأمان ضد الخصم الذي يفسد العقد بشكل فعال، أي يقدم سلوكًا ضارًا في البروتوكول. تهدف التقنيات الموجودة في [161] إلى القيام بذلك مع تقليل تعقيد الاتصال وتوفيره المرونة ضد الفشل في افتراضات صلابة التشفير. الطريقة الثانية هي تحديث مفتاح دفتر الأستاذ pkL. وهذا له فائدة للأمام الأمان: لن يتم التنازل عن الأسهم القديمة لـ pkL (أي عقد اللجنة السابقة). يؤدي إلى اختراق المفتاح الحالي. ومع ذلك، فإن تحديثات pkL تحمل عيبين: (1) تحتاج البيانات المشفرة بموجب pkL إلى إعادة تشفيرها أثناء تحديث المفتاح و(2) يجب نشر التحديثات الرئيسية إلى الأطراف المعتمدة. ونحن نعتزم استكشاف كلا النهجين، فضلا عن التهجين بين الاثنين. 8.3 DON المساءلة كما هو الحال مع شبكات Chainlink oracle الحالية، ستتضمن DONs آليات للمساءلة، أي تسجيل سلوك العقدة الصحيح ومراقبته وإنفاذه. DONs سيكون لها سعة بيانات أكبر بكثير من العديد من blockchains الموجودة غير المسموح بها، خاصة بالنظر إلى قدرتها على الاتصال بالتخزين اللامركزي الخارجي. وبالتالي، سيكونون قادرين على تسجيل تاريخ أداء العقد بالتفصيل، مما يسمح بذلك المزيد من آليات المساءلة الدقيقة. على سبيل المثال، حساب خارج السلسلة قد تتضمن أسعار الأصول مدخلات يتم التخلص منها قبل إرسال النتيجة المتوسطة سلسلة. في DON، يمكن تسجيل هذه النتائج المتوسطة. وبالتالي يمكن معالجة سوء السلوك أو هفوات الأداء من قبل العقد الفردية في DON أو معاقبتها على DON بطريقة دقيقة الحبيبات. لقد ناقشنا أيضًا طرق البناء قضبان الحماية في القسم 7.3 والتي تتناول التأثير المحدد للعقد الناتج عن الأعطال النظامية. ومع ذلك، فمن المهم أيضًا وجود آليات آمنة للفشل في DONs نفسها، على سبيل المثال، الحماية ضد حالات الفشل النظامية، والتي قد تكون كارثية DON، على وجه التحديد فشل التفرع/المراوغة واتفاقية مستوى الخدمة (SLA)، كما نوضح الآن. التشعب/ المراوغة: نظرًا لوجود عدد كافٍ من العقد المعيبة، يمكن أن يتفرع DON أو المراوغة، مما يؤدي إلى إنتاج كتلتين أو تسلسلتين متميزتين وغير متناسقتين من الكتل في L. نظرًا لأن DON يوقع رقميًا على محتويات L، فمن الممكن الاستفادة من السلسلة الرئيسية MAINCHAIN لمنع و/أو معاقبة المراوغة. يمكن لـ DON التحقق من الحالة بشكل دوري من L في عقد التدقيق على MAINCHAIN. إذا انحرفت حالتها المستقبلية عن حالة نقطة التفتيش، فيمكن للمستخدم/المدقق تقديم دليل عن هذا السلوك السيئ في عقد التدقيق. يمكن استخدام هذا الدليل لإنشاء تنبيه أو معاقبة DON العقد عن طريق القطع في العقد. يقدم هذا النهج الأخير مشكلة تصميم الحوافز مشابهة لتلك الخاصة بخلاصات oracle المحددة، ويمكن البناء عليها عملنا المبين في القسم 9.إنفاذ اتفاقيات مستوى الخدمة: في حين أن DONs ليس المقصود منه بالضرورة تشغيلها إلى أجل غير مسمى، فمن المهم أن تلتزم باتفاقيات مستوى الخدمة (SLAs) مع مستخدميها. تطبيق SLA الأساسي ممكن على السلسلة الرئيسية. على سبيل المثال، قد تلتزم العقد DON بالحفاظ على DON حتى تاريخ معين، أو بتقديم إشعار مسبق بإنهاء الخدمة (على سبيل المثال، إشعار لمدة ثلاثة أشهر). عقد على يمكن أن توفر MAINCHAIN تطبيقًا أساسيًا لاتفاقية مستوى الخدمة (SLA) للاقتصاد المشفر. على سبيل المثال، يمكن لعقد SLA أن يخفض DON الأموال المودعة إذا كانت نقاط التفتيش لم يتم توفيرها على فترات زمنية مطلوبة. يمكن للمستخدم إيداع الأموال والطعن في DON لإثبات أن نقطة التفتيش تمثل بشكل صحيح سلسلة من الكتل الصالحة (بطريقة مماثل ل، على سبيل المثال [141]). وبطبيعة الحال، إنتاج الكتلة لا يعني المعاملة المعالجة، ولكن عقد SLA يمكن أن يعمل أيضًا على إنفاذ الأخير. على سبيل المثال، في الإصدار المتوافق مع التراث من الخدمة الثابتة الساتلية (FSS) والذي يتم فيه جلب المعاملات من مجمع الذاكرة (انظر القسم 5.2)، ويتم في النهاية استخراج المعاملات ووضعها في السلسلة. مستخدم يمكن إثبات DON المخالفات من خلال تزويد عقد SLA بمعاملة تم تعدينه ولكن لم يتم إرساله بواسطة DON للمعالجة بواسطة العقد المستهدف خلال الفترة الزمنية المناسبة.15 ومن الممكن أيضًا إثبات وجود المزيد من جيش تحرير السودان (SLA) الدقيق والمعاقبة عليه حالات الفشل، بما في ذلك الأخطاء في الحساب باستخدام الملفات التنفيذية (عبر، على سبيل المثال، الآليات لإثبات معاملات الحالة الصحيحة خارج السلسلة الموضحة في القسم 6.3) أو الفشل في التشغيل الملفات التنفيذية المستندة إلى البادئات المرئية على DON، الفشل في ترحيل البيانات على DON إلى MAINCHAIN في الوقت المناسب، وما إلى ذلك.

Economics and Cryptoeconomics

Economics and Cryptoeconomics

For the Chainlink network to achieve strong security within a decentralized trust model, it is essential that nodes collectively exhibit correct behavior, meaning that they adhere a majority of the time exactly to DON protocols. In this section, we discuss approaches to helping enforce such behavior by means of economic incentives, a.k.a. cryptoeconomic incentives. These incentives fall into two categories: explicit and implicit, realized respectively through staking and future fee opportunity (FFO). Staking: Staking in Chainlink, as in other blockchain systems, involves network participants, i.e., oracle nodes, depositing locked funds in the form of LINK tokens. These funds, which we also refer to as stake or explicit stake are an explicit incentive. They are subject to forfeiture upon node failure or malfeasance. In the blockchain context, this procedure is often called slashing. Staking by oracle nodes in Chainlink, however, differs fundamentally from staking by validators in permissionless blockchains. Validators can misbehave by equivocating or adversarially ordering transactions. The underlying consensus protocol in a 15As users can replace transactions in the mempool, care is required to ensure a correct correspondence between the mined and DON-submitted transactions.

permissionless blockchain, though, uses hard-and-fast block-validation rules and cryptographic primitives to prevent validators from generating invalid blocks. In contrast, programmatic protections cannot prevent a cheating oracle network from generating invalid reports. The reason is a key difference between the two types of system: transaction validation in blockchains is a property of internal consistency, while the correctness of oracle reports on a blockchain is a property of external, i.e., off-chain data. We have designed a preliminary staking mechanism for the Chainlink network based on an interactive protocol among oracle nodes that may make use of external data. This mechanism creates financial incentives for correct behavior using explicit rewards and penalties (slashing). As the mechanism is economic, it is designed to prevent node corruption by an adversary that uses financial resources to corrupt nodes by means of bribery. (Such an adversary is very general, and extends, e.g., to nodes cooperating to extract value from their collective misbehavior.) The Chainlink staking mechanism we have designed has some powerful and novel features.16 The main such feature is super-linear staking impact (specifically, quadratic). An adversary must have resources considerably in excess of nodes’ deposited funds in order to subvert the mechanism. Our staking mechanism additionally provides protection against a stronger adversary than previously considered in similar systems, namely an adversary that can create bribes conditioning on nodes’ future behavior. Additionally, we discuss how Chainlink tools such as DECO can help strengthen our staking mechanism by facilitating correct adjudication in the case of faulty node behavior. Future fee opportunity (FFO): Permissionless blockchains—of both the PoW and PoS variety—today rely critically on what we call implicit incentives. These are economic incentives for honest behavior that derive not from explicit rewards, but from platform participation itself. For example, the Bitcoin miner community is incentivized against mounting a 51% attack by the risk of undermining confidence in Bitcoin, depressing its value, and consequently eroding the value of their collective capital investments in mining infrastructure [150]. The Chainlink network benefits from a similar implicit incentive that we refer to as future fee opportunity (FFO). Oracle nodes with strong performance histories or reputations attract fees from users. Misbehavior by an oracle node jeopardizes future fee payments and thus penalizes the node with an opportunity cost in terms of potential revenue earned through participation in the network. By analogy with explicit stake, FFO may be viewed as a form of implicit stake, an incentive for honest behavior that derives from the shared benefit of maintaining confidence in the platform on which node operators’ business depends, i.e., the positive performance and reputation of the network. This incentive is inherent in but not explicitly expressed in Chainlink network protocols. In Bitcoin, maintaining the value of mining operations as mentioned above 16The staking mechanism we describe here currently aims only to enforce delivery of correct reports by oracle networks. We expect in future work to extend it to ensure correct execution of the many other functionalities DONs will provide.

may similarly be viewed as a form of implicit stake. We emphasize that FFO already exists in Chainlink and helps secure the network today. Our main contribution in the further development of Chainlink will be a principled, empirically driven approach to evaluating implicit incentives such as FFO through what we call the Implicit-Incentive Framework (IIF). To estimate quantities such as the future fee opportunity of nodes, the IIF will draw continuously on the comprehensive performance and payment data amassed by the Chainlink network. Such estimates will enable IIF-based parameterization of staking systems that reflects node incentives with greater accuracy than current heuristic and/or static models. To summarize, then, the two main economic incentives for correct oracle node behavior in the developing Chainlink network will be: • Staking (deposited stake) o Explicit incentive • Future fee opportunity (FFO) o Implicit incentive These two forms of incentive are complementary. Oracle nodes can simultaneously participate in the Chainlink staking protocol, enjoy an ongoing revenue stream from users, and collectively benefit from their continued good behavior. Thus both incentives contribute to the cryptoeconomic security provided by an oracle network. Additionally, the two incentives can reinforce and/or be traded offagainst one another. For example, a new oracle operator without a performance history and revenue stream can stake a large quantity of LINK as a guarantee of honest behavior, thereby attracting users and fees. Conversely, an established oracle operator with a long, relatively fault-free performance history can charge substantial fees from a large user base and thus rely more heavily on its FFO as a form of implicit incentive. In general, the approach we consider here aims for a given amount of oracle-network resource to create the greatest possible economic incentives in Chainlink for rational agents—i.e., nodes maximizing their financial utility—to behave honestly. Put another way, the goal is to maximize the financial resources required for an adversary to attack the network successfully. By formulating a staking protocol with mathematically well defined economic security and also using the IIF, we aim to measure the strength of Chainlink’s incentives as accurately as possible. The creators of relying contracts will then be able to determine with strong confidence whether an oracle network meets their required levels of cryptoeconomic security. The virtuous cycle of economic security: The incentives we discuss in this section, staking and FFO, have an impact beyond their reinforcement of the security of DONs. They promise to induce what we call a virtuous cycle of economic security. Super-linear staking impact (and other economies of scale) result in lower operational cost as a DON’s security grows. Lower cost attracts additional users to the DON,

boosting fee payments. A rise in fee payments continues to incentivize growth of the network, which perpetuates the virtuous cycle. We believe that the virtuous cycle of economic security is just one example of an economy of scale and network effect among others that we discuss later in this section. Section organization: Staking presents notable technical and conceptual challenges for which we have designed a mechanism with novel features. Staking will therefore be our main focus in this section. We give an overview of the staking approach we introduce in this paper in Section 9.1, followed by detailed discussion in Sections 9.2 to 9.5. We present the IFF in Section 9.6. We present a summary view of Chainlink network incentives in Section 9.7. In Section 9.8, we discuss the virtuous cycle of economic security our proposed staking approach can bring to oracle networks. Finally, we briefly describe other potential effects propelling growth of the Chainlink network in Section 9.9. 9.1 Staking Overview The staking mechanism design we introduce here, as noted above, involves an interactive protocol among oracle nodes allowing for resolution of inconsistencies in the reporting of external data. Staking aims to ensure honest behavior from rational oracle nodes. We can therefore model an adversary attacking a staking protocol as a briber: The adversary’s strategy is to corrupt oracle nodes using financial incentives. The adversary may derive financial resources prospectively from successfully tampering with an oracle report, e.g., offer to share the resulting profit with corrupted nodes. We aim in our staking mechanism design simultaneously at two ambitious goals: 1. Resisting a powerful adversary: The staking mechanism is designed to protect oracle networks against a broad class of adversaries that are capable of complex, conditional bribing strategies, including prospective bribery, which offers bribes to oracles whose identities are determined after the fact (e.g., offers bribes to oracles randomly selected for high-priority alerting). While other oracle designs have considered a narrow set of attacks without the full capabilities of a realistic adversary, to the best of our knowledge the adversarial mechanism we introduce here is the first to explicitly address a broad set of bribing strategies and show resistance in this model. Our model assumes that nodes besides the attacker are economically rational (as opposed to honest), and we assume the existence of a source of truth that is prohibitively expensive for typical usage but is available in case of disagreement (discussed further below). 2. Achieving super-linear staking impact: Our aim is to ensure that an oracle network composed of rational agents reports truthfully even in the presence of an attacker with a budget that is super-linear

in the total stake deposited by the entire network. In existing staking systems, if each of n nodes stakes $d, an attacker can issue a credible bribe which requests that nodes behave dishonestly in exchange for a payment of slightly more than \(d to each node, using a total budget of about \)dn. This is already a high bar as the attacker has to have a liquid budget on the order of the combined deposits of all stakers in the network. Our goal is a still stronger degree of economic security than this already substantial hurdle. We aim to design the first staking system that can achieve security for a general attacker with a budget super-linear in n. While practical considerations may achieve a lower impact, as we discuss below, our preliminary design achieves an adversarial budget requirement greater than $dn2/2, i.e., scaling quadratic in n, rendering bribery largely impractical even when nodes stake only moderate amounts. Reaching these two goals requires an innovative combination of incentive design and cryptography. Key ideas: Our staking approach hinges on an idea we call watchdog priority. A report generated by a Chainlink oracle network and sent to a relying contract (e.g., on an asset price) is aggregated from individual reports contributed by participating nodes (e.g., by taking the median). Typically a service-level agreement (SLA) specifies acceptable bounds of deviation for reports, i.e., how far a node’s report can deviate from the aggregate report and how far the aggregate should be permitted to deviate from the true value to be considered correct. In our staking system, for a given reporting round, each oracle node can act as a watchdog to raise an alert if it believes the aggregate report is incorrect. In each reporting round, each oracle node is assigned a public priority that determines the order in which its alert (if any) will be processed. Our mechanism aims at reward concentration, meaning that the highest-priority watchdog to raise an alert earns the entire reward yielded by confiscating the deposits of faulty nodes. Our staking system designs involve two tiers: the first, default tier, and the second, backstop tier. The first tier is the oracle network itself, a set of n nodes. (For simplicity, we assume n is odd.) If a majority of nodes report incorrect values, a watchdog in the first tier is strongly incentivized to raise an alert. If an alert is raised, the reporting decision of the network is then escalated to a second tier—a high-cost, maximumreliability system that can be user-specified in the network service-level agreement. This could be a system which, for example, is composed only of nodes with strong historical reliability scores, or one that has an order of magnitude more oracles than the first tier. Additionally, as discussed in Section 9.4.3, DECO or Town Crier can serve as powerful tools to help ensure efficient and conclusive adjudication in the second tier. For simplicity we thus assume that this second-tier system arrives at a correct report value. While it might seem attractive just to rely on the second tier to generate all reports, the benefit of our design is that it consistently achieves the security properties of the

second-tier system while only paying the operating cost, in the typical case, of the first-tier system. Watchdog priority results in super-linear staking impact in the following way: if the first-tier oracle network outputs an incorrect result and a number of watchdog nodes alert, the staking incentive mechanism rewards the highest-priority watchdog with more than $dn/2 drawn from the deposits of the (majority) misbehaving nodes. The total reward is thus concentrated in the hands of this single watchdog, which therefore determines the minimum that an adversary must promise a potential watchdog to incentivize it not to alert. Since our mechanism ensures that every oracle gets the chance to act as watchdog if the higher-priority watchdogs have accepted their bribes (and chosen not to alert), the adversary must therefore offer a bribe of more than $dn/2 to every node to prevent any alert being raised. Since there are n nodes, the adversary’s requisite budget for a successful bribe amounts to more than $dn2/2, which is quadratic in the number n of nodes in the network. 9.2 Background Our approach to staking draws on research in the fields of game theory and mechanism design (MD) (for a textbook reference, see [177]). Game theory is the mathematically formalized study of strategic interaction. In this context, a game is a model of such an interaction, typically in the real world, that codifies sets of actions available to participants in the game, known as players. A game also specifies the payoffs obtained by the individual players—rewards that depend on a player’s chosen actions and the actions of the other players. Perhaps the best known example of a game studied in game theory is the Prisoners’ Dilemma [178]. Game theorists generally aim to understand the equilibrium or equilibria (if any) represented in a given game. An equilibrium is a set of strategies (one for each player) such that no one player can obtain a higher payoffby unilaterally deviating from its strategy. Mechanism design, meanwhile, is the science of designing incentives such that the equilibrium of an interaction (and its associated game) has some desirable property. MD may be viewed as the inverse of game theory: The canonical question in game theory is, “given the incentives and model, what will the equilibrium be?” In MD, the question is instead, “what incentives will result in a game with a desirable equilibrium?” A typical goal of a mechanism designer is to create an ‘incentive compatible’ mechanism, meaning that participants in the mechanism (e.g., an auction or other information elicitation system [228]) are incentivized to report the truth on some matter (e.g., how much they value a particular item). The Vickrey (second-price) auction is perhaps the best known incentive compatible mechanism, in which participants submit sealed bids for an item and the highest bidder wins the item but pays the second-highest price [214]. Cryptoeconomics is a domain-specific form of MD that leverages cryptographic techniques to create desirable equilibria within decentralized systems. Bribery and collusion create significant challenges throughout the field of MD. Almost all mechanisms break in the presence of collusion, defined as side contracts be-

tween the parties participating in a mechanism [125, 130]. Bribery, in which an external party introduces novel incentives into the game, presents an even tougher problem than does collusion; collusion may be viewed as a special case of bribery among game participants. Blockchain systems can often be conceptualized as games with monetary (cryptocurrencybased) payoffs. A simple example is Proof-of-Work mining: miners have an action space in which they can choose the hashrate with which to mine for blocks. The payoffof mining is a guaranteed negative reward (cost of electricity and equipment) plus a stochastic positive reward (mining subsidy) that depends on the number of other active miners [106, 172] and transaction fees. Crowdsourced oracles like SchellingCoin [68] are another example: the action space is the set of possible reports an oracle may send, while the payoffis the reward specified by the oracle mechanism, e.g., payment might depend on how close an oracle’s report is to the median of the other reports [26, 68, 119, 185]. Blockchain games offer ripe opportunities for collusion and bribery attacks; indeed, smart contracts can even facilitate such attacks [96, 165]. Perhaps the best known bribery attack on crowdsourced oracles is the p-plus-epsilon attack [67]. This attack arises in the context of a SchellingCoin-like mechanism in which players submit booleanvalued reports (i.e., false or true) and are rewarded with p if they agree with the majority submission. In a p-plus-epsilon attack, the attacker credibly promises to, e.g., pay users $p + ϵ for voting false if and only if the majority submission is true. The result is an equilibrium, in which all players are incentivized to report false irrespective of what other players do; consequently, the briber can induce the nodes through its promised bribe to report false without actually paying the bribe (!). Exploration of other briber strategies in the context of oracles, however—and particularly oracles that are not crowdsourced—has been limited to fairly weak adversarial models. For example, in the PoW setting, researchers have studied outcome-contingent bribes, i.e., bribes paid only if a target message is successfully censored and does not appear in a block, irrespective of an individual miner’s action [96, 165]. In the case of oracles, however, other than the p-plus-epsilon attack, we are aware only of work in a strictly limited model of bribery in which a briber sends a bribe conditioned on an individual player’s action, not on the resulting outcome. Here we sketch designs of information-elicitation mechanisms that remain incentive compatible even in a strong adversarial model, as described in the next subsection. 9.3 Modeling Assumptions In this subsection, we explain how we model the behavior and capabilities of players in our system, specifically first-tier oracle nodes, nodes in the second-tier (adjudication) layer, and adversaries.

9.3.1 First-Tier Incentive Model: Rational Actors Many blockchain systems rely for security on the assumption of some number of honest participating nodes. Nodes are defined to be honest if they follow the protocol even when it is not in their financial interest to do so. Proof-of-Work systems typically require the majority of hash power to be honest, Proof-of-Stake systems typically require \(2/3\) or more of all participating stake to be honest, and even layer-2 systems like Arbitrum [141] require at least a single honest participant. In modeling for our staking mechanism, we make a much weaker assumption. (To be clear, weaker assumptions mean stronger security properties and are therefore preferable.) We assume that the adversary has corrupted, i.e., controls, some (minority) fraction of first-tier oracle nodes. We model the remaining nodes not as honest agents, but as rational expected-utility maximizers. These nodes act entirely according to selfinterested financial incentives, choosing actions that result in an expected financial gain. For example, if a node is offered a bribe larger than the reward resulting from honest behavior, it will accept the bribe. Note on adversarial nodes: In accordance with the trust modeling common for decentralized systems, we assume that all nodes are rational, i.e., seeking to maximize net revenue, rather than controlled by a malicious adversary. Our claims, however— specifically super-linear or quadratic staking impact—hold asymptotically provided that the set of adversarially controlled nodes is at most \((1/2 - c)n\), for some positive constant \(c\). 9.3.2 Second-Tier Adjudication Model: Correctness by Assumption Recall that a critical feature of our staking mechanism that helps achieve security against rational nodes is its second-tier system. In our proposed staking mechanism, any oracle may raise an alert indicating that it believes the output of the mechanism is incorrect. An alert results in a high-trust second-tier system activating and reporting the correct result. Thus, a key modeling requirement for our approach is correct adjudication, i.e., correct reporting by the second-tier system. Our staking model assumes a second-tier system that acts as an incorruptible, maximally reliable source of truth. Such a system is likely to be expensive and slow, and thus inappropriate for use for the typical case. In the equilibrium case, however, i.e., when the first-tier system functions correctly, the second-tier system will not be invoked. Instead, its existence boosts the security of the whole oracle system by providing a high-assurance backstop. The use of a high-trust, high-cost adjudication layer resembles the appeals process at the heart of most judicial systems. It is also already common in the design of oracle systems, e.g., [119, 185]. We briefly discuss approaches to realization of the second tier in our mechanism in Section 9.4.3.

Our staking protocol uses the assumed correct adjudication of the second-tier system as a credible threat to enforce correct reporting by oracle nodes. The protocol confiscates part or all of the stake of oracle nodes that generate reports identified by the second-tier system as incorrect. Oracle nodes are thus deterred from misbehaving by the resulting financial penalty. This approach is similar in flavor to that used in optimistic rollups, e.g., [141, 10]. 9.3.3 Adversarial Model Our staking mechanism is designed to elicit truthful information while achieving security against a broad, well-defined class of adversaries. It improves upon prior works, which either omit an explicit adversarial model or focus on narrow sub-classes of adversaries, e.g., the p-plus-epsilon adversary discussed above. Our goal is to design a staking mechanism with formally proven security against the full spectrum of adversaries likely to be encountered in practice. We model our adversary as having a fixed (parameterizable) budget, denoted by $B. The adversary can communicate individually and confidentially with each oracle in the network, and can secretly offer any individual oracle guaranteed payment of a bribe contingent on publicly observable outcomes of the mechanism. Outcomes determining bribes can include, for example, the value reported by the oracle, any public messages sent by any oracle to the mechanism (e.g., an alert), the values reported by other oracles, and the value output by the mechanism. No mechanism can secure against an attacker with unlimited capabilities. We therefore consider some behaviors as unrealistic or out-of-scope. We assume our attacker cannot break standard cryptographic primitives, and, as noted above, has a fixed (if potentially large) budget $B. We further assume that the adversary does not control communication in the oracle network, specifically that it cannot substantially delay traffic between first-tier and/or second-tier nodes. (Whether the adversary can observe such communication depends on the particular mechanism, as we explain below.) Informally, however, as noted above, we assume that the adversary can: (1) Corrupt a fraction of oracle nodes (\((1/2 - c)\)-fraction for some constant \(c\)), i.e., fully control them, and (2) Offer bribes to any desired nodes, with guaranteed payment contingent on outcomes specified by the adversary, as described above. While we don’t offer a formal model or complete taxonomy of the adversary’s full range of bribing capabilities in this whitepaper, here are examples of the kinds of bribers encompassed by our model. For simplicity, we assume that oracles emit Boolean reports whose correct value (w.l.o.g.) is true, and that a final outcome is computed as an aggregate of these reports to be used by a consuming smart contract. The briber’s aim is for the final outcome to be incorrect, i.e., false. • Unconditional briber: Briber offers bribe $b to any oracle that reports false. • Probabilistic briber: Briber offers bribe $b with some probability q to any oracle that reports false.

• false-outcome conditioned briber: Briber offers bribe $b to any oracle that reports false provided that the final outcome is false. • No-alert-conditioned briber: Briber offers bribe $b to any oracle that reports false as long as no alert is raised. • p-plus-epsilon Briber: Briber offers bribe $b to any oracle that reports false as long as the majority of oracles do not report false. • Prospective briber: Briber offers bribe $b in advance to whichever oracle is selected for a randomized role and reports false. In our proposed staking protocol, all nodes act as potential watchdogs, and we are able to show that randomization of watchdog priorities does not lend itself to prospective bribery. Many proofof-work, proof-of-stake, and permissioned systems are susceptible to prospective bribery, however, which shows the importance of considering it in our adversarial model and ensuring that our staking protocols are resilient to it. See Appendix E for more details. 9.3.4 How Much Cryptoeconomic Security Is Enough? A rational adversary will only spend money to attack a system if it can obtain a profit larger than its expenditure. Thus for our adversarial model and proposed staking mechanism, $B may be viewed as a measure of the potential profit an adversary is able to extract from relying smart contracts by corrupting an oracle network and causing it to generate an incorrect report or set of reports. In deciding whether an oracle network offers a sufficient degree of cryptoeconomic security for their purposes, a user should assess the network from this perspective. For plausible adversaries in practical settings, we expect that $B will generally be substantially smaller than the total assets in relying smart contracts. In most cases, it is infeasible for an adversary to extract these assets in their totality. 9.4 Staking Mechanism: Sketch Here we present the main ideas and general structure of the staking mechanism we are currently considering. For ease of presentation, we describe a simple but slow (multi-round) protocol in this subsection. We note, however, that this scheme is quite practical. Given the economic assurances provided by the mechanism, i.e., the penalization of and consequent incentive against faulty nodes, many users may be willing to accept reports optimistically. In other words, such users may accept reports prior to potential adjudication by the second tier. Users unwilling to accept reports optimistically can choose to wait until the protocol execution terminates, i.e., until any potential escalation to the second tier occurs. This, however, can substantially slow the confirmation time for reports. We therefore briefly

Schematic of Chainlink staking scheme with alerting showing watchdog escalation and penalty mechanisms

Figure 15: Schematic of staking scheme with alerting. In this example, 1⃝a majority of nodes are corrupted / bribed and emit an incorrect value ˜r, rather than the correct report value r. The watchdog node 2⃝sends an alert to the second-tier committee, which 3⃝determines and emits the correct report value r, resulting in corrupted nodes forfeiting their deposits—each $d to the watchdog node 4⃝. outline some optimizations that result in a faster (single-round) if somewhat more complex design in Section 9.5. Recall that the first tier in our staking mechanism consists of the basic oracle network itself. The main structure of our mechanism, as described above, is that in each round, each node can act as a “watchdog” with some priority, and it thus has the ability to raise an alert if the mechanism arrives at an incorrect output ˜r, rather than a correct one r. This alert causes second-tier resolution, which we assume arrives at a correct report. Nodes with incorrect reports are punished, in the sense that their stakes are slashed and awarded to watchdogs. This basic structure is common in oracle systems, as in, e.g., [119, 185]. The key innovation in our design, mentioned briefly above, is that every node is assigned a distinct priority in the ordering of potential watchdogs. That is, watchdogs are given opportunities to alert in priority sequence. Recall that if a node has the highest priority to raise an alert, it receives the slashed deposit $d of every misbehaving node, for a total of more than \(dn/2 = \)d × n/2, as an incorrect report implies a majority of bad nodes. Consequently, the adversary must pay at least this reward to bribe an arbitrary node. Thus, to bribe a majority of nodes, the adversary must pay a large bribe to a majority of nodes, namely, strictly more than $dn2/2. We show schematically how alerting and watchdog escalation works in Fig. 15.

9.4.1 Further Mechanism Details The bribery-resistant system we now describe in further detail is a simplified sketch of the two-tiered construction we intend to build. Most of our focus will be on describing the first-tier network (henceforth simply “network” where clear from context) along with its incentive mechanism and the procedure for escalation to the second tier. Consider a Chainlink network composed of n oracle nodes that are responsible for regularly (e.g., once a minute) reporting a boolean value (e.g., whether the market capitalization of BTC exceeds that of ETH). As part of the staking mechanism, nodes must provide two deposits: a deposit $d subject to slashing in the event of disagreement with the majority and a watchdog deposit $dw subject to slashing in the event of a faulty escalation. We assume that the nodes cannot copy the submissions of other nodes, e.g., through a commit-reveal scheme as discussed in Section 5.3. In each round, nodes first commit to their report, and once all nodes have committed (or a timeout has expired), nodes reveal their reports. For each report to be generated, every node is also given a watchdog priority between 1 and n chosen at random, with 1 being top priority. This priority enables the concentration of reward in the hands of one watchdog. After all reports are public, an alerting phase ensues. Over a sequence of n (synchronous) rounds, the node with priority i has the opportunity to alert in round i. Let us consider the possible outcomes for the mechanism after nodes have revealed their reports. Again assuming a binary report, suppose the correct value is true and the incorrect one is false. Suppose also that the first-tier mechanism outputs the majority value output by nodes as the final report r. There are three possible outcomes in the mechanism: • Complete agreement: In the best case, nodes are in complete agreement: all nodes are available and have provided a timely report of the same value r (either true or false). In this case, the network need only forward r to relying contracts and reward each node with a fixed per-round payment $p, which is much smaller than $d. • Partial agreement: It is possible that some nodes are offline or there is disagreement about which value is correct, but most nodes report true and only a minority reports false. This case is also straightforward. The majority value (true) is computed, resulting in a correct report r. All nodes that reported r are rewarded with $p while the oracles that reported incorrectly have their deposits slashed modestly, e.g., by $10p. • Alert: In the event that a watchdog believes the output of the network is incorrect, it publicly triggers an alert, escalating the mechanism to the second-tier network. There are then two possible results: – Correct alert: If the second-tier network confirms that the output of the

Diagram showing how concentrated alerting rewards amplify the cost for a briber attempting to corrupt the oracle network

Figure 16: Amplifying briber’s cost through concentrated alerting rewards. A bribing adversary must bribe each node with more than the reward it stands to gain by alerting (shown as a red bar). If alerting rewards are shared, then this reward may be relatively small. Concentrated alerting rewards increase the reward that any single node may obtain (tall red bar). Consequently the total payout by the adversary for a viable bribe (gray regions) is much larger with concentrated than shared alerting rewards. first-tier network was incorrect, the alerting watchdog node receives a reward consisting of all slashed deposits, and thus more than $dn/2. – Faulty alert: If the second-tier and first-tier oracles agree, the escalation is deemed faulty and the alerting node loses its $dw deposit. In the case of optimistic acceptance of reports, watchdog alerts do not cause any change in execution of relying contracts. For contracts designed to await potential arbitration by the second-tier committee, watchdog alerts delay but do not freeze contract execution. It is also possible for contracts to designate a failover DON for periods of adjudication. 9.4.2 Quadratic Staking Impact The ability for every node to act as a watchdog, combined with strict node priority ensuring concentrated rewards, enables the mechanism to achieve quadratic staking impact for each kind of bribing attacker described in Section 9.3.3. Recall that this means specifically in our setting that, for a network with n nodes each with deposit $d, a successful briber (of any of the kinds above) must have a budget of bigger than $dn2/2. To be precise, the briber must corrupt at least (n+1)/2 nodes, since the briber must corrupt a majority of n nodes (for odd n, by assumption). Thus, a watchdog stands to earn a reward of $d(n + 1)/2. The briber consequently must pay this amount to every

node to ensure that none acts as a watchdog. We are working to show formally that if the briber has a budget of at most $d(n2 + n)/2, then the subgame perfect equilibrium of the game between the bribers and the oracles—in other words, the equilibrium at any point during the play of the game—is for the briber not to issue the bribe and for each oracle to report its true values honestly. We have explained above how it is possible that a successful briber could require a budget significantly larger than that of the sum of the node deposits. To illustrate this intuitive result, Fig. 16 shows the impact of concentrated alert rewards graphically. As we see there, if the reward for watchdog alerting—namely the deposits of bribed nodes reporting false)—were split among all potential alerting, the total amount that any individual alerting node could expect would be relatively small, on the order of $d. A briber, knowing that a payout of larger than $d was improbable, could use a false-outcome conditional bribe to bribe each of n nodes with slightly more than $d + ϵ. Counterintuitively, Fig. 16 shows that a system that distributes a reward broadly among nodes signaling an alert is far weaker than one that concentrates the reward in the hands of a single watchdog. Example parameters: Consider a (first-tier) network with n = 100 nodes, each depositing \(d = \)20K. This network would have a total of $2M deposited but would be protected against a briber with budget \(100M = \)dn2/2. Increasing the number of oracles is more effective than increasing $d, of course, and can have a dramatic effect: a network with n = 300 nodes and deposits \(d = \)20K would be protected against a briber with budget up to $900M. Note that a staking system can in many cases protect smart contracts representing more value than the offered level of bribery protection. This is because an adversary attacking these contracts cannot extract the full value in many cases. For example, a Chainlink-powered contract securing $1B in value may only require security against a briber with $100M in resource because such an adversary can feasibly extract a profit of only 10% of the value of the contract. Note: The idea that the value of a network can grow quadratically is expressed in the well known Metcalfe’s Law [167, 235], which states that the value of a network grows quadratically in the number of connected entities. Metcalfe’s Law, however, arises from growth in the number of potential pairwise network connections, a different phenomenon than that underlying quadratic staking impact in our incentive mechanism. 9.4.3 Realization of Second Tier Two operational features facilitate realization of a high-reliability second tier: (1) Second-tier adjudication should be a rare event in oracle networks and therefore can be significantly more costly than normal operation of the first tier and (2) Assuming

optimistically accepted reports—or contracts whose execution can await arbitration— the second tier need not execute in real time. These features result in a range of configuration options for the second tier to meet the requirements of particular DONs. As an example approach, a second tier committee can consist of nodes selected by a DON (i.e., first tier) from the longest-serving and most reliable nodes in the Chainlink network. In addition to considerable relevant operational experience, the operators of such nodes have a considerable implicit incentive in FFO that motivates a desire to ensure that the Chainlink network remains highly reliable. They also have publicly available performance histories that provide transparency into their reliability. Secondtier nodes, it is worth noting, need not be participants in the first-tier network, and may adjudicate faults across multiple first-tier networks. Nodes in a given DON can pre-designate and publicly commit to a set of n′ such nodes as constituting the second-tier committee for that DON. Additionally, DON nodes publish a parameter k′ ≤n′ that determines the number of second-tier votes required to penalize a first-tier node. When an alert is generated for a given report, the members of the second tier vote on the correctness of the values provided by each of the first-tier nodes. Any first-tier node that receives k′ negative votes forfeits its deposits to the watchdog node. Because of the rareness of adjudication and opportunity for extended-time execution noted above, in contrast to the first tier, nodes in the second tier can: 1. Be highly compensated for conducting adjudication. 2. Draw on additional data sources, beyond even the diverse set used by the firsttier. 3. Rely on manual and/or expert inspection and intervention, e.g., to identify and reconcile errors in source data and distinguish between an honest node relaying faulty data and a misbehaving node. We emphasize that the approach we have just described for selection of secondtier nodes and policy governing adjudication represents just a point within a large design space of possible realizations of the second tier. Our incentive mechanism offers complete flexibility as to how the second tier is realized. Individual DONs can thus constitute and set rules for their second tiers that meet the particular requirements and expectations of participating nodes and users. DECO and Town Crier as adjudication tools: It is essential for the second tier in our mechanism to be able to distinguish between adversarial first-tier nodes that intentionally produce incorrect reports and honest first-tier nodes that unintentionally relay data that is incorrect at the source. Only then can the second tier implement slashing to disincentivize cheating, the goal of our mechanism. DECO and Town Crier are powerful tools that can enable second-tier nodes to make this critical distinction reliably.

Second-tier nodes may in some cases be able to directly query the data source used by a first-tier node or use ADO Section 7.1 in order to check whether an incorrect report resulted from a faulty data source. In other cases, however, second tier nodes may lack direct access to a first-tier node’s data source. In such cases, correct adjudication would appear to be infeasible or require a reliance on subjective judgment. Previous oracle dispute systems have relied upon inefficient, escalating rounds of voting to address such challenges. Using DECO or Town Crier, however, a first tier node can prove correct behavior to second-tier nodes. (See Section 3.6.2 for details on the two systems.) Specifically, if the second tier node identifies a first-tier node as having output a faulty report value ˜r, the first-tier node can use DECO or Town Crier to generate tamperproof evidence for second-tier nodes that it is correctly relaying ˜r correctly from a (TLS-enabled) source recognized as authoritative by the DON. Critically, the first-tier node can do this without second-tier nodes requiring direct access to the data source.17 Consequently, correct adjudication is feasible in Chainlink for any desired data source. 9.4.4 Misreporting Insurance The strong bribery resistance achieved by our staking mechanism relies fundamentally on slashed funds being awarded to alerters. Without a monetary reward, alerters would have no direct incentive to reject bribes. As a result, however, slashed funds are not available to compensate users harmed by incorrect reports, e.g., users that lose money when incorrect price data is relayed to a smart contract. By assumption, incorrect reports don’t pose a problem if reports are accepted by a contract only after potential adjudication, i.e., action by the second tier. As explained above, though, to achieve the best possible performance, contracts may instead rely optimistically on the mechanism to enforce correct reporting, meaning that they accept reports before potential second-tier adjudication. Indeed, such optimistic behavior is safe in our model assuming rational adversaries whose budgets do not exceed the staking impact of the mechanism. Users concerned about the improbable event of a mechanism failure resulting from, e.g., adversaries with overwhelming financial resources, may wish to employ an additional layer of economic security in the form of misreporting insurance. We know of multiple insurers already intending to offer smart-contract-backed policies of this kind for Chainlink-secured protocols in the near future, including through innovative mechanisms such as DAOs, e.g., [7]. The existence of performance history for Chainlink nodes and other data about nodes such as their stake amounts provides an exceptionally strong basis for actuarial assessments of risk, making it possible to price policies in ways that are inexpensive for policyholders yet sustainable for insurers. 17With Town Crier, it is additionally possible for first-tier nodes to locally generate attestations of correctness for the reports they output and provide these attestations to second-tier nodes on an as-needed basis.

Basic forms of misreporting insurance can be implemented in a trustworthy and efficient manner using smart contracts. As a simple example, a parametric insurance contract SCins can compensate policyholders automatically if our incentive mechanism’s second tier identifies an error in a report generated in the first tier. A user U that wishes to purchase an insurance policy, e.g., the creator of a target contract SC, can submit a request to a decentralized insurer for an policy amount $M on the contract. On approving U, the insurer can set an ongoing (e.g., monthly) premium of $P in SCins. While U pays the premium, her policy remains active. If a reporting failure occurs in SC, the result will be the emission of a pair (r1, r2) of conflicting reports for SC, where r1 is signed by the first tier in our mechanism and r2, the corresponding corrected report, is signed by the second tier. If the U furnishes such a valid pair (r1, r2) to SCins, the contract automatically pays her $M, provided her premium payments are up-to-date. 9.5 Single-Round Variant The protocol described in the previous subsection requires that the second-tier committee wait n rounds to determine whether a watchdog has raised an alert. This requirement holds even in the optimistic case, i.e., when the first tier is functioning correctly. For users unwilling to accept reports optimistically, i.e., prior to potential adjudication, the delay associated with that approach would be unworkable. For this reason, we are also exploring alternative protocols that require just one round. In this approach, all oracle nodes submit secret bits indicating whether or not they wish to raise an alert. The second-tier committee then checks these values in priority order. To provide a rough sketch, such a scheme might involve the following steps: 1. Watchdog bit submission: Each node Oi secret-shares a one-bit watchdog value wi ∈{no alert, alert} among nodes in the second tier for every report it generates. 2. Anonymous tips: Any oracle node can submit an anonymous tip α to the secondtier committee in the same round that watchdog bits are submitted. This tip α is a message indicating that an alert has been raised for the current report. 3. Watchdog bit checking: The second-tier committee reveals oracle nodes’ watchdog bits in priority order. Note that nodes must send no alert watchdog bits when they don’t alert: otherwise, traffic analysis reveals all nodes’ bits. The protocol does reveal the no alert watchdog bits of nodes with higher priority than the highest-priority alerting watchdog. Observe that what is revealed is identical with that of our n-round protocol. Rewards are also distributed identically with that scheme, i.e., the first identified watchdog receives the slashed deposits of nodes that have submitted incorrect reports.

The use of anonymous tips enables the second-tier committee to remain noninteractive in cases where no alert has been raised, reducing communication complexity in the common case. Note that any watchdog that raises an alert has an economic incentive to submit an anonymous tip: If no tip is submitted, no reward is paid to any node. To ensure that the sender Oi of an anonymous tip α cannot be identified by the adversary based on network data, the anonymous tip can be sent over an anonymous channel, e.g, via Tor, or, more practically, proxied via a cloud service provider. To authenticate the tip as originating with O, Oi can sign α using a ring signature [39, 192]. Alternatively, to prevent unattributable denial-of-service attacks against the secondtier committee by a malicious oracle node, α can be an anonymous credential with revocable anonymity [73]. This protocol, while practically achievable, has somewhat heavyweight engineering requirements (which we are exploring ways to reduce). First-tier nodes, for instance, must communicate directly with second-tier nodes, requiring maintenance of a directory. The need for anonymous channels and ring signatures adds to the engineering complexity of the scheme. Finally, there is a special trust requirement briefly discussed in the note below. We are therefore also exploring simpler schemes that still achieve super-linear staking impact, but perhaps less than quadratic, in which a briber asymptotically needs resources of at least $n log n, for example. Some of the schemes under consideration involve random selection of a strict subset of nodes to act as watchdogs, in which case prospective bribery becomes an especially powerful attack. Remark: The security of this single-round staking mechanism requires untappable channels between oracle and second-tier nodes—a standard requirement in coercionresistant systems, e.g., voting [82, 138], and a reasonable one in practice. Additionally, however, a node Oi that seeks to cooperate with a briber can construct its secret shares in such a way as to show the briber that it has encoded a particular value. For example, if Oi does not know which nodes the briber controls, then Oi can submit 0-valued shares to all committee members. The briber can then verify Oi’s compliance probabilistically. To avoid this problem in any single-round protocol, we require that Oi know the identity of at least one honest second-tier node. With an interactive protocol in which each second-tier node adds a randomization factor to shares, the best the briber can do is enforce selection by Oi of a random watchdog bit. 9.6 Implicit-Incentive Framework (IIF) FFO is a form of implicit incentive for correct behavior in the Chainlink network. It functions like explicit stake, i.e., deposits, in that it helps enforce economic security for the network. In other words, FFO should be included as part of the (effective) deposit $d of a node in the network.

The question is: How do we measure FFO and other forms of implicit incentive within the Chainlink network? The Implicit-Incentive Framework (IIF) is a set of principles and techniques that we plan to develop for this purpose. Blockchain systems provide many forms of unprecedented transparency, and the high-trust records of node performance they create are a springboard for our vision of how the IIF will work. Here we very briefly sketch ideas on key elements of the IIF. The IIF itself will consist of a set of factors we identify as important in evaluating implicit incentives, along with mechanisms for publishing relevant data in a highassurance form for consumption by analytics algorithms. Different Chainlink users may wish to use the IIF in different ways, e.g., giving different weighting to different factors. We expect analytics services to arise in the community that help users apply the IIF according to their individual risk-evaluation preferences, and our goal is to facilitate such services by ensuring their access to high-assurance and timely supporting data, as we discuss below (Section 9.6.4). 9.6.1 Future Fee Opportunity Nodes participate in the Chainlink ecosystem to earn a share of the fees that the networks pay out for any of the various services we have described in this paper, from ordinary data feeds to advanced services such as decentralized identity, fair sequencing, and confidentiality-preserving DeFi. Fees in the Chainlink network support node operators’ costs for, e.g., running servers, acquiring necessary data licenses, and maintaining a global staffto ensure high uptime. FFO denotes the service fees, net of expenses, that a node stands to gain in the future—or lose should it demonstrate faulty behavior. FFO is a form of stake that helps secure the network. A helpful feature of FFO is the fact that on-chain data (supplemented by off-chain data) establish a high-trust record of a node’s history, enabling computation of FFO in a transparent, empirically driven manner. A simple, first-order measure of FFO can derive from the average net revenue of a node over a period of time (i.e., gross revenue minus operating expenses). FFO may then be calculated as, e.g., the net present value [114] of cumulative future net revenue, in other words, the time-discounted value of all future earnings. Node revenue can be volatile, however, as shown for example in Fig. 17. More importantly, node revenue may not follow a distribution that is stationary over time. Consequently, other factors we plan to explore in estimating FFO include: • Performance history: An operator’s performance history—including the correctness and timeliness of its reports, as well as its up time—provides an objective touchstone for users to evaluate its reliability. Performance history will thus provide a critical factor in users’ selection of oracle nodes (or, with the advent of DONs, their selection of DONs). A strong performance history is likely to correlate with high ongoing revenue.18 18An important research question we intend to address is detection of falsified service volumes.

Revenue earned by Chainlink nodes on a single ETH-USD data feed showing correlation with price volatility

Figure 17: Revenue earned by Chainlink nodes on a single data feed (ETH-USD) during a representative week in March 2021. • Data access: While oracles may obtain many forms of data from open APIs, certain forms of data or certain high-quality sources may be available only on a subscription basis or through contractual agreements. Privileged access to certain data sources can play a role in creating a stable revenue stream. • DON participation: With the advent of DONs, communities of nodes will come together to provide particular services. We expect that many DONs will include operators on a selective basis, establishing participation in reputable DONs as a privileged market position that helps ensure a consistent source of revenue. • Cross-platform activity: Some node operators may have well-established presences and performance track records in other contexts, e.g., as PoS validators or data providers in non-blockchain contexts. Their performance in these other systems (when data on it is available in a trustworthy form) can inform evaluation of their performance history. Similarly, faulty behavior in the Chainlink network can jeopardize revenue in these other systems by driving away users, i.e., FFO can extend across platforms. 9.6.2 Speculative FFO Node operators participate in the Chainlink network not just to generate revenue from operations, but to create and position themselves to take advantage of new opportunities to run jobs. In other words, expenditure by oracle nodes in the network is also a positive statement about the future of DeFi and other smart-contract application domains as well as emerging non-blockchain applications of oracle networks. Node operators today earn the fees available on existing Chainlink networks and simultaneously These are loosely analogous to fake reviews on internet sites, except that the problem is easier in the oracle setting because we have a definitive record of whether the goods, i.e., reports, were ordered and delivered—as opposed to, e.g., physical goods ordered in online shops. Put another way, in the oracle setting, performance can be validated, even if customer veracity can’t.

build a reputation, performance history, and operational expertise that will position them advantageously to earn fees available in future networks (contingent, of course, on honest behavior). The nodes operating in the Chainlink ecosystem today will in this sense have an advantage over newcomers in earning the fees as additional Chainlink services become available. This advantage applies to new operators, as well as technology companies with established reputations; for example, T-Systems, a traditional technology provider (subsidiary of Deutsche Telekom), and Kraken, a large centralized exchange, have established early presences in the Chainlink ecosystem [28, 143]. Such participation by oracle nodes in future opportunities may be regarded itself as a kind of speculative FFO, and thus constitutes a form of stake in the Chainlink network. 9.6.3 External Reputation The IIF as we have described it can operate in a network with strictly pseudonymous operators, i.e., without disclosure of the people or real-world entities involved. One potentially important factor for user selection of providers, however, is external reputation. By external reputation, we mean the perception of trustworthiness attaching to real-world identities, rather than pseudonyms. Reputational risk attaching to real-world identities can be viewed as a form of implicit incentive. We view reputation through the lens of the IIF, i.e., in a cryptoeconomic sense, as a means of establishing cross-platform activity that may be incorporated into FFO estimates. The benefit of using external reputation as a factor in estimates of FFO, as opposed to pseudonymous linkage, is that external reputation links performance not just to an operator’s existing activities, but also to future ones. If, for instance, a bad reputation attaches to an individual person, it can taint that person’s future enterprises. Put another way, external reputation can capture a broader swath of FFO than pseudonymous performance records, as the impact of malfeasance attaching to a person or established company is harder to escape than that associated with a pseudonymous operation. Chainlink is compatible with decentralized identity technologies (Section 4.3) that can provide support for the use of external reputation in the IIF. Such technologies can validate and thereby help ensure the veracity of operators’ asserted real-world identities.19 9.6.4 Open IIF Analytics The IIF, as we have noted, aims to provide reliable open-source data and tools for implicit-incentive analytics. The goal is to enable providers within the community to develop analytics tailored to the risk-assessment needs of different parts of the Chainlink user base. 19Decentralized identity credentials can also, where desired, embellish pseudonyms with validated supplementary information. For example, a node operator could in principle use such credentials to prove that it is a Fortune 500 company, without revealing which one.

A considerable amount of historical data regarding nodes’ revenue and performance resides on chain in a high-trust, immutable form. Our goal, however, is to provide the most comprehensive possible data, including data on behaviors that are visible only off chain, such as Off-Chain Reporting (OCR) or DON activity. Such data can potentially be voluminous. The best way to store it and ensure its integrity, i.e., protect it from tampering, we believe, will be with the help of DONs, using techniques discussed in Section 3.3. Some incentives lend themselves to direct forms of measurement, such as staking deposits and basic FFO. Others, such as speculative FFO and reputation, are harder to measure in an objective manner, but we believe that supporting forms of data, including historical growth of the Chainlink ecosystem, social-media metrics of reputation, etc., can support IIF analytics models even for these harder-to-quantify elements. We can imagine that dedicated DONs arise specifically to monitor, validate, and record data relating to off-chain performance records of nodes, as well as other data used in the IIF, such as validated identity information. These DONs can provide uniform, high-trust IIF data for any analytics providers serving the Chainlink community. They will also provide a golden record that makes the claims of analytics providers independently verifiable by the community. 9.7 Putting It All Together: Node Operator Incentives Synthesizing our discussions above on explicit and implicit incentives for node operators provides a holistic view of the ways that node operators participate in and benefit from the Chainlink network. As a conceptual guide, we can express the total assets at stake by a given Chainlink node operator $S in a rough, stylized form as: \(S ≈\)D + \(F + \)FS + $R, where: • $D is the aggregate of all explicitly deposited stake across all networks in which the operator participates; • $F is the net present value of the aggregate of all FFO across all networks in which the operator participates; • $FS is the net present value of the speculative FFO of the operator; and • $R is the reputational equity of the operator outside the Chainlink ecosystem that might be jeopardized by identified misbehavior in its oracle nodes. While largely conceptual, this rough equality helpfully shows that there is a multiplicity of economic factors favoring high-reliability performance by Chainlink nodes. All of these factors other than $D are present in today’s Chainlink networks.

9.8 The Virtuous Cycle of Economic Security The combination of super-linear staking impact with representation of fee payments as future fee opportunity (FFO) in the IIF can lead to what we call the virtuous cycle of economic security in an oracle network. This can be seen as a kind of economy of scale. As the total amount secured by a particular network rises, the amount of additional stake it takes to add a fixed amount of economic security decreases as does the average per-user cost. It’s therefore cheaper, in terms of fees, for a user to join an already-existing network than to achieve the same increase in network economic security by creating a new network. Importantly, the addition of each new user lowers the cost of the service for all previous users of that network. Given a particular fee structure (e.g. a particular yield rate on the amount staked), if the total fees earned by a network increases, this incentivizes the flow of additional stake into the network to secure it at a higher rate. Specifically, if the total stake an individual node may hold in the system is capped, then when new fee payments enter the system, raising its FFO, the number of nodes n will increase. Thanks to the super-linear staking impact of our incentive system design, the economic security of the system will rise faster than n, e.g., as n2 in the mechanism we sketch in Section 9.4. As a result, the average cost for economic security—i.e., amount of stake contributing a dollar of economic security—will drop. The network can therefore charge its users lower fees. Assuming that demand for oracle services is elastic (see, e.g., [31] for a brief explanation), demand will rise, generating additional fees and FFO. We illustrate this point with the following example. Example 5. Since the economic security of an oracle network with our incentive scheme is \(dn2 for stake \)dn, the economic security contributed by a dollar of stake is n and thus the average cost per dollar of economic security—i.e, amount of stake contributing to a dollar of economic security—is 1/n. Consider a network in which the economic incentives consist entirely of FFO, capped at \(d ≤\)10K per node. Suppose the network has n = 3 nodes. Then the average cost per dollar of economic security is about $0.33. Suppose that the total FFO of the network rises above \(30K (e.g., to \)31K). Given the cap on per-node FFO, the network grows to (at least) n = 4. Now the average cost per dollar of economic security drops to about $0.25. We illustrate the full virtuous cycle of economic security in oracle networks schematically in Fig. 18. We emphasize that the virtuous cycle of economic security derives from the effect of users pooling their fees. It is their collective FFO that works in favor of larger network sizes and thus greater collective security. We also note that the virtuous cycle of economic security works in favor of DONs achieving financial sustainability. Once created, DONs that address user needs should grow to and beyond the point at which revenue from fees exceed operational costs for oracle nodes.

Schematic of the virtuous cycle of Chainlink staking showing how user fees drive security and value capture

Figure 18: Schematic of the virtuous cycle of Chainlink staking. A rise in user fee payments to an oracle network 1⃝causes it to grow, leading to growth in its economic security 2⃝. This super-linear growth realizes economies of scale in Chainlink networks 3⃝. Specifically, it means a reduction in the average cost of economic security , i.e., the per-dollar economic security arising from fee payments or other sources of stake increases. Lower costs, passed along to users, stimulate increased demand for oracle services 4⃝. 9.9 Additional Factors Driving Network Growth As the Chainlink ecosystem continues to expand, we believe that its attractiveness to users and importance as infrastructure for the blockchain economy will accelerate. The value provided by oracle networks is super-linear, meaning that it grows faster

than the size of the networks themselves. This growth in value derives from both economies of scale—greater per-user cost efficiency as service volumes increase—and network effects—an increase of network utility as users adopt DONs more widely. As existing smart contracts continue to see more value secured and entirely new smart contract applications are made possible by more decentralized services, the total use of and aggregate fees paid to DONs should grow. Increasing pools of fees in turn translate into the means and incentive to create even more decentralized services, resulting in a virtuous cycle. This virtuous cycle solves a critical chicken-and-egg problem in the hybrid smart contract ecosystem: Innovative smart contract features often require decentralized services that don’t yet exist (e.g., new DeFi markets often require new data feeds) yet need sufficient economic demand to come into existence. The pooling of fees by various smart contracts for existing DONs will signal demand for additional decentralized services from a growing user base, giving rise to their creation by DONs and an ongoing enablement of new and varied hybrid smart contracts. In summary, we believe that the growth in network security driven by virtuous cycles in the Chainlink staking mechanism exemplifies larger patterns of growth that the Chainlink network can help bring about in an on-chain economy for decentralized services.

الاقتصاد والاقتصاد المشفر

لكي تتمكن شبكة Chainlink من تحقيق أمان قوي ضمن نموذج ثقة لامركزي، من الضروري أن تظهر العقد بشكل جماعي السلوك الصحيح، مما يعني أنها تلتزم في أغلب الأحيان بالضبط إلى بروتوكولات DON. في هذا القسم، نناقش الأساليب للمساعدة في فرض مثل هذا السلوك عن طريق الحوافز الاقتصادية، المعروفة أيضًا باسم الاقتصاد المشفر الحوافز. وتنقسم هذه الحوافز إلى فئتين: صريحة وضمنية، محققة على التوالي من خلال staking وفرصة الرسوم المستقبلية (FFO). التوقيع المساحي: يتضمن التخزين Chainlink، كما هو الحال في أنظمة blockchain الأخرى، المشاركين في الشبكة، أي oracle العقد، وإيداع الأموال المقفلة في شكل LINK tokens. هذه الأموال، والتي نشير إليها أيضًا باسم الحصة أو الحصة الصريحة هي حافز صريح. هم تخضع للمصادرة عند فشل العقدة أو المخالفات. في سياق blockchain، غالبًا ما يسمى هذا الإجراء بالقطع. ومع ذلك، فإن التوقيع المساحي بواسطة oracle العقد في Chainlink يختلف بشكل أساسي عن staking بواسطة validators في blockchains غير المسموح بها. يمكن أن يسيء المدققون التصرف عن طريق المراوغة أو طلب المعاملات بشكل عدائي. بروتوكول الإجماع الأساسي في أ 15 بما أنه يمكن للمستخدمين استبدال المعاملات في مجمع الذاكرة، يلزم الحذر لضمان المراسلات الصحيحة بين المعاملات المستخرجة والمعاملات المقدمة DON.ومع ذلك، فإن blockchain غير المسموح به يستخدم قواعد صارمة وسريعة للتحقق من صحة الكتلة وأساسيات التشفير لمنع validators من إنشاء كتل غير صالحة. في المقابل، لا يمكن للحماية البرمجية أن تمنع إنشاء شبكة oracle للغش تقارير غير صالحة. السبب هو الاختلاف الرئيسي بين نوعي النظام: التحقق من صحة المعاملة في blockchains هو خاصية الاتساق الداخلي، في حين أن الصحة من oracle التقارير على blockchain هي خاصية خارجية، أي بيانات خارج السلسلة. لقد قمنا بتصميم آلية staking الأولية لشبكة Chainlink القائمة على على بروتوكول تفاعلي بين العقد oracle التي قد تستفيد من البيانات الخارجية. هذا تخلق الآلية حوافز مالية للسلوك الصحيح باستخدام مكافآت صريحة و العقوبات (القطع). وبما أن الآلية اقتصادية، فهي مصممة لمنع العقدة الفساد من قبل خصم يستخدم الموارد المالية لإفساد العقد عن طريق رشوة. (مثل هذا الخصم عام جدًا، ويمتد، على سبيل المثال، إلى العقد المتعاونة معها استخراج القيمة من سوء سلوكهم الجماعي.) تتميز آلية Chainlink staking التي صممناها ببعض القوة والرواية الميزات.16 الميزة الرئيسية هي التأثير الخطي الفائق staking (على وجه التحديد، التربيعي). يجب أن يكون لدى الخصم موارد تزيد بشكل كبير عن الأموال المودعة في العقد من أجل تخريب الآلية. بالإضافة إلى ذلك، توفر آلية staking الخاصة بنا الحماية ضد خصم أقوى مما كان مذكورًا سابقًا في أنظمة مماثلة، وهي خصم يمكنه إنشاء رشاوى تتكيف مع سلوك العقد المستقبلي. بالإضافة إلى ذلك، نناقش كيف يمكن لأدوات Chainlink مثل DECO أن تساعد في تعزيز staking لدينا آلية من خلال تسهيل الفصل الصحيح في حالة سلوك العقدة الخاطئ. فرصة الرسوم المستقبلية (FFO): blockchains غير مسموح بها — لكل من إثبات العمل (PoW). وتنوع إثبات الحصة (PoS) – يعتمد اليوم بشكل حاسم على ما نسميه الحوافز الضمنية. هذه هي الحوافز الاقتصادية للسلوك الصادق التي لا تستمد من المكافآت الصريحة، ولكن من مشاركة المنصة نفسها. على سبيل المثال، يتم تحفيز مجتمع عمال المناجم Bitcoin ضد شن هجوم بنسبة 51% بسبب خطر تقويض الثقة في Bitcoin، مما يؤدي إلى خفض قيمتها، وبالتالي تآكل قيمة جمعيتها الاستثمارات الرأسمالية في البنية التحتية للتعدين [150]. تستفيد شبكة Chainlink من الحافز الضمني المماثل الذي نشير إليه كفرصة للرسوم المستقبلية (FFO). عقد Oracle ذات تاريخ أداء قوي أو السمعة تجذب الرسوم من المستخدمين. سوء التصرف من قبل عقدة oracle يعرض المستقبل للخطر دفع الرسوم وبالتالي معاقبة العقدة بتكلفة الفرصة البديلة من حيث الإمكانات الإيرادات المكتسبة من خلال المشاركة في الشبكة. قياسا على حصة صريحة، قد يُنظر إلى FFO على أنه شكل من أشكال الحصة الضمنية، أو حافز للسلوك الصادق مستمد من المنفعة المشتركة المتمثلة في الحفاظ على الثقة في المنصة التي تعمل عليها تعتمد أعمال مشغلي العقد، على سبيل المثال، على الأداء الإيجابي والسمعة الإيجابية للعقدة شبكة. هذا الحافز متأصل في شبكة Chainlink ولكن لم يتم التعبير عنه صراحةً البروتوكولات. وفي Bitcoin الحفاظ على قيمة عمليات التعدين كما ذكرنا أعلاه 16إن آلية staking التي نصفها هنا تهدف حاليًا فقط إلى فرض تسليم التقارير الصحيحة بواسطة شبكات oracle. ونتوقع في العمل المستقبلي توسيع نطاقه لضمان التنفيذ الصحيح للكثيرين سيتم توفير وظائف أخرى DONs.قد يُنظر إليها بالمثل على أنها شكل من أشكال الحصة الضمنية. نؤكد على أن FFO موجود بالفعل في Chainlink ويساعد في تأمين الشبكة اليوم. ستكون مساهمتنا الرئيسية في التطوير الإضافي لـ Chainlink هي اتباع نهج مبدئي مدفوع تجريبيًا لتقييم الحوافز الضمنية مثل FFO من خلال ما نسميه إطار الحوافز الضمنية (IIF). لتقدير الكميات مثل فرصة الرسوم المستقبلية للعقد، سوف يعتمد معهد التمويل الدولي بشكل مستمر على النطاق الشامل بيانات الأداء والدفع التي تم جمعها بواسطة شبكة Chainlink. مثل هذه التقديرات سيتم تمكين المعلمات المستندة إلى IIF لأنظمة staking التي تعكس حوافز العقدة بدقة أكبر من النماذج الإرشادية و/أو الثابتة الحالية. لتلخيص الحافزين الاقتصاديين الرئيسيين للعقدة oracle الصحيحة السلوك في شبكة Chainlink النامية سيكون: • التوقيع المساحي (الحصة المودعة) س الحافز الصريح • فرصة الرسوم المستقبلية (FFO) س الحافز الضمني وهذان الشكلان من الحوافز متكاملان. يمكن للعقد أوراكل في وقت واحد شارك في بروتوكول Chainlink staking، واستمتع بتدفق مستمر للإيرادات من المستخدمين، والاستفادة بشكل جماعي من سلوكهم الجيد المستمر. وبالتالي كلا الحوافز المساهمة في أمن الاقتصاد المشفر الذي توفره شبكة oracle. بالإضافة إلى ذلك، ويمكن تعزيز الحافزين و/أو تبادلهما ضد بعضهما البعض. على سبيل المثال، يمكن لمشغل oracle جديد بدون سجل أداء وتدفق إيرادات أن يشارك في كمية كبيرة من LINK كضمان للسلوك الصادق، وبالتالي جذب المستخدمين والرسوم. وعلى العكس من ذلك، فإن مشغل oracle الذي تم تأسيسه يتمتع بمشغل طويل وخالي من الأخطاء نسبيًا يمكن أن يتقاضى سجل الأداء رسومًا كبيرة من قاعدة مستخدمين كبيرة وبالتالي يعتمد عليه بشكل أكبر على FFO كشكل من أشكال الحوافز الضمنية. بشكل عام، يهدف النهج الذي ندرسه هنا إلى قدر معين من oracle-الشبكة مورد لإنشاء أكبر قدر ممكن من الحوافز الاقتصادية في Chainlink للعقلانية الوكلاء - أي العقد التي تزيد من فائدتهم المالية - إلى التصرف بأمانة. ضع آخر وبطريقة ما، فإن الهدف هو تعظيم الموارد المالية اللازمة لكي يقوم الخصم بالهجوم الشبكة بنجاح. من خلال صياغة بروتوكول staking بطريقة رياضية جيدة الأمن الاقتصادي المحدد وأيضا باستخدام معهد التمويل الدولي، ونحن نهدف إلى قياس قوة حوافز Chainlink بأكبر قدر ممكن من الدقة. المبدعين من الاعتماد على العقود سوف ثم تكون قادرًا على التحديد بثقة قوية ما إذا كانت شبكة oracle تجتمع أم لا المستويات المطلوبة من الأمن الاقتصادي المشفر. الدورة الحميدة للأمن الاقتصادي: إن الحوافز التي نناقشها في هذا القسم، staking وFFO، لها تأثير يتجاوز تعزيزها لأمن DONs. وهي تَعِد بتحفيز ما نسميه بالدورة الحميدة للأمن الاقتصادي. يؤدي التأثير الخطي الفائق staking (ووفورات الحجم الأخرى) إلى انخفاض التشغيل التكلفة مع نمو أمان DON. التكلفة المنخفضة تجذب المزيد من المستخدمين إلى DON،تعزيز مدفوعات الرسوم. ويستمر الارتفاع في مدفوعات الرسوم في تحفيز النمو في الشبكة، التي تديم الدورة الحميدة. ونحن نعتقد أن الدورة الحميدة للأمن الاقتصادي هي مجرد مثال واحد على ذلك وفورات الحجم وتأثير الشبكة من بين أشياء أخرى سنناقشها لاحقًا في هذا القسم. تنظيم القسم: يمثل التوقيع المساحي تحديات فنية ومفاهيمية ملحوظة والتي قمنا بتصميم آلية ذات ميزات جديدة. لذلك سيكون التوقيع المساحي تركيزنا الرئيسي في هذا القسم. نقدم نظرة عامة على نهج staking الذي نقدمه في هذه الورقة في القسم 9.1، تليها مناقشة مفصلة في الأقسام 9.2 إلى 9.5. نحن نقدم IFF في القسم 9.6. نقدم عرضًا ملخصًا لحوافز شبكة Chainlink في القسم 9.7. في القسم 9.8، نناقش الدورة الحميدة للأمن الاقتصادي التي يمكن أن يجلبها نهجنا staking المقترح إلى شبكات oracle. وأخيرًا، سنصف بإيجاز الإمكانات الأخرى التأثيرات الدافعة لنمو شبكة Chainlink في القسم 9.9. 9.1 نظرة عامة على التوقيع المساحي يتضمن تصميم آلية staking الذي نقدمه هنا، كما هو مذكور أعلاه، بروتوكولًا تفاعليًا بين العقد oracle مما يسمح بحل التناقضات في الإبلاغ عن البيانات الخارجية. يهدف التوقيع المساحي إلى ضمان السلوك الصادق من العقد oracle العقلانية. يمكننا بالتالي أن نصمم خصمًا يهاجم بروتوكول staking باعتباره الراشي: تتمثل استراتيجية الخصم في إفساد oracle العقد باستخدام الحوافز المالية. وقد يستمد الخصم موارد مالية بأثر رجعي من التلاعب الناجح مع تقرير oracle، على سبيل المثال، عرض مشاركة الأرباح الناتجة مع العقد التالفة. نحن نهدف في تصميم آلية staking إلى تحقيق هدفين طموحين في وقت واحد: 1. مقاومة خصم قوي: تم تصميم آلية staking للحماية oracle شبكات ضد فئة واسعة من الخصوم القادرين على القيام بعمليات معقدة، استراتيجيات الرشوة المشروطة، بما في ذلك الرشوة المحتملة، التي تقدم الرشاوى إلى oracle الذين يتم تحديد هوياتهم بعد وقوع الحدث (على سبيل المثال، يقدم رشاوى لـ oracles تم اختيارها عشوائيًا للتنبيه ذي الأولوية العالية). بينما تصميمات oracle أخرى وقد اعتبرت مجموعة ضيقة من الهجمات دون كامل القدرات الواقعية الخصم، على حد علمنا آلية الخصومة التي نقدمها هنا هو أول من تناول بشكل صريح مجموعة واسعة من استراتيجيات الرشوة والعروض المقاومة في هذا النموذج يفترض نموذجنا أن العقد بجانب المهاجم موجودة عقلاني اقتصاديًا (على عكس الصادق)، ونفترض وجود أ مصدر الحقيقة باهظ التكلفة للاستخدام النموذجي ولكنه متاح في حالة الخلاف (تتم مناقشته أدناه). 2. تحقيق تأثير خطي فائق staking: هدفنا هو التأكد من أن شبكة oracle المكونة من وكلاء عقلانيين تقدم التقارير بصدق حتى في وجود مهاجم بميزانية فائقة الخطيةفي إجمالي الحصة المودعة من قبل الشبكة بأكملها. في أنظمة staking الموجودة، إذا تبلغ قيمة كل عقدة n $d، ويمكن للمهاجم إصدار رشوة موثوقة تطلبها أن العقد تتصرف بطريقة غير شريفة مقابل دفع مبلغ يزيد قليلاً عن \(d to each node, using a total budget of about \)dn. وهذا بالفعل شريط مرتفع يجب أن يكون لدى المهاجم ميزانية سائلة بناءً على الودائع المجمعة جميع أصحاب المصلحة في الشبكة. وهدفنا هو تحقيق درجة أقوى من الأمن الاقتصادي من هذه العقبة الكبيرة بالفعل. نحن نهدف إلى تصميم أول نظام staking يمكنها تحقيق الأمان لمهاجم عام بميزانية خطية فائقة في n. في حين أن الاعتبارات العملية قد تحقق تأثيرًا أقل، كما نناقش أدناه، يحقق تصميمنا الأولي متطلبات ميزانية تنافسية أكبر من $dn2/2، أي تحجيم التربيعية في n، مما يجعل الرشوة غير عملية إلى حد كبير حتى عندما تشترك العقد بكميات معتدلة فقط. ويتطلب تحقيق هذين الهدفين مزيجاً مبتكراً من تصميم الحوافز والتشفير. الأفكار الرئيسية: يعتمد نهجنا staking على فكرة نطلق عليها أولوية المراقبة. تقرير تم إنشاؤه بواسطة شبكة Chainlink oracle وإرساله إلى عقد الاعتماد (على سبيل المثال، على سعر الأصل) يتم تجميعها من التقارير الفردية التي تساهم بها العقد المشاركة (على سبيل المثال، عن طريق أخذ المتوسط). عادةً ما تكون اتفاقية مستوى الخدمة (SLA) يحدد حدود الانحراف المقبولة للتقارير، أي إلى أي مدى يمكن أن يصل تقرير العقدة الانحراف عن التقرير الإجمالي وإلى أي مدى ينبغي السماح للتجميع بذلك تنحرف عن القيمة الحقيقية لاعتبارها صحيحة. في نظام staking الخاص بنا، بالنسبة لجولة تقارير معينة، يمكن لكل عقدة oracle أن تعمل كـ هيئة رقابية لتوجيه تنبيه إذا اعتقدت أن التقرير الإجمالي غير صحيح. في كل جولة إعداد التقارير، يتم تعيين أولوية عامة لكل عقدة oracle تحدد الترتيب الذي ستتم به معالجة تنبيهه (إن وجد). آليتنا تهدف إلى المكافأة التركيز، مما يعني أن الجهة الرقابية ذات الأولوية القصوى لرفع التنبيه تحصل على المكافأة الكاملة الناتجة عن مصادرة رواسب العقد المعيبة. تشتمل تصميمات نظامنا staking على مستويين: الأول، المستوى الافتراضي، والثاني، الطبقة الخلفية. الطبقة الأولى هي شبكة oracle نفسها، وهي مجموعة من العقد n. (من أجل البساطة، نحن نفترض أن n أمر فردي.) إذا أبلغت غالبية العقد عن قيم غير صحيحة، فستقوم هيئة رقابية في يتم تحفيز المستوى الأول بقوة لرفع مستوى التنبيه. إذا تم رفع تنبيه، الإبلاغ يتم بعد ذلك تصعيد القرار المتعلق بالشبكة إلى المستوى الثاني، وهو نظام عالي التكلفة وأقصى قدر من الموثوقية يمكن تحديده من قبل المستخدم في اتفاقية مستوى خدمة الشبكة. يمكن أن يكون هذا النظام، على سبيل المثال، يتكون فقط من العقد ذات القوة القوية درجات الموثوقية التاريخية، أو تلك التي لها ترتيب أكبر من oracles الطبقة الأولى. بالإضافة إلى ذلك، كما تمت مناقشته في القسم 9.4.3، يمكن أن يخدم DECO أو Town Crier كأدوات قوية للمساعدة في ضمان إصدار أحكام قضائية فعالة وحاسمة في المستوى الثاني. ومن أجل التبسيط، فإننا نفترض أن نظام المستوى الثاني هذا قد وصل إلى التقرير الصحيح قيمة. على الرغم من أنه قد يبدو جذابًا الاعتماد على المستوى الثاني لإنشاء كافة التقارير، إلا أنه تكمن فائدة تصميمنا في أنه يحقق باستمرار الخصائص الأمنية للشبكةنظام من المستوى الثاني مع دفع تكاليف التشغيل فقط، في الحالة النموذجية، لل نظام الطبقة الأولى. تؤدي أولوية الوكالة الدولية للطاقة إلى تأثير خطي فائق staking بالطريقة التالية: إذا كان تُخرج شبكة oracle من المستوى الأول نتيجة غير صحيحة وعددًا من عقد المراقبة تنبيه، فإن آلية الحوافز staking تكافئ هيئة المراقبة ذات الأولوية القصوى أكثر من $dn/2 مأخوذة من ودائع العقد (الأغلبية) التي تسيء التصرف. ال وبالتالي فإن المكافأة الإجمالية تتركز في أيدي هذه الوكالة الرقابية الواحدة، والتي بالتالي يحدد الحد الأدنى الذي يجب على الخصم أن يعد به هيئة رقابية محتملة تحفيزه على عدم التنبيه. نظرًا لأن آليتنا تضمن حصول كل oracle على فرصة للعمل كرقيب إذا قبلت هيئات المراقبة ذات الأولوية العليا رشاويهم (واختار عدم التنبيه)، لذلك يجب على الخصم أن يقدم رشوة بأكثر من $dn/2 إلى كل عقدة لمنع إثارة أي تنبيه. نظرًا لوجود n عقد، فإن تبلغ الميزانية المطلوبة للخصم من أجل الحصول على رشوة ناجحة ما يزيد عن 2/2 دولار أمريكي، وهو ما يعادل 2/2 دولار أمريكي هو تربيعي في عدد n من العقد في الشبكة. 9.2 الخلفية يعتمد نهجنا في staking على الأبحاث في مجالات نظرية اللعبة وآلياتها التصميم (MD) (للحصول على مرجع كتاب مدرسي، راجع [177]). نظرية اللعبة هي رياضيا دراسة رسمية للتفاعل الاستراتيجي. وفي هذا السياق، تعتبر اللعبة نموذجًا لذلك تفاعل، عادة ما يكون في العالم الحقيقي، يقنن مجموعات من الإجراءات المتاحة المشاركين في اللعبة، والمعروفين باللاعبين. تحدد اللعبة أيضًا المكاسب التي تم الحصول عليها من قبل اللاعبين الفرديين - المكافآت التي تعتمد على الإجراءات التي يختارها اللاعب و تصرفات اللاعبين الآخرين. ولعل أفضل مثال معروف للعبة تمت دراستها في اللعبة النظرية هي معضلة السجناء [178]. يهدف منظرو الألعاب عمومًا إلى الفهم التوازن أو التوازنات (إن وجدت) الممثلة في لعبة معينة. التوازن هو مجموعة من الاستراتيجيات (واحدة لكل لاعب) بحيث لا يستطيع أي لاعب الحصول على أعلى المكافأة عن طريق الانحراف من جانب واحد عن استراتيجيتها. وفي الوقت نفسه، فإن تصميم الآلية هو علم تصميم الحوافز بحيث يتم يتمتع توازن التفاعل (واللعبة المرتبطة به) ببعض الخصائص المرغوبة. يمكن النظر إلى MD على أنه عكس نظرية اللعبة: السؤال الأساسي في اللعبة النظرية هي: "في ضوء الحوافز والنموذج، ماذا سيكون التوازن؟" في دكتوراه في الطب، والسؤال هو بدلاً من ذلك: "ما هي الحوافز التي ستؤدي إلى لعبة ذات توازن مرغوب؟" الهدف النموذجي لمصمم الآلية هو إنشاء آلية "متوافقة مع الحوافز"، مما يعني أن المشاركين في الآلية (على سبيل المثال، مزاد أو معلومات أخرى) يتم تحفيز نظام الاستنباط [228]) للإبلاغ عن الحقيقة بشأن بعض الأمور (على سبيل المثال، كيف كثيرًا ما يقدرون عنصرًا معينًا). ربما يكون مزاد فيكري (السعر الثاني) هو أفضل آلية معروفة متوافقة مع الحوافز، حيث يقدم المشاركون عطاءات مختومة لعنصر ما، ويفوز أعلى مزايد بالعنصر ولكنه يدفع ثاني أعلى سعر [214]. اقتصاديات التشفير هي شكل خاص بالمجال من أشكال MD الذي يعزز التشفير تقنيات لخلق التوازنات المرغوبة داخل الأنظمة اللامركزية. تخلق الرشوة والتواطؤ تحديات كبيرة في جميع أنحاء مجال الطب. تتعطل جميع الآليات تقريبًا في ظل وجود التواطؤ، الذي يُعرف بأنه عقود جانبية.بين الأطراف المشاركة في الآلية [125، 130]. وتمثل الرشوة، حيث يقدم طرف خارجي حوافز جديدة إلى اللعبة، مشكلة أكثر صعوبة مما يفعله التواطؤ. يمكن النظر إلى التواطؤ على أنه حالة خاصة من الرشوة بين اللعبة المشاركين. غالبًا ما يمكن تصور أنظمة Blockchain على أنها ألعاب ذات عوائد نقدية (قائمة على العملات المشفرة). مثال بسيط هو تعدين إثبات العمل: يتمتع عمال المناجم بمساحة عمل حيث يمكنهم اختيار hashالمعدل الذي سيتم من خلاله تعدين الكتل. إن مكافأة التعدين هي مكافأة سلبية مضمونة (تكلفة الكهرباء والمعدات) بالإضافة إلى مؤشر ستوكاستيك مكافأة إيجابية (دعم التعدين) تعتمد على عدد عمال المناجم النشطين الآخرين [106، 172] ورسوم المعاملات. يعد التعهيد الجماعي oracles مثل SchellingCoin [68] مثالًا آخر: مساحة الإجراء هي مجموعة التقارير المحتملة التي قد يرسلها oracle، بينما الدفع هو المكافأة المحددة بواسطة آلية oracle، على سبيل المثال، قد يعتمد الدفع حول مدى قرب تقرير oracle من متوسط التقارير الأخرى [26، 68، 119، 185]. توفر ألعاب البلوكشين فرصًا ناضجة لهجمات التواطؤ والرشوة؛ في الواقع، يمكن لـ smart contracts تسهيل مثل هذه الهجمات [96، 165]. ولعل أشهرها هجوم الرشوة على التعهيد الجماعي oracles هو هجوم p-plus-epsilon [67]. هذا الهجوم ينشأ في سياق آلية شبيهة بـ SchellingCoin حيث يقدم اللاعبون تقارير ذات قيمة منطقية (أي كاذبة أو صحيحة) ويتم مكافأتهم بـ p إذا وافقوا على تقديم الأغلبية. في هجوم p-plus-epsilon، يعد المهاجم بمصداقية بما يلي: على سبيل المثال، ادفع للمستخدمين $p + ϵ مقابل التصويت الخاطئ إذا كان تقديم الأغلبية صحيحًا فقط. والنتيجة هي التوازن، حيث يتم تحفيز جميع اللاعبين على الإبلاغ عن الأخطاء بغض النظر عما يفعله اللاعبون الآخرون؛ وبالتالي يستطيع الراشي أن يحفز العقد من خلال رشوتها الموعودة للإبلاغ عن الكذب دون دفع الرشوة فعليًا (!). ومع ذلك، فإن استكشاف استراتيجيات الرشوة الأخرى في سياق oracles، وخاصة oracles التي لا يتم التعهيد الجماعي لها، اقتصر على خصومة ضعيفة إلى حد ما نماذج. على سبيل المثال، في إعداد إثبات العمل (PoW)، قام الباحثون بدراسة النتائج المشروطة الرشاوى، أي الرشاوى المدفوعة فقط إذا تمت مراقبة الرسالة المستهدفة بنجاح ولم يتم إخضاعها للرقابة تظهر في كتلة، بغض النظر عن تصرفات عامل التعدين الفردي [96، 165]. في هذه الحالة من oracles، ومع ذلك، بخلاف هجوم p-plus-epsilon، فنحن على علم فقط بالعمل في نموذج محدود للغاية من الرشوة حيث يرسل الراشي رشوة مشروطة ب تصرفات اللاعب الفردية، وليس على النتيجة الناتجة. نرسم هنا تصميمات لآليات استنباط المعلومات التي تظل حافزًا متوافق حتى في نموذج الخصم القوي، كما هو موضح في القسم الفرعي التالي. 9.3 افتراضات النمذجة في هذا القسم الفرعي، نوضح كيف نقوم بنمذجة سلوك وقدرات اللاعبين نظامنا، على وجه التحديد عقد المستوى الأول oracle، والعقد في المستوى الثاني (التحكيم) الطبقة، والأعداء.9.3.1 نموذج الحوافز من المستوى الأول: الجهات الفاعلة العقلانية تعتمد العديد من أنظمة blockchain للأمان على افتراض وجود عدد من الصدق العقد المشاركة. يتم تعريف العقد على أنها صادقة إذا اتبعت البروتوكول حتى عندما لا يكون من مصلحتهم المالية القيام بذلك. أنظمة إثبات العمل عادةً تتطلب أغلبية hash السلطة لتكون صادقة، وتتطلب أنظمة إثبات الملكية عادةً 2/3 أو أكثر من جميع الحصص المشاركة لتكون صادقة، وحتى أنظمة الطبقة الثانية مثل تتطلب Arbitrum [141] مشاركًا واحدًا صادقًا على الأقل. في نمذجة آلية staking، قمنا بوضع افتراض أضعف بكثير. (ليكون إن الافتراضات الواضحة والأضعف تعني خصائص أمنية أقوى وبالتالي فهي مفضلة.) نحن نفترض أن الخصم قد أفسد، أي الضوابط، بعض (الأقلية) جزء من عقد الطبقة الأولى oracle. نحن نصمم العقد المتبقية وليس كوكلاء صادقين، ولكن كمعظمات عقلانية متوقعة للمنفعة. تعمل هذه العقد بالكامل وفقًا لحوافز مالية ذاتية، وتختار الإجراءات التي تؤدي إلى مكاسب مالية متوقعة كسب. على سبيل المثال، إذا عُرضت على العقدة رشوة أكبر من المكافأة الناتجة عنها السلوك الصادق، فإنه سيقبل الرشوة. ملاحظة على العقد الخصومة: وفقا لنموذج الثقة المشترك ل الأنظمة اللامركزية، نفترض أن جميع العقد عقلانية، أي تسعى إلى تعظيمها صافي الإيرادات، بدلاً من السيطرة عليها من قبل خصم خبيث. مطالباتنا، ومع ذلك - التأثير الخطي الفائق أو التربيعي staking على وجه التحديد - يتم توفيره بشكل مقارب أن مجموعة العقد التي يتم التحكم فيها بشكل عدائي تكون على الأكثر (1/2 -c)n، بالنسبة للبعض إيجابية ثابت ج. 9.3.2 نموذج التحكيم من المستوى الثاني: الصحة بالافتراض تذكر أن إحدى الميزات المهمة لآلية staking التي تساعد في تحقيق الأمان ضد العقد العقلانية هو نظام الطبقة الثانية. في آلية staking المقترحة، فإن أي oracle قد يثير تنبيهًا يشير إلى ذلك تعتقد أن مخرجات الآلية غير صحيحة. يؤدي التنبيه إلى درجة عالية من الثقة تفعيل نظام المستوى الثاني والإبلاغ عن النتيجة الصحيحة. وبالتالي، النمذجة الرئيسية الشرط لنهجنا هو الحكم الصحيح، أي الإبلاغ الصحيح من قبل نظام الدرجة الثانية. يفترض نموذج staking الخاص بنا نظامًا من المستوى الثاني يعمل كمصدر للحقيقة غير قابل للفساد وموثوق به إلى أقصى حد. ومن المرجح أن يكون مثل هذا النظام مكلفًا وبطيئًا، وبالتالي غير مناسب للاستخدام في الحالة النموذجية. ولكن في حالة التوازن، أي متى إذا كان نظام المستوى الأول يعمل بشكل صحيح، فلن يتم استدعاء نظام المستوى الثاني. وبدلاً من ذلك، فإن وجوده يعزز أمان نظام oracle بالكامل من خلال توفير ملف مساندة عالية الضمان. إن استخدام طبقة تحكيم عالية الثقة وعالية التكلفة يشبه عملية الاستئناف في قلب معظم الأنظمة القضائية. كما أنه شائع بالفعل في تصميم oracle النظم، على سبيل المثال، [119، 185]. نحن نناقش بإيجاز طرق تحقيق المستوى الثاني في آليتنا في القسم 9.4.3.يستخدم بروتوكول staking الخاص بنا الفصل الصحيح المفترض لنظام المستوى الثاني كتهديد موثوق به لفرض الإبلاغ الصحيح بواسطة العقد oracle. البروتوكول يصادر جزءًا أو كلًا من حصة oracle العقد التي تولد التقارير المحددة بواسطة نظام الطبقة الثانية غير صحيح. وبالتالي يتم ردع عقد أوراكل عن سوء التصرف بالعقوبة المالية الناتجة. يشبه هذا الأسلوب في النكهة ما تم استخدامه في متفائل rollups، على سبيل المثال، [141، 10]. 9.3.3 نموذج عدائي تم تصميم آليتنا staking للحصول على معلومات صادقة مع تحقيق الأمان ضد فئة واسعة ومحددة جيدًا من الخصوم. ويحسن من الأعمال السابقة، والتي إما تتجاهل نموذجًا عدائيًا صريحًا أو تركز على فئات فرعية ضيقة من الخصوم، على سبيل المثال، خصم p-plus-epsilon الذي تمت مناقشته أعلاه. هدفنا هو تصميم staking آلية ذات أمان مثبت رسميًا ضد مجموعة كاملة من الخصوم المحتملين التي يجب مواجهتها في الممارسة العملية. نحن نمثل خصمنا على أنه يمتلك ميزانية ثابتة (قابلة للقياس)، يُشار إليها بـ $ ب. يمكن للخصم التواصل بشكل فردي وسري مع كل oracle في الشبكة، ويمكن أن يعرض سرًا على أي فرد oracle دفع رشوة مضمونة ويتوقف ذلك على النتائج العامة التي يمكن ملاحظتها للآلية. تحديد النتائج يمكن أن تشمل الرشاوى، على سبيل المثال، القيمة التي تم الإبلاغ عنها بواسطة oracle، وأي رسائل عامة يتم إرسالها بواسطة أي oracle إلى الآلية (على سبيل المثال، تنبيه)، والقيم التي تم الإبلاغ عنها من قبل الآخرين oracles، والقيمة الناتجة عن الآلية. لا توجد آلية يمكنها الحماية ضد مهاجم بقدرات غير محدودة. ولذلك فإننا نعتبر بعض السلوكيات غير واقعية أو خارجة عن النطاق. نحن نفترض مهاجمنا لا يمكنه كسر أساسيات التشفير القياسية، وكما هو مذكور أعلاه، لديه علامة ثابتة (if يحتمل أن تكون كبيرة) الميزانية $B. ونفترض كذلك أن الخصم لا يسيطر الاتصال في شبكة oracle، خاصة أنه لا يمكن تأخيره بشكل كبير حركة المرور بين عقد الطبقة الأولى و/أو عقد الطبقة الثانية. (إن قدرة الخصم على مراقبة مثل هذا التواصل تعتمد على الآلية المحددة، كما سنوضح أدناه). ولكن بشكل غير رسمي، كما ذكرنا أعلاه، نفترض أن الخصم يمكنه: (1) الفساد جزء من oracle العقد ((1/2 −c)- جزء لبعض الثابت c)، أي التحكم الكامل لهم، و(2) تقديم الرشاوى إلى أي عقد مرغوبة، مع ضمان الدفع المشروط على النتائج التي يحددها الخصم، كما هو موضح أعلاه. بينما لا نقدم نموذجًا رسميًا أو تصنيفًا كاملاً للخصم نطاق إمكانيات الرشوة في هذا المستند التقني، فيما يلي أمثلة على هذه الأنواع الرشاوى التي يشملها نموذجنا. للتبسيط، نفترض أن oracles يصدر قيمة منطقية التقارير التي تكون قيمتها الصحيحة (w.l.o.g) صحيحة، ويتم حساب النتيجة النهائية على أنها سيتم استخدام إجمالي هذه التقارير بواسطة smart contract المستهلك. الراشي الهدف هو أن تكون النتيجة النهائية غير صحيحة، أي كاذبة. • الرشوة غير المشروطة: يقدم مقدم الرشوة رشوة بقيمة $b لأي oracle يقدم تقريرًا كاذبًا. • مقدم الرشوة الاحتمالي: يقدم مقدم الرشوة رشوة $b مع بعض الاحتمالية q إلى أي oracle أن تقارير كاذبة.• رشوة مشروطة بنتيجة كاذبة: يقدم مقدم الرشوة رشوة $b لأي oracle يبلغ عن خطأ بشرط أن تكون النتيجة النهائية خاطئة. • مقدم رشوة مشروط بعدم التنبيه: يعرض مقدم الرشوة مبلغ $b على أي oracle يقوم بالإبلاغ كاذبة طالما لم يتم رفع أي تنبيه. • p-plus-epsilon Briber: يقدم مقدم الرشوة رشوة $b لأي oracle يبلغ عن خطأ باسم طالما أن غالبية oracles لم يبلغوا عن خطأ. • مقدم الرشوة المحتمل: يقدم مقدم الرشوة مبلغ $b مقدمًا لأي جهة تم تحديدها oracle لدور عشوائي وتقارير كاذبة. في بروتوكولنا staking المقترح، كل شيء تعمل العقد كهيئات رقابة محتملة، ونحن قادرون على إظهار هذا التوزيع العشوائي من أولويات الوكالة الرقابية لا تصلح للرشوة المحتملة. العديد من أعمال إثبات العمل، proof-of-stake، والأنظمة المرخصة عرضة للاحتمالات ولكن الرشوة مما يدل على أهمية أخذها في الاعتبار في خصومنا النموذج والتأكد من أن بروتوكولات staking لدينا مرنة تجاهه. انظر الملحق ه لمزيد من التفاصيل. 9.3.4 ما مقدار الأمن الاقتصادي المشفر الكافي؟ لن ينفق الخصم العقلاني الأموال لمهاجمة النظام إلا إذا كان بإمكانه الحصول على الربح أكبر من نفقاتها. وهكذا بالنسبة لنموذجنا العدائي والمقترح staking في هذه الآلية، قد يُنظر إلى $B على أنه مقياس للربح المحتمل الذي يمكن أن يحققه الخصم للاستخراج من الاعتماد على smart contracts عن طريق إتلاف شبكة oracle والتسبب في ذلك لإنشاء تقرير أو مجموعة تقارير غير صحيحة. في تحديد ما إذا كانت شبكة oracle توفر درجة كافية من الأمان الاقتصادي المشفر لأغراضها، كما ينبغي للمستخدم تقييم الشبكة من هذا المنظور. بالنسبة للخصوم المحتملين في الإعدادات العملية، نتوقع أن يكون $B بشكل عام أصغر بكثير من إجمالي الأصول في الاعتماد على smart contracts. في معظم الحالات، فإنه من غير الممكن للخصم أن ينتزع هذه الأصول في مجملها. 9.4 آلية التوقيع المساحي: رسم نقدم هنا الأفكار الرئيسية والهيكل العام لآلية staking التي نقوم بها تدرس حاليا. لسهولة العرض، وصفنا بسيطة ولكنها بطيئة (متعدد الجولة) البروتوكول في هذا القسم الفرعي. ومع ذلك، نلاحظ أن هذا المخطط تماما عملي. ونظرًا للضمانات الاقتصادية التي توفرها الآلية، أي المعاقبة والحوافز اللاحقة ضد العقد المعيبة، فقد يكون العديد من المستخدمين على استعداد لـ قبول التقارير بتفاؤل. بمعنى آخر، قد يقبل هؤلاء المستخدمون التقارير قبل ذلك حكم محتمل من الدرجة الثانية. يمكن للمستخدمين غير الراغبين في قبول التقارير بتفاؤل أن يختاروا الانتظار حتى البروتوكول وينتهي التنفيذ، أي حتى يحدث أي تصعيد محتمل إلى المستوى الثاني. هذا، ومع ذلك، يمكن أن يؤدي ذلك إلى إبطاء وقت تأكيد التقارير بشكل كبير. لذلك نحن باختصارالشكل 15: رسم تخطيطي لنظام staking مع التنبيه. في هذا المثال، 1⃝أغلبية من العقد تالفة/مرشوشة وتصدر قيمة غير صحيحة ˜r، بدلاً من القيمة الصحيحة قيمة التقرير ص. تقوم عقدة المراقبة 2⃝ بإرسال تنبيه إلى لجنة المستوى الثاني، الذي يحدد ويصدر قيمة التقرير الصحيحة r، مما يؤدي إلى تلف العقد مصادرة ودائعهم — كل $d إلى عقدة المراقبة 4⃝. حدد بعض التحسينات التي تؤدي إلى سرعة (جولة واحدة) إذا كانت أكثر إلى حد ما التصميم المعقد في القسم 9.5. تذكر أن الطبقة الأولى في آليتنا staking تتكون من oracle الأساسية الشبكة نفسها. الهيكل الرئيسي لآليتنا، كما هو موضح أعلاه، هو أنه في كل جولة، يمكن لكل عقدة أن تعمل بمثابة "المراقبة" مع بعض الأولوية، وبالتالي لديها القدرة على القيام بذلك قم بإطلاق تنبيه إذا وصلت الآلية إلى مخرج غير صحيح، بدلاً من الصحيح ص واحد. يؤدي هذا التنبيه إلى دقة المستوى الثاني، والتي نفترض أنها تصل إلى الحل الصحيح تقرير. تتم معاقبة العقد التي تحتوي على تقارير غير صحيحة، بمعنى أن مخاطرها قطعت ومنحتها لهيئات المراقبة. هذه البنية الأساسية شائعة في أنظمة oracle، كما في مثلا [119، 185]. الابتكار الرئيسي في تصميمنا، المذكور بإيجاز أعلاه، هو أن كل عقدة أعطيت أولوية مميزة في ترتيب هيئات المراقبة المحتملة. وهذا هو، المراقبين يتم منح فرص للتنبيه في تسلسل الأولوية. تذكر أنه إذا كانت العقدة تحتوي على الأولوية القصوى لرفع التنبيه، فإنه يتلقى الوديعة المقطوعة $d لكل سوء تصرف العقدة، بإجمالي أكثر من \(dn/2 = \)d × n/2، حيث يشير التقرير غير الصحيح إلى غالبية العقد السيئة. وبالتالي، يجب على الخصم أن يدفع هذه المكافأة على الأقل رشوة عقدة تعسفية. وبالتالي، لرشوة غالبية العقد، يجب على الخصم أن يدفع أ رشوة كبيرة لغالبية العقد، أي أكثر من $dn2/2. نعرض بشكل تخطيطي كيفية عمل التنبيه وتصعيد المراقبة في الشكل 15.9.4.1 مزيد من تفاصيل الآلية إن نظام مقاومة الرشوة الذي نصفه الآن بمزيد من التفصيل هو رسم مبسط لـ البناء ذو المستويين الذي نعتزم بناءه. سيكون معظم تركيزنا على الوصف شبكة المستوى الأول (من الآن فصاعدا ببساطة "الشبكة" حيث يكون ذلك واضحا من السياق) جنبا إلى جنب مع آلية الحوافز وإجراءات التصعيد إلى المستوى الثاني. خذ بعين الاعتبار شبكة Chainlink مكونة من عدد oracle من العقد المسؤولة عن يتم الإبلاغ بانتظام (على سبيل المثال، مرة واحدة في الدقيقة) عن قيمة منطقية (على سبيل المثال، ما إذا كان السوق القيمة السوقية لـ BTC تتجاوز قيمة ETH). كجزء من آلية staking، العقد يجب تقديم وديعتين: وديعة $d قابلة للقطع في حالة الخلاف مع إيداع الأغلبية والمراقبة $dw الخاضع للتخفيض في حالة حدوث خلل التصعيد. نحن نفترض أن العقد لا يمكنها نسخ إرسالات العقد الأخرى، على سبيل المثال، من خلال مخطط الالتزام والكشف كما تمت مناقشته في القسم 5.3. في كل جولة، العقد أولاً الالتزام بتقريرهم، وبمجرد التزام جميع العقد (أو انتهاء المهلة)، العقد تكشف تقاريرها. بالنسبة لكل تقرير يتم إنشاؤه، يتم منح كل عقدة أيضًا أولوية مراقبة بين 1 وn يتم اختيارها عشوائيًا، مع كون 1 أولوية قصوى. هذه الأولوية تمكن تركيز المكافأة في يد جهة رقابية واحدة. بعد أن أصبحت جميع التقارير علنية، وتتبع ذلك مرحلة تنبيه. على مدى سلسلة من جولات n (متزامنة)، العقدة مع الأولوية لدي الفرصة للتنبيه في الجولة الأولى. دعونا نفكر في النتائج المحتملة للآلية بعد الكشف عن العقد تقاريرهم. مرة أخرى بافتراض وجود تقرير ثنائي، لنفترض أن القيمة الصحيحة صحيحة و الخطأ هو كاذب. لنفترض أيضًا أن آلية المستوى الأول تقوم بإخراج إخراج قيمة الأغلبية بواسطة العقد كالتقرير النهائي r. هناك ثلاث نتائج محتملة في الآلية: • اتفاق كامل: في أفضل الأحوال، تكون العقد في اتفاق كامل: جميع العقد متوفرة وقدمت تقريرًا في الوقت المناسب بنفس القيمة r (إما صحيحًا أو كاذبة). في هذه الحالة، تحتاج الشبكة فقط إلى إعادة توجيه العقود المعتمدة ومكافأة كل عقدة بدفعة ثابتة لكل جولة $p، وهي أصغر بكثير من $د. • اتفاق جزئي: من الممكن أن تكون بعض العقد غير متصلة بالإنترنت أو أن هناك خلافًا حول القيمة الصحيحة، ولكن معظم العقد تفيد بأنها صحيحة وفقط تقارير الأقلية كاذبة. هذه الحالة واضحة أيضًا. قيمة الأغلبية (صحيح) يتم حسابها، مما يؤدي إلى تقرير صحيح ص. جميع العقد التي ذكرت r هي تمت مكافأتهم بـ $p بينما oracles الذين أبلغوا بشكل غير صحيح لديهم ودائعهم تم تخفيضها بشكل متواضع، على سبيل المثال، بمقدار 10 بنس. • تنبيه: في حالة اعتقاد جهة المراقبة أن مخرجات الشبكة غير صحيحة، فهو يطلق تنبيهًا علنيًا، مما يؤدي إلى تصعيد الآلية إلى شبكة المستوى الثاني. ثم هناك نتيجتان محتملتان: - التنبيه الصحيح: إذا أكدت شبكة المستوى الثاني أن إخراجالشكل 16: تضخيم تكلفة الرشوة من خلال مكافآت التنبيه المركزة. رشوة يجب على الخصم رشوة كل عقدة بأكثر من المكافأة التي يمكنها الحصول عليها من خلال التنبيه (يظهر كشريط أحمر). إذا تمت مشاركة مكافآت التنبيه، فقد تكون هذه المكافأة نسبيًا صغير. تعمل مكافآت التنبيه المركزة على زيادة المكافأة التي قد تحصل عليها أي عقدة واحدة الحصول على (شريط أحمر طويل القامة). ومن ثم فإن المبلغ الإجمالي الذي يدفعه الخصم مقابل رشوة قابلة للتطبيق (المناطق الرمادية) أكبر بكثير وتحتوي على مكافآت تنبيه مركزة أكثر من المشتركة. كانت شبكة المستوى الأول غير صحيحة، وتتلقى عقدة المراقبة التنبيهية مكافأة تتكون من جميع الودائع المقطوعة، وبالتالي أكثر من $dn/2. – تنبيه خاطئ: إذا وافق المستوى الثاني والمستوى الأول oracles، فسيتم التصعيد تعتبر معيبة وتفقد عقدة التنبيه إيداعها $dw. في حالة القبول المتفائل للتقارير، لا تسبب تنبيهات المراقبة أي تغيير في تنفيذ عقود الاعتماد. للعقود المصممة للانتظار التحكيم المحتمل من قبل لجنة المستوى الثاني، تنبيهات الوكالة الرقابية تأخير ولكن لا تجميد تنفيذ العقد. من الممكن أيضًا أن تحدد العقود أ تجاوز الفشل DON لفترات الفصل في الأحكام. 9.4.2 تأثير التوقيع المساحي التربيعي قدرة كل عقدة على العمل كجهة رقابية، بالإضافة إلى أولوية العقدة الصارمة ضمان المكافآت المركزة، يمكّن الآلية من تحقيق المعادلة التربيعية staking تأثير كل نوع من مهاجمي الرشوة الموصوفين في القسم 9.3.3. أذكر أن هذا يعني على وجه التحديد في إعدادنا أنه بالنسبة لشبكة تحتوي على عدد n من العقد لكل منها إيداع $d، يجب أن يكون لدى الراشي الناجح (من أي من الأنواع المذكورة أعلاه) ميزانية أكبر من $dn2/2. على وجه الدقة، يجب على الراشي أن يفسد ما لا يقل عن (n+1)/2 عقدة، حيث يجب على الراشي أن يفسد إفساد غالبية العقد n (بالنسبة إلى n الفردية، حسب الافتراض). وهكذا تقف جهة المراقبة احصل على مكافأة قدرها $d(n + 1)/2. وبالتالي يجب على الراشي أن يدفع هذا المبلغ لكل شخصعقدة للتأكد من أن لا أحد يعمل كرقيب. نحن نعمل على إظهار ذلك رسميًا إذا يمتلك مقدم الرشوة ميزانية قدرها $d(n2 + n)/2 على الأكثر، ومن ثم تحقق التوازن المثالي للعبة الفرعية للعبة بين المرتشيين وoracle، وبعبارة أخرى، التوازن عند أي نقطة أثناء ممارسة اللعبة — هي ألا يقوم الراشي بإصدار الرشوة و كل oracle للإبلاغ عن قيمه الحقيقية بأمانة. لقد أوضحنا أعلاه كيف أنه من الممكن أن يطلب الراشي الناجح الحصول على الميزانية أكبر بكثير من مجموع ودائع العقدة. لتوضيح هذا نتيجة بديهية، يوضح الشكل 16 تأثير مكافآت التنبيه المركزة بيانياً. كما نرى هناك، إذا كانت مكافأة الوكالة الرقابية على التنبيه — وهي ودائع الرشوة العقد التي أبلغت عن خطأ) - تم تقسيمها بين جميع التنبيهات المحتملة، المبلغ الإجمالي لذلك أي عقدة تنبيه فردية يمكن أن تتوقعها ستكون صغيرة نسبيًا، حسب ترتيب $د. يمكن أن يستخدمه الراشي، وهو يعلم أن دفع تعويضات أكبر من $d أمر غير محتمل رشوة مشروطة ذات نتيجة كاذبة لرشوة كل من العقد n بأكثر قليلاً من $ د + ϵ. وعلى عكس ما هو متوقع، يوضح الشكل 16 أن النظام يقوم بتوزيع المكافأة على نطاق واسع بين العقد التي تشير إلى التنبيه أضعف بكثير من تلك التي تركز المكافأة فيها أيدي رقيب واحد. معلمات المثال: خذ بعين الاعتبار شبكة (من المستوى الأول) تحتوي كل منها على عدد = 100 عقدة إيداع \(d = \)20K. سيكون لهذه الشبكة ما مجموعه 2 مليون دولار مودعة ولكنها ستفعل ذلك كن محميًا ضد الراشي بميزانية \(100M = \)dn2/2. زيادة عدد oracles أكثر فعالية من زيادة $d، بالطبع، ويمكن أن يكون لها تأثير كبير: سيتم حماية الشبكة التي تحتوي على n = 300 عقدة وودائع \(d = \)20K ضد رشوة بميزانية تصل إلى 900 مليون دولار. لاحظ أن نظام staking يمكنه في كثير من الحالات حماية smart contracts التي تمثل قيمة أكبر من المستوى المعروض للحماية من الرشوة. وذلك لأن الخصم فمهاجمة هذه العقود لا يمكنها انتزاع القيمة الكاملة في كثير من الحالات. على سبيل المثال، أ Chainlink قد يتطلب العقد المدعوم بقيمة 1 مليار دولار ضمانًا فقط مقابل أ رشوة بموارد تبلغ 100 مليون دولار لأن مثل هذا الخصم يمكنه استخلاص الربح بشكل عملي 10% فقط من قيمة العقد. ملحوظة: يتم التعبير عن فكرة أن قيمة الشبكة يمكن أن تنمو بشكل تربيعي قانون ميتكالف المعروف [167، 235]، والذي ينص على أن قيمة الشبكة ينمو بشكل تربيعي في عدد الكيانات المتصلة. لكن قانون ميتكالف تنشأ من النمو في عدد اتصالات الشبكة الزوجية المحتملة، وهي ظاهرة مختلفة عن التأثير التربيعي الأساسي staking في حافزنا آلية. 9.4.3 تحقيق الطبقة الثانية هناك ميزتان تشغيليتان تسهلان تحقيق مستوى ثانٍ عالي الموثوقية: (1) يجب أن يكون التحكيم من المستوى الثاني حدثًا نادرًا في شبكات oracle وبالتالي يمكن ذلك تكون أكثر تكلفة بكثير من التشغيل العادي للطبقة الأولى و(2) بافتراضالتقارير المقبولة بتفاؤل – أو العقود التي يمكن أن ينتظر تنفيذها التحكيم – لا يلزم تنفيذ المستوى الثاني في الوقت الفعلي. هذه الميزات تؤدي إلى مجموعة من خيارات التكوين للطبقة الثانية لتلبية متطلبات DONs معينة. وكمثال على ذلك، يمكن أن تتكون لجنة المستوى الثاني من العقد التي يختارها أ DON (أي الطبقة الأولى) من العقد الأطول خدمة والأكثر موثوقية في Chainlink شبكة. بالإضافة إلى الخبرة التشغيلية الكبيرة ذات الصلة، فإن المشغلين من هذه العقد لديها حافز ضمني كبير في FFO الذي يحفز الرغبة للتأكد من أن شبكة Chainlink تظل موثوقة للغاية. لديهم أيضا علنا سجلات الأداء المتاحة التي توفر الشفافية في موثوقيتها. تجدر الإشارة إلى أن عقد المستوى الثاني لا تحتاج إلى أن تكون مشاركين في شبكة المستوى الأول، و قد يفصل في الأخطاء عبر شبكات متعددة من الدرجة الأولى. يمكن للعقد الموجودة في DON أن تحدد مسبقًا وتلتزم علنًا بمجموعة من هذه العناصر العقد باعتبارها تشكل لجنة المستوى الثاني لذلك DON. بالإضافة إلى ذلك، DON تنشر العقد المعلمة k ′ ≥n ′ التي تحدد عدد أصوات الطبقة الثانية مطلوب لمعاقبة عقدة من الدرجة الأولى. عندما يتم إنشاء تنبيه لتقرير معين، يصوت أعضاء الطبقة الثانية على صحة القيم المقدمة من كل منهم من عقد الطبقة الأولى. أي عقدة من الدرجة الأولى تحصل على أصوات سلبية k′ ستفقد حقها الودائع إلى عقدة المراقبة. بسبب ندرة إصدار الأحكام وفرصة التنفيذ لمدة طويلة المذكورة أعلاه، وعلى النقيض من الطبقة الأولى، يمكن للعقد في الطبقة الثانية: 1. أن يحصل على أجر كبير مقابل إجراء التحكيم. 2. اعتمد على مصادر بيانات إضافية، تتجاوز حتى المجموعة المتنوعة التي يستخدمها المستوى الأول. 3. الاعتماد على التفتيش والتدخل اليدوي و/أو الخبراء، على سبيل المثال، لتحديد و التوفيق بين الأخطاء في بيانات المصدر والتمييز بين ترحيل العقدة الصادق بيانات خاطئة وعقدة تتصرف بشكل غير صحيح. نؤكد على أن النهج الذي وصفناه للتو لاختيار العقد من الدرجة الثانية والفصل في السياسات التي تحكم السياسة لا يمثل سوى نقطة ضمن نطاق كبير مساحة التصميم للإنجازات المحتملة للطبقة الثانية. تقدم آلية الحوافز لدينا المرونة الكاملة فيما يتعلق بكيفية تحقيق المستوى الثاني. يمكن للأفراد DONs القيام بذلك تشكل وتضع قواعد للمستويات الثانية التي تلبي المتطلبات الخاصة وتوقعات العقد والمستخدمين المشاركين. DECO وTown Crier كأدوات تحكيمية: إنه ضروري للطبقة الثانية في آليتنا لنكون قادرين على التمييز بين عقد الطبقة الأولى المتعارضة إنتاج تقارير غير صحيحة عن عمد وعقد من الدرجة الأولى صادقة عن غير قصد ترحيل البيانات غير الصحيحة في المصدر. عندها فقط يمكن تنفيذ المستوى الثاني القطع لتثبيط الغش، هو هدف آليتنا. ديكو وتاون كريير هي أدوات قوية يمكنها تمكين العقد من المستوى الثاني من تحقيق هذا التمييز الحاسم بشكل موثوق.قد تتمكن عقد الطبقة الثانية في بعض الحالات من الاستعلام مباشرة عن مصدر البيانات المستخدم بواسطة عقدة من الدرجة الأولى أو استخدم قسم ADO 7.1 للتحقق مما إذا كان التقرير غير صحيح نتجت عن مصدر بيانات خاطئ. ومع ذلك، في حالات أخرى، قد لا توجد عقد من المستوى الثاني الوصول المباشر إلى مصدر بيانات عقدة الطبقة الأولى. وفي مثل هذه الحالات يكون الحكم الصحيح تبدو غير ممكنة أو تتطلب الاعتماد على حكم شخصي. السابق oracle وقد اعتمدت أنظمة حل النزاعات على جولات تصويت متصاعدة وغير فعالة لمعالجة هذه المشكلة التحديات. ومع ذلك، باستخدام DECO أو Town Crier، يمكن لعقدة المستوى الأول أن تثبت السلوك الصحيح إلى عقد الطبقة الثانية. (انظر القسم 3.6.2 للحصول على تفاصيل حول النظامين.) على وجه التحديد، إذا تحدد عقدة المستوى الثاني عقدة المستوى الأول على أنها قامت بإخراج قيمة تقرير خاطئة ˜r، يمكن لعقدة المستوى الأول استخدام DECO أو Town Crier لإنشاء دليل مضاد للتلاعب عقد الطبقة الثانية التي تقوم بنقلها بشكل صحيح من مصدر (ممكّن لـ TLS). معترف بها على أنها موثوقة بواسطة DON. والأهم من ذلك أن عقدة المستوى الأول يمكنها القيام بذلك دون عقد من المستوى الثاني تتطلب الوصول المباشر إلى مصدر البيانات.17 وبالتالي، من الممكن إصدار قرار صحيح في Chainlink لأي مصدر بيانات مرغوب فيه. 9.4.4 الإبلاغ الخاطئ عن التأمين إن المقاومة القوية للرشوة التي حققتها آلية staking تعتمد بشكل أساسي على الأموال المقطوعة الممنوحة للمنبهين. وبدون مكافأة مالية، فإن التنبيهات سوف تفعل ذلك ليس لديهم حافز مباشر لرفض الرشاوى. ونتيجة لذلك، فإن الأموال المقطوعة ليست كذلك متاحة لتعويض المستخدمين المتضررين من التقارير غير الصحيحة، على سبيل المثال، المستخدمين الذين يخسرون أموالاً عندما يتم ترحيل بيانات السعر غير الصحيحة إلى smart contract. من المفترض أن التقارير غير الصحيحة لا تشكل مشكلة إذا تم قبول التقارير من قبل أ العقد فقط بعد صدور حكم محتمل، أي الإجراء الذي يتخذه المستوى الثاني. كما هو موضح أعلاه، على الرغم من ذلك، لتحقيق أفضل أداء ممكن، قد تعتمد العقود بدلاً من ذلك متفائلون بآلية فرض الإبلاغ الصحيح، أي أنهم يقبلون التقارير قبل الفصل المحتمل من الدرجة الثانية. في الواقع، مثل هذا السلوك المتفائل هو آمن في نموذجنا بافتراض وجود خصوم عقلانيين لا تتجاوز ميزانياتهم staking تأثير الآلية. المستخدمون يشعرون بالقلق إزاء الحدث غير المحتمل لفشل الآلية الناتج عن، على سبيل المثال، قد يرغب الخصوم الذين لديهم موارد مالية هائلة في استخدام طبقة إضافية من الأمن الاقتصادي في شكل الإبلاغ الخاطئ عن التأمين. نحن نعرف وتعتزم العديد من شركات التأمين بالفعل تقديم وثائق تأمين مدعومة بعقود ذكية من هذا النوع لـ Chainlink-البروتوكولات الآمنة في المستقبل القريب، بما في ذلك من خلال آليات مبتكرة مثل DAOs، على سبيل المثال، [7]. وجود سجل الأداء لـ Chainlink توفر العقد والبيانات الأخرى حول العقد، مثل مبالغ حصصها، أساسًا قويًا بشكل استثنائي للتقييمات الاكتوارية للمخاطر، مما يجعل من الممكن سياسات التسعير بطرق غير مكلفة لحاملي وثائق التأمين ولكنها مستدامة بالنسبة لشركات التأمين. 17 باستخدام Town Crier، من الممكن أيضًا لعقد المستوى الأول إنشاء الشهادات محليًا من صحة التقارير التي يصدرونها ويقدمون هذه الشهادات إلى العقد من المستوى الثاني على أساس حسب الحاجة.يمكن تنفيذ الأشكال الأساسية لتأمين الإبلاغ الخاطئ بطريقة جديرة بالثقة بطريقة فعالة باستخدام smart contracts. كمثال بسيط، التأمين البارامترى يمكن لعقود SCins تعويض حاملي وثائق التأمين تلقائيًا إذا كانت آلية الحوافز لدينا يحدد المستوى الثاني خطأً في التقرير الذي تم إنشاؤه في المستوى الأول. المستخدم U الذي يرغب في شراء بوليصة تأمين، على سبيل المثال، منشئ الهدف يمكن للعقد SC، تقديم طلب إلى شركة تأمين لامركزية للحصول على مبلغ السياسة مليون دولار على العقد. عند الموافقة على U، يمكن لشركة التأمين تعيين مبلغ مستمر (على سبيل المثال، شهري) علاوة $P في SCins. بينما تدفع U القسط، تظل سياستها نشطة. في حالة حدوث فشل في الإبلاغ في SC، ستكون النتيجة انبعاث زوج (r1، r2) التقارير المتضاربة لـ SC، حيث يتم توقيع r1 بواسطة المستوى الأول في آليتنا و r2، التقرير المصحح المقابل، موقع من قبل الطبقة الثانية. إذا قدمت U مثل هذا الزوج الصالح (r1، r2) إلى SCins، يدفع لها العقد تلقائيًا مليون دولار، بشرط مدفوعات أقساطها محدثة. 9.5 البديل جولة واحدة يتطلب البروتوكول الموصوف في القسم الفرعي السابق أن تنتظر لجنة المستوى الثاني عددًا من الجولات لتحديد ما إذا كانت هيئة المراقبة قد أطلقت تنبيهًا أم لا. هذا ويظل هذا المتطلب قائمًا حتى في الحالة المتفائلة، أي عندما يعمل المستوى الأول بشكل صحيح. للمستخدمين غير الراغبين في قبول التقارير بتفاؤل، أي قبل الإمكانات الحكم، فإن التأخير المرتبط بهذا النهج سيكون غير عملي. ولهذا السبب، فإننا نستكشف أيضًا بروتوكولات بديلة تتطلب بروتوكولًا واحدًا فقط جولة. في هذا الأسلوب، ترسل كافة العقد oracle بتات سرية تشير إلى ما إذا كان سيتم ذلك أم لا يرغبون في رفع مستوى التنبيه. ثم تقوم لجنة المستوى الثاني بالتحقق من هذه القيم ترتيب الأولوية. لتقديم رسم تقريبي، قد يتضمن هذا المخطط ما يلي الخطوات: 1. تقديم بتات الوكالة الدولية للطاقة: تشترك كل عقدة سرية في Oi في قيمة مراقبة مكونة من بتة واحدة wi ∈{no تنبيه، تنبيه} بين العقد في المستوى الثاني لكل تقرير ينشئه. 2. نصائح مجهولة المصدر: يمكن لأي عقدة oracle تقديم نصيحة مجهولة المصدر α إلى لجنة المستوى الثاني في نفس الجولة التي يتم فيها تقديم بتات المراقبة. هذه النصيحة α هي رسالة تشير إلى أنه قد تم رفع تنبيه للتقرير الحالي. 3. فحص بتات الوكالة الدولية للطاقة: تكشف لجنة المستوى الثاني عن هيئة مراقبة العقد oracle البتات حسب الأولوية. لاحظ أن العقد يجب ألا ترسل أي بتات رقابية للتنبيه عندما لا تنبه: وإلا فإن تحليل حركة المرور يكشف عن بتات جميع العقد. يكشف البروتوكول عن حالة عدم التنبيه بتات الوكالة الرقابية للعقد ذات أولوية أعلى من الوكالة الرقابية للتنبيه ذات الأولوية القصوى. لاحظ أن ما تم الكشف عنه مطابق لما ورد في بروتوكول n-round الخاص بنا. يتم أيضًا توزيع المكافآت بشكل مماثل لهذا المخطط، أي أول جهة رقابية يتم تحديدها يتلقى الودائع المقطوعة للعقد التي قدمت تقارير غير صحيحة.إن استخدام النصائح مجهولة المصدر يمكّن لجنة المستوى الثاني من البقاء غير تفاعلية في الحالات التي لم يتم فيها رفع أي تنبيه، مما يقلل من تعقيد الاتصال في الحالة المشتركة. لاحظ أن أي جهة رقابية ترفع تنبيهًا لديها حافز اقتصادي لتقديم نصيحة مجهولة المصدر: إذا لم يتم تقديم أي نصيحة، فلن يتم دفع أي مكافأة لأي شخص عقدة. للتأكد من أنه لا يمكن التعرف على المرسل Oi للطرف المجهول α بواسطة الخصم بناءً على بيانات الشبكة، يمكن إرسال معلومات مجهولة المصدر عبر مجهول القناة، على سبيل المثال، عبر Tor، أو، بشكل أكثر عملية، وكيل عبر مزود خدمة سحابية. ل مصادقة الطرف على أنه نشأ بـ O، يمكن لـ Oi التوقيع على α باستخدام التوقيع الدائري [39، 192]. وبدلاً من ذلك، لمنع هجمات رفض الخدمة غير المنسوبة ضد لجنة المستوى الثاني بواسطة عقدة oracle ضارة، يمكن أن تكون α بيانات اعتماد مجهولة مع عدم الكشف عن هويته القابلة للإلغاء [73]. ورغم أن هذا البروتوكول قابل للتحقيق عمليا، إلا أنه يتمتع بهندسة ثقيلة الوزن إلى حد ما المتطلبات (التي نستكشف طرقًا لتقليلها). العقد من الدرجة الأولى، على سبيل المثال، يجب أن تتواصل مباشرة مع عقد المستوى الثاني، مما يتطلب صيانة الدليل. تضيف الحاجة إلى قنوات مجهولة وتوقيعات حلقية إلى الهندسة تعقيد المخطط. وأخيرًا، هناك متطلب ثقة خاص تمت مناقشته بإيجاز في المذكرة أدناه. ولذلك فإننا نستكشف أيضًا مخططات أبسط لا تزال تحقق النجاح تأثير خطي فائق staking، ولكن ربما أقل من تأثير تربيعي، حيث يحتاج مقدم الرشوة بشكل غير مقارب إلى موارد لا تقل عن $n log n، على سبيل المثال. بعض المخططات تحت يتضمن الاعتبار اختيارًا عشوائيًا لمجموعة فرعية صارمة من العقد لتكون بمثابة هيئات رقابة، وفي هذه الحالة تصبح الرشوة المحتملة هجومًا قويًا بشكل خاص. ملاحظة: يتطلب أمان آلية staking ذات الجولة الواحدة عدم إمكانية استغلالها القنوات بين oracle وعقد المستوى الثاني - وهو مطلب قياسي في الأنظمة المقاومة للإكراه، على سبيل المثال، التصويت [82، 138]، وهو مطلب معقول في الممارسة العملية. بالإضافة إلى ذلك، يمكن إنشاء عقدة Oi التي تسعى إلى التعاون مع الراشي أسهمها السرية بطريقة تُظهر للرشوة أنها قامت بتشفير شيء معين قيمة. على سبيل المثال، إذا كان Oi لا يعرف العقد التي يتحكم فيها الرشاوي، فيمكن لـ Oi ذلك تقديم أسهم بقيمة 0 إلى جميع أعضاء اللجنة. يمكن للرشاوي بعد ذلك التحقق من Oi الامتثال احتماليا. ولتجنب هذه المشكلة في أي بروتوكول أحادي الجولة، فإننا تتطلب أن تعرف Oi هوية عقدة واحدة صادقة من الدرجة الثانية على الأقل. باستخدام بروتوكول تفاعلي تضيف فيه كل عقدة من المستوى الثاني توزيعًا عشوائيًا عامل الأسهم، أفضل ما يمكن أن يفعله مقدم الرشوة هو فرض الاختيار بواسطة Oi بشكل عشوائي قليلا الوكالة الدولية للطاقة. 9.6 إطار الحوافز الضمنية (IIF) يعد FFO أحد أشكال الحوافز الضمنية للسلوك الصحيح في شبكة Chainlink. ذلك وظائف مثل الحصة الصريحة، أي الودائع، من حيث أنها تساعد في فرض الأمن الاقتصادي الشبكة. وبعبارة أخرى، ينبغي إدراج FFO كجزء من الوديعة (الفعالة). $d للعقدة في الشبكة.والسؤال هو: كيف يمكننا قياس FFO وغيرها من أشكال الحوافز الضمنية داخل شبكة Chainlink؟ إطار الحوافز الضمنية (IIF) عبارة عن مجموعة من المبادئ والتقنيات التي نخطط لتطويرها لهذا الغرض. أنظمة البلوكشين توفير العديد من أشكال الشفافية غير المسبوقة، وسجلات الثقة العالية للعقدة إن الأداء الذي يقدمونه يشكل نقطة انطلاق لرؤيتنا لكيفية عمل معهد التمويل الدولي. نعرض هنا بإيجاز شديد الأفكار حول العناصر الأساسية لمعهد التمويل الدولي. وسوف يتكون معهد التمويل الدولي نفسه من مجموعة من العوامل التي نعتبرها مهمة في التقييم الحوافز الضمنية، إلى جانب آليات نشر البيانات ذات الصلة في شكل عالي التأكيد لاستهلاكها بواسطة خوارزميات التحليل. يمكن لمستخدمي Chainlink المختلفين ترغب في استخدام معهد التمويل الدولي بطرق مختلفة، على سبيل المثال، إعطاء وزن مختلف لعوامل مختلفة. نتوقع ظهور خدمات تحليلية في المجتمع تساعد المستخدمين على تطبيق IIF وفقًا لتفضيلاتهم الفردية لتقييم المخاطر، وهدفنا هو تسهيل ذلك هذه الخدمات من خلال ضمان وصولهم إلى البيانات الداعمة عالية الجودة وفي الوقت المناسب، كما نناقش أدناه (القسم 9.6.4). 9.6.1 فرصة الرسوم المستقبلية تشارك العقد في النظام البيئي Chainlink لكسب حصة من الرسوم التي تدفعها الشبكات مقابل أي من الخدمات المتنوعة التي وصفناها في هذه الورقة، من تغذي البيانات العادية الخدمات المتقدمة مثل الهوية اللامركزية، والتسلسل العادل، والحفاظ على السرية DeFi. الرسوم في Chainlink تكاليف مشغلي عقدة دعم الشبكة، على سبيل المثال، تشغيل الخوادم، والحصول على تراخيص البيانات اللازمة، والحفاظ على فريق عمل عالمي لضمان وقت تشغيل عالي. يشير FFO إلى رسوم الخدمة، صافي النفقات، التي يمكن للعقدة أن تكسبها في المستقبل - أو تخسرها إذا أظهرت سلوكًا خاطئًا. FFO هو شكل من أشكال الحصة التي تساعد في تأمين الشبكة. الميزة المفيدة لـ FFO هي حقيقة أن البيانات الموجودة على السلسلة (المكملة بالبيانات خارج السلسلة) data) إنشاء سجل عالي الثقة لتاريخ العقدة، مما يتيح حساب FFO بطريقة شفافة مدفوعة تجريبيا. يمكن استخلاص مقياس بسيط من الدرجة الأولى لـ FFO من متوسط ​​صافي الإيرادات لـ a عقدة على مدار فترة زمنية (أي إجمالي الإيرادات مطروحًا منها نفقات التشغيل). FFO قد ثم يتم حسابها على سبيل المثال، صافي القيمة الحالية [114] لصافي الإيرادات المستقبلية التراكمية، وبعبارة أخرى، القيمة المخصومة زمنيا لجميع الأرباح المستقبلية. ومع ذلك، يمكن أن تكون إيرادات العقدة متقلبة، كما هو موضح على سبيل المثال في الشكل 17. والأهم من ذلك، أن إيرادات العقدة قد لا تتبع توزيعًا ثابتًا مع مرور الوقت. وبالتالي، فإن العوامل الأخرى التي نخطط لاستكشافها في تقدير FFO تشمل ما يلي: • سجل الأداء: يوفر سجل أداء المشغل - بما في ذلك صحة تقاريره وتوقيتها، بالإضافة إلى وقت تشغيله - هدفًا المحك للمستخدمين لتقييم موثوقيتها. وهكذا فإن تاريخ الأداء توفير عامل حاسم في اختيار المستخدمين للعقد oracle (أو، مع ظهور من DONs، اختيارهم لـ DONs). ومن المرجح أن يكون هناك سجل أداء قوي ترتبط مع ارتفاع الإيرادات الجارية.18 18أحد الأسئلة البحثية المهمة التي نعتزم معالجتها هو الكشف عن أحجام الخدمات المزيفة.الشكل 17: الإيرادات المكتسبة بواسطة Chainlink العقد على خلاصة بيانات واحدة (ETH-USD) خلال أسبوع تمثيلي في مارس 2021. • الوصول إلى البيانات: بينما قد تحصل oracles على العديد من نماذج البيانات من واجهات برمجة التطبيقات المفتوحة، قد تكون بعض أشكال البيانات أو بعض المصادر عالية الجودة متاحة فقط على أساس الاشتراك أو من خلال الاتفاقيات التعاقدية. امتياز الوصول إلى بعض يمكن أن تلعب مصادر البيانات دورًا في إنشاء تدفق ثابت للإيرادات. • مشاركة DON: مع ظهور DONs، ستأتي مجتمعات العقد معا لتقديم خدمات معينة. نتوقع أن يتم تضمين العديد من DONs المشغلين على أساس انتقائي، مع تحديد المشاركة في DONs ذات السمعة الطيبة باعتبارها مكانة متميزة في السوق تساعد على ضمان مصدر ثابت للدخل. • النشاط عبر الأنظمة الأساسية: قد يكون لدى بعض مشغلي العقد تواجد راسخ وسجلات تتبع الأداء في سياقات أخرى، على سبيل المثال، PoS validators أو موفري البيانات في سياقات غير blockchain. ويمكن لأدائها في هذه الأنظمة الأخرى (عندما تكون البيانات المتعلقة بها متاحة في شكل جدير بالثقة) أن يفيد التقييم من تاريخ أدائهم. وبالمثل، السلوك الخاطئ في شبكة Chainlink يمكن أن يعرض الإيرادات في هذه الأنظمة الأخرى للخطر عن طريق إبعاد المستخدمين، أي FFO يمكن أن تمتد عبر المنصات. 9.6.2 FFO المضاربة يشارك مشغلو العقد في شبكة Chainlink ليس فقط لتوليد الإيرادات منها العمليات، ولكن لخلق أنفسهم ووضعهم للاستفادة من الفرص الجديدة لإدارة الوظائف. بمعنى آخر، الإنفاق بواسطة oracle العقد في الشبكة أيضًا بيان إيجابي حول مستقبل DeFi وتطبيق العقود الذكية الأخرى المجالات بالإضافة إلى التطبيقات الناشئة غير blockchain لشبكات oracle. يكسب مشغلو العقد اليوم الرسوم المتاحة على شبكات Chainlink الحالية وفي وقت واحد تشبه هذه بشكل عام المراجعات المزيفة على مواقع الإنترنت، إلا أن المشكلة أسهل في oracle لأنه لدينا سجل نهائي حول ما إذا كانت البضائع، أي التقارير، قد تم طلبها أم لا يتم تسليمها - على عكس، على سبيل المثال، السلع المادية المطلوبة في المتاجر عبر الإنترنت. وبعبارة أخرى، في oracle الإعداد، يمكن التحقق من صحة الأداء، حتى لو لم يكن ذلك ممكنًا.بناء سمعة وتاريخ أداء وخبرة تشغيلية من شأنها أن تحدد مكانتك لهم بشكل مفيد لكسب الرسوم المتاحة في الشبكات المستقبلية (المشروطة، بالطبع، على السلوك الصادق). العقد العاملة في النظام البيئي Chainlink اليوم سوف تفعل ذلك يتمتع Sense بميزة على القادمين الجدد في كسب الرسوم كرسوم إضافية Chainlink تصبح الخدمات متاحة. وتنطبق هذه الميزة على المشغلين الجدد، فضلاً عن شركات التكنولوجيا ذات السمعة الطيبة؛ على سبيل المثال، T-Systems، وهو نظام تقليدي مزود التكنولوجيا (شركة تابعة لشركة Deutsche Telekom)، وKraken، وهي شركة مركزية كبيرة التبادل، أسسوا تواجدًا مبكرًا في النظام البيئي Chainlink [28، 143]. يمكن اعتبار مثل هذه المشاركة بواسطة العقد oracle في الفرص المستقبلية بحد ذاتها كنوع من FFO المضاربة، وبالتالي يشكل شكلاً من أشكال الحصة في Chainlink شبكة. 9.6.3 السمعة الخارجية يمكن لمعهد التمويل الدولي كما وصفناه أن يعمل في شبكة بأسماء مستعارة تمامًا المشغلين، أي دون الكشف عن الأشخاص أو كيانات العالم الحقيقي المعنية. ومع ذلك، فإن أحد العوامل المهمة المحتملة لاختيار المستخدم لمقدمي الخدمات هو عامل خارجي السمعة. ونعني بالسمعة الخارجية تصور الجدارة بالثقة المرتبط بهويات العالم الحقيقي، وليس الأسماء المستعارة. مخاطر السمعة المرتبطة يمكن النظر إلى هويات العالم الحقيقي على أنها شكل من أشكال الحوافز الضمنية. نحن ننظر إلى السمعة من خلال عدسة معهد التمويل الدولي، أي بالمعنى الاقتصادي المشفر، كوسيلة للتأسيس النشاط عبر الأنظمة الأساسية الذي يمكن دمجه في تقديرات FFO. فائدة استخدام السمعة الخارجية كعامل في تقديرات FFO، على العكس من ذلك إلى الارتباط بأسماء مستعارة، هو أن السمعة الخارجية تربط الأداء ليس فقط بـ الأنشطة الحالية للمشغل، ولكن أيضًا للأنشطة المستقبلية. إذا، على سبيل المثال، سمعة سيئة عندما يتعلق الأمر بفرد ما، فإنه يمكن أن يلوث مشاريع ذلك الشخص المستقبلية. وبعبارة أخرى، يمكن للسمعة الخارجية أن تستحوذ على نطاق أوسع من FFO مقارنة بالأسماء المستعارة سجلات الأداء، وتأثير المخالفات المرتبطة بشخص أو المنشأة من الصعب الهروب من الشركة أكثر من تلك المرتبطة بعملية اسم مستعار. Chainlink متوافق مع تقنيات الهوية اللامركزية (القسم 4.3). يمكن أن يقدم الدعم لاستخدام السمعة الخارجية في معهد التمويل الدولي. مثل هذه التقنيات يمكن التحقق من صحة وبالتالي المساعدة في ضمان صحة العالم الحقيقي المؤكد للمشغلين الهويات.19 9.6.4 افتح تحليلات IIF يهدف معهد التمويل الدولي، كما أشرنا، إلى توفير بيانات وأدوات موثوقة مفتوحة المصدر تحليلات الحوافز الضمنية. الهدف هو تمكين مقدمي الخدمات داخل المجتمع لتطوير تحليلات مصممة خصيصًا لتلبية احتياجات تقييم المخاطر لأجزاء مختلفة من المنظمة Chainlink قاعدة المستخدمين. 19. يمكن أيضًا لأوراق اعتماد الهوية اللامركزية، عند الرغبة، تزيين الأسماء المستعارة بأسماء مستعارة تم التحقق من صحتها. معلومات تكميلية. على سبيل المثال، يمكن لمشغل العقدة من حيث المبدأ استخدام بيانات الاعتماد هذه من أجل إثبات أنها إحدى شركات Fortune 500، دون الكشف عن أي منها.كمية كبيرة من البيانات التاريخية المتعلقة بإيرادات العقد وأدائها يوجد في سلسلة في شكل عالي الثقة وغير قابل للتغيير. ولكن هدفنا هو توفير البيانات الممكنة الأكثر شمولاً، بما في ذلك البيانات المتعلقة بالسلوكيات التي لا يمكن رؤيتها إلا من الخارج سلسلة، مثل التقارير خارج السلسلة (OCR) أو نشاط DON. من المحتمل أن تكون مثل هذه البيانات تكون ضخمة. الطريقة الأفضل لتخزينها والتأكد من سلامتها، أي حمايتها من نعتقد أن التلاعب سيتم بمساعدة DONs، باستخدام التقنيات التي تمت مناقشتها في القسم 3.3. بعض الحوافز تصلح لأشكال القياس المباشرة، مثل staking الودائع و FFO الأساسية. أما البعض الآخر، مثل المضاربة الأجنبية المباشرة والسمعة، فيصعب القيام بها قياس بطريقة موضوعية، ولكننا نعتقد أن أشكال البيانات الداعمة، بما في ذلك النمو التاريخي للنظام البيئي Chainlink، ومقاييس السمعة على وسائل التواصل الاجتماعي، وما إلى ذلك، يمكن أن تدعم نماذج تحليلات IIF حتى بالنسبة لهذه العناصر التي يصعب تحديدها كميًا. يمكننا أن نتخيل أن DONs مخصصة تنشأ خصيصًا للمراقبة والتحقق من الصحة تسجيل البيانات المتعلقة بسجلات الأداء خارج السلسلة للعقد، بالإضافة إلى البيانات الأخرى المستخدمة في IIF، مثل معلومات الهوية التي تم التحقق من صحتها. يمكن أن توفر DONs بيانات IIF موحدة وعالية الثقة لأي موفري تحليلات يخدمون مجتمع Chainlink. وسيوفرون أيضًا سجلاً ذهبيًا يقدم ادعاءات موفري التحليلات يمكن التحقق منها بشكل مستقل من قبل المجتمع. 9.7 تجميع كل ذلك معًا: حوافز مشغل العقدة تجميع مناقشاتنا أعلاه حول الحوافز الصريحة والضمنية لمشغلي العقد يوفر نظرة شاملة للطرق التي يشارك بها مشغلو العقد ويستفيدون منها شبكة Chainlink. كدليل مفاهيمي، يمكننا التعبير عن إجمالي الأصول المعنية من خلال Chainlink معين مشغل العقدة $S في شكل تقريبي ومنمق على النحو التالي: \(S ≈\)D + \(F + \)FS + $R، حيث: • $D هو إجمالي الحصص المودعة بشكل صريح عبر جميع الشبكات التي فيها يشارك المشغل؛ • $F هو صافي القيمة الحالية لمجموع جميع FFO عبر جميع الشبكات التي يشارك فيها المشغل؛ • $FS هو صافي القيمة الحالية لـ FFO المضاربة للمشغل. و • $R هو قيمة سمعة المشغل خارج النظام البيئي Chainlink التي قد تتعرض للخطر بسبب سوء السلوك الذي تم تحديده في عقدها oracle. على الرغم من أنها مفاهيمية إلى حد كبير، إلا أن هذه المساواة التقريبية تظهر بشكل مفيد أن هناك العديد من العوامل الاقتصادية التي تفضل الأداء عالي الموثوقية بواسطة Chainlink العقد. كل هذه العوامل بخلاف $D موجودة في شبكات Chainlink اليوم.9.8 الدورة الفاضلة للأمن الاقتصادي مزيج من التأثير الخطي الفائق staking مع تمثيل مدفوعات الرسوم حيث أن فرصة الرسوم المستقبلية (FFO) في معهد التمويل الدولي يمكن أن تؤدي إلى ما نسميه الدورة الحميدة للأمن الاقتصادي في شبكة oracle. ويمكن اعتبار هذا نوعا من الاقتصاد من الحجم. ومع ارتفاع المبلغ الإجمالي المضمون بواسطة شبكة معينة، يزداد مقدار هناك حاجة إلى حصة إضافية لإضافة مقدار ثابت من انخفاض الأمن الاقتصادي كما هو الحال متوسط التكلفة لكل مستخدم. لذلك، يعد انضمام المستخدم أرخص من حيث الرسوم شبكة موجودة بالفعل من تحقيق نفس الزيادة في الشبكة الاقتصادية الأمن عن طريق إنشاء شبكة جديدة. الأهم من ذلك، أن إضافة كل مستخدم جديد يخفض تكلفة الخدمة لجميع المستخدمين السابقين لتلك الشبكة. بالنظر إلى هيكل رسوم معين (على سبيل المثال، معدل عائد معين على المبلغ المراهن عليه)، إذا زاد إجمالي الرسوم التي تكسبها الشبكة، فإن هذا يحفز تدفق الرسوم الإضافية حصة في الشبكة لتأمينها بمعدل أعلى. على وجه التحديد، إذا كانت الحصة الإجمالية يتم تغطية العقدة الفردية التي قد تعقد في النظام، ثم عند دفع الرسوم الجديدة أدخل النظام، ورفع FFO، وسوف يزيد عدد العقد n. شكرا ل فائقة الخطية staking تأثير تصميم نظام الحوافز لدينا، والأمن الاقتصادي ل سوف يرتفع النظام بشكل أسرع من n، على سبيل المثال، كما هو الحال مع n2 في الآلية التي نرسمها في القسم 9.4. ونتيجة لذلك، فإن متوسط تكلفة الأمن الاقتصادي - أي مقدار المساهمة في الحصة دولار من الأمن الاقتصادي – سينخفض. وبالتالي يمكن للشبكة فرض رسوم على مستخدميها رسوم أقل. بافتراض أن الطلب على خدمات oracle مرن (انظر، على سبيل المثال، [31] للحصول على ملخص) تفسيرا)، سيرتفع الطلب، مما يولد رسوما إضافية و FFO. ونوضح هذه النقطة بالمثال التالي. مثال 5. منذ الأمن الاقتصادي لشبكة oracle مع حافزنا المخطط هو \(dn2 for stake \)dn، الأمن الاقتصادي الذي ساهم به دولار من الحصة هو n، وبالتالي متوسط تكلفة كل دولار من الأمن الاقتصادي، أي مقدار الحصة المساهمة في دولار واحد من الأمن الاقتصادي — هو 1/ن. لننظر إلى شبكة تتكون فيها الحوافز الاقتصادية بالكامل من FFO، ذات حد أقصى عند \(d ≤\)10K لكل عقدة. لنفترض أن الشبكة بها n = 3 عقد. ثم متوسط التكلفة ويبلغ كل دولار من الأمن الاقتصادي حوالي 0.33 دولار. لنفترض أن إجمالي FFO للشبكة يرتفع فوق \(30K (e.g., to \)31K). نظرا الحد الأقصى لكل عقدة FFO، تنمو الشبكة إلى (على الأقل) n = 4. الآن متوسط التكلفة وينخفض كل دولار من الأمن الاقتصادي إلى نحو 0.25 دولار. نوضح الدورة الحميدة الكاملة للأمن الاقتصادي في شبكات oracle بشكل تخطيطي في الشكل 18. ونؤكد على أن الدورة الحميدة للأمن الاقتصادي تنبع من التأثير من المستخدمين تجميع رسومهم. إن FFO الجماعي الخاص بهم هو الذي يعمل لصالح الأكبر أحجام الشبكات وبالتالي قدر أكبر من الأمن الجماعي. ونلاحظ أيضا أن الدورة الفاضلة يعمل الأمن الاقتصادي لصالح DON لتحقيق الاستدامة المالية. مرة واحدة تم إنشاؤها، DONs التي تلبي احتياجات المستخدم يجب أن تنمو إلى ما هو أبعد من النقطة التي عندها تتجاوز الإيرادات من الرسوم تكاليف التشغيل لـ oracle العقد.

Revenue earned by Chainlink nodes on a single ETH-USD data feed showing correlation with price volatility

Diagram showing how concentrated alerting rewards amplify the cost for a briber attempting to corrupt the oracle network

Schematic of Chainlink staking scheme with alerting showing watchdog escalation and penalty mechanisms

Schematic of the virtuous cycle of Chainlink staking showing how user fees drive security and value capture

الشكل 18: رسم تخطيطي للدورة الفاضلة لـ Chainlink staking. ارتفاع في رسوم المستخدم تؤدي المدفوعات إلى شبكة oracle 1⃝ إلى نموها، مما يؤدي إلى نمو اقتصادها الأمن 2⃝. يحقق هذا النمو الخطي الفائق وفورات الحجم في شبكات Chainlink 3⃝. ويعني على وجه التحديد انخفاضًا في متوسط تكلفة الأمن الاقتصادي، أي: الأمن الاقتصادي لكل دولار الناشئ عن دفع الرسوم أو مصادر الحصص الأخرى يزيد. تؤدي التكاليف المنخفضة، التي يتم تمريرها إلى المستخدمين، إلى تحفيز الطلب المتزايد على oracle الخدمات 4⃝. 9.9 عوامل إضافية تقود نمو الشبكة مع استمرار توسع النظام البيئي Chainlink، فإننا نؤمن بجاذبيته للمستخدمين والأهمية مع تسارع البنية التحتية لاقتصاد blockchain. القيمة التي توفرها شبكات oracle هي قيمة خطية للغاية، مما يعني أنها تنمو بشكل أسرعمن حجم الشبكات نفسها. وهذا النمو في القيمة مستمد من كليهما وفورات الحجم - زيادة كفاءة التكلفة لكل مستخدم مع زيادة حجم الخدمة - و تأثيرات الشبكة - زيادة في فائدة الشبكة حيث يتبنى المستخدمون DONs على نطاق أوسع. مع استمرار smart contracts الحاليين في رؤية المزيد من القيمة المضمونة والجديدة تمامًا smart contract أصبحت التطبيقات ممكنة من خلال المزيد من الخدمات اللامركزية، المجموع يجب أن ينمو استخدام الرسوم الإجمالية المدفوعة إلى DONs. زيادة مجمعات الرسوم في تحويلها إلى وسائل وحوافز لخلق المزيد من الخدمات اللامركزية، مما أدى إلى دورة حميدة. هذه الدورة الفاضلة تحل مشكلة الدجاجة والبيضة الحرجة المشكلة في النظام البيئي smart contract المختلط: ميزات smart contract المبتكرة غالبًا ما تتطلب خدمات لا مركزية غير موجودة بعد (على سبيل المثال، أسواق DeFi الجديدة غالبًا تتطلب خلاصات بيانات جديدة) ولكنها تحتاج إلى طلب اقتصادي كافٍ لكي تظهر إلى الوجود. إن تجميع الرسوم من خلال smart contracts المختلفة لـ DONs الحالية سيشير إلى الطلب على خدمات لامركزية إضافية من قاعدة مستخدمين متنامية، مما أدى إلى إنشائها بواسطة DONs والتمكين المستمر لـ smart contracts الهجين الجديد والمتنوع. باختصار، نحن نعتقد أن النمو في أمن الشبكات مدفوع بالفاضلة الدورات في آلية Chainlink staking تمثل أنماطًا أكبر من النمو يمكن لشبكة Chainlink أن تساعد في تحقيق اقتصاد متصل بالسلسلة من أجل اللامركزية الخدمات.

Conclusion

Conclusion

In this paper, we have set forth a vision for Chainlink’s evolution. The main theme in this vision is oracle networks’ ability to provide a much broader range of service for smart contracts than mere data delivery. Using DONs as a foundation for the decentralized services of the future, Chainlink will aim to provide performant, confidentialityenhanced oracle functionality. Its oracle networks will offer strong trust minimization through a combination of principled cryptoeconomic mechanisms such as staking and carefully conceived guard rails and service-level enforcement on relying main chains. DONs will also help layer-2 systems enforce flexible, fair ordering policies on transactions, as well as reduced gas costs for mempool-routed transactions. Taken together, these capabilities all drive in the direction of secure and richly functional hybrid smart contracts. The flexibility of DONs will enhance existing Chainlink services and give rise to many additional smart contract features and applications. Among these are seamless connection to a wide variety of off-chain systems, decentralized identity creation from existing data, priority channels to help ensure timely delivery of infrastructure-critical transactions, and confidentiality-preserving DeFi instruments. The vision we’ve set forth here is ambitious. In the short term, we seek to empower hybrid contracts to accomplish goals beyond the reach of smart contracts today, while in the long term we aim to realize a decentralized metalayer. Happily we can draw on new tools and ideas—ranging from consensus algorithms to zero-knowledge proof systems—that the community is developing as the fruit of rapidly evolving research.

Similarly, we expect to prioritize implementation of the ideas in this paper in response to the needs of Chainlink’s community of users. We look forward to the next stage in our quest to empower smart contracts through universal connectivity and establish decentralized technologies as the backbone of the world’s next generation of financial and legal systems. Acknowledgements Thanks to Julian Alterini and Shawn Lee for rendering the figures in this paper.

خاتمة

في هذه الورقة، وضعنا رؤية لتطور Chainlink. الموضوع الرئيسي في هذه الرؤية تكمن قدرة الشبكات oracle على توفير نطاق أوسع بكثير من الخدمات smart contracts أكثر من مجرد تسليم البيانات. باستخدام DONs كأساس للخدمات اللامركزية في المستقبل، سيهدف Chainlink إلى توفير وظائف oracle عالية الأداء ومعززة للسرية. ستوفر شبكات oracle الخاصة بها تقليلًا قويًا للثقة من خلال مجموعة من آليات الاقتصاد المشفر المبدئية مثل staking و حواجز حماية مصممة بعناية وإنفاذ على مستوى الخدمة يعتمد على السلاسل الرئيسية. سيساعد DONs أيضًا أنظمة الطبقة الثانية على فرض سياسات طلب مرنة وعادلة على المعاملات، بالإضافة إلى تقليل تكاليف الغاز للمعاملات الموجهة بواسطة الذاكرة. مجتمعة، كل هذه القدرات تقود في اتجاه نظام ذكي هجين آمن وغني بالوظائف العقود. ستؤدي مرونة DONs إلى تحسين خدمات Chainlink الحالية وتؤدي إلى العديد من الميزات والتطبيقات الإضافية smart contract. ومن بين هذه سلسة الاتصال بمجموعة واسعة من الأنظمة خارج السلسلة، وإنشاء الهوية اللامركزية من البيانات الحالية، والقنوات ذات الأولوية للمساعدة في ضمان تسليم البنية التحتية الحيوية في الوقت المناسب المعاملات وأدوات الحفاظ على السرية DeFi. إن الرؤية التي طرحناها هنا طموحة. وعلى المدى القصير، نسعى إلى التمكين عقود هجينة لتحقيق أهداف بعيدة عن متناول smart contracts اليوم، بينما على المدى الطويل، نهدف إلى تحقيق طبقة معدنية لا مركزية. لحسن الحظ يمكننا الرسم على أدوات وأفكار جديدة، تتراوح من خوارزميات الإجماع إلى إثبات المعرفة الصفرية الأنظمة - التي يتطورها المجتمع كثمرة لأبحاث سريعة التطور.

وبالمثل، نتوقع إعطاء الأولوية لتنفيذ الأفكار الواردة في هذه الورقة ردًا على ذلك لتلبية احتياجات مجتمع مستخدمي Chainlink. ونحن نتطلع إلى المرحلة التالية في سعينا لتمكين smart contracts من خلال الاتصال العالمي والتأسيس التكنولوجيات اللامركزية باعتبارها العمود الفقري للجيل القادم من الخدمات المالية في العالم والأنظمة القانونية. شكر وتقدير شكرًا لجوليان ألتريني وشون لي على تقديم الأرقام الواردة في هذه الورقة.