Umoja Bounty Hack III, Getting into Blockchain and Building an RSVP DApp.

Β·

8 min read

Umoja Bounty Hack III, Getting into Blockchain and Building an RSVP DApp.

Hello guys, I participated in the Decentralized Umoja Bounty Hack III organized by Reach, Africa Blockchain Alliance, and the Algorand Foundation and I will be sharing my experience during the hackathon. The Decentralized Umoja Bounty Hack is an 8-week long hackathon where developers across all levels learn and build a Decentralized Application using the Reach lang and is deployed on the Algorand Blockchain.

Blockchain: It is a digital ledger of transactions that are duplicated and distributed across the entire network. It is a digital chain of blocks where every block records information about a recent transaction. The data on the blocks is permanent and irreversible.

Algorand: Algorand is a Blockchain that is open source and decentralized.

A Decentralized Application (DApp): is an application that runs on the Blockchain. Unlike centralized applications that are controlled by a single authority and managed in one place.

Reach Lang: Reach is a high-level web 3 programming language. Its syntax is similar to JavaScript. It is a platform to develop decentralized applications. Reach is interoperable (ability to exchange and make use of information, work with other systems). It runs on the Algorand (AVM), Ethereum (EVM) and Conflux (CFX) Blockchains.

Completing the Project and Meeting Deadlines 😰😊

I did complete the project in time as I was conscious of the deadline although I worked till the deadline day trying to fine-tune my project, the user interface, and ensuring it does what it’s expected to do. I built a Decentralized Platform for the Creation and Reservation of Events whereby the event creator or host can set an event fee to be paid by attendees in order to reserve a seat at the event, and when the attendees check in on the event date, the fee gets refunded to them. It is like a sort of commitment fee to make people come for the events they made a reservation for. The Application runs on Algorand Blockchain. The transaction fees and execution speed of the Algorand Blockchain are quite fast.

The primary features and functions of the Reservation DApp are

- Connect wallet: It allows users (event hosts and attendees) to connect their Algorand wallet to the app which is used to sign transactions and make event reservations (payments).

- Create Events: This feature allows people primarily event hosts to create events by entering their event details and thereby deploying the contract.

- Make a reservation for Events: This allows people (attendees) to register for events using the contract information that has been given to them by the event host thereby attaching to the contract. This also ensures that attendees pay the required event fee that has been set by the event host.

- Checking in to reserved events: This feature allows attendees to check in to their events and when they have successfully checked in and confirmed, the amount paid while making a reservation is transferred back into their wallet.

Here is a demo video of the RSVP DApp.

Here's the Github repository.

The Beginning of the Hack πŸš€

At the start, my thoughts were mainly around how I will go through this hack and build something worthwhile since I had never written a Reach code before. But I was determined to build something worthwhile at the end of the hack. Also, I was hoping I get a teammate with the same drive as myself to work together since I didn’t come into the hack with a team. But little did I know that fate has a plan for everyone. πŸ˜‚

Diving into the Reservation DApp πŸ“–πŸ’»

The first thing I did was to understand the requirements and deliverables of the project, so I checked out a couple of reservation DApps built online and the features they had. I wrote down the participants and program flow in a book to work with. At the time, I participated in the weekly bear challenges organized by Reach and that really brought me up to speed with getting started on the project. I was in the Reach Ascent 2 Bootcamp as well and it helped me understand writing smart contracts better in Reach. I did a lot of documentation reading which was helpful. Reach has a great documentation as well.

Asking for Community Help πŸ§‘πŸ»β€πŸ€β€πŸ§‘πŸ½

Reach has a great and growing community of developers and users on discord. The first time I asked the community for help, I was trying to deploy the rock paper scissors dapp online (the frontend) but the algorand wallet bridge wasn’t popping up little did I know that it was in the documentation and tutorial. But happy the community pointed me to it, and I was able to use the WalletConnect Fallback and got it working.

Challenges during the Hack 😫πŸ’ͺ

My teammate stopped responding very early into the bounty hack, so I had to work on the project (Smart contract and React frontend) alone and it was quite fun as I learned a lot, but it came at a cost, I got burnt out towards the end. Also, I was in the Ascent Bootcamp and was in YC startup school during that period while working on a Web 2 project. I had to pause the web 2 project and focused on the RSVP app and Ascent Bootcamp. Technically, I ran into an issue while coding, I had implemented the program flow and app using a single participant (attendee) whereby the attendee can make a reservation for an event created but we all know events are not meant for a single person, the event created by the host should allow multiple people to be able to register for the event and this is achieved using the API Participants and Parallel reduce feature inbuilt in Reach. I integrated it with the terminal frontend code, but it was having a couple of bugs as the attendees attaching to the contract were having access to the host features and vice versa. I was on this bug when the Reach team published their Respondez sil Vous Plait (RSVP) tutorial which gave me more clarity to fix the code. As I integrated my smart contract code with the React front end following the tutorial, it worked seamlessly. I was really shocked at how a few lines of Reach code could power up big things on the front end.

Reach: A Super Platform. 🦸

With Reach, you can create your app once and you can deploy it to multiple blockchains. Reach is a programming language, a compiler, and a deployment tool. It makes writing DApps easier and safer. It uses the Satisfiability Modulo Theories (SMT) Solver approach and custom assertions, and it has an automatic verification engine that compiles at runtime (this checks that the contract did not overspend, there are no tokens left in the contract when/if it exits, checks if the formulas and logic used are true with both honest and dishonest participants) It was really easy to get started with since I’ve been pushing to get into solidity because of the syntax and learning curve. The fact that every feature you might want to implement in your decentralized project has ready-made functions or methods available for them, you just have to know where to find them in the docs or ask the community. They have great documentation with examples, tutorials, and workshops that utilized most of these features which you can always go through. They also have a great community where you can just jump in and ask questions when you’re stuck and be sure to get help there.

Expanding the DApp πŸš€πŸš€

I will be improving the Reservation DApp by adding the following features

  1. A platform fee: a token to be paid by event host/creators when they use our platform to create events.
  2. A feature to allow event creators to set the percentage or custom reward amount to be sent back to their attendees upon checking into their events. For instance, attendees get the full amount paid, 50% of it, 25%, 10%, a custom amount, or nothing in return.
  3. A feature to add the created event into our centralized list of events for people to view and make reservations.
  4. Converting the contract/event information to a shareable link or QR code that can be shared with people to make reservations.
  5. Improving the logic of making reservations and checking in.
  6. Setting a deadline where the ability to make reservations is closed upon deadline day.
  7. Feature to set early bird tickets and different levels of tickets such as regular and VIP.
  8. Adding a sponsor feature to request donations for events.
  9. Feature to add event images while creating events. I believe with all these; I will be improving my reach coding skills and blockchain knowledge and the Reservation DApp will be a lot more useful to people.

Closing Thoughts 🎊🍾

Yes, we’ve come a long way down, and here are my closing thoughts. The Bounty hack helped me build my first real-world decentralized application which is the Reservation DApp and get paid as well😊. The Reach Platform really opened my eyes to how building blockchain and decentralized applications can be easy to get started with because they have done and are still doing the hard work of abstracting the hard parts for developers to make building a lot easier. Kudos to the team at Reach. If I’m permitted, I’ll definitely do it again and better. The Future of Blockchain is within Reach. WAGMI.

Got any idea to share, you can always reach out to me on Twitter.