Koinlytics

Gwei, Nonce, and the Full Anatomy of an Ethereum Transaction

Ethereumbeginner7 min read
Every field in a transaction and what it actually does. Why nonce stuck transactions block your wallet, and how to fix them without paying twice.

An Ethereum transaction is a tiny bundle of 8 fields. Understanding them removes 90% of wallet weirdness.

The fields

The nonce trap

You submit tx nonce 12 with a low gas fee. Network gets busy. It sits pending for hours. You submit tx nonce 13 to swap on Uniswap. It sits too, because 12 has to go first. Every future transaction is now blocked.

The fix is to broadcast a replacement for nonce 12 with the same nonce but a higher fee. Any decent wallet has a "speed up" or "cancel" button that does this automatically. Cancel is really "send yourself 0 ETH with the same nonce at a higher fee": the network mines your empty replacement, unlocking every later nonce.

Units cheat sheet

1 ETH = 1018 wei = 109 gwei = 103 Mwei. Gas prices are always shown in gwei. A 30 gwei price on a 100,000 gas transaction = 3,000,000 gwei = 0.003 ETH. At $3,000 ETH, that's $9.

What data actually contains

The first 4 bytes of data are the function selector: keccak256("transfer(address,uint256)")[0:4] for an ERC-20 transfer. The rest is the ABI-encoded parameters. This is what your wallet decodes into "Transfer 100 USDC to 0xabc..." on the confirmation screen. When your wallet cannot decode it (unknown contract), it shows raw hex. Signing raw hex you don't understand is how people lose money.

PreviousHow to Read a Contract on Etherscan
Powered by Koinlytics · Free crypto education.

Ready to try what you just learned?

Open the Koinlytics dashboard and see the concepts live on your real portfolio.

Launch App