From 1e04c471d878329f8f77bc454b30e54d8f98f9ad Mon Sep 17 00:00:00 2001 From: Pavel Shuvalov Date: Sun, 16 Jun 2024 07:11:55 +0400 Subject: [PATCH] Fix for TVL rewards calculation (wrong field) --- seasons/defi_models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/seasons/defi_models.py b/seasons/defi_models.py index 9aa18b6..966b19a 100644 --- a/seasons/defi_models.py +++ b/seasons/defi_models.py @@ -28,8 +28,8 @@ def calculate(self, metrics: List[ProjectStat]): prize_pool = self.total_prize_pool counted_tvl = 0 - for project in sorted(metrics, key=lambda m: m.metrics[ProjectStat.DEFI_TVL_DELTA], reverse=True): - delta = project.metrics[ProjectStat.DEFI_TVL_DELTA] + for project in sorted(metrics, key=lambda m: m.metrics[ProjectStat.DEFI_TVL_DELTA_COUNTED], reverse=True): + delta = project.metrics[ProjectStat.DEFI_TVL_DELTA_COUNTED] if total_tvl_delta <=0 or delta < 0: reward = 0 else: