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

Msg Based Fee Support #354

Closed
6 tasks
iramiller opened this issue Jun 15, 2021 · 0 comments · Fixed by #517
Closed
6 tasks

Msg Based Fee Support #354

iramiller opened this issue Jun 15, 2021 · 0 comments · Fixed by #517
Assignees
Labels
enhancement New feature or request metadata Metadata Module question Further information is requested
Milestone

Comments

@iramiller
Copy link
Member

Summary

As part of the provenance blockchain economics certain messages will require a base fee to be paid in addition to the normal gas consumption. This feature is for the creation of a new antehandler that consumes a fee based on the msgs contained in a tx according to a fee schedule that is persisted on chain.

Problem Definition

In order to create a balanced token economy on Provenance without the use of inflation to offset low volume/low gas prices additional fees must be collected. The gas price must also remain low to facilitate basic token transfers. Due to these two constraints certain operations must be priced significantly higher.

Proposal

  • Create a new module that allows a msg fee schedule to be created
    • Set a sdk.FeeToken amount against a msg type.
    • Fees should be payable to either the fee payer module (default) or an alternate account address
    • Governance proposals should be used to create entries in the fee table.
    • A default "unknown" msg type fee should be supported
  • Create a new MemPoolFeeDecorator ante handler that deducts fee amounts prior to determining the gas price/fee ratio based on a fee schedule for different msg types.

Future Work

The basic fees per msg type is a useful starting point for fees however certain msgs are abstract and represent many different business operations (MemorializeContract, Add Scope on Metadata module). For these msg types the module itself must define a way to handle the determination of if any extra fees are required. One possible way to do this would be a new StdMsg interface type that would define an extra method for returning a msg type string that is extended with additional data that can be appended to the type string for a messages.

// Annotation of a memorialize contract request with a scope specification id
provenance.metadata.v1.MsgP8eMemorializeContractRequest#scopespec1qnwg86nsatx5pl56muw0v9ytlz3qu3jx6m

Above example shows a scope specification annotation on the end of a type url. This enhancement could be used to resolve to a specific fee schedule row allowing a fee to be targeted to a specific user. The enhanced data might be used to add an additional fee to the base fee or replace the fee entirely.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@iramiller iramiller added this to the v1.5.0 milestone Jun 15, 2021
@iramiller iramiller added enhancement New feature or request metadata Metadata Module question Further information is requested labels Jun 15, 2021
@iramiller iramiller modified the milestones: v1.5.0, v1.6.0 Jun 15, 2021
@iramiller iramiller modified the milestones: v1.6.0, backlog Aug 5, 2021
@iramiller iramiller modified the milestones: backlog, v1.8.0 Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request metadata Metadata Module question Further information is requested
Projects
Development

Successfully merging a pull request may close this issue.

3 participants