This branch demonstrates several ways to integrate Aave with scaffold-eth...
🚨 This is experimental code written for educational & learning purposes only, use at your own risk! 🚨
This tests then deploys the Aave Ape contract
kovan-contracts.zipfolder To deploy your own...
useAaveData()hook. Data is sourced from Aave subgraphs for market data, and on-chain for user data (to enable local development)
ape()function, or the
superApe()function to leverage up multiple times in one transaction. This function uses your collateral to borrow the Short asset, swaps that for the Long asset, then deposits that back into Aave.
unwindApe()function (you need to give the AaveApe contract an allowance on your aToken first, so it can withdraw it). Unwinding creates a flash loan to repay your owed amount in the Short token, then withdraws your Long token collateral, swaps it for the right amount of Short token, repays the flash loan and deposits any left-over collateral back into Aave