Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Transaction Details: Gas used should not be expressed in Gwei #3303

Open
tab00 opened this issue Sep 18, 2023 · 2 comments
Open

In Transaction Details: Gas used should not be expressed in Gwei #3303

tab00 opened this issue Sep 18, 2023 · 2 comments

Comments

@tab00
Copy link

tab00 commented Sep 18, 2023

Gas is a quantification of EVM opcode processing. It doesn't really have a unit name, but I think it can simply be "gas units". Etherscan doesn't even give it any unit name.

Gas by itself is not currency or money, so should not be expressed in currency units (e.g. wei or ETH).

Gas price is a rate: currency per unit of gas, like how much money you pay for a bit of work.
It's commonly expressed in "Gwei". To be technically correct, it should be "Gwei per gas unit".

Here is the unit conversion from Gwei to nETH:
1 Gwei
= 1 giga wei
= 109 wei
= 109 x 10-18 ETH
= 10-9 ETH
= 1 nano ETH
= 1 nETH

Network fee = Gas x Gas price

e.g.:
If
Gas used = 50,000 gas units
Gas price = 10 Gwei per gas unit
Then
Network fee = 500,000 Gwei
= 500,000 x 10-9 ETH
= 500,000 nETH
= 0.0005 ETH

@tab00
Copy link
Author

tab00 commented Sep 23, 2023

So you need to remove the "Gwei" from "Gas Used". You can just not even write the unit name, like on Etherscan and other explorers - they only write the number.

Here's an example transaction page on Etherscan, with my calculation guide:

image

https://etherscan.io/tx/0x8e5a6187ad22f58a36678c70b7ef6327151241d0258473749abee13771421fab

@JamesSmartCell
Copy link
Member

Got it, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants