Satsconf Hackaton 2023

November 6, 2023 (1y ago)

Satsbet

Over the weekend, I participated in the Satsconf Hackaton 2023 event where we had to build an app using the Lightning Network in rouglighly 30 hours. My team and I have never had any prior experience coding something with the Lightning Network before neither we had experience working together, so we've decided to build a simple app that would allow users to bet on the price of Bitcoin.

Basically, the biggest problem we tried to solve is the lack of solutions that would allow users to bet on the Bitcoin price direction without KYC or dodgy centralized exchange (where they can manipulate the price on their own benefit).

The initial idea was to build a totally decentralized app, but due to the time constraints, we decided to build a hybrid solution where only the price of the Bitcoin would come 100% from on-chain data (no exchanges or third parties) using the UTXOracle.py.

Architecture
Architecture

Payments are procceced using the Lightning Network, so users could bet and receive their winnings instantly. To do so, we used the LNbits platform to manage the Lightning payments and a lightning node hosted on Voltage.

To glue it all together, we used the Next.js framework with Typescript. The app is hosted on Vercel and the code is open source and available on the GitHub.

Since we had to build everything from scratch and the team had no prior experience with Next.js/TS either, we had to learn a lot of things on the fly.

Given that I'm an Remix.run early adopter, having to explain the new React Server Components API on Next.js to the other devs was incredibly easy and satisfying since they all could just focus on the business logic and not worry about the state management, REST API calls or anything like that.

I'm really proud of what we've accomplished in such a short time and I'm looking forward to the next hackaton!

The project can be accessed at https://satsbet.vercel.app.

PS: We won the general 3rd place šŸ„‰ and also won the "Best Design" prize! šŸ†

Thanks for the fun weekend team!

The team
The team