OFFCODE
Sign inCreate account

What You Are Actually Signing: Token Approvals, Permit Phishing, and How to Trade Without Getting Drained

On a self-custodial exchange you do not trust a company with your keys, you trust your own signature. That moves the most dangerous moment in trading to a single click: the approval prompt. Here is what it really grants and how to read one before you sign.

28/06/2026 · 8 min de leitura · self-custody · wallet security · token approvals · DEX · trading education

Self-custody moves one specific risk onto you

The promise of a self-custodial exchange is simple: no operator holds your keys, so none can freeze, lend out, or lose your funds. What you own lives on a public chain, and nothing moves without your signature. That removes the failure mode behind every custodial collapse: the gap between the balance you are shown and the balance that actually exists.

But it relocates risk rather than removing it. When you are the only one who can authorize a transfer, you are also the only one who can authorize a mistaken one. No support desk can claw funds back, because there was no intermediary in the path. Most losses suffered by self-custodial users are not break-ins; nobody guesses a seed phrase. The user signs something they did not understand, and the signature itself authorizes the theft. Understanding what you sign is the core skill of trading without a custodian.

Signing versus sending: two very different prompts

Every wallet interaction is one of two things. A transaction tells the chain to do something on-chain right now: send tokens, swap, open a position. It costs gas, lands in a block, and you can watch it settle. A signature is a message signed off-chain; it usually costs no gas and has no immediate on-chain effect. Because nothing visibly happens and nothing is charged, signatures feel harmless.

That feeling is exactly what attackers rely on. A message signature can authorize someone to move your tokens later, log you into a service, or act as a pre-signed permission slip a contract redeems against your balance whenever it wants. The rule to internalize: a free, gasless prompt is not automatically a safe prompt. What matters is not the cost, it is what the message says.

Token approvals: the standing permission you forget you gave

To trade an ERC-20 token through almost any smart contract, a router, a swap, a perpetuals venue, you first grant an allowance: permission to move up to some amount of that token on your behalf. This is by design; without it the contract could not pull tokens into a trade. For convenience, many interfaces request an unlimited approval: permission to move your entire balance, now and forever, until you revoke it. You approve once, the app never asks again, and you forget the permission exists. It does not expire.

That standing allowance is only as safe as the contract you granted it to. If the contract has a bug, gets upgraded by a malicious key, or was never honest, the unlimited approval is the exact mechanism that lets it drain the token whenever it chooses, with no further signature from you. A long-forgotten approval to a contract that later turns hostile is one of the most common ways funds leave a self-custodial wallet.

Permit and Permit2: the gasless signature that is the real trap

Newer standards let you approve by signing an off-chain message instead of sending a transaction. EIP-2612 permit and the widely used Permit2 contract exist for good reasons: they make approvals cheaper and batch a permission with the action it is for. But the same mechanism is a phishing dream. A malicious site shows a prompt that costs no gas and looks like a routine login. What you are really signing is an authorization letting the attacker pull a specific token, often your full balance, to an address of their choosing.

Because the signature is gasless and off-chain, none of your instincts about an expensive or weird-looking transaction fire. You click, nothing seems to happen, and minutes later the tokens are gone. Treat any signature request with the same suspicion as a transaction. Before signing a permit-style message, read it: which token, what amount, and which address (the spender) you are authorizing. If you cannot tell what a signature grants, reject it and find out.

How to read a signing prompt before you approve it

You do not need to be a developer; you need a short checklist you run every time. First, identify the type: on-chain transaction or off-chain signature? Your wallet labels it, and a gasless signature deserves extra scrutiny precisely because it feels like nothing. Second, find the spender and the amount: a legitimate approval names the contract you are interacting with and ideally a bounded amount close to what you are trading. An unlimited allowance for a small routine trade is a yellow flag.

Third, confirm the context. Did you reach this site through a link you trust, or an ad, a direct message, or a pop-up? Most drain attacks begin with a spoofed front end or a fake claim or migration page that produces a real, valid signature request. The contract is not lying about what you are signing; the website lied about why. A correct signature on a malicious request is still a loss. When in doubt, navigate to the site yourself and never sign from an unsolicited prompt.

Standing habits: revoke, scope, and verify

Treat approvals as something you maintain. Periodically review the active allowances tied to your address with a reputable approval-checker and revoke the ones you no longer use, especially unlimited approvals to contracts you have not touched in months. Prefer bounded approvals when an interface lets you choose, and keep long-term holdings in a separate wallet that never connects to experimental apps. The wallet you trade with holds what you can afford to expose; the wallet you save with signs almost nothing.

This is the discipline self-custody asks of you, and the trade we think is worth making: you carry the responsibility of the signature, and in exchange no operator can move your assets behind your back. OFFCODE is built on that model, a global, self-custodial DEX where you keep control of your keys and your trades, including USDC-margined perpetuals, settle on-chain. The same rule applies here as anywhere on a public chain: read what you sign, scope what you approve, and verify the page before you click.

← Todos os artigos