diff --git a/src/off_chain/cow_endpoint_surplus.py b/src/off_chain/cow_endpoint_surplus.py index f1812c0..21f4891 100644 --- a/src/off_chain/cow_endpoint_surplus.py +++ b/src/off_chain/cow_endpoint_surplus.py @@ -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