How to provide liquidity on Uniswap/Sushiswap on Ethereum

7 min read
How to provide liquidity on Uniswap/Sushiswap on Ethereum

Decentralized finance (DeFi) provides users with a variety of ways to earn a passive income from their crypto assets. One popular way to do this is by providing liquidity on various protocols within the ecosystem. Liquidity provisioning is an essential part of DeFi because many protocols need liquidity to operate effectively and meet market needs. A set of DeFi protocols with the most need for liquidity are DEXs—decentralized exchanges. This is because of the heavy flow of transactions that these protocols propagate. This article covers everything a DeFi user needs to know about providing liquidity on decentralized exchanges like Uniswap or Sushiswap.

How do decentralized exchanges (DEXs) work

Most DEXs currently operate the automated market maker (AMM) model. In the traditional trading system, the order book model was used to facilitate trades between buyers and sellers. The order book model uses centralized market makers to match buyers and sellers, thereby ensuring constant liquidity. In a decentralized market system such as DeFi, the order book model is not ideal. This is because matching buyers and sellers without any centralized market maker are expensive, slow, and results in a bad user experience. The AMM model solved this problem by allowing users to trade directly with smart contracts rather than other users. Similar to a traditional market maker, an AMM is always willing to buy and sell an asset at a stated price. However, instead of order books, AMMs make use of liquidity pools and algorithms to determine asset pricing and facilitate trades.

Liquidity Pool

What are liquidity pools?

A lot of DeFi protocols not excluding AMMs, lending, borrowing, yield farming, e.t.c are built on using liquidity pools to operate. A DeFi liquidity pool in simple terms is combining different assets for market making. These pools are operated through smart contracts and are supplied by Defi users referred to as liquidity providers.

The As a reward, liquidity pool providers are offered incentives from transactions that occur on the pool according to their percentage of added liquidity. As an example, if a Uniswap trader asset is $20 in a pool that is worth $100, the trader enjoys 20% liquidity provider tokens as trades are executed. These tokens give users a non-custodial right over their shares and assets, not restricting the use to Uniswap, these tokens can be used for other DeFi operations and even traded on centralized exchanges.

The idea of using liquidity pools is the spine of so many DeFi protocols but the process of achieving rewards or adding liquidity might differ. A typical example is Uniswap and some others that use the constant product formula which assures that the total values of assets in the pool must be equal to a constant value that is x * y = k.

The role of liquid tokens in DeFi

The innovation of the "liquidity" concept brought a new phase of use cases to Ethereum's ecosystem. In the early days of DeFi, token use is known to be limited and restricted to staking purposely for governance use. This simply means they are locked up over a period and thereby providing the system with little liquidity which leads to an increase in slippage. But, the idea of liquidity tokens solved this problem by making liquidity tokens more useful for other DeFi use cases such as

  • Liquidity mining: using liquidity pools in Decentralized exchanges allows users to add tokens to other DeFi platforms to generate more yield- a process referred to as farming.
  • Tranching:  This also is an added advantage to the DeFi ecosystem it is a process that allows LPs to provide token holders with constant interest returns using calculated risks
  • Synthetic asset: A new growing benefit of a liquidity pool is minting synthetic assets. The basic idea runs on getting a pegged asset of your choice after connecting your liquidity to an oracle.

How Automated Market Makers (AMMs) work?

A typical AMM works as a series of liquidity pools, usually a pair of assets. For example, ETH/DAI asset pool. Using the formula "x * y = k", where “x” is the amount of token A in the liquidity pool, “y” is the amount of token B and “k” is a fixed constant. The pool’s total liquidity is always recalculated and balanced automatically to maintain an equal ratio between the two assets. Let's assume there are 1 ETH and 2,000 DAI in the pool. 1 DAI would cost 0.0005 ETH, and 1 ETH would cost 2,000 DAI. But if 0.01 ETH is traded for 20 DAI, then the price would change. Now, 1 DAI would cost 0.000495 ETH. This is a tiny change, but the shift gets bigger with bigger trades. Each trade changes the underlying price. The pool is balanced by arbitrage traders who are quick to take advantage of price discrepancies in asset pools.

When a new pool is created in an AMM, the first user who provides liquidity for a particular asset pair sets the price of the assets in the pool. In most DEXs, liquidity providers are required to provide an equal value of both assets. It is important to have as much liquidity as possible because deep liquidity lowers price impacts in an asset pool. Also, as more people provide liquidity, it is ensured that users can trade assets by easily swapping them with other tokens without much price slippage. This creates a fair and efficient market.

Automated Market Maker

What is liquidity provisioning?

Liquidity provisioning is the act of depositing crypto assets into a DeFi protocol's liquidity pools to help facilitate its operations. Liquidity provisioning is needed to create an efficient decentralized market environment. With deep liquidity, assets can easily be exchanged for one another, and at very low rates. Liquidity provisioning also provides yield-earning opportunities for liquidity providers.

In DeFi, liquidity providers (LPs) are effectively market makers. They are incentivized to deposit crypto assets into DeFi protocols to help decentralize their operations. LPs are rewarded with fees generated by the protocol, token incentives, and others. Assets deposited are usually locked within the protocol for a specified amount of time. The longer the lockup period, the higher the rewards generated.

When a liquidity provider deposits an asset pair in a liquidity pool, they are issued a liquidity provider (LP) token. LP tokens represent an LP's percentage share in a liquidity pool. They are yield-bearing tokens used to track individual contributions to the overall liquidity pool and are needed to redeem or remove liquidity.

How to provide liquidity on DEXs (Uniswap/Sushiswap) using Frontier?

Frontier provides a seamless way to provide liquidity on the most popular DeFi platforms across multiple chains. On Frontier's simple-to-use interface, users can deposit their assets on platforms like Uniswap or Sushiswap to take up LP positions with just a few clicks.

To provide liquidity on Uniswap

Step 1

Open your Frontier wallet interface => Tap the "Explore" icon => Select "Uniswap V2 liquidity" => Choose asset pair => Enter amount and tap "Supply"

Step 2

A dialogue window revealing the amount of LP tokens and percentage pool share will appear => Tap "Continue" => Review transaction and tap "Add liquidity"

You have successfully provided liquidity on Uniswap. Your LP tokens will reflect in your Frontier wallet.

Risks associated with providing liquidity

Liquidity provisioning comes with a lot of benefits, but it is not without risks. Providing liquidity comes with an inherent risk called impermanent loss.

Impermanent loss

This occurs when the ratio of two assets held in a liquidity pool becomes uneven due to a sharp price increase in one of the assets against the other. This causes the liquidity provider to lose out on the gains of holding the assets individually. The more significant the change in asset price is, the bigger the loss. Impermanent loss only materializes when the LP sells or opts out of its LP position before price recovery. However, LP rewards can often offset the impact of impermanent loss.

Smart contract risks

Liquidity pools are governed and maintained by smart contract codes. This makes them susceptible to hacks due to errors in their codes. A bug in the smart contract can lead to the loss of all funds deposited in a pool. Moreso, liquidity pools are often a target for malicious actors in DeFi and are very hotspots for theft in DeF‌i.

Centralized governance risks

Another risk faced by liquidity providers is governance risk. Protocols whose liquidity pools are governed by the developers are often a red flag. Without community-centric governance, users run the risk of getting the rug pulled by malicious project developers. If a protocol's governance structure is solely concentrated in the hands of the core project team, the developers can decide to take control of the liquidity pools and steal user funds.

Top five ways to earn passive income on your crypto assets
Don’t just hodl your crypto assets, lend, stake, provide liquidity and earn yield on your assets

Conclusion

Liquidity providing is very crucial to the day-to-day activities of many DeFi platforms. From exchanges to lending protocols, liquidity pools are what power these platforms. This makes liquidity provisioning critical to obtaining market efficiency and maintaining decentralization. In addition, providing liquidity creates a good extra income-earning opportunity for DeFi users. Frontier, the leading DeFi mobile wallet aggregator, provides the best platform for users to easily take advantage of the numerous DeFi opportunities.

Share this story:
Victor Ugochukwu

Head, Communications & Content