Skip to content

Commit

Permalink
Merge pull request #132 from ton-society/hotfix/defi_percent
Browse files Browse the repository at this point in the history
Add percentage for defi boards
  • Loading branch information
shuva10v authored Sep 12, 2024
2 parents bf65fea + a4fc77f commit 255839a
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 @@ -70,7 +70,7 @@ def calculate(self, metrics: List[ProjectStat]):
project.metrics[ProjectStat.DEFI_SQUAD] = next(filter(lambda s: s[0](tvl), self.squads))[1]

if delta > 0 and total_tvl_delta > 0:
project.score = delta / total_tvl_delta
project.score = 100.0 * delta / total_tvl_delta
else:
project.score = 0

Expand Down Expand Up @@ -99,7 +99,7 @@ def calculate(self, metrics: List[ProjectStat]):
volume = project.metrics[ProjectStat.DEFI_VOLUME_USD]
project.metrics[ProjectStat.DEFI_SQUAD] = next(filter(lambda s: s[0](volume), self.squads))[1]
if total_volme > 0:
project.score = volume / total_volme
project.score = 100. * volume / total_volme
else:
project.score = 0

Expand Down

0 comments on commit 255839a

Please sign in to comment.