Funds and Vaults
Last updated
Last updated
Vaults in Grateful are compatible with ERC4626 standard. Vaults can either generate yields on platforms like Aave, Yearn, etc., or act as simple containers for the deposited assets.
When a user wants to deposit their chosen asset, they do so into the corresponding vault associated with their profile. Grateful keeps track of the number of shares issued by the vault and updates the user's profile balance accordingly. To ensure accuracy, shares are standardized to 20 decimal places.
A user can only withdraw from their profile if they have the necessary authorization. When a withdrawal is requested, Grateful receives the specified amount of standardized shares and transfers the corresponding assets to the user who made the request.