Skip to main content

Native tokens

In blockchain networks the "native token" - for example, Ether (ETH) on Ethereum and Arbitrum One & xDAI (xDAI) on Gnosis Chain - is the primary digital currency. It's essential for network operations, like paying transaction fees.

"Wrapped" tokens - for example, Wrapped Ether (WETH) & Wrapped xDAI (wxDAI) - are ERC-20-compatible versions of these native tokens.

They exist to improve interoperability with decentralized applications. The native token and its wrapped version are equivalent to each other, and a user is always allowed to turn one into the other ("wrap" or "unwrap") at a rate of 1:1.

Buying native tokens such as ETH on CoW Protocol is straightforward. However, CoW Protocol is only natively capable of selling ERC-20 tokens - not native tokens. This is because the protocol's intent-based architecture relies on solvers to trade the sell tokens on behalf of its users. Doing so is only possible thanks to ERC-20's concept of approvals, which allow certain "spender" contracts to manage funds on the user's behalf.

Despite this, CoW Protocol provides two ways for users to sell their native tokens:

  • Option 1) Wrap native tokens before swapping: Wrap the native token into an ERC-20 token (e.g. ETH to WETH) and then swap WETH Gaslessly on CoW Protocol; or
  • Option 2) Use Eth-flow: Place a single transaction in a special contract that wraps + places your order.
tip

Wrapping is best for returning users. Also, if you plan to sell the native tokens over multiple orders, its best to wrap all ETH together, so you only pay the gas fee once.

If this is a one-off swap, consider using Eth-flow instead.

Option 1) Wrap native tokens before swapping

Wrapping before swapping requires an extra step. However, users who wrap before swapping get the following benefits:

  1. Lower overall fees (if you need to swap multiple times)
  2. Lower default slippage
  3. No fees for failed swaps

The CoW Swap UI has built-in support for wrapping native tokens. To do this, simply select the native token you want to wrap (e.g. ETH) as your sell token, then select its wrapped ERC-20 counterpart (e.g. WETH) as your buy token.

The button will automatically change from "Swap" to "Wrap".

Wrapping Native tokens

Wrapping the native token is an on-chain transaction and requires a gas fee.

After wrapping the token, you can simply select the wrapped token as your sell token and continue with your swap.

Option 2) Use Eth-flow

In an attempt to smoothen the user experience, CoW Protocol has introduced the Eth-flow contract. This allows users to automate the above process and wrap + swap in a single on-chain transaction.

Eth-flow get the following benefits:

  1. Lower overall fees (if you need to swap just once)
  2. Simpler UX (single transaction)
  3. You don't need to approve WETH explicitly in order to sell it

Using the Eth-flow contract is faster than wrapping and swapping (as discussed above). However, because an Eth-flow transaction is on-chain (unlike most CoW Swap swaps), the user must pay an up-front gas fee in the native token. This fee is not refunded if the order fails.

Swap Native tokens

To use the Eth-flow contract, first select the native token you want to swap (e.g. ETH) and the token you want to buy (e.g. COW).

Then click "Swap". CoW Protocol will automatically detect if the native token needs to be wrapped and will execute the Eth-flow contract on your behalf.

After selecting your tokens, CoW Swap will prompt you to confirm the swap. This will be a single on-chain transaction that will wrap your native tokens (if required) and place the order on CoW Protocol.

Confirm Native tokens

tip

If you intend to swap ETH frequently, consider wrapping some of your Ether into WETH to save on network fees.

The network costs of using the Eth-flow multiple times are typically higher than wrapping the native token a single time and swapping with WETH multiple times on CoW Protocol. Moreover, non-native token swaps allow for gasless cancellations.

Once you have confirmed the swap, your wallet will prompt you to sign and create the on-chain transaction interacting with the Eth-flow contract. On completion of this transaction, your order will be placed on CoW Protocol.

Eth-flow Transaction

note

When using the Eth-flow contract, your order is only placed once the transaction that sends your ETH into the Eth-flow contract is confirmed.

This means you may see ETH missing in your account before the buy tokens arrive.

Fear not! If the order fails, your ETH can be refunded into your account. The refund can be triggered by any account and should happen automatically if you used the CoW Swap UI. If not, get in touch with us for help at info@cow.fi!

note

The Eth-flow option is ONLY available for Swaps.

note

The Eth-flow option is NOT available for Smart Contract wallets in CoW Swap.

tip

While the CoW Swap UI doesn't support the Eth-flow contract, it's possible to bundle the wrap, approval (if needed) and order placement via the special integration with the Safe when using CoW Swap's Safe app.

Cancel eth-flow order

Like regular swap orders, Eth-flow orders can also be cancelled.

note

Beware that only on-chain cancellation is possible.

First, open the activity panel by clicking on your address at the top right

Then, click on Cancel order in your pending order.

Confirm the cancellation, then sign the transaction in your wallet. You are done!

note

Please note that our solvers can be quite quick, so it is entirely possible that your order will have already been filled before it can be invalidated.

The original Eth amount will be refunded as part of the cancellation transaction.