EXERCISE · WALLET SECURITY
MetaMask: disconnect, revoke, what should you check?
After this lesson: Separate connection, signature, permission and actual spending.
01 / BEGINNER
First, what is it?
A permission is a right granted to another party. With some tokens you can allow a program to spend an amount on your behalf. That right can exist before any spending occurs. Connecting a website to a wallet is yet another action.
Words to know
- Connection
- Linking a website with an account under the tool’s permissions.
- Spender
- The party or contract authorised to use a token.
- Allowance limit
- The maximum quantity allowed by that permission.
The idea to understand
Before signing, identify the exact action, network, token, spender, amount and duration where applicable. Apparent zero cost says nothing about the scope of the right granted.
SEE IT IN PRACTICE
Now, a concrete example
ERC-20 distinguishes approve, which grants a right, from transferFrom, which can use it. An exchange may request approval before a swap. Approving and swapping are therefore not synonyms.
YOUR TURN
Does “Sign” without a visible fee mean “no possible financial effect”?
Form an answer before opening the explanation. You can also discuss it aloud.
Compare with the explanation
No. Some messages authorise later operations. Their content and the protocol using the signature determine the effect.
02 / INTERMEDIATE
How it works, and why
Before signing, identify the exact action, network, token, spender, amount and duration where applicable. Apparent zero cost says nothing about the scope of the right granted.
Disconnecting the website does not remove an allowance recorded in the token contract. Revoking it requires a separate operation. Not all signature types are managed the same way.
A “Sign” prompt can log you into a service or authorise an asset movement. Practise telling them apart without connecting a wallet. Exercise screens are educational mock-ups, not MetaMask screenshots.
01 · WORDS, MECHANISM, EXAMPLE
Understand the requested permission before deciding whether it matches your intention.
- Distinguish connection, approval and swap.
- Identify the asset and spending limit.
- Understand mistakes through four explained situations.
The words you need, in plain language
- Wallet
- The app used to access your account and confirm actions. MetaMask is one example. Always read what a wallet window requests.
- Contract and authorised program
- A contract is a program on the blockchain. An approval must identify the program that could use the tokens; its displayed name alone does not verify it.
- Approval and spending limit
- Permission for a program to use a token up to a limit. Approving 25 USDC is not yet swapping 25 USDC.
- Signature
- A confirmation produced with your account. What it permits depends on the message: signing in, approving spending or something else. “No fee” does not mean “no consequence”.
Follow the reasoning
State what you intended to do
Example: “swap 25 USDC”. Use that sentence to compare your intention with the displayed request.
Read what the program requests
Which site did you open? Which network? Which token? Which program would receive permission? What limit? A 250-unit limit is ten times 25.
Decide without guessing
Missing information: verify it. A mismatch: stop that request. Everything matches in the exercise: recognise the match without concluding that the program is safe.
Remember: Disconnecting a site does not remove an existing standard token-spending approval. Revocation concerns that specific permission; it does not recover funds already transferred.
Intermediate: a Permit signature can matter
ERC-2612 lets a signed message prepare an approval that another party can submit later. Its deadline limits use of the signature; it does not necessarily mean that the resulting allowance expires on that date. Permit2 and advanced permissions have different rules: do not automatically apply one mechanism’s rules to another.
Three actions with different effects
Disconnecting removes the site’s active wallet connection. Locking requires you to unlock the wallet again. Revoking changes a contract approval on the relevant network. The first two actions do not replace the third.
Fictional example: you authorised a contract to spend 500 USDC (token units, not euros). Closing the tab does not change the allowance to zero. A confirmed revocation can remove that approval; it does not recover assets already transferred.
Read the request, not just its appearance
A polished interface, a familiar logo and a zero fee do not establish what a signature authorises. A Permit request can grant spending permission through a signed message; it is not just a login. The exercise simplifies fields to make them easier to recognise.
- Domain: does it exactly match the service you intentionally opened?
- Action: login, spending permission or transfer? Does it match your intent?
- Scope: which tokens, authorised program and spending limit? If a deadline appears, what exactly does it limit: the signature or the permission?
- Context: which account and network? An alert or unreadable data is a reason to stop.
Review an approval after use
From official documentation or a known address, inspect the account’s approvals on the correct network. Identify the token and spender contract. Revoking is generally an on-chain transaction with a fee: check its result in the explorer after confirmation.
An off-chain signed message may not appear as a conventional approval. Whether it can be invalidated depends on the contract and signature type. An empty approval list does not prove that all risks are gone. If a recovery phrase was exposed, revoking permissions does not make the keys secret again.
03 / ADVANCED
The rules behind the interface
ERC-2612 allows an allowance to be changed using a permit signature, with a nonce and deadline under the specification. Permit2 is a different mechanism; do not confuse its permissions with the token’s ERC-20 allowance to Permit2.
When analysing a structured signature, identify domain, chainId, verifyingContract, spender, token, amount, deadline and counter as applicable. A summary interface can hide details; familiar field names do not validate the contract.
YOUR TURN
A signature expires tomorrow. Does that prove an allowance created today will also expire tomorrow?
Form an answer before opening the explanation. You can also discuss it aloud.
Compare with the explanation
Not necessarily. For an ERC-2612 permit, the deadline limits submitting the permit; the resulting allowance then follows the token’s rules. Read the exact mechanism.
Use the official sources at the end of this page to inspect these mechanisms further.
READ · REASON · APPLY
4 situations to investigate
For each case: compare the documents, explain your reasoning, make a decision, then solve a variation. The correction explains its assumptions and limits. No timer.
FICTIONAL DOCUMENTS · NO REAL TRANSACTION
Receive a gift… or approve spending?
In this made-up situation, a message directs you to cadeau.example to receive a bonus. You did not request anything. Yet the window asks for permission over your USDC.
- What you expected to do
- Receive a gift
- What is requested
- Approve USDC spending
- Spending limit
- Unlimited
- Immediate signing fee
- €0
Compare the intended action (receive) with the requested right (spend). Explain why “no fee to sign” does not answer the risk question.
This text is not automatically marked or sent. It is kept only in this page’s memory and disappears when you leave or reload. Use fictional information only.A hint for my decision
Receiving something does not normally require unlimited spending permission over your own tokens. Look at the action, not just the fee.
2. My decision
All documents, questions and worked solutions
Receive a gift… or approve spending?
In this made-up situation, a message directs you to cadeau.example to receive a bonus. You did not request anything. Yet the window asks for permission over your USDC.
- What you expected to do
- Receive a gift
- What is requested
- Approve USDC spending
- Spending limit
- Unlimited
- Immediate signing fee
- €0
Which decision matches the information shown?
Compare the intended action (receive) with the requested right (spend). Explain why “no fee to sign” does not answer the risk question.
Reasoning: The promised action and requested permission do not match. Some mechanisms can later use a signed message to grant spending rights. Stop here. The domain and bonus are made up; USDC and the approval mechanism are real.
Zero fees do not prove that a signature has no effect.
Variation
Going further: an ERC-2612 permit was already used on-chain before its 10:05 deadline. It set an allowance of 100 tokens that remains unused. At 10:06, is that allowance automatically zero?
In ERC-2612, the contract checks the deadline when it receives the permit. If accepted, it changes the ERC-20 allowance. These two standards do not specify automatic expiry for that allowance. Other permission systems can have their own rules: do not generalise to all signatures.
Sign in to a forum
You intentionally opened forum.example, a site made up for this exercise. The message uses the real Sign-In with Ethereum format to sign in. You have not yet compared the account and network with your intention.
- Requested domain
- forum.example
- Action
- Sign in to the forum
- Network
- Ethereum
- Expected account
- Not yet compared
- Message expiration
- In 5 minutes (fictional)
What can you conclude at this point?
List what must match your intention: domain, action, account and network. Which item still needs checking here?
Reasoning: Sign-In with Ethereum is a documented format for authenticating with an Ethereum account. Domain, account, network and time information need to match the context. This exercise has not yet supplied all those checks, and guessing cannot replace them.
An unchecked detail is a missing detail.
Variation
A genuine SIWE sign-in message expires at 10:05. You used it at 10:03. Can you conclude that the website will automatically log you out at 10:05?
ERC-4361 defines an expiration after which the message is no longer valid for authentication. That alone does not prove when an already opened session will end. Check the service’s session management. This simplified message is not a real signing request.
You intended 25 USDC; the program asks for 250
You are preparing a fictional swap of 25 USDC, meaning 25 units of the token. You decided to limit approval to that quantity. Yet the next summary displays a different limit.
- Quantity to swap
- 25 USDC
- Requested spending limit
- 250 USDC
- Authorised program
- Exercise swap contract
- Swap already executed
- No
Which reasoning is correct?
Calculate the ratio between 250 and 25. Distinguish “limit too high” from “funds already stolen”.
Reasoning: A 250 USDC limit authorises ten times the intended 25 USDC. This does not assert that theft has already occurred; it shows that the request exceeds your intention. Return to the permission setting and check the remaining context.
Read the field’s unit and scope, not just its number.
Variation
You reduce the limit to 25 USDC. The displayed contract name resembles the site’s name, but its address has not been verified. Is that enough to accept?
An ERC-20 allowance relates an owner, token and spender on a network. Fixing the amount does not fix the other elements. Use the intended service’s official information; a display name is not enough.
The approval matches: is the swap complete?
For this final fictional situation, the scenario states that the intended site, network and program have been checked. You want to approve exactly 25 USDC. The displayed request is an approval only.
- Action
- Approve spending
- Quantity
- 25 USDC
- Context
- Matches in this scenario
- Swap
- Not requested yet
What does this match let you conclude?
Separate granting spending permission from executing the swap. Which action appears in the documents?
Reasoning: The request matches the stated intention without proving contract safety. Uniswap documents separate approval and swap steps, with details varying by flow. Here you are learning to recognise the stage, not to sign a real operation.
An approval is neither an executed swap nor a safety guarantee.
Variation
Explicit model: a finite allowance of 25 tokens decreases by the amount spent each time it is used. The contract successfully spends 10 tokens. No other changes occur. What allowance remains? This asks for the remaining permission, not the wallet balance.
25 − 10 = 15 tokens still allowed in this model. The wallet balance is a different, missing value. Disconnecting the site does not set this allowance to zero: revocation is separate. Some implementations handle unlimited allowances differently; that is not our case.
A useful companion: Crypto wallets: keys, custody and recovery
THE SHORT ANSWER
A wallet window can request a sign-in, permission to use your tokens or an operation. These are different actions. Start with documented examples, then use four made-up situations to compare your intention with what a request actually permits.
The questions that remain
Is a signature without gas risk-free?
No. The absence of an immediate fee says nothing about the rights granted by a message. Read what it authorises, not just what it costs.
Does a correct answer validate my wallet?
No. The exercise uses fictional situations and analyses no real wallet, site or contract. It teaches reading habits, not a security certification.
Sources and further reading
- MetaMask — Disconnect a wallet from a dapp · in English
- MetaMask — Revoke token approvals · in English
- MetaMask — Signature phishing · in English
- ERC-2612 — Signed token approvals · in English
- ERC-4361 — Sign-In with Ethereum · in English
- Uniswap — Approval transactions · in English
- Circle — USDC contracts · in English
- ERC-20 — Token standard · in English
Page updated on
Documentation checked on · WhyTheBlockchain · Editorial approach