Gas Fees

Determine the cost of transactions.

Estimating Gas Fees

There are 3 options for calculating the maxFeePerGas and maxPriorityFeePerGas fees of EIP-1559 transactions.

They are: Arbitrary values, Gas API, and using the PulseChain gas estimator with a multiplier.

The default value for the --gas-multiplier (or -gm) flag is 1%, which means the fees will be multiplied by 1.01 (1% above). To not multiply the fees by any value, you can set -gm 0

For all three options, the maxFeePerGas and maxPriorityFeePerGas calculated will be multiplied by the value of --gas-multiplier.

Arbitrary Values

Manually set arbitrary values with the --max-fee and --priority-fee Telliot flags, for maxFeePerGas and maxPriorityFeePerGas respectively.

These values should be expressed in GWEI. For example, if you want to use 1500000000 WEI as maxPriorityFeePerGas, you need to pass -mf 1.5 GWEI.

Usage example:

telliot report -a <account-name> -qt pls-usd-spot -ncr --fetch-flex --submit-once -mf 20000 -pf 1.5 -gm 10

This example report will use maxFeePerGas as 20000 GWEI and maxPriorityFeePerGas as 1.5 GWEI, and will also increase these values by 10%.

The expected log result of this example should look like this:

INFO    | telliot_feeds.reporters.interval | 
            Fees Info:
            Multiplier: 10
            Option used: "--max-fee and --priority-fee"
            Priority fee after multiplier: 1.6500000000000001
            Max fee after multiplier: 22000.0

Gas Price API

Using the flag --use-gas-api will set the values for maxFeePerGas and maxPriorityFeePerGas equal to the "Rapid" price of the PulseChain mainnet Gas API or PulseChain testnet Gas API if using Telliot in pulsev4 testnet.

Usage example:

telliot report -a <account-name> -qt pls-usd-spot -ncr --fetch-flex --submit-once --use-gas-api

This example would use the PulseChain gas API "Rapid" price as fees. Note that the multiplier is 1, which is the default since this example did not pass any value for -gm.

Here, the expected log result should look like this:

INFO    | telliot_feeds.reporters.interval | 
            Fees Info:
            Multiplier: 1
            Option used: "gas_api"
            Priority fee after multiplier: 226027.9
            Max fee after multiplier: 226027.9

Gas Fees Estimation

Using the flag --use-estimate-fee will estimate the fees using the EIP-1559 Gas Estimation calculations provided by the PulseChain Gas Estimation repository.

Usage example:

telliot report -a <account-name> -qt pls-usd-spot -ncr --fetch-flex --submit-once --use-estimate-fee

This command uses the same EIP-1559 Calculations in the eip1559.ts provided by the PulseChain.

Note that the Gitlab repository was found in the footer of the PulsecChain Gas API. See https://beacon.pulsechain.com/gasnow for more info.

In this instance, the expected log result of this example should look like this:

INFO    | telliot_feeds.reporters.interval | 
            Fees Info:
            Multiplier: 1
            Option used: "estimate_fees"
            Priority fee after multiplier: 7988.09
            Max fee after multiplier: 10270.69

Last updated