Skip to the article
Web3 News

Crypto markets, protocols and policy

Why a DEX Aggregator Appears in MetaMask Swaps

Why a DEX aggregator appears in MetaMask Swaps: the wallet can use the aggregator's routes for token swaps.

Web3 News Editorial3 min read

Why a DEX Aggregator Appears in MetaMask Swaps

ParaSwap appears in MetaMask Swaps because MetaMask can get swap quotes through the aggregator's infrastructure. It is a DeFi trading protocol that aggregates liquidity from multiple decentralized exchanges and returns a route for swapping one token into another. The wallet interface and the service that finds an execution route are different layers.

MetaMask gathers quotes from several providers; the aggregator can supply one routed candidate. MetaMask's published swap liquidity sources include the aggregator, so it can appear as the provider on a quote. A quote request sent directly to ParaSwap returns a route for the wallet to settle. Most users read that provider label as the venue that will fill the trade. It is not the venue; it is the service that found the executable path.

Why the provider label names the route, not the venue

The provider label names the service that supplied the route, not the venue that filled the trade. Take a USDC-to-DAI swap on Ethereum. The quote includes token amounts, network fee, and provider label. Behind that display, the aggregator checks pools and returns a priceRoute: the sequence of pools and amounts that turns USDC into DAI. A Market priceRoute is the live quote; the transactions endpoint turns it into calldata.

For a native-ETH-funded Market swap, the wallet calls POST /transactions/{chainId} on the aggregator's API. That endpoint converts a Market priceRoute into calldata, the encoded instructions that settle the trade. The ETH needed for the swap is supplied through transaction value. After the user authorizes the swap, the wallet submits the transaction to Ethereum, and the receipt records the executed amounts.

What to keep when the trade settles

For a recurring team trade, retain four records: approval spender, provider, execution receipt, and token amounts. The approval spender is the contract the wallet authorized to move the source token. The provider is the service that returned the quote. The execution receipt is the on-chain transaction that settled the swap. The token amounts are the input and output values in that receipt.

  • Approval spender: the smart contract authorized to spend the source token.
  • Provider: the service that supplied the quote, labeled by the wallet.
  • Execution receipt: the on-chain transaction that settled the swap.
  • Token amounts: the exact input and output recorded in that receipt.

Record the provider and underlying execution venues separately: an aggregator-sourced quote can route through other protocols. The provider label alone does not tell you which DEXes handled the fills. The receipt, matched with the calldata created from the priceRoute, does.