ence the optimism)
but τ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])
63
than alternatives such as threshold Schnorr [202] or BLS [55] signatures.
Trusted Execution Environments (TEEs): TEEs are isolated execution environ-
ments (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 input 12. 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 as-
sumptions. 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 flexi-
bility 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
everyN 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 ex-
istence of a competing fork of some threshold length τ. The DON can additionally
12Supplementary details can be found in Appendix B.2.1. They are not required for understanding.
64
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 trans-
action 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.
7 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 (avail-
ability) 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 Chain-
link involves stronger data-source authentication through support of tools and stan-
dards 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
65
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 net-
works as part of the Accelerated Mobile Pages (AMP) protocol [225]. The Chrome mo-
bile 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 brand-
ing incentive, coupled with the relative ease of enabling it using services like Cloud-
Flare’s Real URL [83] and Google’s amppackager [124], may lead to widespread adop-
tion 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
66
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 suf-
ficient 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, aDON 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 digi-
tal signatures address neither problem. From its inception [98], Chainlink has
already included a mechanism to remediate such faults: redundancy. The re-
ports 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 con-
fidentiality 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.
67
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 itneedlessly leaks sensitive information: Alice’s
exact DoB. Ideally, what Alice would like from the DMV instead is a signature on a
simple statementA′ 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 thatA′ 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 ={S1,...,S nS} a sequence of values V ={v1,v 2,...,v nS} from
nS sources with accompanying source-specific signatures Σ ={σ1,σ 2,...,σ nS}. Upon
verifying the signatures, it transmits the price v = median(V ) to SC.
68
Unfortunately, there is no simple way for an oracle network to transmit the median
valuev in Example 4 to SC along with a succinct proofσ∗ thatv was correctly computed
over signed inputs.
A na¨ ıve approach would be to encode inSC the public keys of all nS data sources.
The oracle network would then relay (V, Σ) and allow SC to compute the median of V .
This, however, would result in a proof σ of size O(nS)—i.e.,σ∗ would not be succinct.
It would also incur high gas costs for SC, which would need to verify all signatures in
Σ.
Use of SNARKs, in contrast, enables a succinct proof of correctly combined au-
thenticated 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 com-
bined data from sources is a cryptographic tool known asfunctional 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 in-
cludes 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 economi-
cally, 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 partici-
pants 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 es-
tablished each participant can simply compute the value and broadcast it to the other
69
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 configura-
tions 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. Soft-
ware 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 sec프로젝트로 돌아가기