Skip to content

Commit

Permalink
Update subgraph-liquidity-range-example.py
Browse files Browse the repository at this point in the history
For current price tick, should be adding `adjusted_amountNactual` to the total? Otherwise it'll be double-counting, since `adjusted_amountN` is the "single-asset" hypothetical number?
  • Loading branch information
uniyj authored Sep 3, 2021
1 parent b2e8ca2 commit cf97385
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions subgraph-liquidity-range-example.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ def fee_tier_to_tick_spacing(fee_tier):
adjusted_amount0actual = amount0actual / 10 ** decimals0
adjusted_amount1actual = amount1actual / 10 ** decimals1

total_amount0 += adjusted_amount0
total_amount1 += adjusted_amount1
total_amount0 += adjusted_amount0actual
total_amount1 += adjusted_amount1actual

print(" {:.2f} {} and {:.2f} {} remaining in the current tick range".format(
adjusted_amount0actual, token0, adjusted_amount1actual, token1))
Expand Down

0 comments on commit cf97385

Please sign in to comment.