A function in Aave V3 that returns the APY of the respective token markets

Discussion

Hello All, Is there a function in Aave V3 that returns the APY of the respective token markets that are available on the protocol. I could get the list of the token markets from the `getReservesList` function of the pool file. Now, I need the APY. Much thanks for guiding in advance.

Answers 1

You can call `getReserveData` method on Aave pool or `protocolDataProvider` that returns rate aka APR and then you need to compute APY as described in docs. ``` APY = (((1 + ((apr / 10*27) / 31536000)) ^ 31536000) - 1) 100 ``` Where 31536000 is constant for seconds in year.