Fees, Burn and Gas

Fees Explained

In Dune Network, users pay two kinds of fees:

  • The standard Fees are paid to the bakers who include the operation in their block. The fees are paid in full, even if the gas is not consumed completely or if the operation fails. Fees are supposed to compensate the cost of processing the operations.

  • The Burn is consumed, but not paid to anybody. Burn is supposed to compensate the cost of storing data in the ledger.

Though the fees are always paid in full, there is still a notion of gas. The gas tells the baker the maximum processing it will spend on the operation. If the user does not specify enough gas, the operation will fail by lack of gas. Usually, bakers will compute the ratio fees-per-gas, and include the operations where this ratio is maximal.

Check the following sections for current parameters. Here are some general principles:

  • An operation changing a balance from 0 to non-zero will incur a burn cost for the origination of 0.257 dun.

  • The burn per byte stored in the ledger is 0.001 dun.

  • One operation cannot burn more than 60 dun in storage.

General Parameters

These are parameters set either in the software or in the configuration. They can be modified by every node.

Defaults used by bakers

  • default_minimal_fees: 100 mudun

  • default_minimal_nanodun_per_gas: 100 nanodun

  • default_minimal_nanodun_per_byte: 1000 nanodun

Chain Parameters

These are parameters set for the chain itself. They cannot be modified without an agreement of all nodes.

Gas parameters:

  • hard_gas_limit_per_operation: 800 000

  • hard_gas_limit_per_block: 8 000 000

Burn parameters:

  • origination_size: 257 mdun

  • cost_per_byte: 1000 mudun

  • hard_storage_limit_per_operation: 60000 mdun

Specific parameters on dune-client

By default, dune-client will try to simulate the operation to automatically compute the gas, fees and burn.

Options to set values instead of using a simulation:

  • --fee DUNS: set the fees

  • --gas-limit GAS: set the gas limit

  • --storage-limit BYTES: set the maximal number of bytes stored by the operation (limit the burn)

Options to tune the computation after simulation

  • --minimal-fees DUNS: minimal fees for an operation

  • --minimal-nanodun-per-gas-unit NANODUNS: will set the fees depending on the gas consumption

  • --minimal-nanodun-per-byte NANODUNS:

  • --force-low-fee: do not complain if fee is smaller than expected

  • --fee-cap DUNS: do not emit the operation if computed fee is greater than this value (1 dun by default)

  • --burn-cap DUNS: do not emit the operation if computed burn is greater than this value (0 by default)