Inspiration
Bitcoin transactions don’t always propagate efficiently across the network. Depending on which nodes receive the transaction first, confirmation speed and reliability can vary significantly. We wanted to build a system that intelligently routes transactions through the network, similar to how internet traffic is optimized, to improve speed, reliability, and overall user experience.
What it does
RouteX is a smart transaction relay system that optimizes how Bitcoin transactions propagate across the network. Instead of broadcasting blindly, RouteX selects the best nodes and dynamically routes transactions using different strategies. This increases the likelihood of faster confirmation, reduces propagation delays, and improves reliability under varying network conditions.
How we built it
We built RouteX using a Node.js backend with an Express server and a real-time relay daemon that continuously evaluates network endpoint health. The system constructs and signs Bitcoin testnet transactions, then uses a custom scheduler to decide how to broadcast them across multiple nodes. We implemented: A wallet system using WIF keys UTXO fetching and transaction building/signing A relay daemon that tracks node performance and performs the scoring A multi-wave broadcast system to optimize propagation A React frontend for interacting with the system and visualizing jobs The backend integrates with mempool APIs for broadcasting and tracking transaction status.
Challenges we ran into
One of the biggest challenges was handling real-world Bitcoin network behavior. This includes dealing with unconfirmed UTXOs and timing delays, ensuring transactions were properly constructed with correct fees and change outputs, managing asynchronous propagation and race conditions across nodes, and debugging issues where transactions appeared valid but were not accepted or relayed. We also had some issues deploying.
Accomplishments that we're proud of
We are proud that we built a fully working end-to-end transaction pipeline. We also designed and implemented a custom relay daemon with intelligent scheduling and successfully executed multi-endpoint transaction broadcasting strategies. We are also proud of our frontend for testing and visualization and deploying a live system with real network interaction on testnet.
What we learned
We learned a lot about how Bitcoin transactions propagate through the network. We also learned what UTXO was and the importance of UTXO management and fee estimation. We also did some research to design systems that make decisions under uncertainty for the strategies. We also learned how to quickly iterate on a full-stack system under time constraints
What's next for RouteX
Some ways this can be applied and improved in the future includes improving the adaptive routing algorithms. This could be through the use of an AI Agent for routing or a regression algorithm/ML for prediction and scheduling. We also want to work on compatibility with other cryptocurrencies. Statistical analysis to see how much RouteX actually improves transaction time and costs can also be something to work on. We would also like to see more interactive features to see your transaction in real time
Built With
- axios
- bitcoinjs
- ecpair
- express.js
- javascript
- mempool.space-api
- node.js
- react
- render
- rest-apis
- sessionstorage
- tailwind
- tiny-secp256k1
- vercel
- vite
Log in or sign up for Devpost to join the conversation.