Aave.

帖子

分享您的知识。

Aaveator.
Mar 20, 2023
专家问答

What is the easiest way to get profit generated by an address in Aave v3?

Hi, we are currently integrating Aave into our dApp.

My question:

What is the easiest way to get profit generated by an address in AAVE V3 ?

  • Aave Protocol
  • Aave v3
0
1
分享
评论
.

答案

1
Aaveator.
Mar 22 2023, 11:44

As for now the eaiest way is:

principalBalance = AToken.getPreviousIndex(user) * AToken.scaledBalanceOf(user)

currentBalance = AToken.balanceOf(user) = AToken.scaledBalanceOf(user) * Pool.getReserveNormalizedIncome(underlyingAsset)
0
评论
.

你知道答案吗?

请登录并分享。

我们使用 cookie 确保您在我们的网站上获得最佳体验。
更多信息