# sequencing in decentralized systems ## what approximately a "systemization of knowledge" of what we mean when we talk about "sequencing" or the actors known as "sequencers" in the blockchain context inspiration: [SoK: Validating Bridges as a Scaling Solution for Blockchains](https://eprint.iacr.org/2021/1589.pdf) ## outline * sequencing what? * "transactions" on a "blockchain" * allocation of blockspace * examples in bitcoin, ethereum (no MEV talk yet) * who is sequencing? the _sequencer_ * some leader election protocol to append to the chain * what leader election protocols to consider for the sequencer? * centralized "trusted third-party" * default, web2 world * anyone * proof-of-work * [DMMS notion from this paper](https://download.wpsoftware.net/bitcoin/pos.pdf) * proof-of-stake * RANDAO * "stake-weighted" round robin * sequencer auction * security/trust model for sequencer role * safety? * full nodes ensure safety in L1 settings * "executors" ensure safety in L2 settings * liveness * the bigger one here... * censorship-resistance * avoid wasted work of "anyone can sequence" paradigm while still retaining liveness guarantees * possible call-out to importance of censorship resistance properties here * common design: single leader election per round with all "degrees of freedom" * degrees of freedom: include, reorder, censor/remove transactions from their sequence * implication: MEV * explain MEV at fairly high-level * how to sequence? enter the mempool * mempool designs * how they commonly work * what can go wrong? * DoS attacks * adversarial attacks on mempools * Avalanche example, Solana example, Arbitrum example * interactions with MEV * latency arms race to co-locate with sequencer * cross-domain sequencing * write out formal definition of domain (ralexstokes: not sure this actually exists anywhere) * describe setting of sequencing across multiple domains * in particular, **atomic** cross-domain sequencing * this could be an entire separate piece but: * look at Cosmos interchain scheduler ideas, Flashbots SUAVE ideas, how does Polkadot think about this * security model * centralized setting: easy * how to do in decentralized fashion? * (could be a "future research directions" question) * applications: sequencer as generic abstraction * pre-confirmations * "gas futures" * mention other "builder abstractions" around account abstraction, transaction flexibility * future research directions * we commonly see centralized sequencers in e.g. L2 deployments... how to decentralize sequencer role? * can we just do sequencer auctions and call it a day? * what is the best amount of time to auction off sequencing rights? * how to handle failover if there are liveness issues with auction winner? * maybe: how should sequencers handle the revenue they receive? * user rebate? burn the revenue? fund public goods? fund private goods? * note: "aggregatable sequencing" is equivalent to "distributed building" * important for health of transaction supply chain * just like we have aggregation in cryptography context, can we have aggregation of transaction sequence? * maybe: tie in order flow auctions (OFAs) * separation of transaction inclusion from transaction ordering * commonly see separation of transaction ordering from transaction execution * this is how rollups scale * but also w/in rollups for greater flexibility * and can also consider further refinement * transaction inclusion lists, partial block auctions * how to handle privacy b/t users and sequencers? * exclusive mempools * avoid some MEV if you trust sequencer * private mempools? * remove prior trust assumption, open space of possible sequencer configurations for better decentralization/competition * move from single to multiple leader election protocols * economics/aggregate welfare may improve if there is more competition, rather than exclusive proposer monopoly for one round of leader election protocol ## TODO review resources for integration here: https://twitter.com/ObadiaAlex/status/1632070203088715777?s=20 consider how much of an abstract view to present, e.g. sxysun's work