Fund:0.012 ETH / $6.94

How to know the best or optimal gas to pay for a transaction?

1 month ago

I am a little confused about how to know the correct transaction prices. Can someone explain to me how to know the optimal gas to pay for any given transaction?

Back to Q&A


Checkout the link below. Its very informative,

3 weeks ago
To do anything on the Ethereum platform, you need to pay for it, and the payment (or fee) is calculated in Ether (ETH) via an intermediary benchmark called gas limit and gas price.

Ether = Tx Fees = Gas Limit * Gas Price
3 weeks ago

I just want to second what the person below me said excellent source!
3 weeks ago
Websites like this are very beneficial:
4 weeks ago
You can use estimateGas APIs and these APIs are available in JSON-RPC and Javascript.

Here is the link how to use

APIs works by pretending the transaction was actually being included in the blockchain, and then returning the exact gas amount that would have been charged if that pretend operation was real. In other words, it uses the exact same procedure a miner would use to calculate the actual fee.

They are estimates and for developers that want further precision, testing is required, possibly on a private chain.

If too much gas is provided, the excess gas is converted to ether and refunded. If too few gas is specified, all the specified gas is forfeited to the miner and the transaction is reverted: just like the contract was never called.

Users will generally have to trust the DApp they are using, and DApps that have good UI and UX, may indicate some estimated costs to the user, or possibly even hide such details by sending the user's account some ether, or giving a new user an account that has some ether.

This is feasible because most transactions require a very small amount of ether; 1 ether is 10^18 wei and can run many transactions. As an example, if one were simply using Ethereum to transfer wei/ether around, at the current gas price of 5 Gigawei, a user can do around 9523 transfers with 1 ether. This is because a value transfer transaction costs 21000 gas, and thus the computation is 1e18 / (21000 * 5e9) = 9523.80.

Check this link also

4 weeks ago

Your question is successfully refund. You will be redirect in few seconds.