I noticed that swapping some tokens in Uniswap to exactly the same amount of ETH, at the same time, has much higher gas fees than other tokens. Why is this? Aren't the swap transactions identical for all tokens?
2 Answers
I noticed that swapping some tokens in Uniswap to exactly the same amount of ETH, at the same time, has much higher gas fees than other tokens. Why is this? Aren't the swap transactions identical for all tokens?
Some token transfer()
function has more instructions (if clauses) than others.
Plus it also depends on if the Ethereum Virtual Machine storage can be freed after the transfer (balances goes to zero or from zero).
More information about the EVM storage and token transfers here.