Skip to content

feat(x/provider): per-consumer fees_per_block override#47

Open
giunatale wants to merge 9 commits into
mainfrom
giunatale/fees-per-consumer
Open

feat(x/provider): per-consumer fees_per_block override#47
giunatale wants to merge 9 commits into
mainfrom
giunatale/fees-per-consumer

Conversation

@giunatale
Copy link
Copy Markdown
Contributor

Closes #34.

Currently fees_per_block is a single global value in the provider module's Params, so every LAUNCHED consumer is charged the same per-block fee regardless of the cost it imposes on the validator set. Validating a resource-intensive chain is materially more expensive than validating a lower-traffic chain, and the protocol should let provider governance reflect that difference.

This PR keeps Params.FeesPerBlock as the default that every consumer pays, and layers an optional, gov-gated override on top of it. Each block, the fee charged to a given consumer is now:

  • the consumer's override amount, if an entry exists in the new ConsumerFeesPerBlockOverride collection;
  • otherwise Params.FeesPerBlock.

The override is a single math.Int amount. Denom is not overridable — it remains Params.FeesPerBlock.Denom for every consumer. Eventually we'll also want to change Params.FeesPerBlock so that denom remains constant and cannot be changed after initialization with a param update, but any modification to that would require minor work on the code of this PR and is left for the followup that makes that change.

Copy link
Copy Markdown
Contributor

@tbruyelle tbruyelle left a comment

Choose a reason for hiding this comment

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

A few concerns addressed in the comments, other than that it is good.

Also created issue #49 for the follow-up on the fee denom.

Comment thread x/vaas/provider/keeper/fees.go Outdated
Comment thread x/vaas/provider/keeper/msg_server.go
Comment thread proto/vaas/provider/v1/tx.proto Outdated
Comment thread x/vaas/provider/keeper/grpc_query.go
giunatale added 2 commits May 27, 2026 15:13
Params.FeesPerBlock.Amount now becomes a floor for per-consumer overrides
Comment thread x/vaas/provider/types/msg.go Outdated
Copy link
Copy Markdown
Contributor

@tbruyelle tbruyelle left a comment

Choose a reason for hiding this comment

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

👍

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.

Allow custom fees per block per consumer chain

2 participants