Skip to content

Commit

Permalink
Merge pull request atiselsts#3 from uniyj/patch-3
Browse files Browse the repository at this point in the history
Update subgraph-liquidity-range-example.py
  • Loading branch information
atiselsts authored Sep 19, 2021
2 parents eb8eb17 + 74b2971 commit b212d71
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions subgraph-liquidity-range-example.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,6 @@ def fee_tier_to_tick_spacing(fee_tier):


else:
# Move the current tick range - we alread covered the token0 of the [price_current, price_b] range when printing the current price range
bottom_tick = tick + tick_spacing
top_tick = bottom_tick + tick_spacing
sa = tick_to_price(bottom_tick // 2)
sb = tick_to_price(top_tick // 2)

# Compute the amounts of tokens potentially in the range
amount1 = liquidity * (sb - sa)
amount0 = amount1 / (sb * sa)
Expand Down

0 comments on commit b212d71

Please sign in to comment.