Our Youtube Video is still processing, but we managed to get the Youtube Link, it will load in a couple of minutes

Inspiration

The inspiration for this project is that we wanted to tackle a problem of scale, which had to do with social good. In those case, we have identified the need for open-source sustainability, which is definitely an important question regarding the viability of open source. Because of this, we were inspired to use our knowledge of decentralized systems to create a solution that would be transparent, effective, and quality.

What it does

GitBounty is a crowdsourced, decentralized bug & feature bounty platform that provides incentives for people to contribute to open source projects by awarding them ether. This process is very simple, a person creates a bounty on our platform by linking their corresponding issue, and other metadata and soon other people on the platform see those bounties and choose to accept them. After the issue is closed, which is detected by the Github API, the person who raised the issue then submits a report on our platform that requires the client to input how much each person did depending on how much code they contributed, helping you out in any way. After the report has been submitted the money will be distributed amongst the contributors and they can feel proud that they made some money today by fixing an issue. Now you may be thinking, that’s a very simple explanation and what’s the use of blockchain? Blockchain allows us to decentralize these bounties essentially replacing the middlemain with a smart contract and securing all the issues within the Ethereum Blockchain Ecosystem. The requirements for a user on the platform is simply a Metamask wallet account, and a github account. Then they can proceed on creating a bounty, resolving a bounty, submitting a report, etc. The actual process of each of these steps can be seen more in detail in the demo video above. There are also analytics that are being recorded on the application such as how much you have earned, how many times you have contributed, etc. This can provide feedback on the client and ask themselves the simple question on how to help people in Github. Lastly, why would people pay people for solving certain issues. If someone raises a popular issue the chances are that it is raised for someone else is really high. This can allow popular companies or organizations to increase or donate a bounty to increase the odds of someone contributing to it.

How We built it

The whole structure of the application is simple yet complex. We had to utilize several libraries, systems, and also a lot of critical thinking to solve this problem. The main backend of our application was written in NodeJS and we used Express to manage the routes. There were a lot of endpoints that we created and you could split them off into two groups: Endpoints that worked with IPFS to store data, and endpoints that used the Github API to retrieve information. This was the first time that our team developed using the Github API and it was very user friendly and allowed us to retrieve the information we desired in a meaningful fashion. To go more in depth the specific libraries we used in the backend were: ipfs-api, axios, ethers, node-fetch, octokit. These backend libraries gave us enough information to build our backend algorithm that performed all the IPFS and Blockchain functions. We created our own database with IPFS and updated, read, and created documents for the users of our application in a decentralised manner. Now to the core of the program: the smart contract. We used Solidity to write the Smart Contract and Remix to develop and debug it. EthersJS is a NPM library that helps call the Smart Contract functions from either the backend or the frontend. We specifically utilised it in both, the backend for setting the IPFS database and the frontend for doing the transactions from signer to recipient. And now the actual blockchain software that we used was Ganache, a local Ethereum Blockchain that is created for us and allows us to deploy our smart contract. The console that is dedicated to Ganache is truffle, and that’s where we ran commands to deploy the contract. Onto the frontend aspect of the application, we used Metamask to inject Web3 into our browser and allow the client to retrieve the Smart Wallet of any user on the application. Web3 was used for Metamask on the frontend and linking accounts, and EthersJS was used in the backend or frontend to call the Smart Contract functions. If we look at the source code of the backend API you can specifically see when and where we call the ethers functions. After we received all the important information from both the API that we had constructed and Metamask, the frontend was ready to get built. We used ReactJS as the framework to create the frontend along with AntDesign to design the components along with CSS to style our application. We used Big-Integer on the frontend to convert the user input of Ether into Wei and then send the transaction with EthersJS. We also utilized ReactVis to create analytics for our application, these analytics consisted of charts that reflected our users' decisions on the app. Craco was also used to create the react app so we could configure it to our desired needs. The design and codebase for the React was done by Daniel Yu, who implemented a dark theme that reflected the theme of Github itself. To conclude, this application had a heavy tech stack and required a lot of teamwork for it all to work.

Challenges We ran into

Throughout HackThe6ix my team and I had faced problems that we had never seen before. Let's start off with the technical issues that our group had 0 control about. For this hackathon, our team decided to use VSCode Liveshare with one person frequently committed to code into Github just so we can gradually save the code in case something scary happens, and something scary does happen. All the IPFS endpoints that would manage the user base and keep track of all the important user information along with the bounties were working perfectly on Aditya’s machine, but once we converted the files onto Markos’ VSCode Liveshare, it became buggy. We were getting an Axios error that did not look like it was a fault in the code because we had recently run it and it was working perfectly. After searching for what the actual problem was, we realised it was a network error and Markos’ wifi was bugging out. It was well past midnight and we were stuck because of an issue that we ultimately did not have any power to stop. After waiting for 1-2 hours, the issue subsided and we continued the development process. We will definitely remember this moment on how it created a major roadblock in our hackathon, but we persevered and understood that not everything will work perfectly all times of the day. The second issue that was a code issue, that we spent a lot of time working on was sending the transaction to an account using a signer on the frontend. All we needed to do was send a value to a specific address and we would be done with that major component of the application. The problem is, we need to send the money in Wei, not Ether. Wei to Ether, is like Cents to a Dollar. 1 QUINTILLION Wei is equivalent to 1 single Eth, and we cannot have a number in Javascript that has 18 zeros. So instead our team researched on how to utilize the Big-Integer library in react and spent some time debugging the issue and eventually we fixed the problem by resending it as a hexadecimal value for the smart contract to decode. Last but definitely not least, was the whole integration of the Github API, IPFS Endpoints, Smart Contract, and React into one whole application. The Smart Contract and IPFS Endpoints worked concurrently whenever a certain operation was completed. As for the Github API, we had never used it before, but quickly realized how user-friendly it is. Slowly but surely we transferred our code and created our huge API with all it’s beautiful endpoints, and it really looked complete. The last piece to the puzzle was calling the endpoints from the frontend and making it look beautiful. We have to give all the credit to Daniel Yu, who designed and coded the frontend of the application and overall made it aesthetically pleasing for the client to utilize. To conclude, HackThe6ix allowed us to learn more about Github, Big-Integers, and how bad things can happen to good people. Not everything happens the way it should but we definitely learned how valuable 2 hours of time is, and that block of wifi really restricted our hacking. Nonetheless we are proud that we overcame most of these challenges and resulted with this application.

Accomplishments that We are proud of

My group and I are extremely proud of ending this hackathon with a finished product, even though we had many large hurdles along the way. For example, we had a major roadblock that didn’t allow us to code anything but still we finished with the code we have in front of us now. We are also proud of integrating the Github API even though none of us have ever used it before. As 3 highschoolers and 1 university student we can take a positive look back on what we made and be extremely satisfied that we even got here.

What We learned

his part will become short and concise because I want to get straight to the point. We learned that many uncontrollable factors can affect your hacking experience to a great fold. These uncontrollable factors greatly affected us and taught us a lesson when we realised that one of our team members’ wifi was lost and we used VSCode Liveshare. This would pause all the work that everyone else was doing and essentially stop our hacking experience. We also learned that integrating code isn’t that difficult if you communicate well with your teammates in a calm fashion. This time we all brought our code together and sat in a call for 1 hour integrating all the code to the best of our ability and making sure it worked the way we wanted it to.

What's next for GitBounty

The next steps for GitBounty is to publish it on the Main Ethereum Network or Ropsten Test Network. This would allow people to actually test it on real Github repos and we can witness the magic work. There is so much more for GitBounty and we could only optimize it to such an extent because we were coding this at a hackathon. To conclude, we would love to deploy and watch the Ethereum exchange throughout members and see the magic unfold.

Built With

Share this project:

Updates