帖子
分享您的知识。
Jan 24, 2023
讨论
返回相应代币市场的 Aave APY 的 V3 函数
Aave V3中是否有函数可以返回协议上可用的相应代币市场的Aave APY.
我可以从getReservesList
池文件功能中获取代币市场的清单. 现在,我需要 Aave APY.
非常感谢您提前指导.
- discussion
- expert q&a
- tutorial
- reputation
- reward
1
2
分享
评论
答案
2Aaveator15
Jan 24 2023, 11:13You 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
最佳答案
评论
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答案