Peera.

Пост

Поделитесь своими знаниями.

Hero of Peera.
Jan 24, 2023
Обсуждение

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
Поделиться
Комментарии
.

Ответы

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
Лучший ответ
Комментарии
.
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
Комментарии
.

Знаете ответ?

Пожалуйста, войдите в систему и поделитесь им.

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

206Посты337Ответы
Sui.X.Peera.

Заработай свою долю из 1000 Sui

Зарабатывай очки репутации и получай награды за помощь в развитии сообщества Sui.

Мы используем файлы cookie, чтобы гарантировать вам лучший опыт на нашем сайте.
Подробнее