Saltar al contenido principal
iCute FinanceACTIVOS DIGITALES · OBSERVACIÓN DEL MERCADO
Español
Directorio de investigación
iCute Finance

Navegación principal

Navegación principal

ACTIVOS DIGITALES · OBSERVACIÓN DEL MERCADO

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?

Ver fuente CC BY-SA 4.0