The Limpopo provincial government is often in the news at the beginning of the academic year due late delivery of textbook to schools, resulting in disruptions to the education system. Late delivery (or even none-delivery) is often tied to collusion between corrupt government officials and suppliers.
On the other hand, other provincial governments are often in the news for late payment to suppliers. This is particularly detrimental to small-scale suppliers who often have to default on their own obligations despite having fulfilled contracts with the government.
Our solutions aims to mitigate the collusion between government officials and suppliers, and guarantee payment to suppliers when their fulfilled the requirements of their contract.
What it does
We build an escrow contract for the supply of books to schools. It is broken up into 4 parts:
1. Initialize a smart contract
The national treasury would issue a smart contract for the delivery of textbooks in the province. On initialisation the contract is loaded with currency to guarantee payment to supplier at the end of the process
2. Select a supplier with a vote
The treasury provides a potential suppliers to supply textbooks. Schools are then given a set amount of time to vote on their preferred supplier. The supplier with the most votes is then selected as the winning suppliers.
3. Verify fulfillment of books
The winning supplier is given a set amount of time to fulfill the order. When this time expires, the schools altered to vote on whether or not they have received their books
4. Make payment to supplier
If the supplier receives the minimum number of votes required (step 3), the currency locked in the smart contract is transferred to their account and the contract terminates.
How we built it
We used solidity and zeppelin to build a smart contract on the ethereum blockchain, and reactjs to build the frontend interface.
Challenges we ran into
Being new to the blockchain development, we had to upskill ourselves with the solidity environment. We experienced problems with testing when our code stopped running. However, the code ended up running on a different computer.
Accomplishments that we're proud of
We have a good looking frontend that can interact with the smart contract.
What we learned
We learnt how to use solidity: creating functions, using zepkit to reuse code, making calls to the blockchain from a frontend app.
What's next for Ninja-governator
Test the app on a test site. Integrate a stablecoin such as dai to ensure the smart contract does not lose value while the supplier is fulling the order.