warm background

What is a crypto swap? How swapping works

What is a crypto swap? How swapping works
AdminAdmin
Published on 6 min read

A swap is exchanging one cryptocurrency directly for another in a single transaction, without converting to cash in between. Trade ETH for USDC and you have swapped.

Two quite different things hide behind the word. On an exchange, a swap is a simplified interface over a normal trade. On-chain, it becomes a smart contract execution with entirely different mechanics and risks.

Swapping on an exchange

Simplest version, and what most people mean by it.

You choose two assets, enter an amount, and confirm. Executing against its order book, the platform updates your balances instantly. Because no blockchain transaction occurs, no gas fee applies.

Underneath, a sell and a buy presented as one action. The interface hides the trading pair entirely.

Swapping on-chain

Different machinery. The risks share almost nothing with those of trading on a platform that holds your assets for you and can be held accountable when it fails to.

  1. Connect a wallet to a DEX.
  2. Approve the token for spending by the contract, which is a separate transaction with its own fee.
  3. Submit the swap.
  4. The contract executes against a liquidity pool, and tokens arrive in your wallet.

Rather than matched orders, price comes from the pool's reserves. An AMM formula determines what you get, and pool depth determines how far the price moves against you.

That approval step in the middle is where losses happen. Granting a contract permission to spend your tokens creates a standing authorisation, and wallet drainers depend on exactly that mechanism remaining live long after the swap you originally wanted has settled.

Exchange swap vs on-chain swap

Exchange swapOn-chain swap
CustodyPlatform holds assetsYou hold your keys
Gas feeNoneYes, plus approval fee
SpeedInstantBlock confirmation time
Available assetsReviewed listingsAnything with a pool
Price sourceOrder bookPool formula
Main riskPlatform failureApprovals, MEV, contract bugs

Swap vs trade vs convert

Three words used loosely, and the differences between them are worth knowing before you pick which interface to use for a trade of any real size.

A trade happens against an order book, where you set a price or accept the market's. A swap is typically a simplified interface: you specify what you want and accept the quoted rate. A convert function usually means the same as a swap, at a rate the platform sets.

Control is the distinction. Trading gives you order types and visible depth. Swapping gives you speed and fewer decisions, at a rate that may embed a wider spread.

For small amounts the trade-off rarely matters. For large ones it does.

What determines the rate you get

  • Pool or book depth. The main driver. Thin liquidity means slippage, which frequently exceeds any fee.
  • The route. Swapping between two obscure tokens often routes through an intermediate asset, incurring costs twice.
  • The spread. Simplified swap interfaces can quote a wider spread than the underlying order book shows.
  • Network congestion. On-chain, gas costs and pending transaction ordering both affect the outcome.
  • Trade size relative to the pool. A $500,000 swap against a $1 million pool moves the price dramatically.

Cross-chain swaps

Worth separating, since the risk profile changes completely.

Swapping ETH for SOL means moving between two blockchains that cannot see each other. Doing so requires cross-chain infrastructure, and bridges have been the most reliably exploited component in crypto. Chainalysis estimated roughly $2 billion stolen across 13 bridge incidents in 2022 alone.

Requiring no third party, an atomic swap is the trustless alternative. It also needs a counterparty wanting the exact opposite trade at the same moment, which is why it never scaled.

A regulated exchange sidesteps the problem differently. Through one account, assets on different networks trade with nothing passing through a bridge contract.

Common mistakes

  • Ignoring the approval. Unlimited approvals persist until revoked.
  • Wide slippage tolerance. Sandwich bots exist specifically to exploit it.
  • Swapping tiny amounts on mainnet. Gas can exceed the value of the trade.
  • Assuming the quote is the price. Estimates move.
  • Wrong network on withdrawal. Sending a token over a network the recipient does not support loses it.

Put this into practice on mb.io

Behind every quote sits depth, and behind every balance sits a venue.

mb.io is a regulated crypto spot exchange backed by MultiBank Group, a financial institution founded in 2005 that serves more than 2 million clients across 100+ countries.

  • Regulated by VARA in the UAE and AUSTRAC in Australia
  • Buy, sell, and swap in three steps, from sign-up to purchase
  • 40-nanosecond execution speed
  • 10/10 security score from Hacken, an independent blockchain security auditor
  • Institutional-grade MPC custody powered by Fireblocks, with segregated client funds
  • 24/7 multilingual customer support

Open your account and start trading on mb.io.

Frequently asked questions

What is the difference between a swap and a trade?

Executing against an order book, a trade gives you order types and visible depth. A swap is a simplified interface where you accept a quoted rate. Faster, and capable of embedding a wider spread.

Do I pay gas fees on a swap?

On-chain, yes, plus a separate fee for the token approval. On a centralized exchange, no, since the swap updates internal balances rather than settling on a blockchain.

Why did my swap give me less than the quote?

Slippage. Quotes are estimates, and the price moves as your trade executes. On thin pools, or with a wide tolerance set, the gap can run several percent.

Can I swap between different blockchains?

Yes, through cross-chain infrastructure, and the risk profile changes considerably. Most exploited component in crypto is bridges, with roughly $2 billion stolen across 13 incidents in 2022.

What is a token approval and why does it cost extra?

Permission for a contract to spend tokens from your wallet, submitted as its own transaction with its own fee. Unlimited and persistent until revoked, approvals are what drainers exploit.

Is swapping the same as converting?

Usually, yes. Both mean exchanging one asset for another at a quoted rate, rather than placing an order on a book.

Which is cheaper, an exchange swap or a DEX swap?

For most retail sizes, the exchange, since no gas fee and no approval cost apply. DEX swaps make sense for tokens no regulated venue lists, at the cost of gas and higher risk.

How do I avoid losing money on swaps?

Check depth against your trade size, set slippage tolerance tightly rather than generously, confirm the network before withdrawing, and review what any token approval actually authorises before signing.

RELATED POSTS

Frequently Asked Questions

Frequently Asked Questions

My Account
What is mb.io?mb.io is a secure, regulated crypto exchange designed to make cryptocurrency trading simple, fast, and stress-free. Whether you're buying your first Bitcoin or managing a diversified portfolio, mb.io gives you the tools you need without the complexity.Built on institutional-grade security and backed by MultiBank Group, mb.io offers spot trading with competitive fees, MPC-powered custody, and a clean interface that adapts to your experience level. Trade with confidence knowing your assets are protected by the same security standards trusted by major financial institutions.How long does account verification take?Most verifications are completed within a few minutes.Once you submit your documents, our system reviews them automatically. If everything looks good, you'll be verified and ready to trade almost immediately.In some cases, we may need to review your documents manually. This can add a bit of time, but it's usually still done the same day.Why is my account verification pending?If your verification is taking longer than expected, here are a few common reasons: Document quality issues: Blurry photos, missing corners, or glare can slow things down.Mismatched information: The details on your documents need to match what you entered during signup.High volume: During busy periods, manual reviews can take a bit longer. If your verification has been pending for more than an hour, contact our support team. They'll check what's happening and help you get verified quickly. They're available 24/7 via live chat or email.
Adding Funds
Withdrawing funds
Features
Regulations
Client Support
Account Security
Deposits & Withdrawals
View more