Skip to content

Commit

Permalink
fix: do not pay referal discount if set is not eligible
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy Letang <[email protected]>
  • Loading branch information
jeremyletang committed Oct 13, 2023
1 parent d624a75 commit 6e47e3d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@
- [9541](https://github.com/vegaprotocol/vega/issues/9731) - Add filtering for party to the referral fees API.
- [9751](https://github.com/vegaprotocol/vega/issues/9751) - Make sure that LP fee party accounts exists.
- [9762](https://github.com/vegaprotocol/vega/issues/9762) - Referral fees API not filtering by party correctly.
- [9775](https://github.com/vegaprotocol/vega/issues/9775) - Do not pay discount if set is not eligible

## 0.72.1

Expand Down
4 changes: 4 additions & 0 deletions core/referral/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,10 @@ func (e *Engine) computeFactorsByReferee(ctx context.Context, epoch uint64, take
e.factorsByReferee[party] = refereeStats
setStats.RefereesStats[party] = refereeStats

if e.isSetEligible(setID) != nil {
continue
}

for i := tiersLen - 1; i >= 0; i-- {
tier := e.currentProgram.BenefitTiers[i]
if refereeStats.DiscountFactor.IsZero() && epochCount >= tier.MinimumEpochs.Uint64() && runningVolumeForSet.GTE(tier.MinimumRunningNotionalTakerVolume) {
Expand Down

0 comments on commit 6e47e3d

Please sign in to comment.