Gas accounting in Zilliqa

Unit accounting in Zilliqa

Zilliqa has its base unit, Zil. However, Zilliqa supports up to 12 decimal placing of its base unit.
There are a total of 3 different accounting units in Zilliqa: Zil, Li, Qa.

Decimal placing Unit
1 Zil 1 Zil
0.1 Zil -
0.01 Zil -
0.001 Zil -
0.0001 Zil -
0.00001 Zil -
0.000001 Zil 1 Li
0.0000001 Zil -
0.00000001 Zil -
0.000000001 Zil -
0.0000000001 Zil -
0.00000000001 Zil -
0.000000000001 Zil 1 Qa

Gas accounting in Zilliqa

The gas accounting in Zilliqa shares the same format to that of Ethereum. There is a gasLimit that is set based on the complexity of the computation involved in processing a transaction, and there is a gasPrice (in the denomination Li) that is agreed upon by all nodes.
[Further details on how the gas market works can be found in this pdf HERE]

NOTE: Simple User account-to-account transactions cost 1 gas.

The documentation for gas cost of smart contract (Scilla) functions can be found in this pdf:
https://drive.google.com/file/d/1a2UdXfUFTpS0dYwwdVZMB8SgsqI7y2mR/view?usp=sharing

Bootstrap gas fees for Zilliqa

At the bootstrap phase of the Zilliqa network, the minimum gasPrice will be set to 1000 Li.

A JSON-RPC API is made available for Users to query the latest gasPrice floor for the current DS epoch.

Based on CMC data dated as of 06/01/2019, this will amount to $0.0000205.

As such, the gas fees for a simple User account-to-account transactions will cost roughly:

$0.0000205 * 1 gas = $0.0000205

As for contract-based transactions, simply multiply the gasPrice by the gasLimit required for each contract’s transition by referencing the pdf documentation above. You may also try out your transitions and get the static gas cost via the web IDE or your locally compiled Scilla binary.

2 Likes