Inspiration

Inspired by onTime Carpool, powered by Ethereum, Softheon Armature, MongoDB Atlas and a negligence for sleep.

The idea of the project thought came from Yun Zhang, the CEO of mobileware. Yun had imagined a software that would enable users of his app, onTime Carpool, to be rewarded for reducing their carbon footprint. He proposed to use some kind of token as a proof of how much carbon footprint commuter has save.

We took inspiration from this idea and invented CarbonShare! By using CarbonShare Tokens, companies who wants to reduce their carbon footprint have a way to prove their involvement in eco-friendly ventures.

As a result, when brain storm ideas for this hackathon, we decided cryptocurrency was the perfect fit for this application. Not only does it allow for decentralized accounting, we coded the token to ERC-20 standard, which allowed CST to be traded on any existing DEFI applications or Exchanges .

What it does

Data from onTime Carpool is piped to our incoming data handler. The data handler filters and aggregate the data so that we can retrieve quickly later. The sorted data is then stored in MongoDB atlas. Our full stack developer Xie then coded aggregations and retrieve methods for the data that he is going to display on the frontend using Flask. Using the RESTful API and Softheon Armature, Xie designed a sleek front end that allows users to visualize important information about their rides.

Eric, our smart contract developer and data engineer, designed the micro service for handling incoming data. The data are then uploaded to the MongoDB atlas database. The ride data are then acquired by another micro service that is integrated to the Sepolia testnet. Rides that have not been rewarded are then rewarded by calling the smart contract

How we built it

We used MongoDB Atlas for our database. Using a sample object acquired from onTime Carpool's API as reference, we wrote a python script to generate data for the database.

The smart contract was developed in Remix and flattened using remix. Then it was deployed with the help of Truffle to the Sepolia testnet. A micro service was written to aggregate data from the database. Using the Web3 python library, the micro service interacted with the smart contract and distributed CST to Ethereum address of the users.

The front end was developed using Softheon Armature. Using the RESTful API, the front-end talked to the Flask back-end, where all of the data aggregation occurred. The back-end requested data from the MongoDB and used those data to allow users to view trips and also filter them.

Challenges we ran into

  • Softheon Armature was released only two days ago.

Xie had to edit embedded source files to find alter the classes he needed. A LOT of debugging.

  • The node hosting third party, Infura, had restricted the use of a command.

Eric did not know the command was restricted and struggled to get web3 python develop kit to connect to the EVM.

  • MongoDB python driver had trouble running on python 3.7. because of SSL issues.

With the help of Cliff, we were able to resolve the issue and select a version that was compatible.

  • Due to malicious actors on the testnet, many faucets were restricted and did not give enough ETH for testing.

Eric had to run hash algorithms on his browser to get test ETH.

Accomplishments that we're proud of

  • Complete what we aimed to do in under 24 hours!
  • Average sleep of 2 hours.
  • Deployed a smart contract to a live Ethereum network! Contract on Etherscan.
  • Designed a skeletal front end using Softheon Armature.

What we learned

Eric - I learned how to write a smart contract, deploy it to a testnet, and interact with it using python! It was a lot of debugging but it was rewarding at the end. I also learned how to design data structure with the help of Xie and was able to implement the generation algorithm using python.

Xie - TBF

What's next for CarbonShare

  • By crowdsourcing or getting angel investment, we can invest in this brand and make CarbonShare the go to application for saving the planet.
  • Other development steps include creating a mobile application for CarbonShare users so that they can access their tokens within their hands.
  • Updating the UI UX for the front end and ensuring all features are tested.
  • Getting real data from onTime Carpool and implementing this in production.
  • Rethinking some of the aspect of the idea as suggested by some of the judges of the panel. Refine the idea.
Share this project:

Updates