Preconf Sequencing Rules
Last updated
Last updated
As we will further decentralize the preconfer role, we need to enforce a MEV-resistant sequencing rule to prevent potentially malicious preconfers.
Our end game is to develop a for both L1 and L2 preconfirmations to maximize censorship resistance, MEV resistance, and liveness properties.
As the first step, however, we will introduce a verifiable sequencing mechanism that's much easier to implement.
Consider the scenario where a sequencer is responsible for ordering user transactions. To limit the sequencer's ability to extract MEV, we establish specific rules for the final order of transactions. Here we define a verifiable sequencing rule to be a sequencing rule that can be effectively determined within polynomial time.
A sequencing rule is a function with two variables:
a sequence of transactions and
prior blockchain states . The output, , is nonempty subset of all permutations of , representing allowed orderings of .
A sequencing rule is verifiable if and only if for any transaction sequence and any given prior states , it can be determined in polynomial time that is or .
Note:
We gave a slightly more general definition of sequencing rule above. In many other works, the first input of is set of transaction instead of a sequence of transaction. Our definition is more general in the sense that if we add the restriction for any permutation of , then we obtain the definition of a sequencing rule found in other works.
A sequencing rule is verifiable here means can be verifiable effectively within polynomial times
A sequencing rule defines what kind of ordering is acceptable and add restrictions to sequencers ordering of transactions. A good sequencing rule should be designed to achieves designer goal. In the next section, we use an example work to illustrate the initial version of our verifiable sequencing mechanism.
Taiyi V0's sequencing rule will be based on the verifiable sequencing rule proposed by .
Here is the gist of the rule:
Usually, a sequencer can extract MEV from userβs currency exchange transaction on a convex AMM pool by inserting sequencerβs own currency exchange transactions before and after . This is particularly profitable when the sequencer can use usersβ transactions to significantly shift βs position from its prior state. In this context, the position of a liquidity pool is represented by a pair , indicating the amounts of each currency in the pool.
This suggests that it may be beneficial to restrict the sequencerβs ability to significantly shift a liquidity poolβs position. In particular, the paper points out following key dichotomy:
Consider a pool βs prior position is , where and are amounts of currencies and , respectively. A buy is a transaction that sell for , and a sell is a transaction that sells for . Then for any position , exactly one of following is true:
A buy at position buys more than it does at position if
A sell at position sells more than it dose at position if
Based on this dichotomy, the paper suggests a greedy sequencing rule: when , the next transaction on must be a buy unless no remaining buy transactions are available for sequencing; when , the next transaction on must be a sell unless no remaining sell transactions are available for sequencing. Thus, the greedy sequencing rule requires oscillation around the convex AMM poolβs prior positions for as long as possible. Clearly, this greedy sequencing rule can be verified with linear time complexity, making it verifiable.
As for implementation, we will leverage zk-coprocessor, to verify transaction sequence according to the rule.