Miner Extractable Value (MEV) on Bitcoin Cash

Secondary effects of enabling rich logic on BCH:

  1. Centralized block templates (hurts censorship resistance)
    https://x.com/MKjrstad/status/1885640991173906678
    https://x.com/nero_eth/status/1846786871998759141

  2. Compact Blocks collapsing due to dark mempools (10x hit to scalability)
    https://x.com/MKjrstad/status/1883400171939373105
    https://x.com/Data_Always/status/1882612445426180188

  3. Unconfirmed transaction chains built on UTXOs that will be nuked (double-spend risk)
    https://x.com/MKjrstad/status/1885342361338646716

This post was flagged by the community and is temporarily hidden.

ShadowOfHarbringer flagged my post. Can someone please undo the damage he is causing?

This post was flagged by the community and is temporarily hidden.

Cute cherry-picks, but there’s much more to it.

1.

Centralized block templates (hurts censorship resistance)

You need to explain how this would hurt censorship resistance. By design block templates are “centralized” with block producers, and now we have specialization so pools are the producers and miners are the hashers. Hashers can easily “uncentralize” their hash by running their own pool. What does MEV change here?

If most apps have simple stupid MEV then how would some pool gain advantage over another? They’d all be equally capable to extract MEV, just as they’re equally capable to collect TX fees. The whole boogeyman depends on there being some imaginary super complex MEV that only the most genius of pools (or specialists) can extract and gain an edge.

I think Rearden made an argument somewhere that for this reason MEV on BCH is less dangerous than it would be on BTC with CAT/CTV, because on BCH ScriptVM is more expressive and makes it more obvious how/where to extract MEV.

Novel MEV extraction method would be akin to a new ASIC being exclusively used by the manufacturer: you get an edge only until others catch up. And the chain is transparent - so you can’t really hide what you’re doing much. With ASICs it could take time for others to reverse-engineer.

When I brought it up before him, he was actually in agreement with this view.

If your script engine is expressive enough that with just a few bytes the creators and spenders of UTXOs can precisely specify the conditions in which their transaction is to be valid with zero ambiguity, most types of MEV can’t be harvested by miners (the changes they would make to transactions would make them invalid since the users are able to precisely specify their intentions).

If we just add CAT to bitcoin for example, then to get the level of precision needed to eliminate MEV from an application might be too costly such that the cost of miners getting the MEV might be lower to the application users than the cost of preventing it through script.

This is not a black and white thing, but a continuum.

I don’t know Eth MEV well, but I do wonder if the complexity of authoring Eth contracts contributes to the prevalence of MEV because people use standardized contracts that don’t fully encapsulate their intentions rather than risking contract bugs.


The 2nd link is about Ethereum EVM which is mostly NOT APPLICABLE to us. On Ethereum the MEV’d block is all-or-nothing. The validator carefully assembled a block to extract whatever he could to himself, and others can’t simply reassemble it to replace his block with a block extracting to them instead.

On BCH - all miners can try farm MEV on individual TXs without breaking others, they can more easily “steal” MEV extracted by another miner. If the MEV is extracting value via TX fees, then other miners can attempt to reorg his block with all the same transactions and claim the TX fees themselves, making MEV more uncertain.

In a way “instant finality” enables the problem it claims to be solving. If 3rd parties privately communicate MEV to a validator and they announce a block, it being “final” means others can’t “steal” the MEV for themselves.

On PoW chains - they can, which is a disincentive to 3rd parties making deals with pools and undermines the foundations of your “dark mempool” theory. Why should a 3rd party MEV specialist not just give their MEV’d transactions to ALL the miners, rather than take chances with whether the found MEV will still be valid if some other miner finds a block.


A public kind of huge MEV did happen in the past on BCH, soon after SegWit recovery activation, where the initial bounty was too big to resist fighting over:

Based on publicly available data, the reorg was caused by a hashpower struggle between two miners, the outcome of which was $1.39M (3655 BCH) being sent to the originally intended recipients and $82k (216 BCH) being sent to unknown addresses. – source

Since then, these transactions have been a regular occurrence. This is pure MEV, what problems is it causing for anyone?

image

The above one-off 3.6k BCH MEV highlights a real problem with outsized fees - that of network delays for everyone while miners fight it out. But instead of investigating other solutions you just want to plug it with Avalanche. I already brought up an alternative to your attention. How about actually updating, or will you continue to shill Avalanche like a broken record? Here’s more on that alternative: On RSK's Block Reward Smoothing | Rootstock (RSK)

2.

Compact Blocks collapsing due to dark mempools (10x hit to scalability)

Again you make the mistake in thinking Account-based MEV directly maps to UTXO MEV.

Your first link says something truthful: yes, if mempools are not in sync then block propagation will take longer. Well no shit, Sherlock, everyone knows that. But then you follow with “see, it’s happening on ETH, therefore big problem for BCH” stubbornly ignoring significant differences in architecture so you can doompost and… shill Avalanche.

And again you show 0 evidence of updating your talking points based on past discussions (1 2), and continue to make bombastic claims like a broken record, about how we will all burn in MEV hell if we don’t listen to your warning. It’s all so tiresome.

3.

Unconfirmed transaction chains built on UTXOs that will be nuked (double-spend risk)

Yes, this is a real problem for users - but only to those users who partake in building on top of a nukeable TX, detail conveniently missing from your analysis. I too suspect that some of it could be happening on Cardano and Ergon, but I’m not trusting AI-generated slop. Find real research if you want to point to those chains as examples.

Pure P2PKH 0-conf chains are fine (P2PKH still makes about 99% of our TXs), and they can benefit from DSPs and ZCEs, completely unaffected by MEV happening in DeFi zones. Even you use same wallet for both: as long as you have 1 confirmed UTXO in your wallet, you can go on a 0-conf shopping spree with no risk of getting nuked.

DeFi users will have a choice: partake in platforms where sequence is somehow enforced by 3rd parties (e.g. platform signing off on trades) or partake in probabilistic platforms like Cauldron. MEV happening on Cauldron won’t really create problems for anyone else, and if it’s too much trouble for Cauldron users: then the users will flock to other solutions.

3 Likes
  1. Proposer and builder will separate. Luke’s Ocean mining pool already enables people to build on their own template. As you can see in the second tweet this trend is primarily driven by the rise of private order flow on Ethereum. People want to guard against MEV, so companies start selling space in blocks for transactions that will not be announced before it’s included in a block. People also want fast execution, so the biggest template builder will be preferred. This reduces genuine competition among template builders, since the biggest actors can do the best deals. That’s why two builders dominate on Ethereum today, and there is no reason to suspect that it will be any different on BCH. What is different, is that BCH has very few pools (proposers) producing blocks, but Ethereum has tens of thousands different proposers. Some of these vanilla proposers will build their own blocks and ensure that Ethereum is censorship resistant. MEV is to a large degree a product of DeFi activity, so BCH will have much bigger issues than a dumb chain like BTC.

  2. I you have a Moria liquidation transaction propagating on the network, but every mining pool working to include their own to collect the 1.2x, then this transaction will not be in the mempool of nodes during block propagation. Many more such examples, and you only need a few percentages of missing transactions for Compact Blocks to collapse. So we don’t need to see such enormous amounts of dark transactions, as we currently see on Ethereum, before we take a 10x hit to scalability.

  3. I guess wallets only allowing P2PKH chains for brick-and mortar settings would alleviate some of the double-spend risk, but some wallets won’t make use of this and leave holes in the defense.

There is a lot of reasons to suspect it will be different, because Bitcoin-tech is a whole lot different from Ethereum-tech. Please, just stop pretending that Ethereum-tech problems will all magically transfer to Bitcoin-tech problems.

Again you ignore everything else, after I already pointed it out. Other key differences:

  • account (serial processing transactions in blocks, all modifying same state) vs UTXO (parallel processing of transactions in blocks, each modifying their own part of state), means less complex MEV and easier to level the playing field
  • PoS (instant finality, MEV is locked in and can’t be stolen by another miner) vs PoW (nothing is locked in until other miners accept it deep enough, miners can steal MEV from one another), means deterrence to making private deals

What if… with Bitcoin tech… public mempool is actually the most efficient transaction market and, what if, moving to private will create inefficiencies, friction, and asymmetries which will push people back to public mempool. On BTC, some pools were first to offer non-standard TXs, they could be special only because BTC inherited a big discrepancy between relay rules and consensus rules. I expect relay rules to be relaxed and things to go back to public mempool.

This is just totally false. What do you even mean “collapse”? A short ID is 6 bytes, a typical TX is 200 bytes, this means about 94% TXs have to be missing for it to be more efficient to just send full block.

Even with a full block download, with 32 MB limit orphan rates will be under 1% and network could function just fine. From that point, bandwidth is still expected to outpace our usage and blocksize limit growth, so we can scale just fine.

image

2 Likes

The UTXO model is better for avoiding sandwiching, but outside that it’s not much differences.

With the first-seen-safe policy it is the first transaction hitting the mempool that is accepted into it, and relayed on to the connected nodes. As I said if you have a Moria liquidation transaction propagating on the network, but every mining pool working to include their own to collect the 1.2x, then this transaction will not be in the mempool of nodes during block propagation.

10% missing transactions at 1MB for collapse of Compact Blocks according to Core research. This is probably higher than what you can expect from blocks with transactions not known by any nodes before the block is published. It is not an exact number since many factors play into it.

I base the 10x number on the reaserch done by Andrew Clifford, Peter R. Rizun, Andrea Suisani, Andrew Stone and Peter Tschipper on Xthin: https://medium.com/@peter_r/towards-massive-on-chain-scaling-presenting-our-block-propagation-results-with-xthin-da54e55dc0e4

Xthin

1 Like

To improve UX, wallets will have to get smarter to not build 0-conf TXs on top of such 0-conf TXs likely to get replaced. This is the nice and very relevant difference between UTXO and Account-based architectures. Only the part of the state transformation touched by the TX is affected, and everyone else’s TXs will just go through unaffected.

Regarding propagation, this kind of TXs will still be a small % of total volume, and compact blocks will still work just fine. Miners who make such TXs will know that their TXs have not been seen by anyone, and they can start using prefilledtxn to broadcast those TXs together with the list of TXs, to avoid round-trips.

Maybe so, because their blocks are so small that download time for 1 MB is close to ping time. But you bring it up in scaling context and they made deliberate choice NOT to scale. When you scale, the threshold %missing will grow with block size, because download time will relatively increase to ping. It’s very annoying when you bring up a truthful but not applicable statement (10% missing in 1MB block) and then go on to say therefore BCH will suffer. No, we won’t, because bandwidths are way higher than blocksize limit, and will continue to outpace our use and growth of blocksize limit, so we’re good.

2 Likes

Wallets handling double-spend protection is not a good idea since there will be people asking for protection and people asking for no protection. You will end up with a patch work of different policies, and the consumers will be totally confused/exposed.

None of us know how large a percentage of transactions that will be dark in the future, but I’m pretty sure prefilledtxn will not be enough to handle it.

If you believe that bandwidth is the bottleneck, then a 10x hit will be substantial. Let’s also not forget that it will be a 70x hit to scalability if Graphene is implemented. To wave this away, by saying bandwidth will go to the moon and save us, is intellectually dishonest.

Comparing the best case (compact blocks, graphene) with worst case (full block download) and finding that it is 10x or 70x difference DOES NOT MEAN a 10x or 70x hit to scalability. You’re misinterpreting what it means. Full block download must have orphan rates below 2% for the network to be robust, and scalability is constrained by that scenario if you want to maintain censorship resistance.

Just because miners can employ compact blocks to squeeze out 1-2% better margins (reduction in orphan rates) does not mean that we should use that as scalability baseline.

2 Likes

There is of course a lot of nuance in these numbers, but there is no doubt that undermining Compact Blocks or Graphene will have a huge impact on orphan rates. Ethereum is working towards snarkifying block validation, but as long as Bitcoin Cash is not working on this we should aim towards preserving Compact Blocks as functional as it is today.

Compact blocks are always functional, it’s a very nice piece of tech that just works when used and behaves gracefully at the edge (1.5 * RTT + 103% download if all TXs are missing).

Nobody is undermining anything. Compact blocks are in use and they work fine for those that share transactions via public mempool. Withholding transactions hurts the withholding miner’s block propagation and increases his risk of orphans, so why would he do that?

And “huge” is not really huge. You claimed “collapse” of compact blocks when some % is dark, yeah? You never bothered to actually do the math on it. You just repeat stuff you heard somewhere and pretend it applies to us.

Here’s an example of how this “collapse” would looks in practice for BTC:

image

So, if you have a slow connection (20 Mb/s is quite slow for a serious pool node), it just means that if you know others don’t have 20% of your TXs then you can just do full block send and have 0.27% chance of getting orphaned. Such collapse. Even if others will have 0 transactions of yours, you will risk a “huge” chance of getting orphaned… 0.43%.

You know what else you can do? You can pack all those juicy private MEV TXs into prefilledtxn so you avoid round-trips and still benefit from CBR tech, bring the rate down to 0.12% or so.

How would it look like on BCH?

image

What do you notice?

10% on BCH means there’d be 3.2 MB worth of TXs in your “dark” mempool, and each dark 3.2 MB would cost the dark miner about 0.6% increase in orphan risk. That secret MEV better be worth it. Where will they find 3.2 MB worth of MEV-able transactions every 10 minutes?

2 Likes

That secret MEV is definitely worth it since we only pay miners 3.125 BCH for a block. Since there can likely develop a large mismatch between what the protocol pays and what miners can extract, miners will probably accept a very high orphan risk. To compensate they can withdraw hash from BTC to power through a chain of blocks that they are heavily invested in.

From where will they source the transactions? Who will be making all those hypothetical MEV-able transactions? In the above scenario of 32 MB blocks, everyone paying min. fees would amount to 0.32 BCH. What % of user transactions do you expect will have MEV opportunities in them? 1%? 10%? With 10% the orphan rate would be an acceptable 1% even on a potato connection. You can get a VPS with 1Gbit link for under $100/month to run your pool node while your mining gear can be in the middle of nowhere and just transfer headers back and forth.

Here’s how it looks like with 1Gbit split to 3 peers and 256 MB blocks:

image

10% here means a miner sources 25 MB secret transactions from somewhere, every 10 minutes (that’s more than what the whole Ethereum network does now), and has a whooping 0.62% orphan risk. From where does he source those TXs?

Let’s check again when we actually start filling 32 MB blocks. I wonder what kind of VPS will then be available for $100/month.

2 Likes

The miner source the transactions from the blockchain. If DeFi takes off we will have many anyone-can-spend UTXOs sitting on the blockchain ready to be spent. Markets will fluctuate and create opportunities to extract value. The most powerful miner will be in the best position to take advantage. He might even not care what happens to BCH, since he can always just go back to hashing on BTC…

Last I checked P2SH TXs were less than 1% of our TX volume and 90% of those 1% were multisig TXs. Even if DeFi would take 10% of our TX share AND all of it would be MEV-able, still the orphan rate will be an acceptable 1% - even on a potato connection (20Mbit/peer).

2 Likes

Other chains show us that most transaction volume comes from DeFi. This might be a bit different on BCH, but it might also not be if we undermine double-spend protection.

1 Like

This post was flagged by the community and is temporarily hidden.

2 Likes

It’s time for BCH to realize that it is a minority chain and implement Avalanche for proper economic security. Especially now that people have decided to enable DeFi with rich logic. I understand that people that are all-in on BCH have a very naive attitude towards economic security, but it’s time to wake-up and read-up. Avalanche will solve most of the MEV issues, and the instability issue under zero block rewards. It can also be implemented as a softfork. This makes implementation risk very low since it can be reverted with social consensus if issues are discovered down the line.