Skip to main content
Crypto News Week

Crypto markets, protocols and policy

Can a connected DEX spend your tokens without approval?

What does connecting a wallet allow a DEX to do? It reveals permitted addresses and lets it request transactions; token approval grants spending authority.

The Crypto News Week Editors3 min read

Can a connected DEX spend your tokens without approval?

Connecting a wallet lets a DEX such as SyncSwap see the addresses you permit and request transactions; an ERC-20 token approval gives a spender authority to use tokens within an allowance. For you, the key difference is that a connection shares access to an address, while an allowance authorizes token spending.

SyncSwap is a decentralized exchange for trading tokens and using liquidity pools on supported networks. Its syncswap pools use tokens, but connecting MetaMask to SyncSwap does not itself approve those tokens for spending.

Connection and token allowance grant separate permissions

When you connect MetaMask, you choose which account to share. The site can use that permitted address and propose transactions for your wallet to review and authorize. MetaMask’s permission controls let you review connected accounts and disconnect a site.

Token spending uses a separate authorization in the token contract. Under ERC-20, an allowance is recorded for an owner and a spender: the token contract tracks how much that spender may withdraw from that owner. The spender is commonly a router contract that carries out a swap.

Say you approve 100 USDC to a verified router. That allowance applies to USDC, your wallet address, that spender address, and the chain where the token contract lives. The router can use the approved amount through the token’s transfer function; connecting the wallet alone does not create this authority.

  • Wallet connection: shares the account or accounts you permit and lets the DEX request wallet actions.
  • Token approval: sets an allowance for a token contract, owner, spender, and chain.
  • Permit signature: can let a supported token establish an allowance after a relayer or app submits the signed message.

With ERC-2612, the permit message includes the owner, spender, value, token domain, and deadline. The domain identifies the token contract and chain. Review those details before signing; the signature authorizes a permit submission that can set the allowance onchain.

The deadline limits when someone can submit the permit. Once a valid permit has been submitted and the token contract has established the allowance, that allowance can remain after the deadline passes. The deadline is not an automatic expiry for the resulting allowance. It can be reduced by spending, overwritten with a new approval, or revoked through a separate onchain change.

Disconnecting SyncSwap in MetaMask removes the site’s connection access, but does not revoke a token allowance already recorded in a contract. If you want to remove remaining spending authority, use a separate onchain allowance change or revocation.

Related

Does approving tokens reveal my private key?

No. Signing keeps your private key within the wallet; the wallet produces a signature for the approval or permit request.

Does every wallet signature cost gas?

No. Offchain signing itself incurs no network gas. A permit still needs to be submitted onchain to establish the allowance, and that transaction may require gas.