Peera.

Bài viết

Chia sẻ kiến thức của bạn.

Hero of Peera.
Jan 24, 2023
Thảo Luận

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
Chia sẻ
Bình luận
.

Câu trả lời

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
Câu trả lời hay nhất
Bình luận
.
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
Bình luận
.

Bạn có biết câu trả lời không?

Hãy đăng nhập và chia sẻ nó.

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

206Bài viết337Câu trả lời
Sui.X.Peera.

Kiếm phần của bạn từ 1000 Sui

Tích lũy điểm danh tiếng và nhận phần thưởng khi giúp cộng đồng Sui phát triển.

Chúng tôi sử dụng cookie để đảm bảo bạn có trải nghiệm tốt nhất trên trang web của chúng tôi.
Thêm thông tin