We applied and got selected for ETH India 2018, which was Asia’s biggest Ethereum Hackathon held in Bengaluru between 10th – 12th August. The hackathon itself went on for 36 hours but there were some great tech talks by the sponsors’ team on Dai coin, Embark framework, NuCypher, etc before it began. Also, there were API prizes to be given to teams who used any of those services.
Once the hackathon began, we spent the initial 3-4 hours to brainstorm ideas. The theme was to build a decentralized application solving any kind of problem in general. We went through different sorts of problems, one of which we called – a dead man’s switch, it would be a decentralized application that releases the will of a person after a confirmation through a certain level of security of a person’s death. While this was an interesting and perhaps useful idea, we found certain serious flaws with it and decided not to go with it. We also had an idea to develop a blockchain based system to incentivize researchers for their research work by letting them publish their work on our platform and making general public or investors to encourage them by paying them in Dai coin (everyone likes stability) but this didn’t seem feasible to us since the idea required a good implementation of a private blockchain and was not motivating for us due to short knowledge of hyper ledger fabric which is the best tool to work and deploy private blockchain systems.
Idea and Implementation:
After much deliberation, we ended up with the following problem statement:
In Courts, pieces of evidence and records are frequently tampered due to which many times the innocent are held guilty or the guilty manage to get away with their crimes. When someone submits a piece of evidence to the court (may it be a document, video or audio), the evidence goes through a lot of govt officials (in middle) where tampering/mutation can be done to some extent. The parties and the court have to trust all the middle officials that come in between the process of approval to submission to reviewal of the evidence.
We proposed a solution built on top of solidity where all the pieces of evidence submitted by a user are pushed to an immutable blockchain based database with a very simple and elegant user interface where user can upload all the details of the evidence like its image, name, creation date, description, and type and we handle all the things behind the scenes (uploading the image to IPFS, signing the details user filled using his / her public key, making the actual transaction to blockchain via organisation’s account by verifying the hash so that user doesn’t have to pay for the ether via making a submission and the organization does the payment for user’s transaction with taken care of security issues like mutating user’s filled information). To make things simpler for users, we implemented offline sync in the user interface which enabled the user to upload content to the app even while he is offline. Also, the records are pushed to the blockchain in the same way by the authorities so that they can’t be changed anytime later.
We went to discuss our idea with some mentors and got positive reviews regarding the same. They even helped us find out some flaws in our idea, we were able to overcome possible flaws in the use of the mechanism described below:
In most blockchain based system, we use PoW algorithm to make it immutable, for which the miners are fed and get a transaction fee to verify every transaction made on the blockchain. The fees are given as gas/ether to the smart contract while calling one of its non – view function. The solution we came across for this is using a centralized govt server act as a communication channel between user and blockchain in a way that it cannot even mutate user request in any way. So, we take all details from the user, get an IPFS hash of the evidence digital media, then sign all this data using user’s private key and send it as it is to the centralized server. The server calls the contract function to submit the data on the user’s behalf passing user’s public key, the contract then verifies the data using that key. If the data is mutated, the verification fails and the contract doesn’t make a transaction at all else it simply deducts the gas sent from the govt server and makes the transaction.
Another flaw we faced was, that all data on public blockchain is public. The solution was simple, we proposed to use NuCypher proxy re-encryption to overcome this which seemed an ideal solution to the problem.
The hackathon event was amazing overall, the management team at ETHIndia was very awesome and also there were some great mentors. Also, one needs to mention TIMER – there was a big countdown timer in the hacking area which kept us working on our projects, a great source of motivation. When it showed 6 hours, our beast mode was ON and we finished the development stage of the project from 60 to 100 percent in just 4 hours of work. Then, we started documenting the project, from README.md to presentations and prepared for the pitching round.
Finally came the judging time, our judge was Dr. Vingril Griffith who works at Ethereum Foundation. We explained our project, starting with the problem statement, followed by details of our solution and then finally showing a demo of our implementation. Their overall feedback on our idea and implementation was very positive. We chilled and waited for results around one hour and then finally seeing our team name (Super Hackers which originally was Supercalifragilisticexpialidocious Hackers) made us super excited and this is how we won our first hackathon. We learned a lot of things from how brainstorming of idea works to working and coordinating as a development team, thanks to Logic Square Technologies for that. We didn’t just code continuously for 36 hours but also met different people from different parts of the world, which was a great experience and also gave us insights on some of the amazing new stuff happening around and about communities. This is what these tech events like hackathons and meetups are for, socializing and spending your weekend working and finishing some really cool project you dream of.
So don’t wait, just build it.
-Akshat Bharghava & Sakshi Srivastava