From c7db21fbefb19353f6c1afa81ef4e46fc22e60fa Mon Sep 17 00:00:00 2001 From: ze97286 Date: Thu, 22 Aug 2024 14:52:51 +0100 Subject: [PATCH] fix: wire rank lottery into team reward distribution --- CHANGELOG.md | 1 + core/rewards/contribution_reward_calculator.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87527b2669..d4d8d5b242 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ - [11579](https://github.com/vegaprotocol/vega/issues/11579) - Spot calculate fee on amend, use order price if no amended price is provided. - [11585](https://github.com/vegaprotocol/vega/issues/11585) - Initialise rebate stats service in API. - [11592](https://github.com/vegaprotocol/vega/issues/11592) - Fix the order of calls at end of epoch between rebate engine and market tracker. +- [11607](https://github.com/vegaprotocol/vega/issues/11607) - Wire rank lottery distribution to team reward payout. ## 0.77.5 diff --git a/core/rewards/contribution_reward_calculator.go b/core/rewards/contribution_reward_calculator.go index 2498daf763..0eaca811b3 100644 --- a/core/rewards/contribution_reward_calculator.go +++ b/core/rewards/contribution_reward_calculator.go @@ -114,6 +114,8 @@ func calculateRewardsByContributionTeam(epochSeq, asset, accountID string, balan teamScores = proRataRewardCalculator(teamContribution, map[string]num.Decimal{}) } else if ds.DistributionStrategy == vega.DistributionStrategy_DISTRIBUTION_STRATEGY_RANK { teamScores = rankingRewardCalculator(teamContribution, ds.RankTable, map[string]num.Decimal{}) + } else if ds.DistributionStrategy == vega.DistributionStrategy_DISTRIBUTION_STRATEGY_RANK_LOTTERY { + teamScores = rankingLotteryRewardCalculator(teamContribution, ds.RankTable, map[string]num.Decimal{}, timestamp) } partyScores := []*types.PartyContributionScore{}