Fee
The x/fee
module is a core component of the Sunrise blockchain responsible for managing transaction fees. It introduces mechanisms for burning a portion of $RISE tokens used as fees, enforcing fee denominations, and providing flexibility through bypass denominations. This module supports deflationary tokenomics while maintaining an efficient fee system.
Key Features of x/fee
x/fee
Burn Mechanism:
A portion of $RISE tokens used as transaction fees is burned to reduce the circulating supply.
The burn ratio is determined by the
burn_ratio
parameter (default: 50%).Burn operations are atomic and verified on-chain.
Fee Denomination (
fee_denom
):Specifies the denomination required for transaction fees (default:
"urise"
).Transactions must pay fees in this denomination unless bypassed.
Strict validation of fee denominations is enforced.
Bypass Denominations (
bypass_denoms
):Allows certain denominations to bypass standard fee restrictions.
Default bypass denomination:
"uvrise"
.Useful for specialized transaction scenarios.
Dynamic Parameter Configuration:
Developers can configure parameters dynamically with validation enforced by the module.
Parameters can be updated through governance proposals.
Integration with Bribe System:
Handles unclaimed bribes from expired epochs
Processes fees from bribe transactions
Manages fee collection for bribe operations
Core Functionality
Fee Collection and Processing
Fee Collection Process:
Fees are collected through the FeeCollector module account
The system validates:
Only one fee denomination per transaction
Fee denomination matches configured
fee_denom
Fee amount is valid and non-zero
Fee Processing Flow:
Validate fees against configured parameters
Calculate burn amount based on burn_ratio
Execute burn operation for the calculated amount
Transfer remaining fees to fee collector
Integration with Bribe System
Bribe Fee Handling:
Track bribe fees through the BribeFee structure
Process unclaimed bribes at epoch end
Calculate and handle fees for unclaimed amounts
Transfer processed fees to appropriate accounts
Parameter Configuration
Note: The following section covers advanced topics intended for experienced users or developers.
fee_denom
Required denomination for transaction fees
"urise"
Must be a valid denomination
burn_ratio
Percentage of fees to burn
0.5
Must be between 0 and 1
bypass_denoms
Denominations exempt from fee restrictions
["uvrise"]
List of valid denominations
Example Usage
Developers can query fee parameters using Sunrise Client JS:
Example Output:
Workflow: Fee Processing
Note: The following section covers advanced topics intended for experienced users or developers.
Last updated