Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not pay referal discount if set is not eligible #9779

Merged
merged 1 commit into from
Oct 13, 2023

Conversation

jeremyletang
Copy link
Member

close #9775

@jeremyletang jeremyletang requested a review from a team as a code owner October 13, 2023 12:11
@@ -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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why go all the way to here rather than do this in line 537 for example?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I wanted these:

 558        e.factorsByReferee[party] = refereeStats
 559        setStats.RefereesStats[party] = refereeStats

To be set with set.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but why? they'll just be 0 won't they?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, but we will want the taker volume stats to be stored accross the epoch and sent to the datanode.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basically we still want the refereeStats to be updated.

@jeremyletang jeremyletang merged commit 35b59f2 into develop Oct 13, 2023
@jeremyletang jeremyletang deleted the fix/9775 branch October 13, 2023 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: referral program taker fee discounts on trade event where referrer below min stake
3 participants