Providing Liquidity to Magic-WETH: A Beginner’s Guide

Treasure
7 min readSep 21, 2021

--

One of the best parts of NFT-DeFi is the collision of two different trading communities. Through games like Treasure, NFT traders are gaining exposure to DeFi. Treasure also hopes to show DeFi power users that NFTs can have a lot of utility for financial products.

If you already know what LP’ing is, then skip to the last section (Providing Liquidity) for an explanation of how to do it for our MAGIC token. It’s very important to put your assets into the correct liquidity pool! Also make double sure you are trading out of the correct pool so you don’t get fooled by a scammer who’s tricking you into buying a fake MAGIC token.

**THE CORRECT MAGIC POOL IS THE UNISWAP v2 MAGIC-WETH POOL, NOT MAGIC-ETH**

Liquidity Providing 101

Traditional markets have what’s called “market makers” — third parties who help orchestrate trades between buyers and sellers. Examples in crypto include exchanges like Coinbase. To trade on Coinbase, you have to deposit your assets onto the exchange and let them escrow your funds. There is a centralized order book that keeps track of buy and sell orders. You have to trust the exchange to execute the fairest trade possible for you and not to steal your funds.

Decentralized finance figured out how to facilitate trades between people without requiring a trusted third party. Instead of brokers and centralized exchanges, we have what’s called “liquidity pools” making the market.

Let’s take a hypothetical market for Diamonds and Rupees. A buyer has a lot of diamonds, and they want to acquire rupees. They can go to Uniswap and choose to sell their diamonds for rupees. There is no centralized party executing these trades. It is happening through software, with an algorithm setting the price.

How is this possible? Well, behind the scenes, a group of people called liquidity providers decided to put both diamonds and rupees into a pool and let people execute trades out of them. Anyone can be a liquidity provider. You can create a pool for anything you want, like a Diamonds-Rupees pool, a Diamonds-Emeralds pool, or so on. (Sometimes a decentralized exchange will censor people from making a certain type of pool, but this is usually only censored by the front end of the dapp and can still be accessed through the contract itself if you call the right functions.)

So a liquidity provider has Diamonds and Rupees, and they want to deposit this into a liquidity pool in exchange for some of the trading fees from that pool. On most decentralized exchanges, the user has to deposit the two assets in a 50–50 ratio. This means that depending on the price of assets within the pool at that time, you have to put in an amount of each asset so that the total value (not quantity) is equal to each other.

You put your liquidity (diamonds and rupees) into the pool and get back what’s called an LP token. This represents your proportional ownership of the assets within the pool. If Alice creates a pool and is the first person to deposit assets, she owns 100% of the LP shares for that pool. Bob comes along and deposits a total amount of assets equal to Alice’s assets within the pool. Now they each own 50% of the total LP shares.

An LP token is almost like an IOU because whenever you decide you don’t want to provide liquidity anymore, you can burn your LP tokens and withdraw your assets.

What ends up happening, though, is that you almost always get back a different number of each asset than when you started (unless no one traded from the pool). Let’s say Diamonds and Rupees had the exact same price when you first deposited. For some reason, diamonds became extremely high demand while you were LP’ing. People rushed to the pool and bought diamonds with their rupees. Now there are a lot more rupees in the pool than diamonds. When you withdraw your assets, you will be getting back more rupees than you put in but fewer diamonds. Why? Since diamonds were in high demand with buyers relative to rupees, the price of diamonds was rising in the pool, but the price of rupees was falling. The key phrase being “in the pool.” A decentralized exchange doesn’t have anyone saying what the prices actually are. Prices are set by the ratio of assets within the pool, not by an external market maker.

Your LP token is an IOU for the initial ratio of assets you put in the pool (50% Diamonds, 50% Rupees) but in terms of the price not quantity. So when you withdraw a lot more rupees than you initially put in and very few diamonds, you’re still getting them back in a 50–50 ratio in terms of the total value of each.

Going back to the first example, Bob puts in an amount of assets equal to Alice. His LP shares are for 50% of the pool’s assets. The price of diamonds is surging. Droves of buyers rush to the pool to snatch up the diamonds, leaving rupees in the pool in exchange. Bob decides not to provide liquidity anymore. He cashes in his tokens and takes out 50% of the pool’s assets — which are now primarily rupees and very few diamonds.

Sometimes the price of one asset declines so much that liquidity providers regret putting their assets into the pool at all. They would have been better off holding their assets and not watching their most valuable asset get slowly replaced with an asset that is going down in price. This phenomenon is called impermanent loss and is something that liquidity providers should seriously consider before jumping into a liquidity pool.

It is possible to lose nearly all your money providing liquidity. Take, for example, a coin that goes to $0.0001 or lower. For this to have happened, buyers kept swapping for the other asset over and over until LPs are left with an astronomical amount of the worthless asset and a meaningless amount of the one that actually has value. Remember, the LP tokens aren’t a guarantee of value, just of a proportion of the pool. This is why it’s so important to see which pool you’re providing liquidity to. Scammers try to trick people to adding to the wrong pool (e.g., MAAGIC-WETH pool), then “rug pulling” them by removing their liquidity and selling the worthless asset at a grossly inflated price into the fake pool— leaving the hapless LP to look on powerlessly as their liquidity is “making the market” for the person who just scammed them. Your scammer got to sell MAAGIC around the price of actual MAGIC, and you’re left holding the bill.

If you are SURE you are using the correct tokens and you have faith in the long-term outcome of both assets that you’re using as liquidity, LP’ing can be a really profitable decision. You earn trading fees from the pool and, as in the case of Treasure, extra rewards for having done the important work of helping the protocol’s token stay highly liquid and tradable.

Relationship to Treasure

Treasure is an NFT-DeFi project, meaning we want to build decentralized finance applications on top of these NFTs. Treasures are fictional commodities, but we believe that real financial utility can come out of them if structured the right way.

You can think of Treasures like natural resources, like coal or gold. Owners of these treasures can trade them like money if they want, but they can also find ways to create industrial applications for them, just as people do with gold.

The MAGIC token is a little bit different. MAGIC functions like money. In our native marketplace, you will be able to trade treasures and other items using MAGIC rather than dollars. But you can also use it to perform alchemy like upgrading your game inventory.

Since MAGIC is the universal substance that powers the Treasure universe, it’s very important that people can buy and sell it easily. There needs to be a lot of liquidity (i.e., a lot of MAGIC and WETH tokens) in the MAGIC-WETH Uniswap pool so that someone can buy some of it without causing the price to go really far up. The less liquidity in the pool, the more “price slippage” occurs. This is exactly what it sounds like. Executing the trade causes the price to slip away from the trader’s expectation, either in a good way or a bad way. (Remember, a decentralized exchange doesn’t have a broker setting the prices. It’s set by an algorithm. If there’s very few tokens in a pool, and the prices are adjusting based on the ratio of assets within the pool, then the tiniest buy can send the price of an asset skyrocketing in an illiquid pool.)

The more liquid that MAGIC is, the better the Treasure universe performs. Therefore, we are building LP tokens directly into the universe to encourage people to make MAGIC widely available for other people to buy and sell. This onboards more people and makes the entire experience much more enjoyable for everyone.

If you’re ever asked to deposit an LP token in some part of the Treasure universe, refer to the steps below.

Providing Liquidity

  1. Buy the MAGIC token on Uniswap:

https://app.uniswap.org/#/swap?outputCurrency=0xb0c7a3ba49c7a6eaba6cd4a96c55a1391070ac9a&use=V2

2. Buy WETH on Uniswap (this is wrapped Ether)

3. Go to the MAGIC-WETH pool on Uniswap:

4. Go to Uniswap.org and add liquidity to the v2 Uniswap Pool for MAGIC-WETH:

5. Choose the amount of WETH or Magic you want to add. It will auto-populate with the amount of the other token you need to add. (If it says “insufficient balance,” you need to make sure you’ve bought enough of the other token or decrease the first token’s amount so you can provide in 50–50 ratios.)

6. Click “approve.” Metamask will pop up. Set the transaction fee and confirm the transaction.

7. Uniswap will show you how many MAGIC-WETH UNI v2 LP tokens you will receive in return for your deposit. Click “supply” to add your liquidity to the pool in exchange for those tokens.

You’re all set! Check your wallet on Etherscan and you will see those UNI v2 tokens in your wallet. (Don’t worry if you can’t see them in your Metamask. You can add custom tokens to Metamask to see them, if you want.)

Now you can use those LP tokens in Treasure the same way you would MAGIC or WETH separately.

When you’re done providing liquidity, simply go back to the Liquidity Pool page from above and click “remove liquidity” and execute the transaction.

If you’re having any other difficulties, feel free to reach out in our Discord and we will get you set up!
https://discord.gg/mNu63qkY

--

--

Treasure

The magic of play. Treasure is the decentralized video game console connecting games and communities together through imagination, $MAGIC, and NFTs. ✨