Fixing Fee Uncertainty with a Uniform-Price Auction. How we replaced “guess a fee and pray” with “quote a ceiling and get change back.”

Premium Transactions on Bitcoin
Fixing Fee Uncertainty with a Uniform-Price Auction
How we replaced “guess a fee and pray” with “quote a ceiling and get change back.”
The problem every Bitcoin user knows
You broadcast a transaction. You guessed 150 sat/vB because the mempool looked busy. Ten minutes later, blocks are clearing at 40 sat/vB — and your transaction sailed through paying three times what it needed to. You overpaid, and there's no way to get the difference back.
Or the opposite: you quoted 20 sat/vB to save money. Your transaction sits in the mempool for six hours. You RBF it. You overpay anyway, because now you've paid the replacement fee plus anxiety.
Bitcoin's fee market is a blind first-price auction. Every user bids independently, nobody knows what anyone else is bidding, and the winning bids pay exactly what they bid — even if the marginal winner paid a tenth of that. It's economically irrational, and it's been the default for 15 years.
We built something better on our L2. We call it premium transactions.
The core idea in one sentence
Instead of paying what you bid, you pay what the 250th-ranked bidder paid — and the difference comes back to you after confirmation.
That's it. Everything below is the mechanics.
Figure 1. The premium transaction lifecycle — structure, uniform-price auction, block inclusion, and refund.

The transaction structure
A premium transaction is a regular Bitcoin transaction with a custom version flag and a strict output layout:
premium_tx {
version: PREMIUM_V1 // signals opt-in to auction
vin[n]: user UTXOs // normal inputs
vout[0]: RESERVE output // fee ceiling, refundable
vout[1..n]: payment outputs // actual value sent
}The reserve output is the key innovation. It's a locked output whose value equals the maximum fee the user is willing to pay — max_fee_rate × tx_size. The output is spendable by the protocol after confirmation, but with a settlement rule: only the actual charged fee gets consumed; the rest is refunded to the user.
Think of it as a security deposit. You're not paying 200 sat/vB — you're authorising up to 200 sat/vB, and promising you'll accept whatever clearing rate the block produces.
The block-inclusion rule
- Collect all premium transactions from the mempool.
- Sort them descending by the fee-per-byte encoded in their reserve.
- Take the top 250.
- Read the clearing rate off the 250th (lowest winning) transaction.
- Include all 250 in the block, and charge every one of them the clearing rate — not their own bid.
- Everything below rank 250 waits for the next block.
Why uniform pricing changes the game
This is the same mechanism the US Treasury uses to auction bonds and that Ethereum approximated with EIP-1559's base fee — but applied cleanly to Bitcoin without touching consensus.
The consequences are non-obvious and powerful:
- Bidding honestly becomes optimal In a first-price auction you bid below your true value to avoid overpaying. In a uniform-price auction you bid at your true value — bidding lower only risks missing the block, and bidding higher costs nothing extra because you only pay the clearing rate anyway. Game theory calls this “incentive compatibility.” Users call it “finally, a fee estimator I can trust.”
- Fee volatility collapsesInstead of 250 different fee rates in a block ranging from 40 to 400 sat/vB, every premium transaction in the block paid the same rate. Wallets can quote a ceiling, display “you'll pay at most X,” and users actually get refunds when the block clears cheaper.
- The reserve doubles as congestion insuranceWhen the mempool is quiet, the clearing rate is low and most of your reserve comes back. When it's a mempool apocalypse, you still get in as long as your ceiling was high enough — no RBF gymnastics.
A worked example
Alice sends a 250-byte premium transaction with a 200 sat/vB ceiling. Her reserve output locks 50,000 sats. The block clears at 80 sat/vB.
- Reserve locked: 50,000 sats
- Actual fee charged: 20,000 sats
- Refund to Alice: 30,000 sats
Alice quoted a comfortable ceiling, guaranteed inclusion in the next block, and got 60% of her fee back. In the legacy fee market, she would have paid the full 50,000 sats
What we learned building it
Three things bit us, and they're worth flagging if you're building something similar:
- Reserve outputs need a clean refund path.We went through two iterations. The first used a separate refund transaction, which meant users had to wait for a second confirmation. The second — which shipped — makes the reserve spendable directly by the block's coinbase settlement, with the refund included as an additional output in the same block. One confirmation, done.
- The 250 cap is a tuning parameter, not a constant.We started at 100 and moved to 250 after measuring actual demand. Too low and the clearing rate spikes erratically; too high and block space gets dominated by premium txs, squeezing out normal ones. 250 turned out to be the sweet spot for our block size — your mileage will vary.
- The mempool needs a separate premium lane.Don't try to sort premium and non-premium together. They have different inclusion rules, different fee semantics, and different refund logic. Keep them in separate mempool buckets and merge only at block construction.
What this unlocks
Once you have predictable fees with refunds, a bunch of UX improvements become possible that were painful before:
- Wallets show a single number.“You'll pay up to 0.00008 BTC, with likely refund.” No more three-tier fee selectors.
- Merchants quote fiat prices with confidence.The fee uncertainty that killed point-of-sale Bitcoin payments mostly evaporates.
- Batching becomes cheaper and safer.Batch 50 payments into one premium tx, set a comfortable ceiling, and the clearing rate keeps the actual cost reasonable.
- RBF becomes rare. If your ceiling is high enough to make the top 250, you're in. If it isn't, you wait — but you haven't overcommitted capital.
Is this really “Bitcoin”?
We get this question a lot. The answer: the premium transaction is a valid Bitcoin transaction Nodes that don't understand the version flag treat it as a standard transaction with an unusual output; they can verify it, relay it, and include it. The auction logic lives at the block-construction layer — miners opting into premium blocks run the sort-and-clear step; miners who don't, don't. The reserve output's refund path is enforced by the sidechain's settlement layer. It's Bitcoin all the way down. We just stopped pretending the fee market had to be blind.
Next up in the series: how we built merge-mining software that secures EVM and Cosmos sidechains under a single Bitcoin hash.If uniform-price fees surprised you, wait until you see how one SHA-256 computation settles three chains at once.
Want the code? The reference implementation is in Rust with C++ bindings for the mempool sort path. Drop a comment or reach out — happy to share the repo.
- 📞 Phone: +91 96555 17034
- 📧 Email: support@tecneural.com
- 🌐 Website: www.tecneural.com
