🪐
Awaken Finance
  • Introduction
  • Swap
    • Swap Guide
  • Lending
    • Lending Guide(testnet)
  • Farm
    • Farm(testnet)
  • Dividend Pool
    • Dividend Pool(testnet)
  • Tutorials
    • Setting up your wallet
  • Setting up Night ELF
  • Connecting Your Wallet to Awaken
  • Start to swap
    • How to swap
    • How to Add & Remove Liquidity
    • How to Get Started on Lending(testnet)
    • How to Get Started on Farm(testnet)
    • How to Get Started on Dividend Pool(testnet)
  • Social Media
    • Twitter
  • Discord
Powered by GitBook
On this page
  • 1. Features
  • 2. Swap
  • 3. Add/Remove Liquidity
  • 4. AMM Mechanism & Impermanent Loss
  • 5. Compensation for Impermanent Loss
  1. Swap

Swap Guide

A detailed guide for the Swap function

PreviousIntroductionNextLending Guide(testnet)

Last updated 2 years ago

1. Features

AwakenSwap is a decentralized exchange (DEX) based on the Automated Market Maker (AMM) algorithm. Thriving on ELF chain, AwakenSwap supports swapping between two arbitrary tokens. As a non-custodial decentralized application, AwakenSwap does not possess or control any asset from any user, providing a trust-free and secure trading environment in which users (traders) are supported to swap tokens using liquidity supplied by other users (liquidity providers). For traders, AwakenSwap navigates the optimal orders, implementing trades at the best prices and minimizes slippages. For liquidity providers (LPs), AwakenSwap introduces five pools correspondingly with five swap fees (0.05%, 0.30%, 1%, 3%, 5%) for each pair of tokens, enabling LPs to add liquidity to any pool according to their investment preference and expectation on the return of the token pair they supply.

2. Swap

To become a trader, all you need to do is to connect your DeFi wallet to Awaken with some $ELF deposited in it as the gas fees, then you are free to swap cryptocurrency as long as they are supplied by our LPs.

3. Add/Remove Liquidity

To become an LP, you need to supply a pair of tokens with an equal dollar value. For example, suppose you plan to provide ETH/USDT where 1ETH=2000USDT=$2000. If you add 1ETH to the liquidity pool, you will also need to add $2000 worth of USDT, which is 2000USDT, to the pool. The total liquidity you provide, therefore, is worth $4000. You may either add liquidity to an existing pair in the liquidity pool or establish a new pair of tokens given that the pair you supply or the swap fee tier you choose does not exist in the pool yet. In return, you will receive Awaken LP (ALP) tokens, which are proof of your share of the pooled liquidity for the token pair you supply. The initial number of ALP tokens you will receive is calculated as sqrt(x*y), which means the square root of the product of the two tokens you supply. The value of your ALP token is not constant. Traders will pay swap fees (from 0.05% to 5% ) each time when using the liquidity you provide for exchange and 80% of the fees earned from those transactions will go directly into the liquidity pool, so your ALP tokens will appreciate proportionately with the growth of the liquidity pool. When you remove your liquidity, you will receive the token pair that you initially supply and the swap fees in the form of the pair you provide. For example, if you provide ETH/USDT, you will receive the swap fees also in ETH/USDT when removing the liquidity.

4. AMM Mechanism & Impermanent Loss

As an AMM, AwakenSwap distributes liquidity uniformly along the constant product function x*y=k where x and y are the respective quantities of the two tokens that LPs supply and k is a constant. That means, fluctuations of the prices of the two tokens will automatically recalibrate the quantities of the two tokens and, as a consequence, cause impermanent losses to LPs. The bigger this price change is, the more LPs are exposed to impermanent losses. In this case, the loss means less dollar value at the time of withdrawal than at the time of deposit. For example, Tom deposits 1ETH and 2000USDT in a liquidity pool (suppose 1ETH=2000USDT=$2000) with a total worth of $4000, taking a 10% share of the entire pool (10ETH+20,000USDT). If the price of ETH increases to $3000, traders will add USDT to the pool and remove ETH from it until the ratio reflects the actual current price (considering that AMM does not have order books and the prices of the assets in the pool is determined by trading activities within the pool rather than the market). As a possible result, there is now 5ETH and 25,000USDT in the pool and Tom will receive 10% of the total liquidity, which includes 0.5ETH and 2500USDT with a total worth of $4000 when withdrawing his funds. Given his initial deposit, 1ETH and 2000USDT with a total worth of $5000, Tom would have been better off by rather than depositing into the liquidity pool. Since the impermanent loss increases with the difference in the ratio of assets in the liquidity pool, it would be less risky if you provided a pair of stablecoins (e.g. USDC/DAI), different wrapped versions of a coin (e.g. WBTC/HBTC) or a pair of tokens with similar price trends (e.g. BTC/ETH).

5. Compensation for Impermanent Loss

To compensate LPs for the impermanent losses, Awaken synchronously develops a DeFi lending protocol, Awaken Lending, utilizing the idle assets in the liquidity pool to create passive incomes for LPs. Awaken Lending is now accessible through Awaken test net and will be officially available once the testing procedure is completed.

In addition, the Perennial Yield Farming program with the most competitive farming APYs and the longest yield period among the DeFi platforms is coming soon!

arbitrage
HODLing