delvingbitcoin

An Onchain Implementation Of Mining Feerate Futures

An Onchain Implementation Of Mining Feerate Futures

Original Postby ZmnSCPxj

Posted on: February 12, 2024 11:15 UTC

The concept of mining fee futures is introduced to address the unpredictability of onchain fees in blockchain technology.

This unpredictability stems from novel uses and innovations that can either increase or decrease the demand for block space, thus affecting the fees. With future halvenings, miners are expected to earn more from onchain fees, making the stability of these fees crucial for their income and the security of the blockchain. Mining fee futures allow users to pay a flat rate above the median low-fee rate to miners, who in return provide assured confirmations during high-fee spikes. This arrangement benefits both parties: miners get a stable income while users are protected against sudden fee increases.

A binary mining fee futures contract is detailed, involving two parties: a blockchain user and a miner. The contract specifies an amount to be paid by each party depending on whether the onchain fees fall below or rise above a predetermined feerate boundary by a certain blockheight. The contract employs a Taproot address and includes three branches for transaction execution: a cooperative resolution branch, a miner unilateral execution branch for low fees, and a user unilateral execution branch for high fees.

For low fees, a specific transaction structure is proposed to ensure minimal block space wastage. This involves a series of transactions with conditional execution paths based on the actual onchain fees compared to the set boundary. The structure allows the miner to claim the user's wager without needing the user's cooperation if the onchain fees remain low, using transactions that are intentionally made block space inefficient unless a cooperative agreement is reached.

In case of persistently high fees, the user has the right to claim the combined wagers after a specified period, using the unilateral user branch. This branch enables the user to directly pay for high-priority transactions' fees from the funds, potentially including a large wager from the miner to cover even extreme fee scenarios.

Overall, this mining fee futures scheme aims to mitigate the risks associated with unpredictable onchain fee fluctuations for both blockchain users and miners, promoting a more stable and predictable use of the blockchain space.