Tai-yi V0
  • Page
  • 🌐Taiyi Overview
  • πŸ”§Taiyi Use Cases
  • πŸŒ…Taiyi System Analysis
    • πŸŒοΈβ€β™‚οΈTaiyi V0 System Design Goals
    • ❓Taiyi V0 Solution
    • 🌊System Flow
    • πŸ”’Preconfirmation Pricing & Backtest
    • 🚦Preconf Sequencing Rules
  • πŸ—ΊοΈTaiyi Roadmap
  • βš™οΈAPI
  • ❓FAQ
Powered by GitBook
On this page
  1. Taiyi System Analysis

Preconf Sequencing Rules

PreviousPreconfirmation Pricing & BacktestNextTaiyi Roadmap

Last updated 11 months ago

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.

Definitions

  • A sequencing rule is a function SSS with two variables:

    • a sequence of transactions txs=<T1,T2,...,Tn>\text{txs}=<T_1,T_2,...,T_n>txs=<T1​,T2​,...,Tn​> and

    • prior blockchain states XXX. The output, S(txs,X)S(\text{txs}, X)S(txs,X), is nonempty subset of all permutations of txs\text{txs}txs, representing allowed orderings of txs\text{txs}txs.

  • A sequencing rule SSS is verifiable if and only if for any transaction sequence trs\text{trs}trs and any given prior states XXX, it can be determined in polynomial time that is txs∈S(txs,X)\text{txs} \in S(\text{txs}, X)txs∈S(txs,X) or txsβˆ‰S(txs,X)\text{txs} \notin S(\text{txs}, X)txs∈/S(txs,X).

Note:

  • We gave a slightly more general definition of sequencing rule SSS above. In many other works, the first input of SSS 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)S(\text{txs}', X) = S(\text{txs}, X)S(txsβ€²,X)=S(txs,X) for any permutation txsβ€²\text{txs}' txsβ€² of txs\text{txs}txs, then we obtain the definition of a sequencing rule found in other works.

  • A sequencing rule SSS is verifiable here means SSS 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 TTT on a convex AMM pool PPP by inserting sequencer’s own currency exchange transactions before and after TTT. This is particularly profitable when the sequencer can use users’ transactions to significantly shift PPP’s position from its prior state. In this context, the position of a liquidity pool is represented by a pair (m,n)(m,n)(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 PPP’s prior position is (m0,n0)(m_0,n_0)(m0​,n0​), where m0m_0m0​ and n0n_0n0​ are amounts of currencies C0C_0C0​ and C1C_1C1​, respectively. A buy is a transaction that sell C0C_0C0​ for C1C_1C1​, and a sell is a transaction that sells C1C_1C1​ for C0C_0C0​. Then for any position (m,n)β‰ (m0,n0)(m,n) \neq (m_0,n_0)(m,n)ξ€ =(m0​,n0​), exactly one of following is true:

  1. A buy at position (m,n)(m,n)(m,n) buys more than it does at position (m0,n0)(m_0,n_0)(m0​,n0​) if m<m0m<m_0m<m0​

  2. A sell at position (m,n)(m,n)(m,n) sells more than it dose at position (m0,n0)(m_0,n_0)(m0​,n0​) if m>m0m>m_0m>m0​

Based on this dichotomy, the paper suggests a greedy sequencing rule: when m<m0m<m_0m<m0​, the next transaction on PPP must be a buy unless no remaining buy transactions are available for sequencing; when m>m0m>m_0m>m0​, the next transaction on PPP 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.

concurrent proposer consensus
Credible Decentralized Exchange Design via Verifiable Sequencing Rules
Axiom
πŸŒ…
🚦
Page cover image