Peera.

帖子

分享您的知识。

Hero of Peera.
Jan 24, 2023
讨论

返回相应代币市场的 Aave APY 的 V3 函数

Aave V3中是否有函数可以返回协议上可用的相应代币市场的Aave APY.

我可以从getReservesList池文件功能中获取代币市场的清单. 现在,我需要 Aave APY.

非常感谢您提前指导.

  • 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

在V3中,要确定相应代币市场的Aave APY,可以在Aave池或协议数据提供者上使用GetReserveData方法. 此方法返回汇率(APR),然后您需要根据其文档中提供的公式计算Aave APY. 这包括调整年利率值以考虑全年的复利,使用代表一年中秒数的常数进行计算.

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 确保您在我们的网站上获得最佳体验。
更多信息