Concept
The Fee Processing Module in KIRA is a small middleware that modifies the network's fee mechanism. This module ensures that each transaction type is associated with a unique fee amount, denoted in ukex. Users must pay the specified transaction fee to submit their transaction on-chain. This fee mechanism is essential in mitigating transaction spam, as it prevents users from submitting an unlimited number of transactions at no cost and congesting the mempool, which would cause the network to halt or make it impossible to filter out and execute non-spam transactions.
Gas fees
A key distinction between KIRA and other general-purpose Layer 1 networks is that KIRA doesn’t have a concept of gas fees (fees paid per instruction of the code executed or stored on-chain). Instead, KIRA uses a fixed fee per transaction type, making transaction fees straightforward and predictable. Execution fees are determined through governance proposals and must fall within the safety range of min_tx_fee and max_tx_fee as defined by the Network Properties. The minimum transaction fee, safeguards the network from transaction spam, while the maximum transaction fee protects users and custodians from losing funds due to unexpectedly high fee amounts.
Parameters
CLI functions description
Governance
To change the execution fee parameters of any existing transaction type, a sudo permission 7 is required.
Syntax & Examples
Each CLI command and proposal process in KIRA requires specific permissions. These permissions must be added to the account's whitelist or obtained as sudo permissions for direct changes. Refer to the Roles & Permissions documentation for more details. $SIGNER represents the transaction signer's account name or address. For instructions on setting common flags as environment variables, such as $FLAGS_TX and $FLAGS_QR, see the CLI flags configuration section
Updating Execution Fees
Bash
Copy
# Updating Execution fees via proposal
# CLI
# TBD
# KM
# TBD
# Updating Execution fees as sudo
# CLI
sekaid tx customgov set-execution-fee --execution_fee="$EXECUTION_FEE" --failure_fee="$FAILURE_FEE" --transaction_type="$TX_TYPE" --timeout="$TX_TIMEOUT" \
--from "$ACCOUNT" --chain-id=$NETWORK_NAME --keyring-backend=test --fees=100ukex --yes --log_format=json --broadcast-mode=async --output=json | jq
# KM
# e.g: setExecutionFee <account> <tx-type> <execution-fee> <failure-fee> <tx-timeout>
setExecutionFee $ACCOUNT $TX_TYPE 100 200 60
Query Execution Fees
Bash
Copy
# CLI
sekaid query customgov execution-fee "$TRANSACTION_TYPE" --output=json --home=$SEKAID_HOME
# KM
showExecutionFee "$TRANSACTION_TYPE"