Inspiration

The inspiration behind GreenFlowChain came from the need to create an affordable and scalable solution to incentivize recycling and proper waste disposal. The idea was to develop an automatic dustbin that rewards individuals for putting trash where it belongs, encouraging environmentally friendly behavior.

What it does

GreenFlowChain is an automatic dustbin that rewards users for disposing of recyclable items, specifically used bottles, in the right manner. The dustbin employs open-source electronics and utilizes the Chainlink network to ensure the integrity of the exchange rate for rewards. The primary blockchain used for token transfer is Flow.

When a user places a claimable bottle in the dustbin, the built-in RFID reader scans the RFID tag on the bottle. The microcontroller connected to Wi-Fi then sends a request to the backend to verify if the product is redeemable. If the product is valid, the microcontroller generates and displays a QR code that users can scan. The QR code takes them to a simple frontend interface built with React.

On the frontend, users can log in with any Flow-compatible wallet and claim their reward. The address for reward redemption is verified, and the user can proceed to claim the reward. The backend validates the product's redeemability and retrieves the latest value of Flow to USD exchange rate from a separate backend. This exchange rate is continuously updated using a smart contract deployed on Ethereum and Chainlink's price feed.

After fetching the exchange rate, the appropriate amount of Flow tokens is sent to the user's verified address, taking into account the reward and exchange rate. The transfer of Flow tokens is facilitated using the Flow Client Library, and signers are generated locally using a private key for the testnet account. The necessary commands and cadence script are executed to transfer the tokens.

In summary, GreenFlowChain incentivizes recycling by rewarding users for proper waste disposal. It leverages Chainlink for exchange rate integrity and utilizes the Flow blockchain for secure token transfers.

How we built it

To build GreenFlowChain, we utilized open-source electronics and components for the automatic dustbin. The RFID reader and microcontroller were integrated into the system, allowing for bottle verification and reward generation. We used Wi-Fi connectivity to communicate with the backend and facilitate the token transfer process.

The backend of GreenFlowChain was developed using a Node.js server, which interacted with a MongoDB database hosted in the cloud. The database stored information about the products and their redeemability status.

For the frontend interface, we utilized React to create a simple and user-friendly experience. Users could log in with their Flow-compatible wallets and claim their rewards by following the provided instructions.

The exchange rate integrity was ensured by deploying a smart contract on Ethereum and utilizing Chainlink's price feed. The backend continuously fetched the latest exchange rate from the smart contract to accurately calculate the reward in USD value.

The token transfer was implemented using the Flow Client Library. Local signers were generated with a private key for the testnet account, and the necessary commands and cadence script were executed to transfer the Flow tokens securely.

0.96-inch OLED Display: The cost of a 0.96-inch OLED display can vary depending on the brand and quality. On average, a basic 0.96-inch OLED display can be purchased for around $1.50.

ESP8266 Microcontroller: The ESP8266 microcontroller is an affordable and widely used option for IoT projects. The cost of an ESP8266 module typically ranges from $2 to $4, depending on the specific model and features.

RC522 RFID Reader: The RC522 RFID reader module is a commonly used module for RFID-based projects. The cost of an RC522 RFID reader module is generally around $1 to $2.

Challenges we ran into

During the development of GreenFlowChain, we encountered several challenges. One significant challenge was the availability and accessibility of RFID stickers, which were essential for the system's proper functioning. To overcome this obstacle, we improvised by using a small RFID tag glued to the bottom of the bottle for the demo.

Another challenge was implementing the backend functionalities, such as verifying product redeemability and fetching the latest exchange rate. Ensuring the integrity of the exchange rate was crucial, and deploying the smart contract on Ethereum and integrating Chainlink's price feed helped address this challenge.

Integrating the different components, including the RFID reader, microcontroller, backend server, and frontend interface, required careful coordination and troubleshooting to ensure smooth operation and data flow.

Accomplishments that we're proud of

We are proud of developing GreenFlowChain as an affordable and scalable solution for incentivizing recycling and proper waste disposal. By using open-source electronics and leveraging the power of Chainlink and Flow blockchains, we were able to create an automatic dustbin that rewards users for their environmentally friendly actions.

Despite the challenges faced during the development process, we successfully integrated the various components and created a functional system. We are proud of implementing the RFID verification, backend functionalities, frontend interface, and secure token transfer using the Flow Client Library.

Moreover, we are proud of addressing the issue of exchange rate integrity by deploying a smart contract on Ethereum and utilizing Chainlink's price feed. This ensures that users receive accurate rewards based on the current exchange rate.

What we learned

Through the development of GreenFlowChain, we gained valuable knowledge and experience in various areas. We learned about integrating open-source electronics into a project and overcoming limitations with creative solutions. The improvisation with the RFID tag for the demo showcased our ability to adapt and find alternatives when faced with constraints.

We also learned about the implementation of backend functionalities, such as product verification and data storage in a cloud-hosted MongoDB database. The integration of the Flow blockchain and the Flow Client Library provided us with insights into secure token transfers and handling account authentication.

Furthermore, we deepened our understanding of utilizing Chainlink for ensuring the integrity of exchange rates. By deploying a smart contract on Ethereum and using Chainlink's price feed, we learned how to fetch accurate and up-to-date exchange rate data for token calculations.

What's next for GreenFlowChain

For GreenFlowChain, the next steps involve further testing, refinement, and scalability. We plan to optimize the automatic dustbin's performance, ensuring reliable RFID verification and seamless reward generation.

Additionally, we aim to automate the creation of products, enabling the generation of hundreds of products per minute. This will involve implementing an automated process for creating products and storing them in the MongoDB database.

Furthermore, we will explore partnerships and collaborations to increase the adoption of GreenFlowChain. By collaborating with recycling organizations, waste management companies, and environmental initiatives, we can expand the reach and impact of our solution.

We also intend to enhance the frontend interface, making it more intuitive and user-friendly. By incorporating user feedback and improving the overall design, we aim to provide an even better experience for individuals using GreenFlowChain.

Overall, the future of GreenFlowChain involves continual improvement, scalability, and collaboration to make a significant positive impact on the environment by incentivizing recycling and proper waste disposal.

Built With

Share this project:

Updates