Msg Based Fee Support #354
Labels
enhancement
New feature or request
metadata
Metadata Module
question
Further information is requested
Milestone
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
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.
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
The text was updated successfully, but these errors were encountered: