Smart Hackathon DApp
Late August last year a local IT organization decided to host the first-ever blockchain-themed hackathon in Serbia, Belgrade. We as a company really liked the idea and volunteered to help with the organization.
Late August last year a local IT organization decided to host the first ever blockchain-themed hackathon in Serbia, Belgrade. We as a company really liked the idea and volunteered to help with the organization. Henceforth, we proposed that we implement all the logistics of the hackathon on an Ethereum smart contract. As a result of that endeavor Smart Hackathon DApp has been created.
Hackathon DApp is an DApp template that anyone can use to create a completely decentralized instance of a typical hackathon. The template is consisted of a smart contract and front-end React/Redux code that can be run independently anywhere, without a server to rely on.
The smart contract regulates all the hackathon loy members can cast votes strictly during the voting period.
Positions
The creator of the instance (i.e. hackathon administrator) becomes the governing body and has most of the control over the flow of the event. He is responsible for switching periods, registering teams, registering jury members and paying out prizes during the verification period. Additionally, the administrator has the option to disqualify teams, thus rendering them ineligible to receive a prize regardless of their final score. Only the administrator has access to these options.
Administrator page during the registration period.
Anyone who wants to be a sponsor can contribute to the prize pool by doing so from the DApp interface or by submitting a smart contract transaction directly. These contributors will have their name and an image (e.g. company logo) listed on the main page of the hackathon where it will be visible to anyone accessing the DApp. Furthermore, they are also able to provide a link which will be available by clicking on the name/image. Sponsors contributing twice from the same address will have their link and image updated (if they submitted one) and the new contribution will be added to the previous one. The minimum amount for a contribution is 0.1 Ether.
Sponsor contribution form and a list of sponsors that contributed.
In order to interact with the DApp jury members need to send their name and Ethereum address to the administrator. He is the only person that can register new jury members. After jury members are registered they can only interact with the DApp during the voting period. When voting, jury members submit a list of all teams sorted from highest to lowest score based on their preferences. After the voting period anyone can see how much points each jury member gave to each team.
Voting page only accessible by judges during the voting period.
Similar to jury members, teams who want to participate need to contact the administrator and send him their team name, Ethereum address to which they want to receive funds to and the names of the team members. After they do this, the hackathon administrator adds their teams to the smart contract. In the event that a team does not want to receive a prize after the hackathon is over, they need to inform the administrator before the end of the registration period. Once they are registered, a team has no other interactions with the DApp.
List of all teams on the main page after registration.
Prize system
After the jury members have voted, the administrator should change the period from voting to verification. During the verification period the administrator has the option of checking if there were any irregularities with the hackathon. If he concludes that everything went according to protocol, the administrator can initiate automatic prize payout through the smart contract. He is limited to paying out prizes only during this period. Teams that said they don’t want to receive a prize before registration and disqualified teams will not receive a prize. After payout is done the final period starts automatically which no one will be able interact with the DApp anymore and the hackathon is finished.
The total prize pool amount equals the total amount of Ether contributed by sponsors up until the moment of payout. The first scoring team gets half of the total prize. Every team after that gets half of what is left over after the team that is in front receives a prize.
Because the prize amounts get determined logarithmically, some small amount of Ether might remain in the contract after the payout. This amount is returned to contract owner to cover deployment and transaction costs. In case this amount turns out to be significantly larger than these costs, the administrator should distribute it to all teams equally.
Design of the main page after the end of the hackathon.
Final thoughts
Hackathon DApp is an open source DApp template with a well designed user interface and high level of usability. It’s mechanics, positions and periods are thought out and implemented with security in mind. In addition to this, it was tested in a live production environment where it performed without a flaw. It was created with the intention to promote blockchain technology and to demonstrate its potential through a real world use case that everyone can understand – this is something we generally strive to do here at Decenter. We encourage everyone who is interested in how everything works under the hood to fork our code and try it out for themselves. Hackathon DApp was a great learning experience for us and we hope that it will be the same for you.
The results of the Belgrade hackathon can be found at https://decenterapps.github.io/DecenterHackathon/#/.
The source code to the project can be found at https://github.com/DecenterApps/DecenterHackathon.