Components of the Gas Fee
Last updated
Last updated
The gas fee in Kalp DPI is calculated based on two primary components: Storage Cost and Computation Cost. Each component reflects the resources consumed by a transaction in terms of storage and computational power. These components are expressed in units of Kalp Storage (UKS) and units of Kalp Computation (UKC), which standardize resource measurement across the platform.
Storage Cost Storage cost represents the fee charged for storing transaction data on the network. It is proportional to the size of the data and the cost per unit of storage. The formula for calculating storage cost is:
where:
DataSize[τ] is the size of the transaction data in bytes.
UKSPrice is the price of one Unit of Kalp Storage, representing the cost of storing a unit of data at a particular time period.
Computation Cost Computation cost reflects the processing power used to execute the transaction. It depends on the complexity of the transaction and the duration of execution. The formula for computation cost is:
UKCConstant is a scaling factor for computation effort that depends on network congestion and is decided by Kalp Decentra Foundation.
ExecutionTime[τ] is the time (in seconds) required to execute the transaction.
UKCPrice is the price of one Unit of Kalp Computation, representing the cost of processing one unit of computation at a particular time period.
The total gas fee for a transaction is the sum of the storage cost and the computation cost:
This fee is represented in the smallest denomination of Gini tokens, mGini, to account for precision.