Inspiration
To realise the energy transition, we must act. We need to invest annually 1 (one) trillion USD to achieve CO2-Neutrality. We asked ourselves how can we mobilise private funding, and how can we channel alternative funding sources for financing the energy transition?
What it does
We created a prototype that demonstrates how a peer-to-peer green capital marketplace baked by renewable energy could be implemented. NFTs (digital assets) represent ownership of PV-systems that can be fractionalised. Fractions (PVF) are ERC20 tokens that can be traded, use them for lending and borrowing. In that way we increase significantly liquidity of investing in PV-systems.
How we built it
On a miro board using mind-map we started defining the main concept of the prototype (back- and frontend). We agreed on the storyline and value flows. For the frontend, we created mock-ups with the main functionalities, defined dependencies and the deployment tools needed. We introduced sandboxes as possible solutions and discussed their implementation.
For local development we used the metis local node implementation. After testing our codebase locally, we deployed our solution to metis testnet (stardust ID: 588). For managing NFT metadata we set up initially a local express server that has been migrated to https://refi.hopto.org/api/0 the certificate can be seen on https://refi.hopto.org/api/images/example.png. (DEMO example). To access the frontend follow the link https://refi.hopto.org/. To access it user: refi, password: mlknf3l2knfl3k2fnklfn23lfnk32.
For the frontend, we created a template build with NextJS, TailwindCSS and implemented the main navigation according to our scenario. We created a frontend demo script for testing the deployment process and proper functionality of our prototype.
We applied unit testing for individual testing parts of our code and tested the deployment scenarios to ensure proper interaction of the different contracts. The whole deployment process is orchestrated using docker and docker-compose. We also implemented the initial environment for CI/CD even if it is not fully automated.
Challenges we ran into
The main challenge was to shrink the gap of knowledge among team members and make sure that communication of tasks is successful. We introduced step-by-step instructions for using the different smart-contracts for fractionalise, swap and borrowing/lending. Based on this instruction, the smart contacts have been tested and the deployment scripts developed.
We provided two PR to align the local Metis setup on docker-compose. We had to handle different solidity versions and ensure contracts were fully operational after our modifications. To support a smooth deployment pipeline, we handled three environments for contracts unit testing, local deployment for integration tests and finally the testnet for Q&A.
Accomplishments that we're proud of
This prototype has been created from a virtual team almost from scratch and 100% online. Despite the different time zones, time constraints and the perceived high complexity of our project, we were able to develop a functioning solution.
What we learned
Testing, Testing, Testing
References
[1] Renewable Energy in Cities Status Report 2021
[2] Investment and financing needed for Switzerland to reach net-zero by 2050
[3] Transforming Climate Finance and Green Investment with Blockchain Technology, 2018
[4] C40 announcement at Global Climate Action Summit, 2018
What's next for ReFi - Financing the Energy Transition
We want to create a DAO and work on the next version of ReFi adding additional functionalities, error handling and additional testing. We are interested to work with the energy industry to test and market our prototype. We are planning to apply for the metis grants program for additional funding.
Built With
- docker
- ether.js
- hardhat
- javascript
- next.js
- solidity
- typescript

Log in or sign up for Devpost to join the conversation.