From c5da1e2546e1c87bfb968865d0425744f6af51d0 Mon Sep 17 00:00:00 2001 From: harisang Date: Sun, 7 May 2023 00:13:29 +0300 Subject: [PATCH] switch to relative economic viability test for alternative solutions --- src/off_chain/cow_endpoint_surplus.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/off_chain/cow_endpoint_surplus.py b/src/off_chain/cow_endpoint_surplus.py index 21f4891..0a8e2bd 100644 --- a/src/off_chain/cow_endpoint_surplus.py +++ b/src/off_chain/cow_endpoint_surplus.py @@ -191,10 +191,7 @@ 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"]["fees"] + 0.001 * pow(10, 18) - < soln["objective"]["cost"] - ): + if soln["objective"]["fees"] < 0.9 * soln["objective"]["cost"]: surplus_deviation_dict[soln_count] = 0.0, 0.0 soln_count += 1 continue