Comment on page
Highly Efficient Automated Market-Making System
Swapline is built on top of Liquidity Book, a highly efficient automated market-making system that allows traders to do large trades with zero slippage.
Read below to learn the basics of swapping:
Swapping tokens is one of the most fundamental functions of a DeFi DEX. Decentralized exchanges like the Swapline 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.
- A user who wants to buy the native chain token, like OP token, can use the Swapline DEX to swap it with an existing token, such as the ETH token ($ETH) or a stablecoin ($USDT). 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 Fantom or Optimism Chain can use Swapline to buy a listed project's token with ETH, USDT, 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 Swapline DEX to trade their project tokens for USDT or USDC or any other listed stablecoins at any time, for any reason, without requesting permission from a centralized source.
Swapline collects a dynamic trading fee every time users swap tokens on the exchange. A portion of the fees (10%) goes to the Swapline Treasury, and the majority (90%) 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 Swapline DEX, 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 Swapline if the trade is moving the price from one bin to another. If the trade 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.
Swapline'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: Swapline 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.