Becoming STXN

Anuj DG
Smart Transactions
Published in
5 min readJun 4, 2024

Written in collaboration with Vlad Zamfir.

The Past

The Ethereum VM was conceived of as a metered virtual machine that charges for resource consumption according to a gas schedule in order to protect protocol nodes against spam/DOS. Traders used the transaction ordering system in order to outbid each other for priority in blocks, but miners had preferential positions in determining the order of transactions and began to offer services to traders so they can save gas on failed transactions. Phil Daian and co. coined “MEV”, originally “miner extractable value”, noting that miners can extract trading margins from ordering transactions in an adversarial manner.

Eth Infrastructure, how it used to be

Most miners were specialized in operating hardware rather than transaction ordering, and more technically sophisticated algo traders became specialized in ordering transactions. These traders emerged as special actors, called “searchers”, would “tip” these miners to process specific bundles of transactions that would result in trading profits for them. This market was searching for ways to mitigate losses due to the “theft” of these bundles, where competing searchers, or more technically sophisticated miners, would reorder the transactions, replacing trader transactions with their own, in order to take advantage of the profitable trading opportunities that the searchers had found. EIP-1559 made it worse, since the reduction in fees to be received by the miners forced them to want to make the most profit from the “tip”.

The Present

Seeking to reduce the cost of anarchy of this competition, Flashbots provided software (Flashbots Auction Alpha) creating Flashbots Relay. It relayed bundles of transactions from searchers to “trusted miners” — trusted to not trade against the searchers — but instead would accept the bundle with the highest “MEV tip” as compensation without alteration. This served to protect searchers against each other, and against miners.

Ultimately, unsophisticated traders using Ethereum transactions to trade illiquid cryptocurrencies with automated market makers ended up bearing the cost. Their transactions increasingly getting “sandwiched” between trades that frontrun and backrun the transaction, often resulting in effectively maximum trading losses in transaction execution.

Just as searchers had sought protection from miners, traders now sought protection from searchers, with similar approaches and results. Rather than publishing transactions to the public mempool and bidding based on the gas schedule, traders increasingly opted for private mempools from “trusted searchers” to “minimize MEV”, while searchers started looking to get MEV-supremacy by capitalizing on “private order flow”.

With the transition from mining to proof-of-stake (“the merge”), an effective lottery for which miner would mine the next block would be replaced with a randomized but pre-planned schedule of proposers who are assigned different blocks. To mitigate potential centralization and vertical integration, Vitalik proposed “proposer-builder-separation” (PBS), which created a role of “builder” who would be charged with transaction ordering, so that proposers would not feel economically pressured to participate or compete in the MEV marketplace.

“Builders” are in effect searchers, but rather than searching just for bundle of transactions, they would be searching for the every block field. Flashbots provided MEV-boost software that builders, relays and proposers would use to implement an auction where “builders” could compete without being able to look at each other’s search results, such that proposers would collect the highest MEV tip offered for accepting a builder’s search result.

Ethereum PBS arch [source: Bankless blog]

Earlier miners, and now PBS builders and searchers broke the Nakamoto-mandated principle of absolute non-interventionism in the block’s transaction and composition, by getting into this interactive mode with respect to the mempool and the miners. This was a change that was not only technical but also cultural as a traditional variant of the strong anti-censorship paradigm in crypto meant: the public mempool of transactions and the logic of the fee market are the only factors that could decide the composition of transactions into blocks. In effect, the reality of what a blockchain is changed forever as more and more transactions circumvented the logic of the priority gas auction.

The Future

This reluctant but inevitable acceptance — of intervention post a transaction is sent from a wallet and before it is included in a block — was nothing short of a socio-political revolution in the crypto landscape, with stages of internal and immanent crisis in the crypto communities: most ardent OGs worried about the eventual future of crypto. This took us back to the early days of Bitcoin with its blocksize debates and Ethereum’s TheDAO hard fork, both of which were fundamental in shaping the constitution of crypto, as both were governance debates. Thus, MEV represents a central question of blockchain governance, even apart from and underlying, the question of technically designing secure transaction infrastructure.

Smart Transactions extend the scope of validation of Ethereum transactions by using transaction infrastructure that provides MEV-time oracles and other MEV-time services. Since Intervention of and Interaction with the block production process has now been made normalized post MEV, Smart Transaction builds on this fundamental attitudinal change by extending on and enhancing Ethereum transaction validation semantics.

This could mean validating based on temporally contingent state changes, or based on oracle values that are supplied mid transaction time as and when the I/O request is initiated, or on the composition of the developing transactions that is going to constitute the current block. For example, consider a “smart” transaction pattern where searchers must provide values from the future because the transaction reverts if it finds a different value when it finally arrives at this future point of its execution. This and much more is now possible.

--

--