Maiar Exchange - Testnet functionalities practicing tutorial
Special thanks to The Palm Tree Network
Have you never interacted with a DEX? Then this article will teach you the first steps on Maiar Exchange. Testing is done on the Devnet network, using test tokens. These tokens are economically worthless so there is no risk involved.
During this article we will ask you to solve do tasks in order to ease the learning process.
What is Testnet?
Elrond created two different networks — testnet and devnet — to facilitate testing the functionalities to be added on mainnet and to create a stable medium for developers in order to ease their apps development. All the actions on these two networks are done with test tokens called xEGLD that can not be sent from devnet to mainnet and the other way around.
1. How to connect through Maiar Connect
One of the most useful actions to learn would be connecting using the QR code and Maiar app. In order to do so you need to access your Devnet wallet (testnet-wallet.elrond.com) by picking the Maiar out of the four available options. To get used with the process we recommend using a PC to access your wallet and a mobile to authenticate through Maiar.
After selecting the Maiar option a pop up window with a QR Code will appear. Start your Maiar app on your mobile and tap the blue button with the Elrond logo inside then tap Wallet Connect.
The app will ask you to scan the QR code (the one from your PC browser pop up window). After scanning, the app will ask your permission to authenticate. If you confirm then the connection is settled. At this point you can basically check your wallet and use the wallet from Maiar on the Devnet network.
2. Using the faucet
After accessing your devnet wallet, your balance will be 0 because you have never used this Devnet address. In order to get test tokens you can use the faucet from the left menu.
Or you can make use of this community run faucet: https://r3d4.fr/elrond/testnet/index.php
3. Connecting to Maiar Exchange
Now that you have test tokens you can start testing the exchange using the following link: testnet.maiar.exchange
Pick the Maiar Connect authentication method.
After you connected you can visualize the wallet’s balance clicking the public address (erd1) from the top right corner.
4. Your first swap on the Maiar Exchange
Swap refers to exchanging a token for another. In the beginning, we will exchange 5 EGLD for the BUSD equivalent.
After introducing the EGLD amount and clicking the Continue button, all we need to do is sign the transaction from the Maiar app. It is recommended to keep the app and the mobile on while using the exchange.
5. Get your first LP token
Through the last swap, as you have noticed, we have easily used the exchange by introducing the EGLD amount we wanted to exchange and we got BUSD. The first question that crosses our minds is “where did the BUSD come from?”. An Automated Market Maker as Maiar Exchange works on liquidity pools. The users that swap are trading against these pools.
For the provided liquidity, the Liquidity Providers get LP tokens, which represent their share from that pool. Based on the percentage they hold and the duration of their liquidity providing they get rewards proportionally from the fees generated by the pool.
With the above explanations, let’s get our first LP token by providing liquidity in the EGLD/BUSD pool.
Note: providing liquidity is always done based on the USD price of the tokens from the pool.
As for swap, we must sign from Maiar app. After successfully signing we will be able to see the LP token (EGLD/BUSD) we created in My Liquidity tab next to the other LP tokens we own. While holding this LP token we will get a percentage of each fee generated by its pool based on our share from it.
6. Earn even more. Stake your LP tokens.
As we have seen in the previous explanations, one of the methods to get passive income is providing liquidity and getting LP fees from the pool. Beside this, we can generate even more passive yield if we Stake the LP tokens in Farms.
After we click the Stake button of the Farm we are interested in, a pop-up window will appear allowing us to select the LP token we want to stake and the quantity. In the same window we can also see the Lock rewards option, but we will explain it later in the article.
After the transactions are successful we can trace check the Stake and the generated rewards. On the right side of the stake information one can see the Harvest and Withdraw buttons.
7. Harvesting (Claiming rewards)
Users can claim rewards every minute, hourly or daily, whenever they want. Rewards don’t disappear, they are saved in the smart contract until one decides to harvest them.
Now that we managed to gain more tokens we can check the wallet’s balance to check the harvested tokens.
In the balance pop up window we can see both harvested tokens and staked EGLD/BUSD LP tokens.
8. Same process but with Locked rewards options on.
Maiar Exchange offers the opportunity to earn twice as many rewards as LKMEX (Locked MEX) instead of MEX.
What is LKMEX? It is a token that is converted in MEX after 12 months. For example, one can choose 10 MEX daily or 20 LKMEX daily.
Let’s go through the process again following these steps:
- Swap 3 EGLD for BUSD
- Convert the EGLD + BUSD into EGLD/BUSD LP tokens by providing liquidity
After we converted EGLD + BUSD into LP tokens we can see them in the wallet’s balance under Liquidity category, which means they are not yet staked into a Farm.
Next, we will stake them into the EGLD/BUSD Farm but this time we will turn on the option that allows us to earn twice as much rewards as LKMEX.
Select EGLD/BUSD tokens, click MAX in order to use the whole amount and tick the Lock rewards option.
You can now see the 2 staking positions in the EGLD/BUSD Farm. In our example we have 5.70 LP tokens we get MEX rewards for and 3.42 LP tokens we get LKMEX rewards for.
9. Using Harvest All button
Now that you have more positions in the Farm we can claim all the rewards in one go using the Harvest All button.
10. How to use LKMEX tokens
After learning how to generate LKMEX you must learn how you can use them. Maiar Exchange allows you to use these tokens while waiting for them to be unlocked into MEX.
For example, we can create LP EGLD/MEX tokens using the LKMEX we own.
To start, go to the Liquidity tab, click Add Liquidity and select EGLD in the first field and LKMEX in the second one.
After selecting LKMEX you can notice that the LKMEX we own are grouped according to the month they were created in. For example, LKMEX created in August 2021 are converted into MEX in August 2022. The LKMEX tokens from the example will be unlocked on 13th of September 2021.
Select MAX amount for LKMEX to use all of them and click Continue.
If we try to deposit a smaller amount (0.0013 EGLD + 1.23 LKMEX) we will get the message pointing out that the minimum amount for liquidity providing is 0.01 EGLD.
So, the best way to claim your LKMEX rewards is after checking the amount is equivalent to 0.01 EGLD.
After we earned the required amount we can go through the process again, we click Continue and sign the transactions from the Maiar app. After the transactions are successfully done we will be able to see the LP EGLD/LKMEX newly created tokens in the wallet’s balance.
We can stake these LP tokens in the EGLD/MEX Farm to earn even more rewards.
11. MEX and LKMEX Staking
We will now use the first Farm, the one for MEX only. We can stake in this Farm both MEX and LKMEX to generate more MEX.
Firstly we will stake MEX with Locked rewards options on.
We can notice now that our staked MEX position generates LKMEX. Next we will stake LKMEX from our balance.
We can now see two staking positions MEX and LKMEX that generate LKMEX.
12. Reinvest the rewards
All the rewards from the MEX Farm can be Reinvested by clicking Reinvest All button, taking advantage of compounding and maximizing earnings.
Maiar Exchange, being available on devnet too, offers the users that have never used a DEX or AMM the opportunity to experience and understand the functionalities of such an exchange without the fear of losing tokens. You can try other actions like swapping the rewards into EGLD too in order to get used to the platform.
For a better understanding of how an AMM works, what Price Slippage or Impermanent Loss is, we recommend you the following article: Maiar Exchange: All you need to know