What is swap in crypto

Why are crypto swaps needed?

Terminology

Other types of swaps

Atomic swap

Cross-chain bridges

Wrapped tokens

Soft fork and hard fork

Each digital coin or token is initially created on some kind of blockchain, which becomes the platform within which the cryptocurrency project will develop. Sometimes it may be necessary to transfer a digital asset to another blockchain. The process of such a transfer is called a token swap.

What is swap in cryptocurrency

Token swap is the process of exchanging one digital asset for another according to pre-established rules. Unlike a regular purchase or sale transaction, a swap involves replacing one token with another, that is, the user receives a new asset, while the old one loses its relevance.

A swap can occur in different scenarios:

  • The user sends his tokens to a special account and receives new ones in return.

  • A community member receives new assets into his account, while the old ones do not disappear, but they can no longer be used in the project.

  • The user simply holds the cryptocurrency in the account of the online service (exchange, wallet, etc.), and the administration carries out the exchange and credits new assets.

There are other scenarios, the mechanisms of which depend on the decisions of the developers.

The replacement can be done within the same network or between different blockchains.

Why are cryptocurrency swaps needed?

A swap may be necessary in several cases:

  • Token update. An issuer may decide to update its cryptocurrency—for example, to change its ticker or functionality. Then the old asset is exchanged for a new one through a swap.

  • Blockchain replacement. A project can move from one blockchain to another and at the same time transfer all the cryptocurrency.

  • Changing characteristics of the blockchain. Sometimes developers change network features without switching. In this case, a new token can be created that replaces the existing one.

  • Merging or splitting projects. Two or more projects may decide to merge or split. Then a new cryptocurrency is created, which can be received in exchange for the old one.

  • Changing the economic model. The project may revise its economic model, for example, change the issue or staking conditions. This can also create a new asset.

Sometimes, when conducting a token swap, other goals are also pursued. But in any case, it is associated with project updates as decided by the developers or community.

One example of a successful swap is the BNB exchange. This token was created in 2017 on the Ethereum platform, and in 2019 the native blockchain Binance Chain (now BNB Chain) appeared. The process of exchanging ERC-20 tokens for BEP2 has been launched. However, some holders are still holding their BNB on Ethereum, so the swap is not yet complete.

Terminology

The functions of decentralized networks allow for several related processes related to swaps, and users and developers can refer to them with similar or identical terms. This sometimes causes confusion.

For example, there are three types of swaps:

  • token-to-token exchange;

  • exchange of coin for coin;

  • exchange of coin for token.

Technically, these are different things, but in discussions for either process the same terms may be used: “token swap” or “coin swap”. The third option is sometimes called coin to token swap.

There is also the concept of “token migration” (or “coin migration”), which refers to the same process as the word “swap”. However, technically these are also slightly different things. Migration is the process of moving from one blockchain to another, and swap is the transaction itself to exchange assets.

This doesn't really matter to users. All these terms mean the same thing - replacing one digital asset with another.

Other types of swaps

Participants in the cryptocurrency market can use services that are built on different blockchains. To do this, they need the appropriate tokens. It is logical that sometimes they may need to exchange digital assets between independent chains or off-chain - outside the blockchain.

Such exchange transactions are also called swaps, and different instruments can be used for them.

Atomic swap

It is the process of exchanging one cryptocurrency for another without the need for a centralized exchange or intermediary. The exchange is carried out directly between two counterparties using smart contracts on the blockchain.

To carry out a transaction, users must agree to the proposed conditions, including the price and quantity of assets exchanged. As a result, a double transaction will be automatically completed. At the same time, the decentralized system guarantees that each counterparty will fulfill its obligations.

Cross-chain bridges

This is a technology that allows you to transfer the same asset between different blockchains.

There are several types of cross-chain bridges, which differ in their goals:

  • for moving tokens of different standards (ERC-20, BEP-20 and others);

  • movement of cryptocurrencies that are built using different technologies (bitcoin, ethereum, polkadot, etc.);

  • to move between second-level add-ons (Arbitrum, Optimism and others).

When transferring, “wrapped tokens”, liquidity pools, relay nodes and other necessary tools can be used.

Wrapped tokens

This is the name given to a copy of a cryptocurrency that exists on another blockchain, but is tied to the value of the original asset. For example, wrapped bitcoin (wBTC) is an ERC-20 token that duplicates the original bitcoin (BTC). Typically, the creation of such assets is controlled by a custodian - an organization that holds the underlying cryptocurrency while the user holds the wrapped token.

The wrapping process looks like this:

  • the trader sends the coins he wants to wrap to the custodian’s account;

  • in return, the custodian transfers the same number of wrapped tokens.

Why do you need to exchange cryptocurrency for wrapped tokens? The trader can use the received wrapped tokens at his own discretion. In most cases, they are created for trading on decentralized exchanges. These assets also improve the interoperability of different blockchains, allowing the functionality of certain tokens to be used in networks other than those on which they were created.

Soft fork and hard fork

These concepts do not relate to swaps, but have some similar features:

  • A soft fork is an editing of the blockchain code in order to change its functions. The token does not change.

  • A hard fork involves a more radical change that results in the creation of a new blockchain that is incompatible with the previous one. At the same time, a new cryptocurrency is being created.

That is, forks and swaps are similar in that in both cases the token receives new functions or moves to a new blockchain. However, as a result of forks, one asset is not replaced by another.