Skip to content

Commit

Permalink
require economic viability for alternative solutions
Browse files Browse the repository at this point in the history
  • Loading branch information
harisang committed May 5, 2023
1 parent 1bf6827 commit 951ea4e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/off_chain/cow_endpoint_surplus.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,10 @@ def get_order_surplus(self, competition_data: Dict[str, Any]) -> None:
surplus_deviation_dict = {}
soln_count = 0
for soln in competition_data["solutions"]:
if soln["objective"]["total"] < 0:
if (
soln["objective"]["fees"] + 0.001 * pow(10, 18)
< soln["objective"]["cost"]
):
surplus_deviation_dict[soln_count] = 0.0, 0.0
soln_count += 1
continue
Expand Down

0 comments on commit 951ea4e

Please sign in to comment.