Is there an efficient way to get all loans on Aave protocol?
- undefined Aave
Is there an efficient way to get all loans on Aave? Only way I can think of is to get all the tokenholders of each individual debt token, which involves either using Etherscans API or listening for transfer events every block on like 74 token addresses.
Yes, you can do this with the protocol [subgraphs ](https://github.com/aave/protocol-subgraphs)by querying for all `UserReserve `entities where `currentTotalDebt `> 0;