Main functions
Last updated
Last updated
The purpose of our protocol is to provide the following functions: user deposit, user withdrawing fund interaction with DeFi protocol, funds trigger, donation.
At the same time, FreeDona also provides users with the access to the information of both users and the general ledger.
1. User deposit
The user deposits funds in FreeDona and obtains the corresponding share of the certificate token. The FreeDona storage contract records user address, deposit amount, and the change of user's deposit share, liquidity of protocol, and the total deposit share.
When Liquidity is over threshold value, the FreeDona logic contract automatically deposits the funds into DeFi protocols to generate yields.
2. User withdraw
The user can use the User Address and the Deposit Share he holds to redeem the principal deposited to FreeDona before. FreeDona will return the corresponding funds to the User Address. The corresponding part of the yields will be donated to build the Ethereum ecosystem.
When Liquidity is more than the amount of funds that the user wants to redeem, FreeDona will returns the principal to the user's address directly.
When Liquidity is less than the amount of funds that the user wants to redeem, FreeDona's logic contract will retrieves the deposit amount from the DeFi protocols and returns the principal to the user's address automatically.
3. Deposit in DeFi
When Liquidity is over threshold value, the FreeDona logic contract automatically deposits the funds into DeFi protocols to generate yields.
4. Withdraw from DeFi
When Liquidity is less than threshold value, FreeDona will withdraw the funds from DeFi protocols.
5. Funds trigger
In order to save gas, we adopt a combination of various triggering methods.
Quantitative trigger: When the Liquidity reaches the threshold, it is triggered quantitatively (by user deposit or user withdraw). FreeDona will automatically deposits or withdraw Liquidity in DeFi protocols as shown in Figure 5.
Active trigger: when admin address (fund management) or user call the contract proactively, FreeDona will automatically deposits or withdraw Liquidity in DeFi protocols.
6. Donate
When admin address (donation) calls the yield donation interface, FreeDona will take out the corresponding accumulated yields and donate it to Ethereum projects to provide help.
In the third stage, FreeDona will vote among the community through the DAO governance contract to determine which project will be funded.
7. User deposit query
Used to query the information of the user's deposit funds.
8. User available donation query
Used to query information about the yields that users can use for donations.
9. General funds query
Used to query the information of total funds in FreeDona.
10. General available donation query
Used to query information about the yields that can be used for donations in FreeDona