0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Signs of a Crypto Wallet Drainer Before Signing: 6 Checks

0
Posted at

Six pre-sign checks help you spot a crypto wallet drainer before signing. Warning signs are a gasless permit granting transfer rights, an unlimited allowance, an unfamiliar spender, setApprovalForAll, unexpected simulated outflows, and a mismatched domain or chainId. Drainers exploit the permission you grant, which can exceed the action the page advertises.

A cross-chain bridge moves assets between networks for use in the destination network’s DeFi ecosystem. The Berachain bridge is such a bridge for assets entering Berachain; in an illustrative deposit flow, a lookalike page requesting a broad Permit2 signature instead of the expected deposit transaction is a reason to stop.

Pre-Sign Drainer Checks

Pre-sign drainer checks apply when a site sends MetaMask a signature or transaction prompt, especially after “sign to verify.” Expand the prompt and compare its requested rights with your intended action.

  • Gasless permit or Permit2 signature: Read the EIP-712 typed data: spender, amount, deadline, and verifyingContract. EIP-2612’s specification defines how submitting a signed permit sets a token allowance. Signing costs no gas and creates no transaction for you; someone else can submit it later. The deadline limits submission time, not the resulting allowance’s lifetime.
  • Unlimited allowance: Compare the approved amount with the intended deposit. An unlimited cap lets the spender draw more than that deposit until you change the approval.
  • Spender is an EOA or unknown contract: Match the spender address to the intended protocol. An externally owned account or unrelated contract has no clear reason to receive your allowance.
  • setApprovalForAll: This NFT operator approval can authorize transfers of every NFT you hold in that collection, not just the item pictured on the page.
  • Simulation shows unexpected outflows: Simulate the transaction and compare token and NFT balance changes with your intended deposit. Reject a transfer to an unrelated address. A signature may have no simulation because the transfer can happen later.
  • Domain or chainId mismatch: Compare the site address, active chain, and EIP-712 domain. The verifyingContract identifies the signature verifier; chainId binds it to a chain. Reject an unexplained mismatch.

Say you intend to deposit one token through a bridge. Before review, an illustrative “sign to verify” label sounds like account access; after expanding the prompt, you see a spender and long deadline. The deposit and wallet balance stayed the same, but you found that signing would authorize another party to spend. Close the prompt and return to the verified deposit flow.

Related

How to revoke token approvals?

Revoke an existing token approval by setting that spender’s allowance to zero in a trusted wallet approval view or token contract interface, then confirm the transaction. Review Permit2’s separate spender permissions too. Disconnecting a site leaves on-chain allowances in place.

What is a Permit2 signature?

A Permit2 signature authorizes token spending after you have approved the token for the Permit2 contract. Uniswap’s Permit2 overview distinguishes one-time SignatureTransfer from AllowanceTransfer, which creates a time-bound spender allowance. Read the token, spender, amount, deadline, and any expiration before accepting either path.

Before signing, act in this order:

  • Verify the site address and active chain.
  • Read each permission and identify the spender.
  • Simulate the transaction; sign only when its effects match your intended action.
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?