Skip to content

Commit

Permalink
Fix for TVL rewards calculation (wrong field)
Browse files Browse the repository at this point in the history
  • Loading branch information
shuva10v committed Jun 16, 2024
1 parent cce149a commit 1e04c47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions seasons/defi_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 1e04c47

Please sign in to comment.