▶️Swap
Last updated
Last updated
Swapping tokens is one of the most fundamental functions of a DeFi DEX. Decentralized exchanges like the MagicSea DEX allow users to send their tokens into the protocol and receive as close to an equal value of another token as possible, after accounting for transaction fees, slippage, and price impact.
In the world of DeFi, smart contracts dictate each step of a swap transaction, with no human or centralized intermediaries involved. This gives users several advantages relative to traditional or centralized currency exchanges, including:
Fast transaction speeds
Permissionless trading
Flexibility and access to a wide variety of tokens
Markets that are always open
Most importantly, swapping between tokens allows users to take advantage of unique opportunities within DeFi.
For example:
A user who wants to buy the native chain token, like IOTA token, can use the MagicSea DEX to swap it with an existing token, such as the ETH token ($ETH) or a stablecoin ($USDC). The user now has a utility token which they can hold, stake to earn rewards.
A user who is interested in supporting a particular crypto project on Shimmer or IOTA can use MagicSea to buy a listed project's token with IOTA, USDC, or any other of the tokens listed on the DEX. At any hour, they are free to swap tokens at fast speeds without the permission of an intermediary.
A user who wants to consolidate crypto tokens into stablecoins to add stability to their portfolio can use the MagicSea DEX to trade their project tokens for USDC or USDT or any other listed stable coins at any time, for any reason, without requesting permission from a centralized source.
MagicSea collects a fee every time users swap tokens on the exchange. A portion of the fees goes to the Magic LUM Staking Pool, and the rest is distributed to liquidity providers.
While token swaps do occur at very fast speeds on the blockchain, there can still be a (usually small) difference between the price you see when you submit a swap transaction, and the price that applies when the transaction is recorded on the blockchain. This difference in prices is called "slippage".
When you submit a swap on the MagicSea, you select a "slippage tolerance" amount, which is the pricing difference that you are willing to accept while the trade is executing. While slippage tolerance ranges between 0.10% and 1.00%, the default slippage tolerance is 0.50%. However, If the price difference between submission and confirmation of the trade exceeds that amount, the trade will fail.
If the token you are trading has a reflect fee, then the slippage tolerance will need to meet or exceed the reflect fee percentage for the trade to succeed.
Slippage occurs not only from the change in prices from other user's trades, but also from the trade you submit. This is called "price impact", and it's expressed in percentage at the bottom of the swap module. If your slippage tolerance is below the price impact of your trade, the trade will fail. An price impact (or slippage) occurs only on MagicSea if the trade is moving the price from one bin to another. If the trade goes through a liquidity book pool and stays in the same active bin, then the swap is slippage free.
Swaps have a default transaction deadline of 20 minutes before they time out and fail. This ensures that incomplete transactions do not remain in your wallet indefinitely. You can adjust this time limit in the settings of the exchange window.
MagicSea's Expert Mode turns off the Confirm transaction prompt and allows high slippage trades that can result in bad rates and lost funds. Expert Mode can also allow you to send the tokens you're trading into to an address other than your own. We recommend you enable this mode only if you are an experienced user who understands these risks well.
Expert Mode Warning: MagicSea makes no warranty on Expert Mode transactions, and is not responsible for exchanges made at lower-than-market rates, lost funds, or tokens sent to wallets out of your control. Expert Mode transactions are made at your own risk.