Skip to content

Commit

Permalink
switch net liquidity sign - better result
Browse files Browse the repository at this point in the history
  • Loading branch information
jepidoptera committed Jun 25, 2024
1 parent 07ea6a0 commit 20de1e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hydradx/model/amm/concentrated_liquidity_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def swap(
# shift tick if we reached the next price
if self.sqrt_price == sqrt_price_next:
# if the tick is initialized, run the tick transition
self.liquidity += next_tick.liquidityNet if zeroForOne else -next_tick.liquidityNet
self.liquidity -= next_tick.liquidityNet if zeroForOne else -next_tick.liquidityNet

# update the agent's holdings
if tkn_buy not in agent.holdings:
Expand Down

0 comments on commit 20de1e1

Please sign in to comment.