Modular MEV; Part 1—The Introduction
模块化MEV;第 1 部分——简介
A Systematization of Knowledge on MEV in the Modular World
模块化世界中 MEV 知识的系统化
Introduction to MEV MEV简介
Maximum Extractable Value, or MEV, has been all the rage in crypto. MEV refers to the extraction of value from users by reordering, inserting, and censoring transactions within blocks, as well as the profits from benign MEV such as arbitrage, liquidations etc. It was first mentioned back in 2014 on the Ethereum subreddit, by /u/pmcgoohan.
最大可提取价值(MEV)在加密货币领域风靡一时。 MEV 是指通过在区块内重新排序、插入和审查交易来从用户那里提取价值,以及从良性 MEV 中获得的利润,例如套利、清算等。它最早于 2014 年在以太坊 Reddit 子版块/u 上被提及。 /pmcgoohan。
One of the earliest examples of quantifiable MEV was during the CryptoKitties craze. Specifically, the concept of completing pregnancies of CryptoKitties (giving birth to a new cat), wherein anyone could finalize the pregnancy via calling giveBirth() to the smart contract after the cat’s birthing block. By doing so, you could receive a reward in Eth. This was possible to front-run, resulting in profit (MEV). As Markus Koch pointed out back in 2018 (great read btw) – Early in the history of the game, accounts associated with a few people were the only ones giving birth to kitties. As time went by, other accounts began calling the giveBirth() method, seeing the profit freely available. It was also possible to see that only a few midwives (cat birth callers) accounted for most of the births.
可量化 MEV 的最早例子之一是在 CryptoKitties 热潮期间。具体来说,是加密猫完成怀孕(生出一只新猫)的概念,其中任何人都可以在猫的出生区块后通过调用智能合约的 GiveBirth() 来完成怀孕。通过这样做,您可以获得以太币奖励。这有可能抢先运行,从而产生利润(MEV)。正如马库斯·科赫 (Markus Koch) 在2018 年指出的那样(顺便说一句,值得一读)——在游戏历史的早期,与少数人相关的账户是唯一能生出小猫的账户。随着时间的推移,其他账户开始调用 GiveBirth() 方法,看到利润可以免费获得。还可以看到,只有少数助产士(猫接生员)承担了大部分的分娩。
It was also possible to see that the midwives were competing via gas fees (since despite being relatively even in code efficiency, some were ostensibly more successful and profitable than others in achieving the giveBirth call). The conclusion made, back then, was that the birthing fee made CryptoKitties more expensive to be played than if the mechanism wasn’t necessary. This is an example of where MEV equals poor transaction execution for the end-user, as it spiked gas fees during the births.
还可以看到助产士通过汽油费进行竞争(因为尽管代码效率相对均匀,但有些助产士在实现 GiveBirth 调用方面表面上比其他助产士更成功、更有利可图)。当时得出的结论是,与不需要该机制相比,出生费使得加密猫的玩起来更加昂贵。这是一个 MEV 等于最终用户交易执行不佳的例子,因为它在出生期间飙升了汽油费。
Another example is that of front-running on Bancor, back in mid-late 2017. The possibility of this was pointed out in June 2017 by Phil Daian (Flashbot co-founder) and Emin (Avax founder). They showed that miners would be able to front-run any transactions on Bancor, since miners were free to re-order transactions within a block they mined. Ivan Bogatyy took this one step further in August of the same year, and built a program that could monitor and execute front-running opportunities on Bancor as a non-miner (just a searcher!) — since blockchains, and their mempools are public. It’s a great read if you want to get a view into the world of MEV in the earlier days (Link).
另一个例子是2017年中后期Bancor上的抢先交易。Phil Daian(Flashbot联合创始人)和Emin(Avax创始人)在2017年6月指出了这种可能性。他们表明,矿工将能够在 Bancor 上抢先运行任何交易,因为矿工可以自由地对他们开采的区块内的交易进行重新排序。 Ivan Bogatyy 在同年 8 月更进一步,建立了一个程序,可以作为非矿工(只是搜索者!)监控和执行 Bancor 上的抢先交易机会 - 因为区块链及其内存池是公开的。如果您想了解早期的 MEV 世界,这是一本很好的读物(链接)。
Since then MEV has evolved rapidly and with increased on-chain economic activity from 2019 and onwards with the advent of DeFi, it has become a critical component of protocol design. With the rise of L2’s, bridges, app-chains and so forth it is interesting to look into the potential implications the “modular” design space might have on MEV. But first, we must give an overview of the actors within MEV as it stands.
此后,MEV 迅速发展,随着 2019 年以来链上经济活动的增加以及 DeFi 的出现,它已成为协议设计的关键组成部分。随着 L2、桥梁、应用链等的兴起,研究“模块化”设计空间可能对 MEV 产生的潜在影响是很有趣的。但首先,我们必须概述 MEV 中的参与者。
There are various actors within the MEV ecosystem. Searchers are usually the most profitable MEV participants (from a first principle perspective, although more “general” value ends up with builders and validators as they congregate value from many searchers), but there are other participants as well. Let's explain who they're first. What's also important to note is that part of the participants collude more than others do, as a result of protocol design. The participants (bar users and wallets) are searchers (S), builders (B) and validators (V). In the MEV supply chain, they have the following role to play:
MEV 生态系统中有各种各样的参与者。搜索者通常是最有利可图的 MEV 参与者(从第一原则的角度来看,尽管更多“一般”价值最终归于构建者和验证者,因为他们聚集了许多搜索者的价值),但也有其他参与者。我们先解释一下他们是谁。同样值得注意的是,由于协议设计的原因,部分参与者比其他参与者串通更多。参与者(bar 用户和钱包)是搜索者(S)、构建者(B)和验证者(V)。在 MEV 供应链中,他们可以发挥以下作用:
Searcher: try to find all extractable value on-chain through different methods. Searchers work with builders, as searchers are willing to pay high gas fees in order to have their transactions included. This is important because many of the things we take for granted, like arbitrage and liquidations, are performed by searchers. Searchers bundle transactions together and give them to builders.
搜索者:尝试通过不同的方法找到链上所有可提取的价值。搜索者与构建者合作,因为搜索者愿意支付高额汽油费以包含他们的交易。这很重要,因为我们认为理所当然的许多事情,例如套利和清算,都是由搜索者执行的。搜索者将交易捆绑在一起并将其交给构建者。
Builder: Takes the bundled transactions that are grouped together and put them into blocks for proposers. In addition to the searcher’s transaction(s), several bundles can be grouped together for a block, and can also potentially contain other users’ pending transactions from the mempool, and bundles can target specific blocks for inclusion as well.
构建器:将捆绑在一起的交易打包在一起,并将它们放入区块中供提议者使用。除了搜索者的交易之外,多个捆绑包还可以组合在一起形成一个块,并且还可能包含内存池中其他用户的待处理交易,并且捆绑包也可以针对特定块进行包含。
Validator: Validators perform consensus roles to validate the blocks. They sell blockspace to the profit-seeking searchers and builders and are in turn rewarded with part of the spoils. Keep in mind that the validators get both rewards from issuance (Proposer, attestor, sync) and execution rewards (MEV+Tips).
验证者:验证者执行共识角色来验证区块。他们将区块空间出售给寻求利润的搜索者和建设者,并反过来获得部分战利品作为奖励。请记住,验证者同时获得发行奖励(提议者、证明者、同步)和执行奖励(MEV+Tips)。
So why do some say that MEV is bad when it seems on the surface to provide value to the ecosystems and the security budget? MEV gets competed for via Priority Gas Auctions (PGA)s. PGAs are auctions where fees are competitively bid up to obtain priority ordering for transactions. Fee estimators used PGA-inflated gas prices as a reference, causing users to overpay for their transactions. What should be noted, is that this was primarily the way it worked prior to MEV-Geth/Boost and Flashbots. After the release of MEV-Geth, much of the computation related to MEV was taken off-chain instead, by a permissionless side-relay that allows MEV searchers to communicate directly with nodes and other participants. Leading to a decrease in fee congestion pricing. This is also easier to see when you look at the share of vanilla builders versus MEV-Boost.
那么,为什么有些人说 MEV 不好,因为表面上它似乎为生态系统和安全预算提供了价值呢? MEV 通过优先天然气拍卖 (PGA) 进行竞争。 PGA 是一种拍卖,通过竞争性地提高费用以获得交易的优先排序。费用估算者使用 PGA 夸大的 Gas 价格作为参考,导致用户为交易支付过高的费用。应该指出的是,这主要是 MEV-Geth/Boost 和 Flashbots 之前的工作方式。 MEV-Geth 发布后,与 MEV 相关的大部分计算都通过无需许可的侧中继进行了链外计算,允许 MEV 搜索者直接与节点和其他参与者进行通信。导致费用拥堵定价下降。当您查看普通构建器与 MEV-Boost 的份额时,这一点也更容易看出。
At its core, the issue stems from the fact that users and bots are in the same pool, independent of whether they go after MEV or not.
从本质上讲,问题源于这样一个事实:用户和机器人位于同一个池中,无论他们是否追求 MEV。
The nature of MEV (and profit in general) and its relatively permissionless nature is that there’s a huge incentive for participants to extort users of the blockchain for profit. This, as in most profit-driven ventures, leads to participants centralizing (geographically for example) to make higher profits. Extortion is also centralized at the coordinator level, especially in the current implementation mechanism of shared layers that eventually rollups/sequencers will have to off-load tasks to (such as ordering, dispute resolution, liquidity and so on). Thus, extortion can and will happen (through centralization).
MEV(以及一般利润)的本质及其相对无需许可的本质是,参与者有巨大的动机勒索区块链用户以获取利润。与大多数以利润为导向的企业一样,这会导致参与者集中(例如在地理上)以获得更高的利润。勒索也集中在协调器级别,特别是在当前共享层的实现机制中,最终汇总/排序器将不得不卸载任务(例如排序、争议解决、流动性等)。因此,敲诈勒索可能而且将会发生(通过集中化)。
There's also an increasingly high barrier to entry to participate in MEV, leading to further centralization. This is partly because of the fact of the constant upkeep of MEV bots that searchers have to do. The competition is rough, and the code is constantly updated. If you find an edge, you’re much more likely to not share it. Although, as a result of blockchains being open ledgers, they will eventually be found. The MEV “marketplaces”, like Flashbots, are also quite centralized, since the vast majority of blocks flow through Flashbots (70%!), although MEV-Boost relays are permissionless, and have several endpoints (11 according to Mevboost.pics - creator Toni Wahrstätter).
参与 MEV 的准入门槛也越来越高,导致进一步集中化。部分原因是搜索者必须不断维护 MEV 机器人。竞争很激烈,代码不断更新。如果你发现了优势,你就更有可能不分享它。尽管如此,由于区块链是开放式账本,它们最终会被发现。 MEV“市场”,如 Flashbots,也相当中心化,因为绝大多数区块都流经 Flashbots(70%!),尽管 MEV-Boost 中继是无需许可的,并且有多个端点(根据 Mevboost.pics - 创建者的说法为 11)托尼·瓦尔斯塔特) 。
Important to note that there are plans to decentralize the entire MEV supply chain, and we believe that the Flashbots team is well aware of the nuances of the current implementation. The centralized Flashbots relay does not directly own any validator power. Neither can Flashbots censor non-MEV-related transactions. Validators can still include transactions that did not go through the Flashbots relay. Flashbots is clearly a centralizing force, but the alternative of a non-Flashbots world certainly feels like it would be worse. As participants in MEV-Boost make a larger income on average than non-participants, it leads to further centralization in actors utilizing it as well.
值得注意的是,我们计划分散整个 MEV 供应链,我们相信 Flashbots 团队非常清楚当前实施的细微差别。集中式 Flashbots 中继不直接拥有任何验证器权力。 Flashbots 也不能审查非 MEV 相关的交易。验证器仍然可以包含未经过 Flashbots 中继的交易。 Flashbots 显然是一种集中力量,但如果选择非 Flashbots 的世界,情况肯定会更糟。由于 MEV-Boost 的参与者平均收入高于非参与者,因此它也导致使用它的参与者进一步集中化。
Fear not, though, “we’re going to decentralize!” as the age-old answer often is. Although, if Flashbots can’t come to a consensus on the ethics of MEV (as alluded to during a recent podcast w/ Phil Daian), how will the wider community agree on it?
不过,不要害怕,“我们将去中心化!”正如古老的答案通常是的。不过,如果 Flashbots 无法就 MEV 的道德规范达成共识(正如Phil Daian最近的播客中提到的那样),那么更广泛的社区将如何达成共识呢?
If Flashbots as a system eventually becomes a DAO, it could possibly become decentralized itself. This is a similar analogy to Lido and others here. To off-load claims of centralization, many protocols say it will become a decentralized DAO (eventually), just like Flashbots. You could argue that it is merely altering the centralization into more layers, such that the centralization is harder to see. However, there’s some limited merit in adding more layers. At the end of the day, in most cases, some decentralization is better than none. Although, this depends on how attackable that decentralization is.
如果 Flashbots 作为一个系统最终成为一个 DAO,它本身可能会变得去中心化。这与 Lido 和其他人的类比类似。为了摆脱中心化的说法,许多协议表示它将成为一个去中心化的 DAO(最终),就像 Flashbots 一样。你可能会说,这只是将中心化变成了更多层,这样中心化就更难看到了。然而,添加更多层的优点有限。归根结底,在大多数情况下,一定程度的去中心化总比没有好。不过,这取决于权力下放的可攻击性。
So why is it so vital for actors to participate?
那么为什么演员的参与如此重要呢?
Validators want to collect the most amount in fees/MEV in order to offer the highest staking rate on their user’s Eth. This is an incentive for validators to pick the highest-value block created by builders.
验证者希望收取最多的费用/MEV,以便为用户的以太坊提供最高的质押率。这是对验证者选择由构建者创建的最高价值区块的激励。
Builders will aggregate transactions from users, MEV searchers and their own private order flow to make the highest value blocks possible:
构建者将聚合来自用户、MEV 搜索者和他们自己的私人订单流的交易,以使最高价值的区块成为可能:
Builders with exclusive private order flow should mainly be able to create the most valuable block.
拥有专属私人订单流量的建设者主要应该能够创造出最有价值的区块。A builder having its blocks included consistently incentivizes more private order flow to arrive at this builder since users and searchers want their transactions included swiftly.
包含其区块的构建器始终会激励更多的私人订单流到达该构建器,因为用户和搜索者希望他们的交易迅速包含在内。Selling future block space upfront so market makers or protocols can secure block space for their transactions or users
预先出售未来的区块空间,以便做市商或协议可以为其交易或用户确保区块空间
MEV block production and transaction inclusion dynamics in essence create an unfair market for end-users. The market structure cannot be improved (and has not) without direct intervention. The protocol as such must control the market, or have mechanics built out to support it (as we’ve seen). Cooperation between proposers (who have all the power in the market) seems much more worrying, especially in a semi-permissionless half-decentralized sequencer setup. However, if slashing takes place in the advent of any extraction of MEV, what is the reason to become a sequencer apart from transaction fees?
MEV 区块生产和交易包容动态本质上为最终用户创造了一个不公平的市场。如果没有直接干预,市场结构就无法(而且也没有)得到改善。这样的协议必须控制市场,或者建立机制来支持它(正如我们所看到的)。提议者(拥有市场上所有权力)之间的合作似乎更令人担忧,尤其是在半无许可、半去中心化的排序器设置中。然而,如果在任何MEV提取出现时都会发生削减,那么除了交易费用之外,成为排序者的原因是什么?
This is especially true if you don't emission tokens for security, as you derive security from a base layer. Thus, it leads to the belief that an SBV (Searcher-Builder-Validator/Sequencer) supply chain must be in place. That could lead to trusted social contracts between actors as well. MEV could also in reality become a “problem” aggressed more so on the application side of things (such as some protocols have done so far - Timelock Puzzles and more), leaving the protocol without direct interference. But in some cases, and we will make that case, MEV can be seen as increasing the security budget of the underlying protocol.
如果您不为了安全而发出令牌,则尤其如此,因为您从基础层获得安全性。因此,人们相信 SBV(搜索器-构建器-验证器/排序器)供应链必须就位。这也可能导致参与者之间建立可信的社会契约。 MEV 实际上也可能成为一个“问题”,在应用程序方面更是如此(例如到目前为止一些协议已经做到的 - Timelock Puzzles等),使协议不受直接干扰。但在某些情况下,MEV 可以被视为增加底层协议的安全预算,我们将说明这一点。
In competitive block markets, where there’s competition for blockspace applications will eventually revert to “MEV” (as in priority gas fees). Builders don’t waste blockspace on unprofitable reversions, and will always make the most profitable block.
在竞争激烈的区块市场中,对区块空间应用程序的竞争最终将恢复到“MEV”(如优先燃气费)。构建者不会在无利可图的版本上浪费区块空间,并且总是会制作最有利可图的区块。
By enabling searchers and hunters to easily look for good predictable state changes resulting in MEV (so a marketplace) you can incentivize good MEV adding to the security and efficiency of protocols. Coupling these profitable actions with the sequencer itself, whom as a result of bonding tokens to become one (maybe with the added possibility of delegation from other users to gain a fraction of the profits) could share in that profit. This would allow the value chain to both land in the hands of users and sequencers, while adding to the security budget of the protocol itself. So the user shares in the value they themselves create. You can only scale a blockchain's decentralization with its success and adoption (matureness).
通过使搜索者和猎人能够轻松地寻找良好的可预测状态变化,从而产生 MEV(因此是一个市场),您可以激励良好的 MEV,从而提高协议的安全性和效率。将这些有利可图的行为与定序器本身结合起来,通过绑定代币而成为定序器(也许还可以从其他用户那里获得授权以获得一小部分利润),定序器可以分享该利润。这将使价值链落入用户和测序者手中,同时增加协议本身的安全预算。因此用户分享他们自己创造的价值。只有随着区块链的成功和采用(成熟度),你才能扩展它的去中心化。
MEV; good, bad or just existent?
MEV;好、坏还是只是存在?
A way to reason about the role of MEV is by looking at it through the lens of the economic security of a chain. In general, this is seen as the value at stake to “protect” that chain, the amount of assets staked or the amount of money needed to perform a 51% attack in the case of Bitcoin. MEV is a critical component of this, as it enhances the yield for validators/miners and therefore allows greater economic value to be put up for stake.
理解 MEV 作用的一种方法是从链条的经济安全角度来看待它。一般来说,这被视为“保护”该链的赌注价值、赌注资产数量或对比特币进行 51% 攻击所需的资金数额。 MEV 是其中的关键组成部分,因为它提高了验证者/矿工的产量,因此可以为权益提供更大的经济价值。
So there are basically two lines of reasoning here. Either MEV is seen as bad; this follows the reasoning that value being (unknowingly) extracted from the user is bad for UX and sophisticated users extract this from less sophisticated users. As a result of this, a myriad of solutions to prevent MEV has popped up, things like threshold cryptography to encrypt TX’s pre-ordering and batch auctions with a uniform execution price are used to prevent or minimize MEV extraction.
所以这里基本上有两条推理线。 MEV 要么被认为是不好的,要么被认为是不好的。这遵循这样的推理:(不知不觉地)从用户那里提取价值对用户体验不利,而经验丰富的用户从不太熟练的用户那里提取价值。因此,出现了无数的防止 MEV 的解决方案,例如使用阈值密码学来加密 TX 的预购和具有统一执行价格的批量拍卖等,以防止或最大限度地减少 MEV 提取。
Another way to look at this is that MEV is actually a force of good. The reasoning here is that MEV extraction enhances the (potential) value of the blockspace being sold by validators/miners, and therefore allows for more yield towards those. As a result of yields being higher, it stands to reason that validators/miners are willing to put up more assets in order to get access to these yields. This will result in the chain having more economic security. Another way of achieving this economic security is by artificially enhancing the yield, by issuing more native tokens/rewards. However, this comes at the cost of token holders as they face inflation on their assets. If you view MEV through this point of view, it's actually a force of good for token holders, as it allows them to benefit from economic security while facing less inflation.
另一种看待这一问题的方式是,MEV 实际上是一种善良的力量。这里的原因是,MEV 提取提高了验证者/矿工出售的区块空间的(潜在)价值,因此可以获得更多收益。由于收益率较高,验证者/矿工愿意投入更多资产来获得这些收益率也是理所当然的。这将导致链条具有更多的经济安全性。实现这种经济安全的另一种方法是通过发行更多的原生代币/奖励来人为地提高产量。然而,这是以代币持有者为代价的,因为他们面临资产通胀。如果你从这个角度来看 MEV,它实际上对代币持有者来说是一种有益的力量,因为它使他们能够从经济安全中受益,同时面临较少的通货膨胀。
It boils down to where do you want the pain to land. By allowing MEV to be extracted, you limit the inflation required to reach a certain level of economic security, at the cost of user experience. Issuance (inflation) thus becomes a needed utility to reach certain adoption metrics, which eventually will allow you to lower it to insignificant amounts, while MEV can contribute to the security budget (and as a such the decentralization of the protocol itself.
归根结底就是你想让痛苦落在哪里。通过允许提取 MEV,您可以限制达到一定经济安全水平所需的通货膨胀,但代价是用户体验。因此,发行(通货膨胀)成为达到某些采用指标所需的实用程序,这最终将使您将其降低到微不足道的数量,而 MEV 可以为安全预算做出贡献(因此也可以促进协议本身的去中心化)。
However, by preventing or minimizing MEV (if even possible) you increase the general user experience at the expense of token holders, as you need more inflation to maintain economic security. Another, perhaps more farfetched, reasoning behind the level of MEV extraction can be that for an entirely rational actor, extracting the maximum amount might not be the most optimal. Since this will be such a burden on users that they will stop being actively economically on-chain, decreasing the overall amount to be extracted from them over the entire lifespan of a user.
然而,通过防止或最小化 MEV(如果可能的话),您可以以牺牲代币持有者的利益为代价来提高一般用户体验,因为您需要更多的通货膨胀来维持经济安全。 MEV 提取水平背后的另一个可能更牵强的推理可能是,对于完全理性的参与者来说,提取最大量可能不是最优的。由于这对用户来说是一个负担,他们将不再积极地在链上进行经济活动,从而减少了用户在整个生命周期中从他们身上提取的总量。
And while we view MEV through the lens of the base layer in the above section, the same argument can be made more on an application level (although our belief is these will intertwine more with app-chains). Research from Mekatek shows that on a DEX level, you either allow for arbitrage and benefit LPs, or don’t allow for it and compensate LPs with inflation at the expense of token holders. This is a similar dynamic as we have just presented on an infrastructure protocol level.
虽然我们在上一节中通过基础层的视角来看待 MEV,但在应用程序级别上可以更多地提出相同的论点(尽管我们相信这些将与应用程序链更多地交织在一起)。 Mekatek 的研究表明,在 DEX 层面上,要么允许套利并使 LP 受益,要么不允许套利并以通货膨胀补偿 LP,而牺牲代币持有者的利益。这与我们刚刚在基础设施协议级别上呈现的动态类似。
So is MEV good or bad? The fairest answer we can give is, it's both and neither. Some forms of MEV can be seen as bad from the point of view of one, but as rewarding from the point of view of another. Overall, we are of the belief that MEV is neither good nor bad, it just is.
那么MEV是好还是坏呢?我们能给出的最公平的答案是,两者都是,又两者都不是。某些形式的 MEV 从一个人的角度来看可能是不好的,但从另一个人的角度来看却是有益的。总的来说,我们相信 MEV 既不好也不坏,它就是这样。
Decentralizing Sequencers
去中心化排序器
The topic of how much value to be optimally extracted becomes particularly important when you look at MEV on layer 2’s. This is because, as it currently stands, most sequencers are centralized. They are entirely in charge of ordering in a block, and consequently can determine how much to extract. However, as like any point of centralization in crypto, the goal is to move to decentralized sequencer at which point you run into the same incentivization game theory of a PoS L1. The economics behind a sequencer can be shown as;
当您查看第 2 层的 MEV 时,最佳提取多少价值的主题变得尤为重要。这是因为,就目前而言,大多数定序器都是集中式的。他们完全负责区块中的排序,因此可以决定提取多少。然而,就像加密货币中的任何中心化点一样,我们的目标是转向去中心化排序器,此时您会遇到与 PoS L1 相同的激励博弈论。测序仪背后的经济学可以表示为:
yield = issuance (inflation) + sum of fees collected - cost of DA & dispute resolution
(Keep in mind there’s overhead to count for as well in regard to the cost of running hardware)
(请记住,运行硬件的成本也需要考虑开销)
By preventing or limiting MEV to be extracted from an L2, you decrease the sum of fees collected and therefore make it less profitable to run a sequencer, or participate in a decentralized sequencer network. Furthermore, there are various considerations that you need to consider when decentralizing a sequencer set.
通过阻止或限制从 L2 提取 MEV,您可以减少收取的费用总和,从而降低运行定序器或参与去中心化定序器网络的利润。此外,在分散定序器集时,您需要考虑各种注意事项。
The reason why decentralizing sequencers is needed is clear—it decentralizes and removes trust assumptions from the centralized teams building the rollups. Currently, the way rollup sequencers function is that there exists a single sequencer (run by the team) that executes, batches and finalizes all transactions. This is obviously not ideal in the situation of a sequencer failure (although exit withdrawals can help here). Furthermore, it is also putting massive trust assumptions on the team that controls both the sequencer and the multi-sig smart contracts that allow for upgradeability, and fault proofs in the case of fraud. They also have the ability to reorder transactions and extract MEV. Although, the way transactions are currently finalized is under the assumption that the sequencers will not touch, extract or extort any MEV or transactions, which is what gives us the soft finality that allows sequencers to finalize transactions as soon as they’re received. This is what is referred to as soft finality, in some cases actual finality won’t be reached until up to 10 hours later, in the case of ZK rollups. A great example of this can be found if you look at the SHARP stark verifier contract from Starkware on Ethereum—which is where the ZK proof (that is recursively proven from a myriad of transactions) is finalized. This is usually done every 3–10 hours, which is quite the dispute time from when the first transaction in the batch was handled.
需要去中心化排序器的原因很明显——它去中心化并消除了构建汇总的中心化团队的信任假设。目前,汇总排序器的工作方式是存在一个单一排序器(由团队运行)来执行、批处理和完成所有事务。这在定序器故障的情况下显然不理想(尽管退出退出可以在这里提供帮助)。此外,它还对控制定序器和多重签名智能合约的团队施加了巨大的信任假设,以实现可升级性,并在欺诈情况下提供故障证明。他们还能够重新排序交易并提取 MEV。尽管如此,目前交易的最终确定方式是假设排序器不会接触、提取或勒索任何 MEV 或交易,这为我们提供了软最终确定性,允许排序器在收到交易后立即完成交易。这就是所谓的软最终确定性,在某些情况下,在 ZK rollups 的情况下,直到 10 小时后才能达到实际最终确定性。如果您查看以太坊上 Starkware 的SHARP stark 验证者合约,就会发现一个很好的例子,ZK 证明(从大量交易中递归证明)就是在该合约中最终确定的。这通常每 3-10 小时完成一次,这是从处理批次中的第一笔交易开始的相当长的争议时间。
This is done to lower the cost of transactions and put as many transactions in a single proof as possible, otherwise, the cost of transactions would skyrocket. Such is the way transactions are finalized on rollups - they receive a soft finality guarantee, that eventually they will be finalized on the underlying layer (in this case Ethereum). In the case of Optimistic rollups transactions are instead batched up and the state root (same as ZKRs) alongside the calldata (transaction state, this is just state diff with ZKRs) is sent to the L2 contract on Ethereum. Because of dispute period requirements (the ability to roll back a fraudulent transaction) actual finality of transactions on Optimistic Rollups doesn’t happen until around 7 days later (agreed on number). This means their actual soft finality guarantee last quite some time to allow for watchers to prove any fraud that has happened. These are all issues that need to be addressed when we decentralize the sequencer set; soft finality needs to be guaranteed, and eventual finality needs to be reached while allowing for the proofs (validity or fraud) to function as intended.
这样做是为了降低交易成本,并将尽可能多的交易放在一个证明中,否则交易成本将会飙升。这就是交易在汇总上最终确定的方式 - 它们收到软最终确定性保证,最终它们将在底层(在本例中为以太坊)上最终确定。在乐观汇总的情况下,交易会被批量处理,状态根(与 ZKR 相同)与调用数据(交易状态,这只是与 ZKR 的状态差异)一起被发送到以太坊上的 L2 合约。由于争议期要求(回滚欺诈交易的能力),乐观汇总上的交易的实际最终结果要到大约 7 天后才会发生(就数字达成一致)。这意味着他们的实际软最终性保证会持续相当长的时间,以允许观察者证明已经发生的任何欺诈行为。这些都是我们去中心化定序器集时需要解决的问题;需要保证软最终性,并且需要达到最终的最终性,同时允许证明(有效性或欺诈)按预期发挥作用。
Underneath is a picture of the way rollups function currently:
下面是当前汇总功能的图片:
Keep in mind that L2 finality is not finality when you depend on the L1 for consensus. This is partly the trade-off you make when you move the consensus of the chain from the rollup to the underlying “settlement” layer. Unless you handle consensus on the rollup as well (which would lose the derived security, but could gain sovereignty and utilize a DA layer for data availability guarantees). However, the obvious tradeoff here is the fact that you fragment liquidity and increase the difficulty of interoperability.
请记住,当您依赖 L1 达成共识时,L2 终结性并不等同于终结性。当您将链的共识从汇总层转移到底层“结算”层时,这在一定程度上是您所做的权衡。除非您也处理汇总共识(这将失去派生的安全性,但可以获得主权并利用 DA 层来保证数据可用性)。然而,这里明显的权衡是流动性分散并增加了互操作性的难度。
Next off, let’s explore some possibilities for decentralizing the sequencers of rollup, and what kind of implications this can have for MEV.
接下来,让我们探讨一些去中心化 rollup 排序器的可能性,以及这对 MEV 有何影响。
First off, to decentralize the sequencer set means to remove the trust assumption that we have in a singular one that is run by a team that has incentives to not touch MEV nor reorder transactions. This gives a certain “protection” against MEV. However, if you move to decentralize the sequencer set, possibly through the bonding of tokens. You open up the possibility for a permissionless or semi-permissioned set of validators/sequencers to extract value, since they have committed tokens of the rollup (such as with the Fuel token model). This means there needs to be a mechanism to ensure block ordering correctness and slashing properties in place. The reason for this is to ensure that the sequencer set keeps liveness, stays fair and doesn’t infer on transactions. Such as with reordering and placing their own transactions first in the pool—even if they paid less in gas fess, this usually warrants a public mempool, or guarantees of inclusion.
首先,去中心化排序器集意味着消除我们对单个排序器集的信任假设,该假设是由一个有动机不接触 MEV 或重新排序交易的团队运行的。这对 MEV 提供了一定的“保护”。但是,如果您采取去中心化定序器集的方式,可能是通过代币绑定。您为一组无需许可或半许可的验证器/排序器提供了提取价值的可能性,因为它们已经提交了汇总代币(例如使用 Fuel 代币模型)。这意味着需要有一种机制来确保区块排序的正确性和削减属性。这样做的原因是为了确保定序器集保持活跃、保持公平并且不会推断交易。例如,重新排序并将自己的交易放在池中——即使他们支付的天然气费用较少,这通常也保证了公共内存池或包容性的保证。
Underneath are some examples of how this could look:
下面是一些示例:
Proof-of-Stake with Leader Election. This would likely be with Tendermint’s leader election or akin (since we derive consensus from the base layer) alongside a slashing module (like the Cosmos SDK one), or something similar. This is at least the option that most rollups that I’ve talked to seems to be going down. However, there are other options as well. With PoS, if you allow the largest holder to get the most % of blocks, it will inevitably also lead to centralization. Or also revert to a MEV auction, since you bid with the opportunity cost instead of outright payments.
领导者选举的权益证明。这可能与 Tendermint 的领导者选举或类似的(因为我们从基础层获得共识)以及削减模块(如 Cosmos SDK 模块)或类似的东西有关。这至少是我接触过的大多数汇总似乎正在下降的选项。然而,还有其他选择。使用PoS,如果让最大的持有者获得最多%的区块,也将不可避免地导致中心化。或者也可以恢复 MEV 拍卖,因为您使用机会成本而不是直接付款进行投标。Fair Ordering Sequencing (Arbitrum have in particular looked at this). For this to work properly, you’d also need a bond that is slashable (which could be the same for everyone, to keep the essence of fairness). In this setup, you “pay” [opportunity cost per block * blocks staked] for the right to extract MEV over that period. For fair ordering to work, you’d need a fair ordering protocol that picks a fair sequence of events to eventually publish. This will usually come through honest majority assumptions, such as in the form of first serve ordering with a merged transaction list from the various sequencers. The system is, as such, first come-first serve with a 51%-of-N honesty assumption. In the case of dishonesty, the system could commit to a social fork (if they have sovereignty).
公平排序排序(Arbitrum 特别关注了这一点)。为了让它正常工作,你还需要一个可削减的债券(这对每个人来说都是一样的,以保持公平的本质)。在此设置中,您“支付”[每个区块的机会成本 * 质押的区块]以获得在此期间提取 MEV 的权利。为了使公平排序发挥作用,您需要一个公平排序协议来选择公平的事件序列以最终发布。这通常会通过诚实的多数假设来实现,例如采用来自各个定序器的合并事务列表的先服务排序的形式。因此,该系统采用先到先服务的原则,并假设 N 的诚实度为 51%。在不诚实的情况下,系统可能会进行社会分叉(如果他们拥有主权)。
The problem in particular with the second option is the fact that it becomes a latency race to be included first, which will most likely lead to builders and searchers moving as close as humanly possible to the sequencers in question (much like what we’ve seen in Trad Fi, and even in the crypto world as well by optimizing network latency). This obviously causes geographical centralization.
第二种选择的问题在于,它成为首先包含的延迟竞赛,这很可能导致构建者和搜索者尽可能接近有问题的排序器(就像我们所看到的那样)在 Trad Fi 中,甚至在加密世界中也可以通过优化网络延迟)。这显然造成了地域集中化。
There have also been some discussions surrounding MEV auctions (bidding for the right to extract MEV and propose a block) for sequencing slots (particularly from the Optimism camp). However, we feel that it pushes towards centralization despite its permissionless nature, and it has a very high barrier to entry. Although some of the aforementioned methods also lead to “centralization”, it’s way less obvious and harmful to the protocol.
还有一些围绕排序槽的 MEV 拍卖(竞标提取 MEV 并提出区块的权利)(特别是来自乐观阵营)的讨论。然而,我们认为,尽管它具有无需许可的性质,但它仍在推动中心化,并且进入门槛非常高。尽管上述一些方法也会导致“中心化”,但它不太明显,而且对协议有害。
Generally, the fair ordering mechanisms aren’t able to “prevent” or mitigate MEV in any way that doesn’t add considerable negative trade-offs. However, things like threshold encryption, time lock puzzles, batch auctions and meta mempools (unbundling the mempool and block builder role with a shared aggregation/sequencer layer—which could become useful in the area of cross-domain MEV, which we’ll also touch upon later) might have more success in providing such properties.
一般来说,公平排序机制无法以任何不增加相当大的负面权衡的方式“预防”或减轻 MEV。然而,诸如阈值加密、时间锁定谜题、批量拍卖和元内存池(通过共享聚合/排序器层将内存池和区块构建器角色分拆——这可能在跨域 MEV 领域变得有用,我们也会在跨域 MEV 领域发挥作用)稍后会谈到)可能会在提供此类属性方面取得更大的成功。
Now that we’ve seen how sequencers currently work and some methods for possibly decentralizing them—let’s try to picture how a decentralized sequencer set looks, and what it needs to keep finality guarantees and make sure the protocol functions as intended.
现在我们已经了解了定序器当前的工作原理以及可能实现去中心化的一些方法,让我们尝试描绘一下去中心化定序器集的外观,以及它需要什么来保持最终性保证并确保协议按预期运行。
On top is a sequencer setup in a smart contract rollup, underneath we’ll showcase how this would look with a sovereign rollup (rollup on top of a DA layer) via PoS leader election. In the fair sequencing setup, there isn’t much incentive to buy and stake the required token amount to become a sequencer, and the total cryptoeconomic security of the sequencer set, stays rather low.
顶部是智能合约 Rollup 中的排序器设置,下面我们将通过 PoS 领导者选举展示主权 Rollup(DA 层顶部的 Rollup)的外观。在公平排序设置中,没有太多动机购买和质押所需的代币数量来成为排序器,并且排序器集的总体加密经济安全性仍然相当低。
In this setup, the way it works is quite simple—When choosing the sequencer for a certain round, a committee simply utilizes a weighted round-robin method based on stake weight. With this method, any validator can easily calculate the eligible proposer for a given round. If you want to read about NMTs on Celestia, check out our data structures article here. (Keep in mind that the dispute window could potentially be lowered in this setup, as you’re not in the extremely competitive blockspace of Ethereum).
在这种设置中,它的工作方式非常简单——在为某一轮选择排序器时,委员会只需使用基于权益权重的加权循环法。通过这种方法,任何验证者都可以轻松计算给定轮次的合格提议者。如果您想了解 Celestia 上的 NMT,请在此处查看我们的数据结构文章。 (请记住,在此设置中争议窗口可能会降低,因为您不在以太坊竞争极其激烈的区块空间中)。
There’s also been some research and discussion (2017 on Tendermint repo) done into randomizing leader election as well, which could also be a method to get a similar setup to fair ordering, but with a random proposer (leader) instead of first-come, first-serve. Although, this disincentivizes sequencers to buy and stake more tokens (which weighted round-robin incentivizes), which could lower the economic security of the protocol.
还有一些关于随机领导者选举的研究和讨论( 2017 年在 Tendermint repo 上),这也可能是一种获得与公平排序类似的设置的方法,但使用随机提议者(领导者)而不是先到者,先服务。尽管如此,这会抑制排序者购买和质押更多代币(这会激励加权循环),这可能会降低协议的经济安全性。
MEV extraction differs between the two different setups, and can result in MEV being distributed and extracted differently. There are other concerns to keep in mind, such as finality guarantees, disincentivisation methods for MEV, which we’ll cover in a second part alongside the various actor that populates the space in modular MEV, and how collusion can happen. We’ll also look at shared sequencers and meta mempool setups—so look out for another part in the coming weeks!
两种不同设置之间的 MEV 提取有所不同,并且可能导致 MEV 的分配和提取方式不同。还有其他问题需要记住,例如最终保证、MEV 的去激励方法(我们将在第二部分中与填充模块化 MEV 空间的各种参与者一起讨论)以及如何发生共谋。我们还将研究共享排序器和元内存池设置——所以请在接下来的几周内关注另一部分!
Many thanks to Mathijs van Esch for participating in the writing of this article, and to Josh Bowen for the discussion that originally led to this series of articles.
非常感谢Mathijs van Esch参与本文的撰写,并感谢Josh Bowen最初促成本系列文章的讨论。
Thanks to Mekatek for reviewing.
感谢Mekatek的审阅。
The four graphs on MEV data related to blocks per relay, builder payments and MEV-boost share are able to be found at https://mevboost.pics/, one of the greatest websites on MEV data - big thanks to Toni Wahrstätter
与每个中继的区块、构建商付款和 MEV-boost 份额相关的 MEV 数据的四个图表可以在 https://mevboost.pics/ 上找到,这是关于 MEV 数据的最好的网站之一 - 非常感谢Toni Wahrstätter
If this is a topic you’re passionate about, feel free to reach out to the writer on Twitter:
如果这是您热衷的话题,请随时在 Twitter 上联系作者:
amazing post, learned a lot!
很棒的帖子,学到了很多!