Audience
DeFi liquidity providers searching for a solution that provides actionable finance analytics
About Revert
An initial naive approach to take when counting LP tokens an account owns, would be to simply check the balance the account currently holds. The Uniswap subgraph makes this particularly easy. The problem with this approach is that many times LP tokens are staked in various contracts that provide reward incentives, at which point the tokens are not held by the account. A different approach that addresses this issue is to compute the LP tokens that have been “minted” and “burned” by the account, when depositing and withdrawing assets from the pool. This addresses the problem of LP tokens being staked in any unknown contract, however, it comes with some important caveats. It’s almost certain that our approach will evolve over time as changing practices with regard to staking contracts, feedback from users, and our own experience will improve our solution to the problem described.