@@ -1264,7 +1264,7 @@ def test_dynamic_fees(hdx_price: float):
12641264 holdings = {tkn : initial_state .liquidity [tkn ] / 100 for tkn in initial_state .asset_list }
12651265 )
12661266 test_state = initial_state .copy ().update ()
1267- test_state .update_function = OmnipoolState .update_oracles
1267+ test_state .update_function = lambda self : self .update_oracles (). update_fees ()
12681268 test_state .swap (
12691269 agent = test_agent ,
12701270 tkn_sell = 'USD' ,
@@ -1420,7 +1420,7 @@ def test_dynamic_fees_empty_block(liquidity: list[float], lrna: list[float], ora
14201420 'fee_max' : 0.1 ,
14211421 }
14221422
1423- initial_omnipool = oamm .OmnipoolState (
1423+ omnipool1 = oamm .OmnipoolState (
14241424 tokens = copy .deepcopy (init_liquidity ),
14251425 oracles = {
14261426 'price' : n
@@ -1442,20 +1442,21 @@ def test_dynamic_fees_empty_block(liquidity: list[float], lrna: list[float], ora
14421442 last_oracle_values = {
14431443 'price' : copy .deepcopy (init_oracle )
14441444 },
1445- update_function = lambda self : [self .lrna_fee (tkn ) + self .asset_fee (tkn ) for tkn in self .asset_list ]
1445+ update_function = lambda self : [self .lrna_fee (tkn ) + self .asset_fee (tkn ) for tkn in self .asset_list ],
1446+ unique_id = 'omnipool1'
14461447 )
14471448
1448- omnipool2 = copy .deepcopy (initial_omnipool )
1449+ omnipool2 = copy .deepcopy (omnipool1 )
14491450 omnipool2 .update_function = None
14501451 omnipool2 .unique_id = 'omnipool2'
14511452
14521453 initial_state = GlobalState (
1453- pools = [initial_omnipool , omnipool2 ],
1454+ pools = [omnipool1 , omnipool2 ],
14541455 agents = {}
14551456 )
14561457
14571458 events = run .run (initial_state = initial_state , time_steps = 4 , silent = True )
1458- omnipool = events [1 ].pools ['omnipool ' ]
1459+ omnipool = events [1 ].pools ['omnipool1 ' ]
14591460 omnipool2 = events [1 ].pools ['omnipool2' ]
14601461 lrna_fee_1 , asset_fee_1 = {}, {}
14611462 lrna_fee_2 , asset_fee_2 = {}, {}
@@ -1502,7 +1503,6 @@ def test_dynamic_fees_empty_block(liquidity: list[float], lrna: list[float], ora
15021503 amp = st .lists (st .floats (min_value = 0.001 , max_value = 100 ), min_size = 2 , max_size = 2 ),
15031504 decay = st .lists (st .floats (min_value = 0.000001 , max_value = 0.0001 ), min_size = 2 , max_size = 2 ),
15041505)
1505- @reproduce_failure ('6.131.3' , b'AXic03CIZAADDUyGo15LAw4GHl1kMRy5NOw/QMXsN+BmXMDN+IDBEIAxBG/cE/riVQIAWe8dgQ==' )
15061506def test_dynamic_fees_with_trade (liquidity : list [float ], lrna : list [float ], oracle_liquidity : list [float ],
15071507 oracle_volume_in : list [float ], oracle_volume_out : list [float ],
15081508 oracle_period , trade_size : float , lrna_fees : list [float ],
0 commit comments