Skip to main content

Does Setting an Allowance to Zero (Revoking) Cost the Same as Setting It to a Non-Zero Value?

Yes, the gas cost is generally very similar. Both actions involve changing a value in the blockchain's storage, which is the primary driver of the transaction cost.

In some cases on Ethereum, changing a storage value from non-zero to zero can result in a small gas refund due to the way Ethereum incentivizes clearing up the state, but the base cost of the transaction itself remains and is subject to network fees. The difference is usually negligible.

Why Did the Ethereum/Ethereum Classic Fork Require Specific Replay Protection?
Why Does a Deep ITM Option Have a Delta near 1?
Why Does Revoking a Token Allowance Require a Blockchain Transaction and Incur a Gas Fee?
Could a Token Allowance Be Used to Automate Margin Calls in a Decentralized Perpetual Futures Contract?