
Author: Jeffrey Hu, HashKey Capital Source: medium Translation: Shan Oppa, Bitchain Vision
introduce
The concept of Bitcoin MEV (miner extractable value) appeared as early as 2013.Although it is still in its infancy compared to MEVs on Ethereum, with the introduction of meta-protocols such as BRC-20s, Ordinals, and Runes, the booming Bitcoin ecosystem is expected to bring more programmability in the future.Expression and MEV Opportunity.
This report will analyze the increasing complexity of MEVs on Bitcoin and evaluate its impact on the wider ecosystem.
Why are people paying more and more attention to Bitcoin MEV?
Before Ordinals was introduced, MEVs on Bitcoin were not widely recognized and valued, with people focusing on Lightning Network and sidechain mining attacks.However, the Taproot upgrade brought more expressiveness and programmability to Bitcoin, facilitating the launch of meta-protocols such as Ordinals and Runes that pushed MEV concerns to the forefront.Bitcoin’s 10-minute block time also exacerbates the problem, making it easier for inexperienced users to become victims of various forms of MEV attacks, such as fee snipers when bidding in the inscription market.As block rewards decline, miners’ profitability is affected, forcing miners to focus on maximizing transaction fees, which may explain the increase in MEV activity.
The figure below shows the highly anticipated surge in Ordinals and Runes’ post-release fees relative to block rewards, which once accounted for more than 60% of the total revenue share of Bitcoin mining.
So far, we have seen an increasing number of BTCFi applications and developments transform Bitcoin’s status from a purely digital gold/payment network to a thriving ecosystem with rapidly growing utility.This may bring more MEV opportunities to Bitcoin.
Differences between Bitcoin and MEV on Ethereum
There is limited discussion about MEV on Bitcoin and can be attributed to the very different architectural designs between Bitcoin and Ethereum.
Architectural design
Ethereum runs on an Ethereum virtual machine (EVM), can execute smart contracts and achieve programmability by maintaining global state machines.
Ethereum uses an account-based model to run transactions in sequence by managing random transactions.This means that the order of transactions affects its execution results, resulting in searchers being able to easily identify MEV opportunities and insert their transactions directly into problems before or after the user’s transaction.For example, if both Alice and Bob submit transactions to Uniswap to exchange 1 ETH for USDT, the first transaction executed in the block will receive more USDT.
By contrast, Bitcoin adopts a UTXO model that runs in scripting languages and does not have state like Ethereum.If this is just a standard Bitcoin transfer, then only the expected recipient can spend the output with a valid signature, which will not cause other users to rush to spend the money.However, on Bitcoin, scripts or SIGHASH can also be used to construct UTXOs that can be unlocked by multiple parties.The first transaction to be confirmed is a transaction that can be used with UTXO.Nevertheless, since the unlocking conditions for each UTXO are only related to the UTXO itself and do not depend on other UTXOs, the race conditions are limited to this UTXO.
Altcoins on Bitcoin
In addition to the fundamental differences in designs mentioned above, the introduction of valuable assets other than BTC also creates incentives for miner extractable value (MEV).The MEVs generated in these scenarios are essentially the order in which the protocol designer specifies asset ownership and on-chain operational legality when trying to build new asset classes and on-chain behavior on BTC using scripts + UTXO (BTC native data structure).Through events defined based on order, people can be motivated to compete for order, resulting in MEV.
Without considering other assets, rational miners will only package legal transactions based on transaction fees and charge fees based on transaction size.However, if a Bitcoin transaction is more than just a standard transfer, such as minting a new valuable asset (such as runes, etc.), miners can adopt various strategies rather than just considering the Bitcoin transaction fee: 1) Review the transactionAnd replace it with a transaction you minted by yourself; 2) Charge higher fees to users (on-chain, off-chain or side-chain payment); 3) Let multiple users bid against each other, thus triggering a fee war.
Mint
A direct example is the minting process of assets such as Runes or BRC20, which generally sets the maximum limit for minting assets.The first confirmed minting transaction is considered successful, while the other transactions are considered invalid.Therefore, the order of transactions in this context becomes crucial and provides opportunities for MEVs through transaction sorting.
Furthermore, the concept of Rare Sense introduced by Ordinals has even raised concerns that miners may trigger block restructuring during the halving period in order to compete for high-value Rare Sense.
Pledge
In addition to minting, pledge agreements like Babylon also set an upper limit on the number of assets that can be pledged at each stage.Even if users exceed the cap, they can still construct bitcoin and send it to the staking lock script, but this will no longer be considered a successful staking and are not eligible for future rewards.In other words, the order of pledge transactions is also crucial.
For example, shortly after the launch of the Babylon mainnet, it reached the first phase of 1000 BTC stake limit, causing about 300 BTC to overflow and require unstaking.
In addition to on-chain casting/engraving assets and pledges, some activities on sidechains or Rollup are also affected by MEVs.We will provide more examples in the MEV Events on Bitcoin section.
What is considered a Bitcoin MEV?
So, what exactly is the MEV on Bitcoin?After all, the definition of MEV is different in different situations.
Overall, MEV on Bitcoin refers to various ways in which miners manipulate block generation processes to make maximum profits.We can roughly divide them into the following categories:
-
Users pay extra fees: A common channel for users who want to speed up transactions is to accelerate services through off-chain transactions, but such services are often expensive because users’ transactions are preferred.Traders can also provide miners with higher fees through mechanisms such as RBF (fee substitution) and CPFP (professional payment) to prioritize transactions and achieve faster confirmation times.Transactions with lower rates and fees usually face longer confirmation times, as profit-oriented miners will prioritize profitable transactions for inclusion in the block.
-
User-Miner Conspiracy: Users and miners conspire to review or include certain transactions of specific significance.For example, malicious users and miners collude to review and exclude penalized transactions on the Lightning Network to illegally obtain assets within the channel.Other new systems such as BitVM and their penalized transactions also face such risks.
-
Bitcoin miners mine on sidechain/L2: This includes various early merger mining schemes, where miners reuse computing power on Bitcoin to protect another network.By combining mining, it can encourage centralization of miners, as large miners may use their computing power on the main chain to influence block production, sorting, etc. on L2, thereby obtaining too many L2 mining rewards and possibly affectingL2 Network Security.
Bidding methods that are biased towards the open market (such as RBF) have played a relatively positive role in the overall economic system and promoted the development of the free market economy.But when users make out-of-band payments with mining pools, it undoubtedly poses a threat to the decentralization and censorship resistance of the network and is labeled as “MEVil”.
Bitcoin MEV example
Based on the above classification, we can observe several MEV cases.
Non-standard transactions
Bitcoin Core software only allows nodes to process standard transactions up to 100 kvB.However, mining pools will still incorporate non-standard transactions into the block at high fees, usually at the expense of excluding other transactions with lower fees.
Some typical examples include:
-
Block 776,884: Mined by Terra mining pool, this block contains inscription transactions of size 849.93 kvB.The inscription is a 1-minute MP4 video in which a frog holds a drink and the miner earns 0.5 BTC.
-
Block 777,945: Contains a 4000 x 5999 pixel WEBP image with a size of 975.44 kvB, and miners can get a 0.75 BTC fee.
-
Another block, 786,501, received about 0.5 BTC for engraving Julian Assange’s JPEG image on the cover of Bitcoin magazine, taking up 992.44 kvB.
By default, Bitcoin core nodes only allow relaying standard transactions.Therefore, non-standard transactions must be submitted directly to the mining pool through a private memory pool.Private memory pools allow mining pools to accept non-standard transactions and prioritize user transactions.While this can speed up transaction processing, transferring more transactions to private memory pools may lead to increased pool centralization and increased risk of scrutiny.Obviously, some mining pools are already taking advantage of the profitability of operating private memory pools.
For example, Marathon Digital launched “Slipstream,” a direct transaction submission service that allows customers to submit complex and non-standard transactions.
MEV events on sidechain/L2
Stacks sidechains use a unique consensus mechanism – Proof of Transfer (PoX), which allows Bitcoin miners to mine Stacks blocks and settle transactions on the Bitcoin blockchain while receiving STX rewards.
In the past, Stacks adopted simple miner elections, where Bitcoin miners with high hash rates were more likely to mine Stacks blocks, review other miners’ commitment transactions, thereby earning all rewards for themselves.If more miners adopt this strategy, future Stackers may suffer suboptimal benefits.
Impact on ecosystems:
1. By excluding other honest miners’ commitments, the rewards ultimately passed to the stacker will be reduced.
2. If large miners continue to abuse their computing power and exclude the promises of honest miners, it may lead to centralization problems, allowing a few miners to receive full rewards.
However, the Stacks Nakamoto upgrade will ease this problem and make the strategy unprofitable again.The upgrade will shift from a simple miner election to using a lottery algorithm and adopts assumed general commitment carry-over (ATC-C) technology to reduce the profitability of MEV mining.Miners need to show continuous engagement in the last 10 blocks to be eligible for the draw.Miners who have not participated in mining in at least 5 of the last 10 blocks will be disqualified from winning any Stacks rewards.With ATC-C, the probability of miners winning the Stacks block is now equal to miners’ BTC spending divided by the median BTC total commitment in the last 10 blocks.This reduces the motivation for miners to acquire disproportionate benefits by excluding block commitments from other miners.
Bidding for alternative asset transactions
MEVs related to alternative assets such as Ordinals and Runes can be divided into two types mentioned above:
-
Extract additional value from mining pools: Mining pools can obtain additional value by incorporating assets such as Bitcoin or rare Satoshi into blocks and transactions.
-
Fee Sniper Trading: Traders can bid to include transactions related to these alternative assets into the block.
For mining pools, Runes’ initial success provides an additional source of profit.For example, the highly anticipated launch of Runes caused record highs in online transaction volume and fees during the halving event, as many users competed to incorporate their transactions into the historic Bitcoin halving block.After the halving, transaction fees soared above 1,500 sats/vByte (less than 100 sats/vByte before the halving).ViaBTC took advantage of this surge to earn 40.75 BTC in 840,000 blocks by mining the halving blocks that occurred simultaneously with Runes’ release, with 37.6 BTC coming from the transaction fees associated with Runes.With the block reward halved, Runes’ transaction fees have proven to be a profitable source of income for miners.
For traders, Bitcoin transaction pairs using Runes and Ordinals are PSBT (partially signed Bitcoin transactions)SIGHASH_SINGLE|SIGHASH_ANYONECANPAY, this allows only one signature input to correspond to one output.Coupled with the transparency of the memory pool, this allows many buyers to discover potentially profitable deals.Therefore, traders often use RBF and CPFP to trigger competitive expense wars, allowing miners to obtain MEV from this demand.For example, when sellers list their assets for sale, buyers can bid and use RBF to increase their transaction fees when there is a competitor, hoping that their transaction will be confirmed.
A typical example of such competition among traders is a transaction with ID 2ffed299689951801a68b5791f261225b24c8249586ba65a738ec403ba811f0d.After the seller lists the assets, the transaction is replaced repeatedly with RBF, with rates of 238, 280, 298 and 355 sat/vB, respectively.
Another example involves the OrdiBots casting process on the Magic Eden platform.Some users became victims of trading pool preemptive trading attacks.OrdiBots cast inscriptions on Magic Eden use PSBT.The existence of PSBT and the 10-minute Bitcoin block interval allow any potential buyer to compete for the same transaction by introducing different addresses, signatures, and paying a higher fee.This has resulted in some whitelisted users being unable to cast due to interference from the preemptive trading robot.(The team later apologized and promised to compensate affected users with customized OrdiBots.)
However, not all MEV-related technologies or events are detrimental to the user.MEV technology can also protect user assets from losses in some cases.For example, without RBF, wrong transactions cannot be saved, and stuck transactions can be in uncertainty for a long time, resulting in opportunity costs.Additionally, running RBF is beneficial to Bitcoin network security.As block subsidies are expected to drop in the future relative to transaction fees, transaction fees will play a key role in incentivizing miners to continue to participate in the Bitcoin network.Bitcoin developer Peter Todd has also been promoting the benefits of RBF and advised miners to run RBF in full.
Key technical components that promote Bitcoin MEV
So, what are the key technical components or methods to support these MEV opportunities on Bitcoin?Common technical areas involved include mempools, RBF (Replace-by-Fee), CPFP (Child Pays for Parent), pool acceleration services, and pool protocols.
Trading pool
Similar to typical blockchain networks such as Ethereum, Bitcoin also has a transaction pool structure for storing transactions that have been received by P2P nodes but have not been packaged into the block.The transparency and decentralized nature of mempool allows all transactions to be transmitted to miners, providing a favorable environment for MEV opportunities.
However, unlike Ethereum’s gas mechanism, the transaction fee of Bitcoin is only related to the transaction size.Therefore, Bitcoin’s trading pool can be seen as a more direct block space auction market, where users can be observed to bid for the next block and what the bid price is.
Since different nodes receive different transactions from P2P propagation, each node has a different memory pool.In addition, each node can actively customize its own forwarding policy (memory pool policy) to define which transactions it wants to receive and relay.Pools can also choose which transactions to include in the block according to their preferences (although from an economic point of view, they will prioritize higher-cost transactions).For example, the Bitcoin Knots node filters out any Ordinals transactions, while Marathon Mining creates a pixel-style logo in the browser.
Therefore, users may consider sending transactions directly to specific miners or mining pools to accelerate transaction inclusion, but this approach could undermine two key features highly valued by the Bitcoin community: privacy and censorship resistance.
Transactions propagated through P2P nodes rather than transactions sent directly (e.g. through RPC endpoints) to miners or mining pools help to mask the source of the transaction, making it harder for miners and mining pools to review transactions based on identified information.
In addition to using the transaction acceleration service, users can also choose to accelerate transactions through RBF and CPFP.
RBF and CPFP
Fee substitution (RBF) and child payment for parent (CPFP) are methods commonly used by users to increase transaction priorities.
RBF (Replace-by-Fee) allows unconfirmed transactions in the transaction pool to be replaced with another transaction that conflicts with it (also cited at least one of the same inputs), but requires a higher rate and a higher overallcost.Similar to the trading pool strategy discussed earlier, RBF can be implemented in a number of ways.The most common implementation is the optional RBF (opt-in RBF) designed by BIP125, where only transactions with special tags can be replaced.Another approach is to fully RBF, where transactions can be replaced, whether they are tagged or not.
CPFP (Son Pay Parent Transaction) uses different methods to speed up transaction confirmation.Instead of replacing transactions stuck in the memory pool like RBF, the receiver can speed up the pending parent transaction by sending child transactions using UTXOs in the pending transactions with a higher fee rate.This may incentivize miners to batch process these transactions in the next block.So, despite the high fees at a certain moment, sometimes you may see very low-cost transactions being included in a block; these transactions are likely to use CPFP (because subsequent transactions will pay for the fees).
The main difference between RBF and CPFP is that RBF allows the sender to replace pending transactions with higher rates, while CPFP allows the receiver to speed up pending transactions by sending subtransactions with higher rates.CPFP is also useful for transactions that require exiting the Lightning Network (e.g., anchor output).In terms of expenses, RBF has a relatively more cost advantage because it does not require additional block space.
Additional charges and mining pool acceleration services
In addition to RBF (Replace-by-Fee), CPFP (Child Pays for Parent), etc., users can also choose out-of-band payment to accelerate transactions.For example, many mining pools provide free and paid transaction acceleration services, which accelerate transaction packaging by submitting txID.If it is a paid service, users need to pay a certain service fee to subsidize the mining pool.Since this type of service pays fees through systems outside the Bitcoin network (such as payment through websites, credit card, etc.), it is called out-of-band payment.
While out-of-band fee payments provide remedies for transactions that cannot use RBF or CPFP, long-term heavy use may affect Bitcoin’s censorship resistance.
Mining pool agreement
In the previous discussion, we see the mining pool and the miner as a whole, but in fact, there is a need for division of labor and cooperation between the two.The mining pool aggregates the miner’s computing power for mining and allocates rewards based on the contribution of the computing power.This cooperation process requires certain agreements to coordinate.
In common mining pool protocols, such as Stratum v1, the mining pool only needs to provide the miner with a block template (including block header and coinbase transaction information), and the miner hashed the calculation based on this template.There are also tools that can visualize Stratum information of each mining pool, such as stratum.work.
In this process, the miner cannot choose which transactions to package, but instead the mining pool selects the transactions and builds a template to assign tasks to the miner.
So, in the Stratum v1 protocol, we can roughly map roles into the Ethereum ecosystem as follows:
-
Miner: assumes part of the responsibilities of the proposer (does hash calculation).
-
Mining pool: acts as both a builder, a hash value calculated by miners, and a proposer of blocks.
What will be the future?
Some promising solutions have been developed or are in progress to mitigate the negative impact of MEV (miners can extract value) on Bitcoin.
New Agreement
In some new mining pool protocols, such as Stratum v2 and BraidPool, miners can choose which transactions to package.Stratum v2 has been adopted by some mining pools (such as DEMAND) and mining firmware (such as Braiins) to allow individual miners to build their own block templates.This improves the security, decentralization and efficiency of data transmission, while reducing transaction censorship and MEV risks for Bitcoin.
Therefore, following this trend, the role of mining pools and miners in the future may not evolve in the way of the Ethereum PBS (Proposer/Builder Separation) model.
In addition, new designs related to transaction pools in Bitcoin Core may bring changes, including the highly-watched v3 transaction relay strategy and enhancements to cluster memory pools.However, the impact of these new designs on the implementation of Lightning Network channel exits, etc. is still under discussion.
The impact of mining reward reduction
The reduction in mining rewards is a major issue.As block rewards are further reduced in the future, it may have various impacts on the network.
Bitcoin developers have long realized and discussed some issues, such as fee sniping, where the mining pool may intentionally re-mine previous blocks to obtain transaction fees.Bitcoin Core has implemented some measures to deal with cost sniping, but the current method is not perfect enough.
In addition to native transaction fees, alternative assets may also become sustainable sources of income in the future.Therefore, some projects are trying to build infrastructure to better identify valuable transactions involving alternative assets.For example, Rebar is developing an alternative public memory pool to better identify valuable alternative asset transactions.
However, as discussed in the Out-of-Band Fee Payment section, the impact of these off-chain Bitcoin economic incentives on Bitcoin self-regulating incentive compatibility systems remains to be seen.
Anyway, the MEV on Bitcoin is similar to Ethereum, but differs due to differences in architecture and design philosophy.The increasing practicality of Bitcoin, the decreasing block subsidy rewards, and the growing BTCFi ecosystem will bring more attention to MEV-related factors.