Quick Links

  1. Section 1: Welcome to the iFi DEX
  2. Getting Started
  3. Adding iFi DEX Ethereum testnet to Metamask
  4. Adding iFi DEX Testnet to Metamask
  5. Getting testnet tokens
  6. Section 2: Exploring the iFi DEX
  7. Bridging testnet tokens into iFi DEX
  8. First swap: get some gas tokens
  9. Second swap: all the other tokens
  10. Liquidity pool overview

Welcome to the iFi DEX experience

Thank you for participating in the iFi DEX testnet! Below are the steps to get started and will serve as a general guide on how to explore the iFi DEX. Beyond the general instructions, please feel free to explore and get creative. If you encounter any issues during testing, we would ask that you report them.

Getting Started

Before you begin, you will need to add both the iFi Ethereum Testnet and the iFi DEX Testnet to Metamask.

Adding iFi DEX Ethereum testnet

To begin you will need to manually add the Ethereum testnet to Metamask. To do this, open up your browser and then the Metamask extension.

Click on the Network drop-down menu in the upper left and scroll to the bottom where you will see the option to “add a custom network.”

Althea L1

Fill in the the various fields with the following information (as pictured above).

Field Input
Network name iFi ETH TEST
Default RPC URL https://testnet.althea.zone:9545
Chain ID 15
Currency Symbol iFi-ETH
Block explorer URL (empty)

Adding iFi DEX Testnet

Unlike in the last step, we can use the testnet portal to add the iFi testnet to Metamask automatically. To do this, navigate to https://test.althea.link.

Althea L1

  • Click on “connect wallet”
  • Click on Metamask

Metamask will pop up and ask if you would like to add the network. Click APPROVE. After you have approved the network, you might find it easier to rename it, so it does not get confused with Althea mainnet. You can do this from the network drop-down menu as well.

Althea L1

There we go. Both networks added. You’re almost ready to go, but first you’ll need to get some testnet tokens.

Getting tokens

To begin you will start with 100,000 tUSDC tokens, serving as ersatz USDC, which you will need to bridge from the ETH testnet onto the iFi DEX testnet. From there you can use the different pools to swap your tUSDC into other tokens to use on the DEX.

In order to get the starting tokens, navigate back to the iFi DEX Testnet signup form that you have already filled out.

Click on “edit my response” and note that there is now a new question that was not there before.

The third question asks you to submit your testnet addresses, which will likely be the same. If they are different for any reason, include both addresses.

Now sit back for a moment and wait for your tokens to arrive. You will receive a tag in the #iFi DEX Testnet channel on the Althea L1 Discord server when your tokens have been dispensed. If you have not received your tokens within 24 hours, ask a moderator in the channel to double-check your submission.

Explore iFi DEX

Now that you have received your testnet tokens, the first step is to bridge them from the Ethereum test network onto the iFi DEX test network.

Bridge into the iFi DEX test network

To beging, navigate to the test portal: https://test.althea.link. If your wallet is not already connected, click on the “connect wallet” button in the lower right.

Now click on the BRIDGE tab on the upper navigation bar.

Althea L1

Note that the source network (from) should be Ethereum and the destination network (to) should be Althea (as pictured above). Select the token to bridge in, in this case tUSDC, and bridge the maximum amount possible.

Time to get some Althea tokens!

iFi DEX supports both standard and gasless swaps. Generally you will want to use standard swaps, covering gas with Althea tokens—but as you do not yet have any Althea tokens, we will perform a gasless swap to acquire some.

Gasless swaps are necessary if you do not have any Althea tokens for gas, but they are not free. You will need incentivize the relayer to pick up your transaction using the token being swapped.

On the upper navigation bar, click on SWAP to navigate to the swap page.

  • Select the token you are swapping into Althea (tUSDC) using the upper drop-down menu.
  • Enter the amount of tUSDC you wish to swap in the upper token field
  • Confirm the TO drop-down is set to ALTHEA.
  • Confirm that the Gasless toggle is switched to the right (enabling a gasless-swap)

If everything looks good, click on [whatever the button says] to initiate the swap.

Note the details drop-down tab, which will provide price impact, allow for slippage tolerance to be adjusted, and show the minimum amount that you will receive from the swap.

In the lower portion of the swap page, you will also see the open orders. Going forward you will also find order history and other helpful graphs and visualizations of DEX activity.

Let’s get some other tokens!

You are now free to swap your tUSDC into any of the other tokens available, in whatever amounts you would like. Which ones should you get? That’s up to you.

Why not put a pin in that for a moment and visit the iFi DEX Pools to find some inspiration.

Use the navigation bar on the top, click on Pools.

Plunge into the (liquidity) pools

The pools page displays the various available liquidity pools, to which you can add or remove different types of liquidity: ambient, concentrated, or knock-out (limit orders).

To understand more about the different types of liquidity and how they work, we recommend reading the, “Liquidity Fusion in the iFi DEX,” which gives a good overview.

Liquidity types, summarized

Ambient liquidity is traditional, “always available,” liquidity that you most likely are familiar with. Trades happen, regardless of price or liquidity, and prices fluctuate up and down (slippage). Ambient liquidity is important, but providing this kind of liquidity exposes the user to impermanent loss.

Concentrated Liquidity is different from ambient liquidity in that it is not spread out across the entire spectrum of possible exchange rates/prices. Providers of concentrated liquidity select a specific price range where they want their liquidity to be active. This makes the the liquidity that is provided more efficient—it’s only used for swaps in the desired range—but if the price moves outside of this range, the liquidity becomes inactive and swaps cannot execute (until the price returns within this range).

Knockout Liquidity is a type of concentrated liquidity position with a very narrow price range, begins with only one token, and is removed when it becomes entirely made up of the other token—this means that it acts as both a liquidity position and as a limit order. This allows buyers and sellers to make large trades with extreme efficiency, while simultaneously providing improved swap quality to regular traders. The downside is that it is not instant and requires buyers or sellers willing to fulfill the order/position.

Instructions on adding/removing liquidity

On the upper toolbar, click Pools to navigate view the testnet liquidity pools.

In the upper portion of the page you will see the liquidity pools listed by their trading pair, the liquidity incentives represented in APR, total value locked (TVL) off the pool, and the volatility type.

You can also filter by stable- or volatile pool types. Stable pools are comprised of two stable coins, where the value of the pool does not change, even if the composition fluctuates in one direction or the other. Volatile pools consist of at least one token (or both) that is not pegged in value to a specific asset.

Creating an ambient liquidity position (i.e. adding ambient liquidity to a pool)

When you create an ambient liquidity position, you add liquidity by contributing equally valued amounts of the two token that comprise the liquidity pool (LP).

To do this, simply click on the Add LP button next to the pool you wish to add liquidity to. The Create New Position dialog box will appear giving you the option to select either Concentrated or Ambient.

Select Ambient and then click the Add Liquidity button.

This will continue to the next screen, where you can input the amount of liquidity you would like to add. The amount you enter into either field will auto-balance in the other and you will need to have both tokens in your wallet in sufficient amount to create the position.

For example, if Althea and USDC have an exchange rate of 2:1, and you enter 1 ALTHEA as the amount you wish to contribute, the lower field will auto-populate with 2 USDC. You will therefore need to have both 1 ALTHEA and 2 USDC in your wallet to create the position.

Note also the current price (i.e. the current exchange rate between the two assets), expected APR you will earn from incentives and/or swap fees, as well as the minimum and maximum execution price.

Having done all that, enter the amount you would like to use to create the position, and click the [BUTTON] and confirm the transaction.

[….view/manage your positions…]

Creating a concentrated liquidity position

[ INSTRUCTIONS ]

“It’s time to start LPing!” –Damon Killian

Now you can swap into any combination of tokens available on the iFi DEX and can also provide different kinds of liquidity to the various pools available and earn rewards from the liquidity incentives and swap fees.

As a challenge, you are invited to swap your testnet tokens into any combination of tokens available on the DEX and create liquidity positions—ambient, concentrated or knockout/limit orders—with the intention of maximizing the profit drawn from swaps made and fees collected.

At the end of the testnet, we will go through the results and create a leaderboard for the top performers.