Peera.

Publication

Partagez vos connaissances.

Hero of Peera.
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
Partager
Commentaires
.

Réponses

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
Meilleure réponse
Commentaires
.
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
Commentaires
.

Connaissez-vous la réponse ?

Veuillez vous connecter et la partager.

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

206Publications337Réponses
Sui.X.Peera.

Gagne ta part de 1000 Sui

Gagne des points de réputation et obtiens des récompenses pour avoir aidé la communauté Sui à se développer.