Tracking liquidity pool earnings over time starts with your deposit and pool share, then checks the tokens that share can claim today. The Fraxswap exchange uses a constant-product pool with an embedded time-weighted market maker, so its pair contracts show this accounting in practice. Fees grow reserves while price moves change the token mix; compare your current claim with your original deposit and with simply holding those tokens.
The Deposit Record and Current Pool Claim
The deposit record anchors your pool share, and current reserves show what you can withdraw. Record the date, both token amounts deposited, the LP tokens received, and the pair’s totalSupply immediately afterward. An LP token represents a pool share: divide your LP balance by totalSupply to get your fraction. Save both reserves and token prices at the same time for later comparisons.
- Deposit amounts: Set the value of the original tokens had you held them.
- LP balance and totalSupply: Set your pool fraction at each snapshot.
- Reserves and prices: Turn that fraction into current token amounts and value.
On Etherscan, open the Fraxswap pair contract’s Read Contract tab. getReserves returns the two stored reserves; totalSupply returns all LP tokens outstanding. Match reserve0 and reserve1 to token0 and token1, and adjust raw amounts for token decimals. Multiply each reserve by your LP balance divided by totalSupply to find the tokens your position represents.
The LP balance is the wrong earnings counter. While you leave the position alone, its token count stays fixed, although other providers can change totalSupply. Fees stay in reserves and compound into your claim, so track reserve divided by totalSupply for each token. Trading can push one of those amounts down while raising the other. A falling token amount alone is therefore no measure of fees.
Consider an illustrative pool with no later deposits or withdrawals. You deposit 10 token A and 100 token B when A costs $10 and B costs $1; you get 10 LP tokens out of 100. The pool holds 100 A and 1,000 B, making your 10% share 10 A and 100 B. Later it holds 80 A and 1,600 B, while A costs $20. Your same 10 LP tokens claim 8 A and 160 B, worth $320. Holding the original tokens would be worth $300. The $20 lead over holding is fees minus impermanent loss, the value lost to the changed token mix.
A fee-free comparison separates the two effects. At the new price, the original 10 A and 100 B would become about 7.07 A and 141.42 B in a constant-product pool, worth $282.84. Fees account for roughly $37.16 above that amount; impermanent loss accounts for roughly $17.16 below holding. Together they give the $20 lead. This estimate assumes fees are the only source of reserve growth beyond trades.
On a Fraxswap pair with a long-term order, getReserves can lag until virtual orders execute. Note its timestamp; for a current projection, use getReserveAfterTwamm with the current Unix timestamp. Save weekly snapshots with prices from the same time. Dashboards can speed up the view, but these readings let you check it.
Related Questions
Are liquidity pool earnings taxable?
Liquidity pool earnings may be taxable where you live. Keep deposit, withdrawal, and transaction records with their values; the comparison with holding measures performance, not taxable income.
What happens to accrued fees when you remove liquidity?
Removing liquidity redeems LP tokens for your share of both reserves, including fees added to them. No separate fee payout arrives. Compare the tokens received with your deposit and holding benchmark before deciding whether to stay or withdraw.