Inspiration
The inspiration behind SolidiTree comes from the possibility of being able to contribute to charitable organizations, whether environmental or not, without the need to detach financially from the money you are contributing, so this was born as an alternative to help such organizations and at the same time use that money for other things like personal growth, or any particular goal.
What it does
When users stake, produce a small return by pooling all deposits using the AAVE protocol. In this way, the platform provides them with USDT tokens, and thus over time, they receive a small return on deposits. The choice of AAVE is due to its secure features, such as isolated mode, as well as having very good liquidity and performance for stable coins. The staking system using AAVE works using an Isolated AAVE USDT Pool V3 on the Polygon network, while the Interest of the pool is low compared to
How we built it
For our project we decided to use a combination of an ERC20 Wrappable token using the open zeppelin library and a role-based access contract for the commemorative NFT contract. It consists of an evolving NFT representing a tree and its different growth facets, all depending on the staking time in the AAVE pool.
- Only people who have deposited at least once can mine the NFT, Whitelist_Role.
- The NFT is SoulBound, so it cannot be transferred to other contracts.
- The NFT cannot be burned.
- The NFT metadata is updated in a database in Moralis, taking the Simple-API-Metadata Open Sea project as an example.
To track staking time, events are used such as:
- StakingStarted,
- StakingEnded,
- StakingResumed
Both the Moralis V1 node SDK and the new version of the Moralis API are used in the project for different functions such as:
- Read events from the blockchain.
- Execute Call functions
- Filter events indexed by their respective signature, and topics.
- Access the database and create, read and update the addressToDeposits table.
Which contains the following fields:
{ address , days, starDate, endDate, daysCounter }
Heroku, Git and AutoDeploy are used to provide constant updates to the API and add different functions.
On the Frontend side React-Moralis is used:
- Which we use to read or execute functions from the smart Contract such as balanceOf, approve, safeMint, totalSupply.
- Read all transactions and filter by AdressTo, AdressFrom and Contract to create a table of transactions with their respective TX ID, and Link with the following format:
https://mumbai.polygonscan.com/tx/`${txid}`
- Verify that you are in the correct chain and otherwise automatically change and add the correct RPC for the Mumbai blockchain.
NFT Contract Deployment: https://mumbai.polygonscan.com/tx/0xb421a940586738f8f2d4ad1dd6a80e079778b02e349ce94629873a9c0a34c654
Token Contract Deployment: https://mumbai.polygonscan.com/tx/0x7ba1e8f6badf3fccb5b915726a708ffb7c8a5dcfaba2e2c7cf6c5b75bb5b0977
Protocol Contract Deployment: https://mumbai.polygonscan.com/tx/0x1c68f7a65c5366b42661f73fd668c59615573b6afd8923076fa066f8f1cc6049
Challenges we ran into
We feel that one of the biggest challenges when working with the DApp, was to modularize everything to avoid harcoded variables, as much as possible. Especially the connection of the Backend - Frontend.
Every little interaction, whether with an instance of the ETH object or not, had to be thought through carefully enough to provide an excellent user experience.
Fixing these little details, we think, is the hardest part of providing a true DApp development experience, to a scalable Web3 product, which was our ultimate goal all along.
Accomplishments that we're proud of
We are proud to have overcome great challenges in this project, such as the creation of a Backend, developing an API for NFTs, without having team members with this area of expertise.
Increasingly, the interaction between the members of our team when carrying out these projects is carried out in a more harmonious and fluid way, we are perfectly meshed and prepare ourselves to continue accepting and overcoming challenges that follow, with greater complexity and in the shortest possible time.
What we learned
For this hackathon we presented ourselves with a more diverse development team and while some began their immersion in the world of web3 tools, learning what was necessary for their use and usefulness, other members delved into more advanced areas such as multi-contract integration, access role-based, evolutionary NFTs.
What's next for SolidiTree
- We have plans in the future to add more assets in Isolated mode.
- The inclusion of more charitable organizations and foundations, creating a network of platforms for staking in favor of humanitarian causes of various kinds and thus expanding the spectrum of collaboration at a global level.
- In the future we may integrate the option to vote which organizations we want to contribute for a period of time or for a different pool, with the SolidiTreeUSDT tokens that you receive when you make a deposit.
So we could become a Dao focused on charity, but in a ChariFi way.
If we win a prize, we would like to:
- - Stake a portion of the prize in the ChariFi protocol (SolidiTree) .
- - Commit a portion of the prize as a bug bounty.
We consider ourselves a ChariFi category project, a new category that we propose, whose objective is to encompass DeFi projects for charitable causes around the world, to encourage and facilitate community support for foundations and societies that work for these Causes. Our dream is to promote and integrate the community to the most continuous and active development of these applications or platforms, to facilitate the financial aid processes in any scenario.
Built With
- alchemyapi
- hardhat
- heroku
- mongodb
- moralis
- nextjs
- node.js
- openzeppelin
- polygon
- solidity
- typescript
Log in or sign up for Devpost to join the conversation.