Skip to content

Commit

Permalink
Specifying which amm functions to use in toxic_asset_attack trade str…
Browse files Browse the repository at this point in the history
…ategy
  • Loading branch information
poliwop committed Jun 29, 2023
1 parent 9e25ba8 commit 878a246
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hydradx/model/amm/trade_strategies.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from .basilisk_amm import ConstantProductPoolState
from .global_state import GlobalState, withdraw_all_liquidity, \
execute_external_market_trade
from .omnipool_amm import OmnipoolState, execute_swap, execute_add_liquidity
from .omnipool_amm import OmnipoolState
from .stableswap_amm import StableSwapPoolState


Expand Down Expand Up @@ -571,7 +571,7 @@ def strategy(state: GlobalState, agent_id: str) -> None:
- omnipool.lrna[asset_name]
) / current_price - 0.001 # because rounding errors

execute_add_liquidity(
oamm.execute_add_liquidity(
state=state.pools[pool_id],
agent=state.agents[agent_id],
quantity=quantity,
Expand All @@ -584,7 +584,7 @@ def strategy(state: GlobalState, agent_id: str) -> None:
if sell_quantity == 0:
# pool is maxed
return
execute_swap(
oamm.execute_swap(
state=state.pools[pool_id],
agent=state.agents[agent_id],
tkn_buy='USD',
Expand Down

0 comments on commit 878a246

Please sign in to comment.