Aave.

Post

Share your knowledge.

Aaveator.
Mar 20, 2023
Expert Q&A

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
Share
Comments
.

Answers

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
Comments
.

Do you know the answer?

Please log in and share it.

We use cookies to ensure you get the best experience on our website.
More info