milkshakeswap.finance

What Is a Wrapped Token, and Why Do Swaps Use Them Under the Hood?

A wrapped token is a token that represents another asset on a blockchain where that asset doesn't natively exist. When you swap on a DEX like MilkshakeSwap, you rarely swap one native token directly for another - instead, the swap moves through wrapped versions of those tokens to make the trade possible.

Why wrapped tokens exist

Blockchains are isolated systems. Bitcoin lives on the Bitcoin blockchain. Ether lives on Ethereum. A token like USDC might exist on Ethereum, Binance Smart Chain, Polygon, and a dozen other chains - but each version is a separate contract, not the same token. If you want to swap a native asset for something that isn't native to the same chain, you need a representation of it.

Wrapped tokens solve this. A wrapped token is a smart contract that holds the original asset (or an equivalent) and issues a new token that can move on the target chain. The wrapper is always redeemable for the original asset, usually through a custodian or a bridge.

How Wrapped Tokens Work in a Swap

When you initiate a swap on a DEX, the liquidity pools you're trading against hold pairs of tokens. Those pairs almost always include a wrapped version of the chain's native currency.

For example, on Ethereum-based DEXs: - ETH is the native currency, but most pools trade WETH (Wrapped Ether), not raw ETH. - If you try to swap ETH directly for a token, the DEX's router contract first wraps your ETH into WETH, then swaps the WETH for the other token. - If you're receiving ETH at the end of a swap, the router unwraps WETH back to ETH before sending it to your wallet.

The same pattern repeats across other chains. On Binance Smart Chain, you'll see WBNB (Wrapped BNB). On Polygon, it's WMATIC. The wrapped version behaves identically to the native asset in price, but it conforms to the ERC-20 token standard, which liquidity pools require.

Why pools can't use native tokens directly

Liquidity pools are smart contracts that hold pairs of ERC-20 (or similar standard) tokens. Native currencies like ETH or BNB are not ERC-20 tokens - they have different transfer mechanics and aren't compatible with the standard transfer() and approve() functions that pools expect.

Wrapped tokens bridge that gap. By converting a native asset into its wrapped ERC-20 equivalent, the DEX can treat it like any other token in the pool. This is why nearly every major DEX has a WETH/USDC pool, not an ETH/USDC pool.

The wrapping process in practice

When you swap on a DEX, the wrapping and unwrapping happens automatically inside the router contract. You don't need to manually wrap or unwrap tokens unless you're interacting with a pool directly.

Here's the sequence for a typical swap of ETH for a token like LINK on Uniswap V2 or a similar DEX:

  1. You send ETH to the router contract.
  2. The router wraps the ETH into WETH using the WETH contract.
  3. The router swaps the WETH for LINK in the WETH/LINK liquidity pool.
  4. The router sends LINK to your wallet.

For a swap that ends in ETH, the process reverses:

  1. You send a token (say USDC) to the router.
  2. The router swaps USDC for WETH in the USDC/WETH pool.
  3. The router unwraps the WETH back to ETH.
  4. The router sends ETH to your wallet.

Slippage and wrapped tokens

Because wrapped tokens track the native asset's value 1:1, wrapping and unwrapping does not introduce slippage. The price of WETH is always the same as the price of ETH, minus any gas costs for the wrapping transaction. The slippage you see on your swap comes from the liquidity pool trade itself, not from the wrapping step.

However, the wrapping step does consume gas. Every swap that involves a native currency requires an extra internal transaction to wrap or unwrap. This adds a small amount to the total gas cost of your swap - typically negligible for most trades, but noticeable if you're swapping very small amounts.

Wrapped tokens for non-native assets

Wrapped tokens aren't limited to chain-native currencies. Cross-chain bridges create wrapped versions of assets from other blockchains. For example: - WBTC (Wrapped Bitcoin) represents Bitcoin on Ethereum. - WBNB (Wrapped BNB) exists on Ethereum to allow BNB trading without leaving the Ethereum ecosystem. - Bridged stablecoins like USDC.e on Avalanche are technically wrapped versions of the Ethereum-native USDC.

These wrapped tokens carry additional risks. The custodian or bridge holding the original asset must be trustworthy. If the bridge is exploited or the custodian fails, the wrapped token can become worthless. This is why many DEXs display a warning when you're trading a bridged or wrapped asset that isn't the canonical version on that chain.

Key Takeaway

Every time you swap a native currency on a DEX, you're indirectly using a wrapped token. The wrapping step is invisible to you, but it's what makes the swap technically possible. Understanding this helps explain why some swaps cost slightly more gas than others, and why you might see WETH or WBNB in your wallet after certain transactions instead of the native currency you expected.

Not financial advice. milkshakeswap.finance publishes market data and general information about MilkshakeSwap Token. Crypto assets are volatile and you can lose everything you put in. Nothing here is a recommendation to buy, sell or hold, and we make no price predictions.

Prices are sourced from third parties and may be delayed or wrong. Verify anything you intend to act on against a primary source.

Back to dex swaps