[Part 3 of 4] The 0Chain Geyser Guide: How to Provide Liquidity on Uniswap

Derick Fiebiger
8 min readDec 18, 2020

--

Welcome to Part 3 of the 0Chain Geyser Guide.

If you don’t already know how to use Metamask and/or Uniswap, please review Parts 1 and 2 of the Geyser Guide. In Part 3, we will cover how to provide liquidity on Uniswap using the Metamask crypto wallet. Understanding how to provide liquidity on Uniswap is relevant to your participation in the 0Chain Geyser for the reason that you cannot use the Geyser without first becoming a liquidity provider on Uniswap.

What is Liquidity?

Liquidity is defined as “the ease with which an asset can be converted into ready cash without affecting its market price”. Liquidity, while an incredibly important function for assets within a market, can be a difficult concept to grasp at first. To better illustrate how it works, we can examine a real world example: whenever a trader buys or sell an asset on Uniswap, there is a price impact on that asset. The price will go up or down. For instance, let’s say someone might want to buy 10 ABC tokens and the price of ABC is currently $10 per ABC token. But, because of low liquidity, only a few tokens are available at $10 per token (because of low liquidity), the purchaser must buy up the tokens available at a higher price in order to acquire all of his 1,000 ABC tokens. In total, the purchaser purchases tokens from $10 all the way up to $20 per ABC token to secure his target of 10 ABC tokens. After the trade, the price per ABC token is now trading at $20. The price impact from this purchase was a 100% increase from the initial price, an impact that is also referred to as price slippage.

Price slippage is defined as “the difference between the expected price of a trade and the price at which the trade is executed.” In the ABC token example, we have demonstrated such a difference and its negative impacts. Liquidity comes into the fold when trying to reduce the negative impacts of price slippage. Liquidity and price slippage have an inverse relationship: in other words, an increase in liquidity, or, the number of interested buyers of ABC and sellers of ABC at the price point of $10 per ABC token (also understood as a a narrow bid/ask spread), will reduce the extent of price slippage. This narrow spread is generally accomplished when a liquidity provider (or market maker) provides an equal amount of liquidity in both ABC and dollars, at that $10 price point (eg 1 ABC token and 10 US dollars). If ample amounts of liquidity are provided, the slippage is dramatically reduced, and thus more people are interested in trading the token (since they won’t be hit with a 100% price slippage premium to acquire, say, 10 ABC tokens).

To provide ZCN liquidity on Uniswap, a Uniswap liquidity provider (LP) will simply add equal amounts of ZCN and ETH, at the current market rate, to the ETH/ZCN liquidity pool. Each addition that an LP makes to the liquidity pool will lower the rate of price slippage and entitle the LP to a growing share of trading fees. The share of fees is based on the LP’s ratio of their personal addition of liquidity relative to the total amount added to the liquidity pool. On Uniswap, this share is represented an LP token. The LP token is deposited into the LP’s wallet when they add their liquidity. The LP token will be described in further detail later on in the article.

What are the risks to providing liquidity?

Providing liquidity on Uniswap does not come without its risks. The largest risk is called impermanent loss. Impermanent loss can be defined as the difference, or opportunity cost, between simply holding your tokens vs. depositing your tokens into the liquidity pool. When there are major fluctuations in the token price of either ZCN or ETH, the ratio of ZCN:ETH will readjust and can result in a new ZCN:ETH ratio that is collectively worth more or less than your initial ZCN:ETH ratio when you first made your deposit. For instance, if the price of ETH crashes to $1 and the price of ZCN did not change, the Uniswap automated market maker (AMM) would essentially push your entire liquidity position into ETH, rebalancing the ratio so that both your ZCN position and ETH position continue to be worth the same USD value. This is called an impermanent loss; since the ratio is always changing, any loss on paper is not permanent until your funds are withdrawn from the liquidity pool.

Not satisfied with this answer? This article is a good beginner’s guide as to how impermanent loss works and its associated risks.

Will I lose or make money as a liquidity provider?

Combining the concepts of liquidity and price slippage with the concept of impermanent loss can enable a liquidity provider to generate predictive Return on Investment models. These models, while complex, can be used to forecast profit and loss on the liquidity that you provide. This guide is not designed to provide financial advice, nor is it designed to analyze profit/loss potential.

Not satisfied with this answer? While this article is slightly older, it is frequently referenced to introduce people to the costs and benefits of providing liquidity on Uniswap.

What are the benefits to providing liquidity?

Providing liquidity on Uniswap not only fosters price discovery on the ZCN token, but also generates an inflow of trading fee revenue for the liquidity provider. A trading fee is paid by the trader on every trade (.3% of the value of every trade, specifically). This fee gets added to the liquidity pool — in the context of 0Chain, fees are added to the ZCN/ETH pool.

Daily fees are paid out based on a fraction of total volume.

It’s important to reiterate, however, that the earnings from fees may or may not outpace the rate of impermanent loss, as mentioned in the previous paragraphs. But, combatting the risk of impermanent loss is the ultimate purpose of the 0Chain Geyser: by dispensing ZCN tokens to LPs as an additional reward for LPs, the earnings derived from providing liquidity are increased, lowering the risk of impermanent loss.

DeFi is a learning process

DeFi, Uniswap, and liquidity providing are complex environments. It’s normal to still have questions regarding any or all of these areas. Providing liquidity on Uniswap will make far more sense as you go through the process of becoming an LP. If it sounds like something you’d like to give a try, start out with a very small amount and play around; many of your unanswered questions will likely begin to resolve themselves.

Necessities for Setup

Before you attempt to navigate on Uniswap, you’re going to need a few things:

  • A computer (I’ll be using a Mac)
  • An internet connection
  • 1 of 4 web browsers (Google Chrome, Brave, Firefox, or Edge). For this guide we will be using Google Chrome, since it’s the most popular web browser.
  • ETH in your Metamask wallet
  • ZCN in your Metamask wallet

Assuming you have all of these items ready to roll, we can get started.

Step One: Open Uniswap

Congrats on making it to Part 3. Now that you understand how to use Metamask and how to trade on Uniswap, the steps required in order to become a liquidity provider are pretty straightforward.

  1. Go to the Uniswap website (uniswap.org); click the “Launch App” button in the top right.
Go to the Uniswap website (uniswap.org); click the “Launch App” button in the top right.

2. Click “Pool”. This will take us to the Liquidity Provider (LP) ecosystem.

Click “Pool”.

3. Click “Add Liquidity”. This will allow us to select the pool we want to become an LP in.

Click “Add Liquidity”. This will allow us to select the pool we want to become an LP in.

4. Leave “ETH” as is, and Click “Select a Token” so that we can link ZCN into the ETH/ZCN pool. This will direct us to the CoinGecko token list (assuming you’ve changed the list from the Uniswap Default List to the CoinGecko list) so that we can select the ZCN token.

Leave “ETH” as is, and Click “Select a Token” so that we can link ZCN into the ETH/ZCN pool.

5. Select ZCN from the token list. This will coordinate us with the ETH/ZCN pool, which is the only pool the 0Chain Geyser is running on.

Note: you can also paste the ZCN token address to accomplish the same thing (ZCN token contract address: 0xb9EF770B6A5e12E45983C5D80545258aA38F3B78)

Select ZCN from the token list. This will coordinate us with the ETH/ZCN pool, which is the only pool the 0Chain Geyser is running on.

Step Two: Add Liquidity

  1. Input the amount you want to stake as an LP; click “Approve ZCN”. As explained earlier, the input amounts of ETH and ZCN must be equal in USD value. As you input an amount into ETH or ZCN, Uniswap will automatically calculate the amount for the other.
Input the amount you want to stake as an LP; click “Approve ZCN”.

2. Click “Confirm” on Metamask. This will initiate your approval step. The approval step gives permission for Uniswap to automatically rebalance your ETH/ZCN liquidity ratio.

Click “Confirm” on Metamask. This will initiate your approval step.

3. Wait. This step is often painfully slow, as it’s a bigger transaction (data wise) so it may take a bit for this to get processed in the Ethereum blockchain.

Wait for approval transaction to process :)

4. Once approval goes through you’ll be prompted to Supply Liquidity, click “Supply”; then “Confirm Supply”. After confirming Supply you will be directed to the Metamask wallet.

Once approval goes through you’ll be prompted to Supply Liquidity, click “Supply”; then “Confirm Supply”. After confirming Supply you will be directed to the Metamask wallet.

5. Confirm the transaction by clicking “Confirm”. This will submit the transaction to the blockchain to complete your process of becoming an LP.

Confirm the transaction by clicking “Confirm”. This will submit the transaction to the blockchain to complete your process of becoming an LP.

Step Three: Verify That You’ve Received an LP Token

  1. Click the three dots on Metamask in the top right; Click “View on Etherscan”. This is a “double check” step so that you can see proof of your LP token on the blockchain. Once you click the link, you’ll be directed to the Ethereum block explorer where you can see proof on the blockchain of your LP token.

2. On the Etherscan link, click the “Token” dropdown and locate the “Uniswap V2 (UNI-V2)" token balance. This is your LP token, which is essentially your “ticket” into the 0Chain Geyser. You will deposit this token into the Geyser to collect rewards.

Click the “Token” dropdown and locate the “Uniswap V2 (UNI-V2)” token balance. This is your LP token, which is essentially your “ticket” into the 0Chain Geyser.

You’ve Reached The End (of Part 3)!

If all looks good, congratulations! You are now ready to join the 0Chain Geyser! If you still have questions, feel free to pop into the 0Chain telegram and ask for help.

Now, onto Part Four of the 0Chain Geyser Tutorial — How to Provide Liquidity on Uniswap!

If you found this article helpful, please let me know on twitter!

--

--

Responses (1)