Guide · Wallets

How to connect MetaMask to a DEX

MetaMask is the most widely used wallet for EVM networks, and connecting it to a decentralized exchange is the gateway to every swap you will make. The process is quick, but a few details — adding the right network, confirming the chain ID, and understanding exactly what a connection authorizes — separate a safe setup from one that leaves you exposed. This guide walks through installing and securing MetaMask, adding networks, connecting to a DEX, and the permissions you actually grant when you click connect.

Install and secure the wallet first

Install MetaMask only from the official browser extension store or the official mobile app listing, never from a link sent to you. During setup you receive a 12-word recovery phrase. Write it down offline and never type it into any website, form, or message — no legitimate site or support agent will ever ask for it. Anyone with that phrase controls your funds permanently. This single habit prevents the majority of catastrophic wallet losses.

Add the network you want to trade on

MetaMask ships with Ethereum mainnet. To trade on BNB Chain, Polygon, Arbitrum, Base, or Avalanche you add each network with its chain ID and RPC endpoint. Most DEX interfaces offer a one-click add-network prompt, which is safer than pasting RPC details manually. After adding, confirm the chain ID shown matches the official value for that network (for example, 1 for Ethereum, 56 for BNB Chain, 8453 for Base) so you are not connected to a spoofed network.

Connect to the exchange

On the swap interface, click connect and choose MetaMask. The wallet opens a prompt showing the site requesting access and the account it will see. Approving this shares only your public address and grants permission for the site to request signatures later — it does not move funds and does not give the site spending power over your tokens. Spending power is granted separately, per token, through approval transactions you confirm individually.

Switching chains mid-session

When you change the network in the DEX, it asks MetaMask to switch chains, and MetaMask prompts you to confirm. Always glance at the network badge in the wallet header before signing any transaction. A surprising number of failed or confusing swaps come down to the wallet sitting on a different chain than the interface, so the balance you expect simply is not visible.

What you are actually authorizing

Three distinct actions exist and it helps to keep them separate: connecting (sharing your address, reversible any time by disconnecting), approving a token (granting a router permission to move a specific token, which you should scope to the amount you are trading), and signing a swap (the actual transaction that moves funds). Reviewing each prompt — what it is, which contract it involves, and how much it authorizes — is the core discipline of safe self-custody.

Legal

Risk disclosure

XAUConnect is a non-custodial swap aggregator. Digital assets are volatile and may lose value rapidly. Content on this page is educational and not investment advice. Verify every contract address on the official block explorer before approving a transaction.

Frequently asked questions

Does connecting MetaMask give a site access to my funds?

No. Connecting only shares your public address and lets the site request signatures. Moving tokens requires a separate approval and a swap transaction that you confirm individually.

How do I add a new network safely?

Use the DEX's one-click add-network prompt rather than pasting RPC details by hand, then verify the chain ID matches the official value for that network in your wallet header.

What if my token balance does not show up?

You are almost certainly on the wrong network. Tokens do not move between chains automatically, so switch MetaMask to the chain where the asset actually lives.

Will anyone legitimate ask for my recovery phrase?

Never. No exchange, wallet, or support agent needs your 12-word phrase. Anyone who asks is attempting to steal your funds.

Live execution

Trade on XAUConnect

Open the swap page to compare live routes, set slippage, and sign from your own wallet — fully non-custodial.

Continue exploring

Related markets, guides & networks

Curated next steps based on this topic — deepen your research before you trade.

Build programmatically

Swap via API for bots and AI agents — quotes, builds, and cross-chain routes.

Developer quickstart