π¦Preconf Sequencing Rules
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 concurrent proposer consensus 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.
Definitions
A sequencing rule is a function S with two variables:
a sequence of transactions txs=<T1β,T2β,...,Tnβ> and
prior blockchain states X. The output, S(txs,X), is nonempty subset of all permutations of txs, representing allowed orderings of txs.
A sequencing rule S is verifiable if and only if for any transaction sequence trs and any given prior states X, it can be determined in polynomial time that is txsβS(txs,X) or txsβ/S(txs,X).
Note:
We gave a slightly more general definition of sequencing rule S above. In many other works, the first input of S is set of transaction instead of a sequence of transaction. Our definition is more general in the sense that if we add the restriction S(txsβ²,X)=S(txs,X) for any permutation txsβ² of txs, then we obtain the definition of a sequencing rule found in other works.
A sequencing rule S is verifiable here means S 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 Credible Decentralized Exchange Design via Verifiable Sequencing Rules.
Here is the gist of the rule:
Usually, a sequencer can extract MEV from userβs currency exchange transaction T on a convex AMM pool P by inserting sequencerβs own currency exchange transactions before and after T. This is particularly profitable when the sequencer can use usersβ transactions to significantly shift Pβs position from its prior state. In this context, the position of a liquidity pool is represented by a pair (m,n), 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 Pβs prior position is (m0β,n0β), where m0β and n0β are amounts of currencies C0β and C1β, respectively. A buy is a transaction that sell C0β for C1β, and a sell is a transaction that sells C1β for C0β. Then for any position (m,n)ξ =(m0β,n0β), exactly one of following is true:
A buy at position (m,n) buys more than it does at position (m0β,n0β) if m<m0β
A sell at position (m,n) sells more than it dose at position (m0β,n0β) if m>m0β
Based on this dichotomy, the paper suggests a greedy sequencing rule: when m<m0β, the next transaction on P must be a buy unless no remaining buy transactions are available for sequencing; when m>m0β, the next transaction on P 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, Axiom to verify transaction sequence according to the rule.
Last updated
