The Graph API
Aave Flash Loans
Aave Credit Delegation
The application allows to refinance student loan at a much lower rate by leveraging credit history of their parents through Aave Credit Delegation feature. In future, the loan portfolio could be made of a bunch of crypto assets and that one could re-balance the portfolio dynamically. Of course, in that space, one could execute Arbitrage by taking advantage of Flashloan feature. Traditional stock assets trade on one or two exchanges and only during certain times. But, crypto assets are traded 24/7 and in more than 10 exchanges with many time zones. So, while SanFrancisco is fast asleep, the exchange in Korea is active and there is bound to be a price difference that could be utilized to one's advantage.
How It's Made
The application uses React Front end, and there are 3 Contracts written in Solidity. Refi Contract: Track Delegates and Delegatee Front-end includes Aave Deposit, Borrow and Repay feature. Truffle to compile contracts and deployed on Kovan network. I learned how to combine multiple contracts in truffle and migrate to test environments. I lost a lot of time finding the correct JSON file for IProtocolDataProvider.json. The one I found did not work with web3.js implementation of Credit Delegation. I finally had to resort writing contracts in Solidity based on the example provided at https://github.com/aave/code-examples-protocol/tree/main/V2. Many references used during development are: https://github.com/aave/protocol-v2/tree/ice/mainnet-deployment-03-12-2020 My Credit Delegation and Flash loan implementation still does not work correctly and I have to do a lot to complete the work flow. Still a lot of ground to cover!