bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 19쪽 중 6쪽
ess 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 τ 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 userU that pays a fee for access.
M agrees that when U submits a transaction τ to the mempool (with any gas price,
40
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 fromM and an advance payment $p fromU. A
DON executable exec monitors the mempool, triggering on placement of a transaction
byU. It sends a success message to SC ifU submits a transaction that M mines in
a timely way and a failure message in case of a service failure.
SC sends payment $p toM 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 toM.
The miner M can of course provide priority channels simultaneously to multiple
users and can open a priority channel withU 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 transac-
tions 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 comple-
ment the privacy assurances of other systems. For example, Mixicles, a confidentiality-
preserving 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, ifM 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.
41
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
ifr≥ 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≥ 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 adapterConfSwitch 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
42
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 imple-
mentation 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].
5 Fair Sequencing Services
One important service that we expect DONs will offer that leverages their network-
ing, computation, and storage capabilities is called Fair Sequencing Services (FSS).
Although FSS may be viewed simply as an application realized within the DON frame-
work, 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 miner-
extractable 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 up-
per 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].
43
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, min-
ers 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 pro-
posed 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 decentral-
ize 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 se-
quencing 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 partic-
ipants 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 commit-
ted.
44
• Reduced transaction cost: By eliminating players’ need for speed in submitting
their transactions to a smart contract, FSS can greatly reduce the cost of trans-
action 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 mo-
tivate 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 back-
running 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.
45
Consider the common design pattern of using an oracle to supply variousprice 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 front-
running 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 “speed-
bumps,” such as queuing user transactions for a number of blocks before processing
them, or retroactively adjusting prices when a new oracle report arrives. The disadvan-
tages of these solutions are that they add complexity to the exchange implementation,
increase storage requirements and thus transaction costs, and disrupt the user experi-
ence as asset exchanges are only confirmed after a significant time period.
Piggybacking: Before moving on to FSS, we discusspiggybacking, 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 by-
need basis, oracles can generate more frequent updates (e.g., every minute), thereby
minimizing arbitrage opportunities from front-running a report 9; (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 numbern, 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.
46
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 Net-
work.
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 trans-
actions 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 attac프로젝트로 돌아가기