Inspiration

Perhaps no technology in modern history has been as transformative as the internet. It has revolutionized how we access and share information. However, in many places around the world, internet access is still not readily available. Of course, in many cases, a lack of infrastructure prevents access, but in others, even where the infrastructure is there, internet access is prohibitively expensive. We wanted realize an idea which solves this issue by decentralizing and democratizing internet access for all.

Enter HAVA

Users can connect to HAVA access points, or Hotspots, where they can pay for internet access using HAVA tokens, which they can obtain from a smart contract by converting Ethereum. Where do these hotspots come from? Well, from anyone. Any user with an internet connection and a computer can become a HAVA Hotspot by configuring their computer to act as a router. But how can the HAVA Hotspot provider ensure that they are paid for the access they provide, and how can the user not only ensure that they get the internet they pay for, but also that they can make a payment before they have internet access? All these problems are addressed with an unique and innovative application of Blockchain technology. At the core is a Smart Contract for the Ethereum network written in Solidity. This smart contract mediates the interaction between the user and host. (See Technical Section for additional detail.)

The use of blockchain and smart contracts enables this entire process of WiFi sharing to be decentralized and separate from any 3rd party intermediary, thereby drastically lowering costs and barriers to access.

How we built it

The Smart Contract: When the user first attempts to make a connection, they sign a transaction message that locks a portion of their funds in the smart contract for a given period of time, roughly the time that they wish to connect. The user sends this signed message over LAN to the host, who then broadcasts the transaction on the Blockchain. When the host sees that the transaction is confirmed, the initial setup is complete. The user can agree to purchase a small allocation of data using the funds in their wallet. To do so, they sign a message indicating an intention to pay the host an amount of HAVA token corresponding to the data they wish to use. The host then grants them internet access for a certain amount of data that the user is able to track. To continue their internet connection, the user must continuously send messages that update their willingness to pay. If the user does not send such a message when their data is up, the host can add their signature to the last message the host sent, broadcast a transaction to the blockchain, and claim the funds the user agreed to pay. The rest of the funds in the contract are then sent back to the user. This method essentially means that the user is able to pay as they go, and if any party backs out of their end of the deal, the other party can immediately cease the relationship and walk away with what they are owed. It is also important to note that only the first and last messages are broadcast on the blockchain; everything else is strictly between the host and the user. This methodology of using time-locked contracts and multi-signature transaction messages results in a greater than 50% reduction in gas fees from our own testing.

The Router: We used openNDS to serve the captive portal that users are redirected to upon connecting to a HAVA Hotspot. Ndsctl is used for authenticating and deauthenticating users based on whether or not they have paid for access. When users first connected to the Hotspot, they are placed into a “Pre-authentication” state where they are redirected to our custom captive portal. From there they can interface with the smart contract

The App: To connect users in need of Wi-Fi to HAVA Hotspots, we built an opt-in system for HAVA Hotspots host to share their locations. This infrastructure, by virtue of the kind of data it contained, had to be centralized off chain. Our entire off-chain mobile infrastructure was powered by CockroachDB Serverless. We utilize the SQL database to quickly store and retrieve the coordinates of hotspots near the user. This information is piped directly into our mobile application allowing users to view the hotspots near them on a map.

Challenges we ran into

Our journey at Bitcamp 2022 was riddled with challenges. Simply configuring our computers to act as hotspots proved to be challenging. Code that worked one minute would without cause or warning stop working the next. At its core we realized that widespread support across multiple systems was unfeasible at this timescale. We pivoted to targeting a single device and internationally chose the cheapest internet enabled computer we could get our hands on, the Raspberry Pi. While in the end we were successful, getting this aspect of the project was certainly one of the most stressful and difficult to accomplish.

What we learned

Our project heavily relied on the blockchain to enable secure offline transactions and ensure our project was truly decentralized. Learning to write and interact with smart contracts written in Solidity was a challenge for our team. None of us were particularly experienced with the blockchain but we shared a common interest and desire to learn more. As a group we researched and collaborated to teach ourselves the basics and challenged each other’s security notions to ensure our contract was both safe and secure.

What's next for HAVA Hotspot

Our mission of democratizing access to the internet is at the forefront of our roadmap. We started with a cheap raspberry pi, but we want to make HAVA Hotspots even more accessible. Over the course of the hackathon we made major progress towards supporting windows and ubuntu systems. Enabling these devices to become Hava Hotspots will enable even more people across the world to become an ISP. This next step is in perfect alignment with our mission because the more devices we can support, the more HAVA Hotspots will exist and the more democratic internet access will become.

Share this project:

Updates