cryptonist
A bank vault standing open, its door thickness and locking mechanism visible

Wallets

Wallet drainers: how one signature empties a wallet

A wallet drainer is phishing software that has no use for your recovery phrase. It needs one signature of the right kind from the wallet that holds the assets, and it is built to ask for whichever kind will move the most. That signature might be a transaction you pay gas for, or a message that costs nothing and leaves no trace until the attacker submits it.

What a drainer is

What a wallet connection approves sets out the difference between connecting and approving, and why an allowance outlives the visit. A drainer is that difference run as a business. Scam Sniffer, a security firm that publishes annual figures on the problem, defines it as “phishing infrastructure deployed on malicious websites that induces users to sign harmful transactions, enabling rapid asset extraction” (2025 report).

It is sold as a service. Ledger’s report on the December 2023 compromise of its Connect Kit library describes the kit used there, Angel Drainer, as “a malware as a service” and “a complete infrastructure specialized on EVM chains that deploys smart contracts on demand and crafts tailored transactions in order to maximize damage”. Ledger observed on-chain that stolen funds were split “85% to the exploiter and 15% to Angel Drainer”. The kit fitted its request to the asset: “For ERC20 and NFT tokens, it requests users to sign approval and permit messages”, and for native coins it asked for “a fake ‘claim’ transaction where the claim method simply sweeps the funds” (Ledger). How that compromise reached hardware-wallet users is covered in how hardware wallets work.

Scam Sniffer’s counts are an industry estimate and are presented as one here: $295M taken from 324,000 victims in 2023, $494M from 332,000 in 2024, and $83.85M from 106,106 in 2025. They cover EVM chains only, and only drainers operating through phishing websites; Scam Sniffer values assets at the time of theft and calls the figures a lower bound.

Approvals: the transaction kind

The oldest request is an ordinary transaction. Under ERC-20, approve “allows _spender to withdraw from your account multiple times, up to the _value amount”. The drainer asks for the maximum and calls transferFrom later, from its own address. You pay gas for the approval, it appears on-chain at once, and a wallet that decodes it can show the spender and the amount. A drainer’s approval differs from a legitimate one only in who the spender is.

NFTs carry a broader grant. ERC-721’s setApprovalForAll exists to “enable or disable approval for a third party (‘operator’) to manage all of msg.sender’s assets” in that collection. One call covers every item, and there is no amount to read. DefiLlama’s hacks record has a technique for the project-level version, Token Approval Abuse, though the record lists incidents at projects and venues, not individual wallets drained.

Signatures that move tokens

EIP-2612 added permit, a function that “allows users to modify the allowance mapping using a signed message, instead of through msg.sender”. The owner signs a structured message naming owner, spender, value, nonce and deadline, in the typed-data format of EIP-712, and anyone holding the signature can submit it. The standard is candid about what that hands over. A relayer that receives a permit “is essentially given a free option to submit or withhold” it, and the deadline “can be set to uint(-1) to create Permits that effectively never expire”.

That is how a signature moves funds without a transaction you paid for. You sign, you pay nothing, and nothing appears on-chain. The drainer submits your permit and a transferFrom in a transaction of its own, paying the gas itself, and the first public record of your approval is the record of its use.

Permit2, a contract published by Uniswap, extends the idea to any ERC-20 token. A user approves the Permit2 contract once per token, commonly for the maximum amount, as Uniswap’s documentation shows. After that, spenders are authorised by signed messages: a one-off SignatureTransfer, or a standing AllowanceTransfer with an expiry. A wallet that has used an application built on Permit2 therefore holds standing approvals to one contract, and a signature naming a new spender can draw on them. Scam Sniffer’s largest single theft of 2025 was $6.5M “via Permit signature” in September, and Permit or Permit2 signatures account for three of the eleven cases of $1M or more in its table.

Signing away the account

EIP-7702 lets an ordinary account set code on itself. It came to Ethereum mainnet with the Pectra upgrade, which the Ethereum Foundation scheduled for 7 May 2025. The owner signs an authorization naming a contract, and once that is included in a transaction, “all code executing operations must load and execute the code pointed to by the delegation”. Authorising a malicious contract hands it the account and everything in it, with no per-token approval needed.

The EIP’s authors address wallets directly: “There is no safe way to provide this interface. The code specified by an authorization has unrestricted access to the account”. Applications “must not expect that they can suggest the user sign an authorization”. An authorization signed with chain ID zero is valid on every chain, and the specification says as much: “When universal deployment is preferred, simply set chain ID to 0.” Scam Sniffer’s 2025 report says malicious EIP-7702 signatures “emerged after the Pectra upgrade, with 2 large cases in August”.

How to read a signing request

The kind of request tells you the category before the content does.

  • A transaction has a recipient, an amount of the native coin and a data field. If the data calls approve, increaseAllowance or setApprovalForAll, it is a grant, and the address inside it is the one that will hold the power. The site’s domain and the contract in the request are separate facts.
  • A plain message, requested through personal_sign, should be readable text. MetaMask’s developer documentation presents the method as a way to request “human-readable signatures” (MetaMask). A sign-in message has no reason to name a spender or a token.
  • Typed data, through eth_signTypedData_v4, is EIP-712 structure, and it is where permits live. Read the primary type (Permit, PermitSingle, PermitBatch, PermitTransferFrom) and the verifying contract, which is either a token or Permit2, deployed at 0x000000000022D473030F116dDEE9F6B43aC78BA3 on every chain Uniswap supports except zkSync. Then read the spender, the amount and the deadline. A permit to an unfamiliar address, for the maximum, with a deadline decades away, is the signature a drainer is fishing for.
  • A hash or an undecoded hex string is a request to sign blind. EIP-712 was written because signed messages were “an opaque hex string displayed to the user with little context”, and MetaMask lists the older eth_sign method as deprecated.

A website asking for an authorization to delegate your account is the warning by itself, on the EIP’s own reasoning. And a wallet that cannot decode a request leaves the reading to you, in hex. What actually separates one crypto wallet from another treats what a wallet shows before you sign as the largest practical difference between two of them.

Revoking, and what it cannot undo

Revoking an on-chain approval uses the same function with a zero. Calling ERC-20 approve again “overwrites the current allowance”, so an approval of zero ends it, and ERC-721’s setApprovalForAll takes false “to revoke approval”. Explorer tools such as Etherscan’s token approval checker list what an address has granted and send the revoking transaction. Each revocation costs gas.

Permit2 has two layers. Inside it, an allowance re-approved with an expiration of zero ends at once (“Passing 0 expires permissions at block.timestamp”, in Uniswap’s reference), lockdown revokes several “by batch revoking approvals”, and unused signatures can be cancelled with invalidateNonces or, for one-off transfers, invalidateUnorderedNonces (Permit2’s allowance and signature interfaces). Underneath, revoking the token’s own approval of the Permit2 contract cuts off every Permit2 route for that token in one transaction.

An EIP-2612 permit that has not been submitted is invisible to every approval checker, because it is not on-chain yet. It ends at its deadline or when its nonce is used; the standard notes that a signer who holds ETH “can also just submit the Permit themselves, which can render previously signed Permits invalid”. An EIP-7702 delegation is cleared by authorising the zero address, which the specification treats as resetting the account’s code. A signed authorization that has not yet been used also lapses on a chain once the account sends a transaction there, because the specification requires the authorization’s nonce to equal the account’s current one.

None of it recovers anything. Revocation closes routes for the future, and tokens already moved are gone. How crypto wallets actually fail places this, an authorisation the owner gave, second among the ways funds leave a self-custodial wallet. Anyone who then offers to get the money back for a fee is running a different fraud, set out in crypto recovery scams. The losses recorded at projects rather than people are read in how crypto gets hacked, and the record’s Phishing technique has a data page of its own.