- Family members are added as members of the contract
- When a member adds savings, the funds are supplied to Aave V3 to generate yield
- Members must make a withdrawal request before withdawing from the savings & include a reason
- Other members can then review the withdrawal request & may choose to approve the request or not
- When enough approvals have been reached, the member may now execute their withdrawal
To see the most real-life simulation of this project, have a look at the script "make_a_withdrawal.py"
To view the smart contract, click here
Generational.Savings.-.Mobile.Site.mp4
- Calling the 'easySaveEth' function will send your ETH to Aave V3 via the WETH Gateway
- Sending ETH directly to the contract will not send it to Aave, and will act as "reserve savings"
- In order to withdraw funds from the savings, the individual will need to put in make a request via the 'requestWithdrawal' function, with a reason of the withdrawal
- family members can review the request, and give their approval via the 'approveRequest' function
- if a family member changes their mind about an approval, they can call the 'revokeRequest' function
- when the number of approvals is at least 'requiredApprovals', the individual who wants to withdraw funds may now call 'withdrawSavedETH'
- The admin of the contract can add and remove extra family members or admins once the contract is deployed
- Admins can also change the number of required approvals in order for a withdrawal request to go through - however this number must always be above 1
- The admin also has the right to withdraw everything in the savings by calling 'withdrawEverything' - however, this will not withdraw the reserves in the contract