Governance-Controlled Parameters: The Global Fee module’s parameters (minimum gas prices, bypass message types) can only be updated through governance proposals. Individual users cannot directly modify module settings.
Key Features
- Minimum Gas Price Enforcement: Sets network-wide minimum gas prices that all transactions must meet
- Multi-Asset Support: Supports minimum gas prices in multiple denominations with alternative acceptance
- Message Type Bypass: Allows specific message types to bypass minimum fee requirements
- Gas Usage Limits: Controls the maximum gas usage allowed for fee-exempt transactions
- Network Security: Prevents spam attacks by ensuring adequate transaction costs
Module Functionality
The Global Fee module operates through the following workflow:- Fee Validation: Validates that all transactions meet minimum gas price requirements
- Bypass Processing: Checks if transactions contain only fee-exempt message types
- Gas Limit Enforcement: Ensures fee-exempt transactions don’t exceed gas usage limits
- Multi-Asset Acceptance: Accepts fees in any of the configured denominations
Parameters
The module maintains the following parameters:Minimum Gas Prices
Parameter | Type | Description |
---|---|---|
minimum_gas_prices | []DecCoin | Minimum gas prices required for transactions |
bypass_min_fee_msg_types | []string | Message types that can bypass minimum fee requirements |
max_total_bypass_min_fee_msg_gas_usage | uint64 | Maximum gas usage allowed for fee-exempt transactions |
Fee Enforcement Logic
Standard Transactions
For regular transactions:- Gas Price Check: Transaction gas price must meet or exceed minimum requirements
- Multi-Asset Support: Fees can be paid in any configured denomination
- Alternative Acceptance: If multiple denominations are configured, any one can be used
Fee-Exempt Transactions
For transactions containing only bypass message types:- Message Type Validation: All messages must be in the bypass list
- Gas Limit Check: Total gas usage must not exceed the configured limit
- Zero Fee Acceptance: These transactions can have zero or minimal fees
Use Cases
For Network Security
- Spam Prevention: Prevents low-cost spam attacks on the network
- Economic Sustainability: Ensures validators receive adequate compensation
- Resource Protection: Protects network resources from abuse
For Users
- Predictable Costs: Clear minimum fee requirements
- Multi-Asset Flexibility: Option to pay fees in different denominations
- Fee Exemptions: Certain operations may qualify for reduced fees
For Validators
- Revenue Assurance: Guaranteed minimum fee income
- Network Protection: Protection against unprofitable transactions
- Operational Stability: Consistent fee structure for planning
For Governance
- Economic Policy: Control over network fee structure
- Security Tuning: Ability to adjust fees based on network conditions
- Exemption Management: Control over which operations qualify for fee reductions
Common Bypass Message Types
Typical message types that might be configured for fee bypass include:- Governance Messages: Voting and proposal submission
- Validator Operations: Delegation and staking operations
- IBC Acknowledgments: Certain IBC protocol messages
- Emergency Operations: Critical network maintenance operations
Security Consideration: Fee bypass configurations must be carefully managed to prevent abuse while maintaining network accessibility for essential operations.
Integration with Other Modules
The Global Fee module works alongside:- Dynamic Fees: Provides base minimum requirements for dynamic pricing
- Fee Burner: Ensures adequate fees are available for burning mechanisms
- Auth: Integrates with transaction authentication and fee deduction
- Bank: Coordinates with token transfer and balance management