Peera.

Post

Share your knowledge.

Hero of Peeranha.
Jan 24, 2023
Discussion

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

Is there a function in Aave V3 that returns the Aave 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 Aave APY.

Much thanks for guiding in advance.

  • discussion
  • expert q&a
  • tutorial
  • reputation
  • reward
1
2
Share
Comments
.

Answers

2
Aaveator.
Jan 24 2023, 11:13

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.

1
Best Answer
Comments
.
0x0836...6529.
Mar 13 2024, 13:00

In V3, to determine the Aave APY of the respective token markets, you can use the getReserveData method on the Aave pool or protocolDataProvider. This method returns the rate (APR), and then you need to calculate the Aave APY based on the formula provided in their documentation. This involves adjusting the APR value to account for compound interest over the year, utilizing a constant representing the number of seconds in a year for the calculation​​.

0
Comments
.

Do you know the answer?

Please log in and share it.

Peeranha is a decentralized questions and answers protocol for Web3 where users can organize and store their interests and skills, creating a common community platform

387Posts334Answers
We use cookies to ensure you get the best experience on our website.
More info