aave-v3-core
aave-v3-core copied to clipboard
List of Features I Think Should Be Considered
Hey, having worked on some stuff interfacing with Aave V3, I've come up with a few feature requests that I'd like to bring up, for potential future inclusion.
- Token getters
- Currently the only way to fetch the a/debt tokens relies on fetching the entire reserve data struct, if possible, streamlining getters to reduce the amount of unnecessary storage reads would help.
- Meta-tx flashloans
- Ok, I know what you're thinking, in what context would this ever be useful? Well, take for example liquidity migrations, or debt swaps, etc. Being able to initiate a flashloan on behalf of a given signer would be great, while passing the initiator as that signer. Though this can be circumvented with custom flashloan recipients that assert either
msg.sender == initiatororrelayer == initiator, this logic would be convoluted (requiring different data decoding) and application-specific. I think it's worth considering a meta-tx variant.
- Ok, I know what you're thinking, in what context would this ever be useful? Well, take for example liquidity migrations, or debt swaps, etc. Being able to initiate a flashloan on behalf of a given signer would be great, while passing the initiator as that signer. Though this can be circumvented with custom flashloan recipients that assert either
- Return minted aToken amounts on supply actions
- As rounding can cause minted aToken amounts to vary slightly (by factors of wei), the assertion that aToken mints are always 1-to-1 is not valid. This isn't an issue for top-level users, but it can be an issue for contracts interfacing with the protocol who need to keep track of minted aToken balances. The alternative would be tracking scaled balances in the interfacing contracts, but this is likely to be less gas efficient due to needing to fetch the index as well.
Anyway, these are just some features from the top of my head. Let me know what you folks think!
- Flashloan passing additional rateMode context
- Currently the
executeOperation()callback does not pass any context about the specified ratemode for each asset. This can cause headaches when it comes to flashloan receivers that may need to act differently depending on whether the asset(s) loaned is(are) debt-bearing or not, or potentially variable/stable debt.
- Currently the