Transaction » Transaction Fee
Clone this wiki locally
- Transaction size - the size of a serialized transaction
- Fee rate - fee rate indicates how many shannons per KB charge.
Size of a normal two-in-two-out transaction is 597 bytes, to calculate transaction fee we need plus extra 4 bytes size due to the cost to serialize tx in a block.
(tx_size + 4) * fee_rate / 1000
Assume we use
1000 shannons/KB as fee_rate, the transaction fee is
(597 + 4) * 1000 / 1000, 601 shannons (0.00000601 CKB).
NOTICE: this fee calculation may do not suite txs that consume too many cycles. In that case, the node will package tx in low priority unless you pay more fees.
CKB Node operator can set a value
ckb.toml to decide ignore txs which fee lower than
send_transactionRPC will not accept txs which fee lower than
- A node will stop to relay txs which fee lower than
The default value of
min_fee_rate = 1_000 # shannons/KB
Which mean a tx need at least
(tx_size + 4) * 1000 / 1000 shannons as tx fee.
NOTICE: even you can set
min_fee_ratelower than the default value, the other nodes in the network may still use the default value, it's may cause the tx you accept still can't relay to other nodes. Unless your node is also a miner or mining pool that you can mine those txs yourself.
CKB node support transaction fee estimate feature, open the
ckb.toml RPC modules.