Skip to main content

Questions tagged [gas-price]

Questions dealing with the gas price of a transaction.

Filter by
Sorted by
Tagged with
23 votes
2 answers
65k views

Gas price in ETH unit

I am wondering if there's a website that provides the price of the standard gas limit (21000 Gas, transaction cost for sending ETH) in ETH unit. I checked Ether.Fund site, but it provides the gas ...
suburhok's user avatar
  • 401
22 votes
1 answer
3k views

What were the key assumptions and analyses that went into setting Ethereum's gas price?

Frontier was launched with a default gas price of 0.05e12 wei. In Homestead, the default was reduced to 0.02e12 wei. If this gas price is too low and operations on Ethereum are too cheap, for ...
eth's user avatar
  • 85.9k
21 votes
3 answers
34k views

Can I set the gas price to whatever I want?

The default gas price is 0.02e12 Wei. But while creating transactions on the command line or Geth's Javascript console you can define your own gasPrice: web3.eth.sendTransaction({/* ... */, gasPrice: ...
q9f's user avatar
  • 32.9k
19 votes
2 answers
31k views

how to estimate gas cost?

I have a function that iterate through an array, which could cost a lot of gas. But I still want to test out the estimate gas cost, then decide if I should maintain the design or not. function ...
dome some's user avatar
  • 319
17 votes
2 answers
5k views

Where does the consumed ether/gas go?

I'm a bit new to ethereum and I'm finding it a bit difficult to understand how gas and Ether relate. So every call we do to a smart contract costs gas. Where does the gas that the user pay goes to? ...
sfrj's user avatar
  • 782
16 votes
5 answers
26k views

How to get the actual Gas price?

Is there a way to get the lowest and average price miners are asking for gas? Some statistics sites seem to have prices but they are outdated.
Roland Kofler's user avatar
16 votes
1 answer
8k views

How much does it cost to use a contract?

Still new to ethereum and would like to know the price for a contract.
Patoshi パトシ's user avatar
16 votes
1 answer
4k views

How does "Gas Price Oracle" work?

How does "Gas Price Oracle" work? "Gas Price Oracle" is explained here in go-ethereum wiki, but it doesn't explain how it works. Where does it get the data from? How does it do its calculations?
Satoshi Nakanishi's user avatar
15 votes
6 answers
10k views

Why not mine my own transactions?

I have a contract which needs to be updated occasionally. So I create a transaction, sign it and send it to the network. When I do that, I state a gas-price. The higher the gas-price is, the faster ...
goodvibration's user avatar
12 votes
2 answers
13k views

How do I set a gasPrice with ethers deploy script?

I'd like to set a gasPrice in my deploy script, so I could deploy and let miners pick up my transaction when gas is low. Like deploy my contract over night while I'm sleeping to save money. How can I ...
caker's user avatar
  • 195
12 votes
2 answers
683 views

Can I send gas to another user?

Gas is purchased using Ether, does that mean I can send gas as a separate coin?
Patoshi パトシ's user avatar
10 votes
1 answer
2k views

Geth Gas price too low for acceptance

Why is geth not letting me post a transaction with a low gasPrice? > ./geth console > eth.sendTransaction({ "from": "...", "to": "...", "gas": "30000", "gasPrice": "10", "value": "0.1" }) Gas ...
Micah Zoltu's user avatar
9 votes
1 answer
3k views

How do I retrieve the exact gas costs spent for a transaction with ethers.js?

Running const receipt = await contract.mint(4) console.log(receipt) gives me the following transaction receipt { hash: '...
love lain's user avatar
  • 271
9 votes
1 answer
906 views

How does EIP-1559 make Ethereum fees better?

I have a few questions that are mostly related to each other. I don't understand how EIP-1559 makes it a better way than the current one about fees. Since EIP-1559 brings priority fees and miners ...
Nika Kurashvili's user avatar
8 votes
1 answer
78k views

Why is it so expensive to trade on Uniswap with MetaMask? ($50 fee)

The best quote that the Uniswap fox found for swapping 1 ETH for UNI token right now has a $50+ estimated transaction fee (max $80) inclusive of a 0.875% MetaMask fee. Even if I change the swap to a ...
user610620's user avatar
  • 1,528
8 votes
1 answer
2k views

How do events influence a transaction's gas?

Since events are stored in the transaction receipts trie they should influence the gas a transaction costs since storage costs, right?
rosul's user avatar
  • 353
8 votes
3 answers
1k views

trouble matching gas used in transaction with difference in account balance

I've fired up my testrpc and deployed a simple HelloWorld contract using truffle. I send a simple transaction to my contract and I log my account balance before and after the transaction. ...
natsuki_2002's user avatar
8 votes
1 answer
337 views

Can I estimate the total gas limit of several dependent transactions?

Assume two dependent transactions A and B. Transaction B depends on transaction A and will fail if transaction A has failed. I would like to estimate the gas limit required for the success of both ...
amanusk's user avatar
  • 266
8 votes
1 answer
30k views

Fees are too Damn High to send $20 worth of USDC. How can one minimize these fees?

It's 2020 September 3. Fees to send 20 USDC to someone is about $10-15 worth of gas fees. How can I minimize the gas fees when using metamask? And is it true that if I set the gas fee too low, I would ...
Patoshi パトシ's user avatar
8 votes
2 answers
960 views

eth.gasPrice is returning less value than expected

As mentioned in documentation eth.gasPrice returns the current gas price. The gas price is determined by the x latest blocks median gas price. I was relying on this method to estimate current gas ...
Prashant Prabhakar Singh's user avatar
7 votes
5 answers
5k views

How are miners minimum acceptable gas price determined?

In section 5 of the yellow paper, it states "there will be a (weighted) dustribution of minimum acceptable gas prices.." My question is what, if any, is the enforcement mechanism that ensures this ...
Gruff McGruff's user avatar
7 votes
2 answers
5k views

How to determine transaction fees using web3.py

I am using web3py to transfer tokens and ether. I need to track the transaction fees for each transaction. Given a transaction hash, how do I determine the total fee paid?
Paras's user avatar
  • 205
7 votes
1 answer
8k views

What is the relationship between Gwei and gas?

I know that a Gwei means 1000000000 wei, but when we send a transaction with 21000 gas, is that mean we send 21000 Gwei? please explain Gwei for me
Moein's user avatar
  • 149
7 votes
1 answer
644 views

Is it possible to mine my own txs with no fees?

It seems like minimum tx fee is around .001$ in Ethereum (maybe a little bit less) but I was wondering about the possibility of performing zero fee transactions, mining them by myself. Obviously, ...
Juan Ignacio Pérez Sacristán's user avatar
7 votes
1 answer
2k views

How to retrieve ERC20 from a hacked address monitored by a bot?

Check it out: https://discordapp.com/channels/554623348622098432/633092550407749652/714325610050355260 The address that was hacked: https://etherscan.io/address/...
Mars Robertson's user avatar
6 votes
2 answers
4k views

weird transaction sending to self

see some weird txs calling self addresses, for example, the last 2(the first and second tx in this block) transactions, at https://etherscan.io/txs?block=6475251&p=2 https://etherscan.io/tx/...
DiveInto's user avatar
  • 490
6 votes
2 answers
6k views

How can I estimate price of data storage? [duplicate]

I'd like to make estimations of the cost of an application, and one of the things I need is the price to store n kB of data on a contract. In ether and in USD. Where could I find rates or prices of ...
Teleporting Goat's user avatar
6 votes
1 answer
793 views

Should I use the default gas price?

I see that there is a default gas price, but does everyone use it? Do people get away with paying much less for gas? Are there any websites that track how long transactions take at different gas ...
rethsid's user avatar
  • 1,898
6 votes
1 answer
2k views

Is there a 'default' gas price and does it change when price of ether relative to fiat rises?

I understand how gas pricing works, so that is not my question. My question is, as the price of ether relative to fiat (US $) rises, does the 'default' gas price lower (if there is such a thing as ...
Thomas Jay Rush's user avatar
6 votes
2 answers
5k views

Deploying contract with no cost (gasPrice 0) on private network

In order to achieve a no-coin bootstrapping of my private network I'm trying to deploy a first special contract having zero funds in owner wallet (every wallet of this private network should have zero ...
Juan Ignacio Pérez Sacristán's user avatar
6 votes
1 answer
627 views

Since the price of ETH has gone up 10x in 6 months, should I be lowering the gas price for my transactions?

The price of ETH has gone from ~8 USD/ETH to ~90 ETH/USD in 6 months, but when I view transactions on the blockchain (example), I see that most people are still using the default gas price of 2e10 wei/...
k26dr's user avatar
  • 861
6 votes
1 answer
468 views

Why does gas cost explode with more than 7 variables in a struct

I'm assuming this has to do with Ethereum's 7 variable stack limit but in the following code test struct TestStruct5 { uint8 m_nOther1; uint8 m_nOther2; uint8 m_nOther3; uint8 ...
John Snow's user avatar
5 votes
4 answers
3k views

How much gas and gasPrice to set when signing a transaction?

const params = { to: '0xdbC0d76Fb1f2399b618FB29922dBC5cf763dd3d7', from: dbDeposit.depositAddress, value: balance, gas: 2000000, gasPrice: '234567897654321', nonce: 0 }; ...
Shamoon's user avatar
  • 261
5 votes
3 answers
16k views

How can I set the gas price while deploying a contract with web3.js?

I set up a Geth node on the Rinkeby network recently. And while I can send ordinary transactions in seconds without a problem, I can't seem to get a contract creation to happen in less than an hour. ...
reductionista's user avatar
5 votes
1 answer
2k views

what is difference between "gas" "gas price" and "fee"?

Can we say that gas is the unit of transaction fee ? And gas price is the same transaction fee ? If so, why we do not use ether and wei instead of gas ?
Questioner's user avatar
  • 2,680
5 votes
2 answers
4k views

How to get the transaction cost in a Truffle unit test?

How can I get the actual gas consumed by a sendTransaction inside a truffle test? In the following test, buyer sends an amount of 50 ETH to a contract: const EmptyContract = artifacts.require("...
Robert's user avatar
  • 317
5 votes
1 answer
11k views

Gas cost of different computations [duplicate]

Is there somewhere a list showing the different cost of different calculations?For example: Perform transaction: 21'000 gas calculate a hash: 30 gas addition of two numbers: 3 gas cycle in a loop: 1 ...
Dalit Sairio's user avatar
5 votes
1 answer
1k views

Disable mining/gas/ether or set really low

When building a private ethereum network, with trusted Nodes (companies, investors, etc.) who all contribute to verifying the transactions. Three related questions/options: Would it be better/...
Cubedj's user avatar
  • 363
5 votes
1 answer
563 views

Why does zero to non-zero in storage take higher gas?

According to EIP-1087 https://eips.ethereum.org/EIPS/eip-1087 , it take 20,000 gas to set a slot from 0 to non-zero with SSTORE while it takes only 5000 gas for any other change. Why does 0 to non-0 ...
Naveen V's user avatar
5 votes
2 answers
1k views

With the rising Ether price to $9, doesn't this mean gas costs more?

With the increase in the ether price, doesn't gas cost more, hence higher price to execute a contract? What is the current gas price today to execute a typical contract or send a transaction?
Patoshi パトシ's user avatar
5 votes
2 answers
2k views

Will Ethereum 2.0 gas cost decrease?

I want to generate large number of transaction probably in thousands per day to store document hashes of certificates from Universities so that I can verify the integrity of documents through time ...
Mr.SsS's user avatar
  • 435
5 votes
2 answers
2k views

How is it possible to pay 2,100 Ether ($309,267) for a transaction fee?

Here is the transaction details that has transaction fee for 2,100 Ether ($309,267.00) only for sending 0.1 Ether. There is no fairness for users, hence accidentally adding a zero might cause them ...
alper's user avatar
  • 8,394
5 votes
1 answer
3k views

Understanding "eth_estimateGas" results estimating gas

I have been playing around with parity's "eth_estimateGas" call to determine different tokens gas requirements. Generally using this code: let transfer_data = contract.transfer.getData("<...
Heel Clicker's user avatar
5 votes
1 answer
4k views

Gas, gas price, gas cost

I have read in the documentation that the miners set the gas cost. Does this means that gas cost varies from miner to miner? If not, how it is determined? Moreover, when a contract is referred in geth ...
Sukhmaninder's user avatar
5 votes
1 answer
355 views

Is the transaction fee reduced from the transaction value?

Address A holds 1 ether and address B holds 0 ethers. Lets create a transaction to transfer all balance from A to B. This transaction will consume roughly gas_price * gas_used = 20 gwei * 21000 = 0....
randomguy's user avatar
  • 459
5 votes
1 answer
7k views

What's the default web3 gas price? [duplicate]

When sending a TX, there's an optional gasPrice field. If I don't set it, what's it default to? Does it look at other TXs going on or is it a fixed value that only changes when web3 gets updated to a ...
Jonah's user avatar
  • 655
5 votes
5 answers
9k views

web3.eth.getGasPrice() always return 1GWei

For estimate transaction cost, I use web3.eth.getGasPrice() function. The return callback value always 1Gwei(1,000,000,000) in ROPSTEN. web3.eth.getGasPrice(function(error, result){ console.log(...
Mark Lee's user avatar
5 votes
2 answers
680 views

Finalized Empty blocks with 0 transactions and 0 block reward

This block was finalized 21 mins ago from now and there is one exactly like this waiting to get finalized Here is the link of that. Both of them had 0 transaction, 0 block reward, 0 extra data, 0 gas ...
R.V's user avatar
  • 96
5 votes
3 answers
236 views

What are the available options (March 2021) for bridging tokens across the chains?

Actual problem in mind I would like to release a token for the Island DAO. I'm worried that ETH gas prices are prohibitively expensive - if I use ETH, the smaller guys will not come. But ETH is the ...
Mars Robertson's user avatar
5 votes
1 answer
714 views

Does anything change on getGasPrice( ) in Web3js after EIP-1559?

Using getGasPrice in web3js returns the last few blocks median gas price. After EIP-1559, the fees system is divided into Base + Tip. My question is, what is returned using getGasPrice after EIP1559? ...
sigmaxf's user avatar
  • 1,080

1
2 3 4 5
10