Force Fee
Force is crucial to the Hash Ahead network. It is this fuel that allows it to run, just as a vehicle needs gasoline.
Prerequisite
To better understand this page, it is recommended to read Transactions and EVMC first.
What is Force?
Force refers to the computational effort required to perform a specific operation on the Hash Ahead network.
Since each Hash Ahead transaction requires computing resources to execute, each transaction requires a fee. In this context, Force refers to the fee required to successfully conduct a transaction on Hash Ahead.
Essentially, Force fees are paid in Hash Ahead's currency, HAH. Force prices are denoted in Gwei, which is itself a unit of HAH - each Gwei is equal to 0.000000001 ETH (10-9 ETH). For example, instead of saying your HAH costs 0.000000001 HAH, you can say that your HAH costs 1 Gwei. The word "gwei" itself means "giga-wei", equal to 1,000,000,000 wei. The Wei itself (named after Wei Dai, the inventor of b-money) is the smallest unit in HAH.
Basic fee
Each block has a base fee as the reserve price. To be eligible to be added to a block, the gas fee quote must be at least equal to the base fee. The base fee is calculated independently of the current block and is determined by the blocks before the current block, which makes it easier for users to predict transaction fees. When a block is mined, its base fee is "burned" and withdrawn from circulation.
The base fee is calculated using a formula that compares the size of the previous block to the target size. If the target block size is exceeded, the base fee will increase by up to 12.5% per block. This exponential growth makes it economically unfeasible to keep block sizes high indefinitely.
Priority Fee
Hash Ahead introduces a priority fee (tip) that incentivizes miners to add transactions to blocks. If there were no tips, miners would find it economically viable to mine empty blocks, since they would receive the same block reward. Under normal circumstances, a small tip provides minimal incentive for miners to add transactions. For transactions that need to be executed first in the same block, higher tips need to be provided, and strive to make the bid higher than competing transactions.
Maximum Cost
To execute transactions on the network, users can specify a maximum amount they are willing to pay for transaction execution fees. This optional parameter is called maxFeePerGas. In order to execute a transaction, the maximum fee must exceed the sum of the base fee and tip. After the transaction is completed, the difference between the maximum fee and the sum of the base fee and tip is refunded to the sender of the transaction.
Why do fuel charges exist?
In short, gas fees help ensure the security of the Hash Ahead network. There is a fee for every computation performed on the network, which prevents bad actors from spamming the network. To prevent unintentional or malicious infinite loops or other computational waste in the code, each transaction is required to place a limit on the computational steps that can be taken to execute the code. The basic unit of calculation is "fuel".
All gas not used in the transaction will be refunded to the user despite the fee limit included in the transaction (i.e. max fee - (base fee + tip))。
What is a fuel allowance?
The gas limit refers to the maximum amount of gas you are willing to consume in a transaction. More complex transactions involving smart contracts require more computational work, so they require higher gas limits than simple payments. Standard HAH transfers require a fuel limit of 21,000 units of fuel.
For example, if you set a gas limit of 50,000 units for a simple HAH transfer, the Hash Ahead VM will consume 21,000 units and you will receive the remaining 29,000 units. However, if you set the gas too low, say, for a simple HAH transfer, set the gas limit to 20,000 units, the Hash Ahead VM will consume 20,000 units of gas and try to complete the transaction, but will not. The Hash Ahead VM then rolls back all changes, but since the miner has done work worth 20k units of gas, the gas is consumed.
\
\
Last updated