Hey folks,
Thinking about what to do about Bitcoin MEV got me thinking about an even more radical proposal: lift mining off of Bitcoin altogether. Instead of Stacks miners individually producing block-commits, they would organize themselves as an open-membership mining pool natively supported by the consensus protocol. The miners would collectively control a single block-commit UTXO, such that the act of spending it to mine a new block requires a threshold signature weighted by BTC contributions.
A Unified Mining Pool for Stacks
What would this look like? The model for mining would no longer tie miners to a UTXO history. Instead, miners would work off-chain to collectively produce a block, and collectively announce it via a single, shared UTXO history. There would be only one UTXO history for Stacks at any point in time, except to recover from pool quorum failures.
Stacks miners would join the mining pool by sending some BTC to the pool – i.e. by creating a UTXO that the pool participants can spend. Then, when the pool produces a subsequent block-commit, it (1) consumes this UTXO and (2) grants the miner the ability to submit a portion of the signature for a given number of subsequent Bitcoin blocks. The Stacks miner would then be entitled to a pro-rata share of the STX earned by the production of each Stacks block mined in those Bitcoin blocks. For example, just to throw out some concrete numbers, a miner could create a UTXO to join the pool at Bitcoin block N with a redeem script that either allows the pool to spend it by Bitcoin block N+10, or allows the miner to reclaim the BTC after Bitcoin block N+11. If the pool picks up the UTXO, then the miner joins the pool and receives a pro-rata share of STX for the next 100 Bitcoin blocks. If the pool ignores the UTXO, then the pool is economically penalized – they forfeit a portion of the STX they would have earned based on the size of the UTXO ignored (more below).
Pool participants vote off-chain to select the transactions that will go into the block. Because everyone knows everyone else’s outstanding BTC contributions, we’d just have miners vote to include (or exclude) transactions based on their contribution weight. Once they’re done selecting transactions, they collectively spend the pool’s UTXO to produce a new block-commit that commits to the block and pays the PoX recipients. The Stacks blockchain itself would automatically disburse STX to the participants once the block rewards mature, and would require proof that miners did indeed vote on the transactions included in the block.
Adherence to the voting protocol is enforced by the threshold signature script: a block will only be produced if at least 66% of the signers, weighted by BTC contributions, approve of the block. The threshold can be made higher in practice, but it must be at least 66% to overcome Byzantine failures.
PoX itself would be lifted off of Bitcoin and into the block voting procedure. Each miner’s contribution to the pool would be doled out to PoX recipients in 1/100th increments (to use the example numbers from above). This way, miners must keep contributing BTC to the pool (and thus keep paying PoX payouts) in order to earn STX. Moreover, this ensures that the value of PoX payouts remains close to the value of the STX produced, even if there’s only one pool in operation.
Keeping the Majority Honest
The pool must pick up the UTXO from a miner wishing to join the pool. But what if the majority of miners want to exclude new participants? To address this, the Stacks blockchain consensus rules would be altered so that the act of ignoring a valid UTXO would be the act of forfeiting STX. I’d recommend a “penalty curve” that grew superlinearly in the ratio between the BTC ignored and the BTC the pool represents. For example, if the joining miner would increase the size of the pool’s BTC by X%, then the pool could reduce the STX payout to (1 - X)^2% of the baseline. Using some concrete numbers, if the UTXO would grow the pool’s BTC size by 5%, then the pool’s payout would go from 100% of the STX to (1 - 0.05)^2% or 90% of baseline if the pool ignored it. If the UTXO would grow the pool’s BTC by 10%, then the pool’s payout drops to 81% of the baseline.
Recovering from Pool Failure
If a pool fails to produce a block for more than X Bitcoin blocks in a row (where X is on the order of 10), then the system declares the pool as defunct and falls back to the sortition system we have today until the next PoX prepare phase. The miners who mine during that prepare phase would form a pool at the start of the subsequent reward phase, and resume operation.
How this Addresses Bitcoin MEV
By lifting mining off of Bitcoin and into a pool this way, we can ensure that PoX gets paid according to miners’ collective contributions, instead of according to the whims of the Bitcoin miners. In this system, we know how much BTC each pool participant contributed, the time at which they contributed, and the number of block-commits produced since each miners’ contribution was included. Therefore, we can calculate how much BTC the pool must pay out at each Bitcoin block. Miners cannot influence the amount the pool pays once their contribution is picked up. Therefore, a Bitcoin miner cannot get a discount on Stacks blocks – they can either participate honestly in a pool, or block the pool from mining in the blocks the produce.
How this Addresses Miner Centralization
The biggest barrier to entry today in Stacks mining is the requirement that miners pay a BTC transaction fee in each Bitcoin block. Mining in a protocol-supported pool like this removes this capital expenditure, meaning that the barrier to entry for mining is very low – all you’d have to do is submit enough BTC that it can be spent over the next e.g. 100 Bitcoin blocks in even chunks (so, batches bigger than 550,000 sats).
Within the pool, miners would use a conventional implementation of BFT agreement to decide on what transactions get included, and then use a form of weighted threshold FROST to produce block-commits such that each commit represents at least 66% of the miners by BTC weight (we can make the threshold higher, but it must be at least 66%). While this does require a transaction fee, the transaction fee itself would be debited from each miners’ contribution pro-rata, thereby allowing a large number of miners to share the burden of paying for the transaction.
Timeline
This would be a very complex undertaking and would likely not see the light of day until after sBTC is live. But, it would reuse a lot of the tech stack that’s getting built for sBTC, so there would be few technical surprises when implementing it.