A set of contracts and Hardhat scripts for giving/receiving credit delegations
This project covers credit delegation from multiple parties to a single wallet (eoa) or smart wallet. In its most basic form, a beneficiary should be able to enjoy credit from multiple parties, delegated from an Aave depositor via smart contract call. However for ease of use, a UI should be provider for beneficiaries and sponsors (UI Not part of submission as of today). Fun arrives when smart wallet functionality is implemented. It would a be simple mechanic, just to control amounts borrowable by the beneficiary. A beneficiary will first borrow from the sponsor that has delegated more credit to them, until the credit available is exhausted.
How it's made
I started with Hardhat for basic script proof of concept. This is delegating credit from one EOA to another EOA. This was done successfully. I did not manage to include oracle consumption, or the matcha swap router I had in mind. I have also created a "dumb" smart contract wallet, called Purse, which resembles a vault more than an actual smart wallet. This is where multiple sponsors can delegate their credit to, and where there is space for borrowing logic. Sponsor technology used was Aave Credit delegation. This is a core piece and without it this project wouldn't be possible! At least, not at this level of simplicity/abstraction.