Salar Saeedi

Crypto guides · Analysis

The wallet asks for an approval or a signature. What changes?

Understand ERC-20 spending allowances, EIP-712 typed signatures and the questions to ask before granting access.

Salar Saeedi2 min read
Three-stage illustration — The wallet asks for an approval or a signature. What changes?

A wallet asks you to sign before a swap. The balance may not move while that prompt is on screen. The risk depends on what the authorization lets the requesting contract or application do later, so the best starting point is the details of the prompt.

An allowance names a spender

Under ERC-20, an approval grants a spender an allowance on a particular token contract. The spender can later use a transfer-from operation within the allowance. Check the token, network, spender and amount. When the interface permits it and the product works with a lower limit, size the allowance to the intended use.

Source · Ethereum ERC-20 token standard

A message can authorize an action

EIP-712 makes structured signed data easier to interpret than an opaque string. It does not guarantee that the request matches your intentions. Review the domain and the message fields, particularly the recipient or spender, amount and expiration when shown.

Source · Ethereum EIP-712 structured signatures

Disconnecting and revoking answer different questions

Disconnecting a site affects the connection to that application. A recorded token allowance is controlled by the token contract and can require a separate revocation transaction. Review active authorizations in a trusted interface.

Source · Ethereum.org guide to reviewing and revoking token access

What to take away

When you cannot explain who gets permission to do what, with which asset, and for how long, cancel the prompt and verify it first.

References

Related work in the portfolio