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

Distribution Total will always be empty in emitted events #720

Closed
AdityaSripal opened this issue Feb 7, 2023 · 0 comments · Fixed by #1097
Closed

Distribution Total will always be empty in emitted events #720

AdityaSripal opened this issue Feb 7, 2023 · 0 comments · Fixed by #1097
Assignees
Labels
good first issue Good for newcomers scope: UI Addressing UX changes and improvements to user interface source: audit To indicate an issue found during an audit.

Comments

@AdityaSripal
Copy link
Member

fpTokens are retrieved to emit events after all funds are already sent out, so it should always be empty

func (k Keeper) EndBlockRD(ctx sdk.Context) {

This function sends all funds out of the FeeCollector ModuleAccount:

func (k Keeper) DistributeRewardsInternally(ctx sdk.Context) {

This then gets called after which should return empty coins:

fpTokens := k.bankKeeper.GetAllBalances(ctx, consumerFeePoolAddr)

Thus this event is always going to just emit empty coins on the DistributionTotal attribute:

sdk.NewAttribute(ccv.AttributeDistributionTotal, fpTokens.String()),

@AdityaSripal AdityaSripal added the source: audit To indicate an issue found during an audit. label Feb 7, 2023
@mpoke mpoke added this to the ICS v1.0.1 milestone Feb 23, 2023
@mpoke mpoke modified the milestones: ICS v1.0.1, ICS next release Mar 5, 2023
@mpoke mpoke removed this from the ICS next release milestone Jun 20, 2023
@mpoke mpoke added scope: UI Addressing UX changes and improvements to user interface good first issue Good for newcomers labels Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers scope: UI Addressing UX changes and improvements to user interface source: audit To indicate an issue found during an audit.
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants