Skip to content

Commit

Permalink
Fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
poliwop committed Nov 5, 2024
1 parent f218338 commit 488d17e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hydradx/model/amm/omnix_solver_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ def add_small_trades(p: ICEProblem, init_deltas: list):
if not simulated_state.fail: # trade was successful
sell_amt = intent['sell_quantity']
buy_amt = intent['buy_quantity']
if intent['agent'].holdings[intent['tkn_sell']] - sim_agent.holdings[intent['tkn_sell']] != sell_amt:
if intent['agent'].holdings[intent['tkn_sell']] - sim_agent.holdings[intent['tkn_sell']] > sell_amt:
raise
additional_deltas.append((intents_remaining_indices[i], [-sell_amt, buy_amt], intent['tkn_buy'], intent['tkn_sell']))
else:
Expand Down

0 comments on commit 488d17e

Please sign in to comment.