Transaction Fee
Covers the overall content regarding InfraBlockchain's unique transaction fee model.
Before Starting
Learn about the basic transaction fee model applied by InfraBlockchain through Learning About Transaction Fees.
Transaction Fee Model
InfraBlockchain employs the following transaction fee models:
Dynamic transaction fee model
Transaction fee model based on the transaction fee table
Dynamic Transaction Fee Model
Dynamic transaction fees are charged based on the actual amount of blockchain resources used (e.g., CPU, network bandwidth, storage space).
Transaction Fee Calculation Formula
The final fee for a transaction is calculated as follows:
Transaction Fee Model Based on Fee Table
Block producers (validators) can set a fixed transaction fee per operation.
Example of Transaction Fee Table
Fix the
transfer
transaction fee of thebalances
pallet in parachain-1000 at '1_000'Fix the
create_did
transaction fee of thedid
pallet in parachain-2000 at '0'
Parachain Identifier | Transaction Name | Pallet Name | Fee |
---|---|---|---|
1000 | transfer | balances | 1_000 |
2000 | create_did | did | 0 |
In the multi-chain architecture of InfraBlockchain, transaction fees imposed for each parachain can be managed through the transaction fee table by the governance of InfraRelayChain validators.
Transactions include metadata known as
CallMetadata
.When determining transaction fees, the transaction fee table is first referenced and, if a value is present, it overrides the dynamic transaction fee.
Imposing Transaction Fees Using System Token
InfraBlockchain is a blockchain that imposes transaction fees based on System Token linked to fiat currency, without its own cryptocurrency. It follows the fee imposition method of Substrate based blockchains but also applies its unique transaction fee model.
The BalanceToAssetBalance of the Asset pallet determines how much system token is required for fees. The transaction fee in System Token is proportionate to the Parachain Fee Rate (PARA_FEE_RATE) and the System Token Weight (SYSTEM_TOKEN_WEIGHT).
FEE_ADJUSTMENT
: A value used to adjust the benchmarking standard applied to existing Substrate-based chains.
ACTUAL_FEE
: The fee imposed when actual computing resources are used compared to the benchmarking standard.
PARA_FEE_RATE
: The fee rate imposed for each parachain.
SYSTEM_TOKEN_WEIGHT
: The weight of the system token held for each system token.
DEFAULT_PARA_FEE_RATE
: A value used to adjust the fee rate for each parachain.
Parachain Fee Rate
Parachain Fee Rate is a value multiplied uniformly within the InfraBlockchain multi-chain architecture to impose different transaction fees for each parachain.
InfraRelayChain governance can change the Parachain Fee Rate.
In general, the Parachain Fee Rate value is set to 1,000,000 (10^6) to account for decimal places, to adjust the value to 1, and to divide by
DEFAULT_PARA_FEE_RATE
to make it 1.
Depending on the Parachain Fee Rate, different transaction fees can be measured for each parachain. This allows certain parachains to pay more or less in fees for the same transaction.
System Token Weight
System Token Weight is a value that reflects the difference in exchange rates between fiat currencies. It is used to calculate transaction fees and transaction votes (Transaction-as-a-Vote). In general, the value is designed to ensure that the same transaction fee is paid regardless of which system token is used, considering the final converted value.
For example, if the value charged as a transaction fee is 1_000, the number of tokens to be paid when paying in USD or KRW will be different (e.g., USD will pay 100 tokens, while KRW will pay 1300 tokens), but the same 1_000 value will be paid.
System Token Weight is calculated considering the decimal places and exchange rate information of the base system token.
BASE_WEIGHT
: Weight of the base system token.
DECIMAL_RELATIVE_TO_BASE
: Decimal places relative to the base system token.
EXCHANGE_RATE_RELATIVE_TO_BASE
: Exchange rate relative to the base system token.
For example, let's consider the current scenario where the base system token is USD
.
In this situation, let's assume that a transfer
transaction is made. Here, we do not consider PARA_FEE_RATE
.
Delegatable Transaction Fee Payment
From the perspective of a blockchain service provider, it is not ideal to require users of the service to pay transaction fees. Therefore, InfraBlockchain allows for the existence of fee payers who can optionally pay transaction fees on behalf of users.
The existing Substrate-based transaction structure has been modified to include the signature of the fee payer.
Next Steps
Last updated