I want to build an application which gives power to individuals to request resources provided by charities like Food Bank or non-profit organizations. Meanwhile, those charities could manage their resources, including donations and volunteers, using the application. As a volunteer, donor, or low-income worker, I wish I can trade my kindness for something whenever and wherever I need them, e.g, an online course, a piece of craftwork, instead of feeling guilty. Furthermore, I wish my kindness could be traced and acknowledged by society.

This project is a prototype inspired by this thought.

What it does

A user can request tokens from a fund through the application built in the project. Meanwhile, the user is able to make a promise to donate token in the future. The user should redeem such a promise later.

How I built it

The project contains two kinds of smart contracts, one is used by a user (e.g, a donor or fund consumer), and another one by an organization.

The smart contracts are implemented with solidity. The user smart contract is called PayItForwardWallet, and it contains the interface for a user to consume tokens from a fund, donate tokens to a fund, consume with promise, redeem promise, or withdraw tokens. The organization smart contract is called PayItForwardFund, contains the interface which responds the request from PayItForwardWallet to consume/donate tokens.

The demo app contains a nodejs backend. The backend realizes RESTful APIs by calling the interfaces of smart contracts through Harmony-one sdk. The front end is a Vue app.

Challenges I ran into

I took some time on learning solidity, and got some help on using harmony-one-sdk.

Accomplishments that I'm proud of

I am proud that I have built a DApp on blockchain finally.

What I learned

I learned that it is not that difficult to build a DApp, also, compared to a classic mechanism, payment or money transfer mechanism using blockchain technology does have its advantage: these functions could be achieved without considering the security boundaries of different organizations.

What's next for Pay It Forward

We hope that the app could trace the transactions which consume token requests or redeem promise. In this way, different transactions could chained together, and the effect of kindness could be seen.

Also, we could have a better UI. The smart contract for users or organizations could be future improved.

In the demo, the front end calls backend to read from and write to the harmonyOne platform. We are going to make frontend calling harmonyOne platform using its SDK directly instead.

The smart contracts of this projects are deployed on the testnet as demo. We also want to deploy production contracts on mainnet for a non-profit organization.

Built With

Share this project: