Ruka hadi maudhui makuu
iCute FinanceMALI ZA KIDIJITALI · UCHUNGUZI WA SOKO
Kiswahili
Saraka ya utafiti
iCute Finance

Urambazaji mkuu

Urambazaji mkuu

MALI ZA KIDIJITALI · UCHUNGUZI WA SOKO

Why do these two Ethereum transactions have different gas usages? Can't explain it from the GETH EVM debug traces

One of the reason for the gas cost not being the same would be that one account did not have any usdc before the transaction and the other already had some. It cost more gas to set a 0 value to non zero than non zero to non zero. For instance. The new account does not have his address written in the usdc balance mapping. So the contract would have to record the address and set the balance. The other account already have his address written and we just updated the balance. See; Why does zero to non-zero in storage take higher gas?

Tazama chanzo CC BY-SA 4.0