Skip to content

Commit

Permalink
low buy quantity in test_buy_omnipool_with_stable_swap
Browse files Browse the repository at this point in the history
  • Loading branch information
jepidoptera committed Jan 23, 2025
1 parent b028e31 commit 865ab5a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions hydradx/tests/test_stableswap_subpools.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import hydradx.model.amm.stableswap_amm as ssamm
from hydradx.model.amm.agents import Agent
from hydradx.tests.strategies_omnipool import omnipool_config, omnipool_reasonable_config
from hypothesis import given, settings, strategies as st
from hypothesis import given, settings, strategies as st, reproduce_failure
import pytest
from hydradx.tests.test_stableswap import stable_swap_equation
from hydradx.model.amm.omnipool_router import OmnipoolRouter
Expand Down Expand Up @@ -171,7 +171,7 @@ def test_buy_omnipool_with_stable_swap(token_lrna_price, sub_pool_lrna_price, su
# attempt buying an asset from the stableswap pool
tkn_buy = initial_state.asset_list[1]
tkn_sell = stable_pool.asset_list[0]
buy_quantity = 10
buy_quantity = 1
new_router, new_agent = router.simulate_swap(
agent=agent,
tkn_buy=tkn_buy,
Expand Down Expand Up @@ -213,7 +213,7 @@ def test_buy_omnipool_with_stable_swap(token_lrna_price, sub_pool_lrna_price, su
agent=agent,
tkn_buy=tkn_buy,
tkn_sell=tkn_sell,
buy_quantity=buy_quantity - 1
buy_quantity=buy_quantity * 0.99
)
lesser_execution_price = (
(agent.holdings[tkn_sell] - lesser_trade_agent.holdings[tkn_sell]) /
Expand Down Expand Up @@ -599,8 +599,6 @@ def test_sell_stableswap_for_stableswap(initial_state: oamm.OmnipoolState):
raise AssertionError('Execution price out of bounds.')




@given(omnipool_config(
asset_dict={
'USD': {'liquidity': 1000, 'LRNA': 1000},
Expand Down

0 comments on commit 865ab5a

Please sign in to comment.