Skip to main content
Crypto Readout

Crypto markets, protocols and policy

Does an ERC-20 Approval event show the current allowance?

Does an ERC-20 approval event show the current allowance? It records the value set by that transaction; read allowance(owner, spender) for today’s value.

By Crypto Readout Editorial3 min read#d5b7c2

Does an ERC-20 Approval event show the current allowance?

An ERC-20 Approval event records the value set by that approval transaction; it does not necessarily show the current allowance. A later transferFrom can reduce the allowance without a new Approval event, so read allowance(owner, spender) from the token contract at the latest block to see what remains.

Say you approve a contract to spend 100 tokens. The token contract emits an Approval event containing your wallet address as owner, the contract’s address as spender, and 100 as value. That log is a record of the approval transaction, much like a dated receipt; it is not a live reading of the permission.

The event records a past approval

The event’s value is the amount recorded when approve was called. It describes what that transaction set, not a continuously updated total. The allowance is the permission the token contract currently reports for a particular owner and spender.

Now say the spender later calls transferFrom to move 30 tokens from your wallet. The token contract can reduce the allowance from 100 to 70 as part of that transfer. If it emits no new Approval event for that reduction, the original event still says 100. Replaying that event alone would overstate what remains.

This is why the event and the allowance answer different questions. The Approval event shows what value an approval transaction recorded. The allowance(owner, spender) view function asks the token contract for the permission currently stored for those two addresses.

For a practical explanation of the log fields, how revokecash explains ERC-20 logs can help you identify the owner, spender and value in your case. That makes it easier to match an event to the wallet permission you want to inspect with revokecash.

To check the current value, call allowance(owner, spender) on the token contract at the latest block. Use the wallet address that granted permission as owner, and the approved smart contract address as spender. The returned value is the allowance reported at that block; an event from an earlier transaction remains a historical record.

Keep the token contract in view, too: allowances belong to a specific token, owner and spender combination. An event from one token contract does not give the allowance for another. Match all three before comparing the event’s value with the current read.

Before the transfer, the illustrative case had a 100-token allowance and an event recording 100. After the 30-token transfer, the same wallet and spender may have a current allowance of 70, while the old event still records 100. The addresses and the historical log stay the same; the stored permission changes because transferFrom used part of it.

Related questions

What does an unlimited ERC-20 approval mean?

An unlimited ERC-20 approval sets a very large allowance for a spender, rather than a small amount sized to one transfer. The relevant current value is still the one returned by allowance(owner, spender). Read it for the specific token, wallet and spender you are checking.

Why can an approval value appear in hexadecimal?

An approval value can appear in hexadecimal because transaction logs encode event data as bytes, which explorers often display in that format. The value still represents the amount recorded by the approval transaction. Decode it using the token’s decimals to read it in token units, then query allowance(owner, spender) for the current on-chain amount.

For the permission that remains now, read allowance(owner, spender) at the latest block; use the Approval event to understand what an earlier approval transaction recorded.