1

I am integrating the Uniswap contracts and want to understand how could I calculate the daily rewards for the liquidity provider. I understand that I could get the pairAddress.balanceOf(msg.sender) for each day and subtract the numbers from each other, but it doesn't seem the most efficient way.

1 Answer 1

1

Is this regarding V3 or V2? In either, LP rewards do not accrue directly to a LP token holder. In V2 they are reinvested into the pool, and in V3 they are collected separately and must be redeemed by calling the pool contract directly.

1
  • Thank you for the answer, it is regarding V2, but I still don't understand, where the user could see how much did he earn since the beginning. (or at least how much liquidity does he/she earns currently). Commented Jun 4, 2021 at 9:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.