The Problem: Bitcoin Core's Blind Spot
Bitcoin Core's fee estimator (estimatesmartfee) looks at historical block confirmation times but is blind to the current mempool state. When congestion spikes, it reacts slowly. ML can see the current mempool and predict fees more accurately, especially during volatile periods.
Mempool Mechanics
The mempool is Bitcoin's waiting room for unconfirmed transactions. Miners pick transactions with the highest fee rates (sat/vB) first. When the mempool is congested, fees spike. When it's empty, fees drop to minimums. Our model captures this dynamic state.
Feature Engineering
Mempool size (count + vsize), fee distribution across projected blocks, median fee rates, time since last block, hour/day-of-week patterns, block fullness. These features capture signal that Bitcoin Core's historical approach misses.
Where ML Wins
Congestion spikes: ML sees the mempool filling up before fees actually rise. Weekends: activity patterns differ. Post-halving: fee dynamics change. Bitcoin Core adapts slowly; ML can retrain on new patterns.
Non-Stationarity
Fee estimation is a non-stationary problem — the data distribution shifts constantly. This requires frequent retraining (daily or on-demand via Prefect), monitoring for prediction drift, and fallback to conservative estimates when confidence is low.