Remember Tamagochi? It was a simple device, and you had to take care of your virtual animal inside the box. We thought, what if we have a generative art that you should take care of?

What it does

As KodaDot we planted a forrest to become carbon negative NFT marketplace, and we would be happy to give people the opportunity to support this vision. Every day you have a simple task: Water your plant. When you are consistent, the tree grows.

How we built it

We used NextJS and modern libraries like Wagmi & rainbow for the frontend. The generative part was built using p5.js. The intelligent contract part is so far NFT extended by the gaming logic.

How does the tree generation work? We use a mathematical function called 'Fractal Trees.' Thanks to it, we can generate a tree with branches. After the tree passes level 8 (you have been steady for 8 days), the tree obtains leaves. When you pass level 15, your tree is upgraded to the sakura tree (pink leaves).

Why is a smart contract special? We basically wrote that you must water your NFT token once daily. For that, we use a couple of date util functions that tell us which day is today.

Challenges we ran into

😅 We had to ensure that you can water only once a day: That means if you water the plant today at 6pm, you should be able to water it tomorrow from 12am - 11:59pm

Accomplishments that we're proud of

It works! The tree goes from the small branch to the entire tree based on the level stored on-chain, and it looks fantastic.

What we learned

We built the app using the modern stack

  • Frontend NextJS, Tailwind
  • Contracts: Solidity, HardHat
  • web3 libs: Wagmi, Rainbow

What's next for Tamago

We want Tamago as a soulbond non-fungible token that you will take care of. We also want to integrate it into KodaDot.

Built With

Share this project: