Vendor4626LendStrategy
The very first strategy launched by Vendor Finance is a wrapper that allows to deposit idle lend assets into ERC4626 AAVE Vault.
The very first strategy launched by Vendor Finance is a wrapper that allows to deposit idle lend assets into ERC4626 AAVE Vault.
This strategy utilizes the TimeSwap AAVEV3 EIP4626 vault code in order to deposit the idle lend funds into AAVE. We would need to deposit a separate Vendor4626LendStrategy.sol contract for every single lend token we would like to route through AAVE.
For this strategy to work, lending pools would need to approve all the lend tokens to the strategy so strategy could deposit lend tokens into AAVE on behalf of the lending pool. Lending pools also have to approve the ERC4626 vault shares to the strategy so that strategy could burn the vault shares on behalf of lending pools when withdrawing funds from AAVE. This combination of approvals results in the following approval prefix: 1010
.
This strategy only implements the following methods from the IStrategy.sol specification:
In case when AAVE is not able to withdraw the right amount of lend tokens, funds will not be accessible for borrowing or withdrawing. For this situation we implemented the following function:
This function will allow the lender to withdraw the ERC4626 shares and then using the strategy contract withdraw the underlying aTokens. Lender can then either wait for liquidity on AAVE or sell them on a secondary market.