LFi Docs
Search…
⌃K

Swap

Swap

L-Finance decentralized exchange (L-DEX) allows users to swap between tokens in the most efficient way possible.

How Swaps Work

Swapping tokens is one of the most fundamental functions of a DeFi DEX. Decentralized exchanges like the L-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 a protocol utility token, like LFI, can use the L-DEX to swap it with an existing token, such as the LYO Credit (LYO) or BNB Chain token (BNB) or BNB stablecoin (BUSD). The user now has a utility token which they can vest to earn rewards and participate in governance DAO.
  • A user who is interested in supporting a particular crypto project on BNB Chain can use the L-DEX to buy a listed project's token. 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 L-DEX to trade their project tokens for BUSD or other listed stablecoins at any time, for any reason, without requesting permission from a centralized source.

Trading Fees

⚙️ More information will be shared soon!

Slippage

While token swaps on the blockchain occur at very high speeds, 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 a user submits a swap on the L-DEX, they select a slippage tolerance amount, which is the price difference they are willing to accept as the trade is executed. Slippage tolerance can be between 0.20% and 2.00% and has a default value of 0.50%. If the price difference between submission and confirmation of the trade exceeds the selected 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.

Price Impact

Slippage arises not only from the change in prices from other users’ trades, but also from the trade submitted. This is called price impact, and it is expressed as a percentage at the bottom of the swap module. Price impact is dictated by the constant product formula: if the slippage tolerance is below the price impact of the trade, the trade will fail.

Tx Deadline

Swaps have a default transaction deadline of 20 minutes before they time out and fail. This ensures that incomplete transactions do not remain in a user’s wallet indefinitely. The time limit can be adjusted in the settings of the swap page.