Inspiration

BitRoute was inspired by the Lightning Network and the multi-commodity flow problem. Our goal was to provide a solution that provides, fast, cheap, and secure Bitcoin transactions using advanced routing algorithms and graph theory. By incorporating technology such as the Hedera Hashgraph, we aim to offer a secure, private, and cost-effective way to navigate the complex landscape of cryptocurrency transactions.

Background

Reshaping the Cryptocurrency Ecosystem with Advanced Channel Management

In the dynamic era of decentralized finance, efficient transaction channels are not just a convenience—they are a necessity. BitRoute Optimizer emerges as a revolutionary force poised to transform Bitcoin's Lightning Network by providing an intelligent, efficient, and secure manner of managing transaction channels.

Bridging the Gap in Bitcoin's Lightning Network:

The traditional Bitcoin blockchain, while groundbreaking, has limitations concerning transaction speed and scalability. To overcome these, the Lightning Network was introduced—a second layer protocol that facilitates faster transactions by establishing channels between nodes. However, the management of these channels raises challenges such as liquidity provision, routing efficiency, privacy concerns, and suboptimal fee structures.

Recognizing the imperative for improvement, we've built the BitRoute Optimizer, a platform that not only simplifies the complexity of opening and maintaining channels but also ensures that transactions traverse the most efficient and cost-effective paths available through continuous network optimization.

What it does

  • Smart Network of Open Channels: With BitRoute Optimizer, enter a world where you no longer have to manually seek out viable channels for transactions. Our network maintains a mesh of open channels, ready to facilitate your transactions with optimized efficiency.
  • Strategic Channel Management: Our tool doesn't just find any path; it finds the best path. By judiciously analyzing numerous potential routes, BitRoute identifies the most favorable channels to carry your transaction, considering factors like fee reduction, channel capacity, and path reliability.
  • Privacy-Preserving Transactions: We understand the value of transaction privacy in the digital domain. BitRoute Optimizer reinforces the security of your financial exchanges by employing advanced routing techniques that shield transaction footprints from public scrutiny.
  • Batch-Processsing: In order to defend against network attacks, BitRoute is capable of handling transactions in batches, making it harder for targeted attacks. Batch Processing Image
  • Proprietary Rating System: For every transaction, each node involved is updated using our proprietary rating algorithm. This acts as an open sourced reputation system by which our algorithm uses to create safe paths. Rating System
  • Dynamic Transaction Security Options: The blockchain is decentralized, so why should we control the paths? This is why for each transaction the user is able to specify their path routing settings to make their transactions harder to track and more customizable. Transaction Options

Introducing Hedera Hashgraph Synergy:

In pursuit of the avant-garde, BitRoute Optimizer integrates with the Hedera test network. This fusion enables us to prototype our solutions in a state-of-the-art environment where transaction throughput and consensus accuracy are elevated to unprecedented levels. Hedera Hashgraph's distributed ledger technology not only complements but also enhances our platform's capabilities.

Why BitRoute Optimizer Matters:

Sophisticated Algorithm, Simplified: Using our proprietary GraphSimulator backend with networkx and Pyvis, BitRoute Optimizer handles the intricacies of route finding, sparing users the labyrinthine complexity of channel management. Streamlit-Powered Interface: Our frontend, developed with Streamlit, invites users to engage with a clean, intuitive interface that belies the sophisticated computations working in the backend. It's a paragon of design where accessibility meets functionality. User's can visualize their transactions and directly screen the ratings of the nodes in their transaction.

How we built it

The Algorithm

To develop our optimizer algorithm, we employed a heavily modified version of Edmonds–Karp network flow algorithm. We took 6 variables, the Sender, Receiver, Amount, Threshold, Limit, and Aggressiveness. The last three variables are what make this algorithm special. The Limit is the hard limit on ratings. Nodes with ratings below the limit are completely avoided at ALL costs. On the other hand, ratings below the threshold are heavily de-incentivized. This is the beauty in the algorithm, it takes n random edges determined by the aggressiveness score from the bottom half of edge weights in nodes that have ratings below the threshold. We choose random edges so attackers can't predict the flow, and we choose the bottom half of weights to ensure we don't destroy any vital connections.

The Software

The software was developed in modular fashion so that this algorithm can be run on any blockchain network. The code in the repository shows the implementation of the local data as well as Hedera, and it is able to switch between the true with a simple boolean parameter.

Challenges we ran into

  • Hedera: BitRoute is based on a Python backend. The problem with this is that Hedera does not have native support for a Python SDK. Because of this I had to use a second hand implementation which worked for testing. I was able to get Hedera implemented with the BitRoute transaction system. However, when deploying the Streamlit application, I realized that the native implementation requires a Java complier which is unsupported by Streamlit
  • Pathfinding Algorithm: Coming up with an algorithm for this was initially difficult. Luckily i'm currently enrolled in CS577 in which we are currently learning network flow algorithms. Because of this, I already knew the terminology, I just had to put everything together.

Accomplishments that we're proud of

The goal of this project is to make life easier. And I understand, Bitcoin is confusing. As simple as this BitRoute makes the process of sending secure transactions, there is still a sizable barrier to entry. This is why I developed a customized chat assistant that is capable of guiding users from creating their first address to completing their transaction. BitRoute Assistant

What I learned

  • Python and animated visuals do NOT go hand in hand. I spent too much time trying to animate the flow on the network graph visual before I realized that the visuals are all static images generated with javascript.
  • Typesafety is crucial

What's next for BitRoute: Lightning Network

  • Implement a direct connection to the Bitcoin Network.
  • Allow for the chatbot to using OpenAI function calling to be able to create and execute transactions on its own.
  • Redo the visualization system from scratch to implement flow animations.

Built With

  • hedera
  • networkx
  • openai
  • python
  • pyviz
  • streamlit
Share this project:

Updates