Flashbake on Mainnet: here we come

Nicolas Ochem
Flashbake
Published in
5 min readOct 17, 2022
Lightning on Sasso Lungo, Dolomites

When you submit a transaction to the Tezos Network, it is placed in a node’s mempool — a public list of all operations a node knows about, but have not yet been placed in a block. Nodes regularly gossip transactions from their mempool.

We are introducing Flashbake on Tezos Mainnet today. Flashbake is a mechanism to send a transaction directly to a baker, bypassing the mempool.

This requires bakers to opt-in, register and run an endpoint. Registration is on-chain and permissionless. So far, only one baker, Tessellated Geometry, has registered.

You can submit a Flashbake transaction today. For this, you need to be on the lookout for Tessellated Geometry’s next block.

Within one hour of the allotted slot of the baker’s next block, submit a transaction to the Flashbake Relay as follows:

octez-client --endpoint https://relay.flashbake.xyz transfer 1 from alice to bob --fee 0.3

This is not your regular Tezos endpoint: you may wait a long time for the operation to be included, or it may fail altogether.

In fact, for every Flashbake block, only one Flashbake transaction will make it. The highest bidder wins! Do not hesitate to put a high fee.

The winner will be included in the block, before every other transaction. All while bypassing the mempool.

The transaction is private until inclusion: only the sender, the relay and the baker know about it. For extra privacy, you can run your own relay.

If no Flashbaker is available within the next hour, the relay will immediately return an error: indeed, Tezos transactions are only valid for one hour — 120 blocks- and will expire after that.

Of course, as is, the system is not very impressive: the participating baker only produces a few blocks per cycle, so it almost never makes sense to use the system.

But any baker can register as Flashbaker and participate. Our relay running on the Ghostnet testnet is already pretty useful: any transaction submitted to it will almost certainly be included within a few minutes.

This could be true of mainnet as well. A public mempool is neither mandatory nor necessarily the best way to send transactions for inclusion. In Tezos, you know weeks in advance who the baker will be at a given time. Why not send transactions to them directly?

That would be a win for the ecosystem: increased privacy, less on-chain space wasted by backtracked transactions, less fees spent on losing NFT bids.

We are hoping for a quick adoption of the technology. Below we explain why bakers should join the effort.

First Flashbake Block on Mainnet

The first Flashbake block on Mainnet was baked at level 2809410.

How to tell? Normally, the baker fetches transactions from the mempool and orders them by decreasing profitability. By looking at the transactions in the block, it is possible to determine whether this default ordering was respected, or whether the first transaction had a lower fee than the second, relative to the amount of gas and storage used. The latter is a strong indication that a Flashbake transction was included.

We wrote a script to detect such blocks. In the case of block 2809410, the first transaction has a fee of zero. It would not normally have been included, or if it had, it would have been the last transaction of the block.

As the system becomes more popular and people start competing for inclusion, the Flashbake transaction may have the highest fee anyway. Still, a non-decreasing order of transaction fees within the block is indicative of sophisticated block production strategies. Part of our work is to shine light on them.

A Private Fee Market is Good

Today, Flashbake only includes one transaction per block. But we are planning to accept several transactions in parallel. We also want to allow submission of “bundles” of transactions for inclusion in a specific order. Bundles are different than batches, in the sense that they could contain transactions that are not the submitter’s own.

With this we expect the emergence of “searchers” that scour the mempool for transactions, reorder them to extract value, and submit this bundle to the baker. Most of the value goes to the baker (with either fees or “bribes”), and the searcher takes a cut.

At the limit, every block on Tezos could be pre-assembled by a searcher and submitted to a baker for inclusion. Bakers would simply pick the most profitable block proposal. With this comes a risk of centralization, where extremely well-performing searchers end up producing a majority of the blocks.

The Ethereum community is grappling with such problems: powerful Ethereum searchers submit block proposals to a specialized system called MEV-boost. A majority of validators are currently opting to pick the most profitable among these proposed blocks and add it to the chain. Censorship concerns have emerged as a result.

Of course, Tezos users as well sometimes stand to lose from sophisticated MEV strategies. A simple example is arbitrage: DEX transactions can be “milked” by the searchers, so DeFi traders get a worse exchange rate than they would otherwise have.

All of this sounds pretty bad. But in the same way that no one should run a e-commerce platform without TLS security in 2022, no one should deploy smart contracts that have no MEV protection.

Tezos benefits from fast protocol development cycles and is bent toward enshrining everything. This allows for rapid development of MEV protection mechanisms as well as enforcement mechanisms to ensure fairness and censorship-resistance.

Example of such mechanisms are:

  • Timelock feature, where smart contract execution is delayed until the block is finalized, preventing reordering. This feature is currently under redevelopment.
  • Enforceable inclusion receipts: by receiving a cryptographic receipt, the user is sure that their transaction will be included in the next block, otherwise the baker gets penalized.
  • One proposal making the rounds in the Ethereum ecosystem is called “Proposer-Builder Separation” (PBS), where the validator picks the most profitable block without knowing its contents. Since Tezos moved to the Tenderbake consensus algorithm, we are already distinguishing between “block producer” and “payload producer”. In most cases, there are one and the same. With a protocol amendment, bakers may be able to “commit” to a block header proposed by a separate payload producer (the searcher), without knowing its contents. This would ensure fairness.
  • Decentralized searching, where a committee of searchers extract value in zero-knowledge fashion, rendering it unable to censor transactions.

With safeguards like these in place, MEV extraction is akin to slashing: something that happens only rarely, due to improper operation of the platform, rather than a pervasive and ineluctable “fact of life”. We are hoping for continued funding of our effort so we can further explore this topic.

These improvements could allow Tezos to ultimately leapfrog Ethereum to become the fairest blockchain platform. But for this to happen, we first need Flashbake to be a thing.

We urge all bakers to join the effort today. Please go to the Flashbake documentation and let us know if you have any questions.

Thanks to Vincent Botbol

--

--