通过全体一致排序:在不破坏可组合性的情况下赋予应用程序排序权
Ordering by Unanimity: Giving Applications Sequencing Rights Without Breaking Composability
浏览论文内容
中文总结 AI 辅助
研究区块链应用对交易执行顺序有偏好但与底层区块链排序不兼容的问题,引入一致否决算法,该算法能打破应用一致意见形成的循环,且能保证与单个应用交互的交易按其偏好排序及门控交易按应用一致偏好执行。
中文摘要 AI 辅助
区块链应用可能对交易执行顺序有偏好,如自动做市商需预言机更新在掉期前执行,交易所想先执行限价订单取消等。但底层区块链选择的交易排序可能与特定应用需求不兼容。本文引入一致否决算法解决此问题。其直觉是当所有应用就两笔交易排序达成一致时,区块链应尊重;默认顺序(交易在区块中的出现顺序)解决其余情况。然而,应用的一致意见可能形成循环,算法须打破。打破循环也是该规则的主要弱点,因攻击者可插入交易制造循环。不过,对于设置默认顺序、部署应用和插入交易的任何攻击者,有两个保证:与表达偏好的单个应用交互的所有交易按该应用偏好排序;门控交易(攻击者构造的任何交易在一致顺序中都无法超越它们)总是按应用一致偏好执行。这两个保证确定了协议可保护的偏好,并提前告知应用和发送者哪些交易将按预期顺序执行。
英文摘要
Blockchain applications may have preferences over the order in which transactions execute: an automated market maker may use an external feed to price its liquidity, and require that the oracle update incorporating this price execute before any swap; an exchange may want to execute cancellations of limit orders before incoming market orders; an application may run an on-chain auction by executing bids from highest to lowest, so that the first bid wins. However, the ordering of transactions is chosen by the underlying blockchain and may not be compatible with the requirements of a specific application. In this paper, I tackle this problem by introducing an algorithm called unanimity override. The intuition is that when all the applications agree on how to order two transactions, the underlying blockchain should respect this agreement; a default order - the order in which transactions appear in the block - settles the rest. The problem with this naive approach is that application unanimity may form cycles, which the algorithm must break. Cycle-breaking is also the rule's main vulnerability because an attacker can insert transactions to manufacture a cycle. Yet two guarantees hold against any attacker who sets the default order, deploys applications, and inserts transactions. All transactions that interact with a single application that expressed preferences are ordered according to that application's preferences, even when they also interact with other applications that did not express preferences. Also, gated transactions - those that cannot be outranked in the unanimity order by any transaction crafted by an attacker - always execute as the applications unanimously prefer, even when they touch many applications. The two guarantees identify the preferences the protocol can protect, and they tell applications and senders in advance which transactions will execute in the intended order.