Decentralized exchanges (DEXs) are cutting-edge programs on Ethereum’s blockchain that offer investors an alternative way to exchange cryptocurrency tokens. Gaining popularity over the last year, there’s now over $100 billion worth of cryptocurrency locked in decentralized finance protocols.
The most successful decentralized exchange to date is Uniswap with over $9 billion in crypto assets staked for liquidity on its platform. Uniswap is an Ethereum-based protocol that uses smart contracts to hold crypto assets in liquidity pools, allowing for investors to trade cryptocurrencies directly from their Ethereum wallet. However, Ethereum gas fees have been extremely expensive as of late, so these programs are shifting toward layer 2 scaling solutions to lower the trading costs for investors.
You can provide liquidity to decentralized exchanges to earn transaction fees. Popular liquidity pools, such as the Ethereum-USDC liquidity pool on Uniswap, earn fees equivalent to about a 25% annual interest rate. Learn more about how liquidity provider tokens work now.
What is a Liquidity Provider?
Liquidity providers are investors who stake their cryptocurrency tokens on DEXs to earn transaction fees, often referred to as liquidity mining or market making. These transaction fees are often denominated in interest rates, and the interest varies based on the amount of liquidity available and the number of transactions in the liquidity pool. While Uniswap doesn’t show the interest rate you’ll earn, you can estimate your yield based on the transaction volume and amount of liquidity staked in the pool.
How Liquidity Provider (LP) Tokens Work
Uniswap V2 uses Ethereum-based ERC-20 tokens as liquidity provider (LP) tokens. These LP tokens are proof you own part of the liquidity pool which you can use to remove your crypto tokens from the liquidity pool at any time. The fees earned from transactions go directly into the liquidity pool, so your token holdings will appreciate proportionately with the growth of the liquidity pool.
Uniswap has upgraded to Uniswap V3, but it still offers Uniswap V2 as an option to investors. The new version of Uniswap launched on May 5, and it uses non-fungible tokens (NFTs) as liquidity provider tokens. No, you won’t be using art or collectibles for liquidity – NFTs are simply tokens that hold distinct, separate values.
Since NFTs can hold separate values for each token, Uniswap V3 lets liquidity providers choose the price range of crypto assets that they wish to provide liquidity at. This custom price range is represented by an NFT which you can use to remove your liquidity at any time.
The protocol explains this concept as a “fee earning limit order”. If the price of the cryptocurrency falls out of the price range you specify, the smart contract will remove you from the liquidity pool and sell your cryptocurrency for whichever token is still within your price range.
For example, you could provide liquidity to the ETH-USDC pool specifically between a $1,500 Ether and a $2,000 Ether. If your Ether tokens drop in value to $1,500, then you’ll sell your USDC for Ether tokens and receive all your funds back in Ether. You’ll also be able to adjust the price range that you provide liquidity at, letting you adjust your liquidity with market conditions.
Automated Market Maker (AMM)
Automated market makers (AMM) replace the need for order books used by centralized exchanges. Exchanges like Coinbase and Gemini use investors’ buy and sell orders to provide liquidity. They can do this because centralized exchanges have a certain degree of control over investors’ funds. With DEXes, smart contracts calculate the price of an asset by dividing the total amount of tokens in the liquidity pool by each other.
Since liquidity pools rebalance to maintain a 50/50 proportion of cryptocurrency assets by USD value, they can use the formula X * Y = K where X and Y are the USD value of cryptocurrencies in the pool, and K is the total value of funds in the pool.
For example, there may be 79,180 Ethereum tokens and 134,457,994 USDC tokens in the ETH-USDC liquidity pool. The total amount of funds in the pool would be equivalent to $269,084,583.
With this information, Uniswap can derive the current price of each asset. Take 134,457,994 and divide it by 79,140 to determine the price of Ethereum would be $1,698.13 on Uniswap’s exchange.
Farming with LP Tokens
Liquidity provider tokens are proof that you own a piece of the liquidity pool you stake your crypto assets in. You need these tokens to redeem your assets when you want to sell your tokens, but until that time you can use certain LP tokens to yield farm.
Yield farming refers to an investment strategy where cryptocurrency investors switch between different liquidity pools to earn the highest interest rates possible. They often do this by leveraging their positions by taking out loans on DeFi platforms like Compound or MakerDao.
Certain platforms let you stake your LP tokens to earn extra rewards in separate liquidity pools. Most of these platforms are small, and you run the risk of losing your assets through smart contract failures. Depending on your risk tolerance, it may be better to simply stake your crypto assets in 1 liquidity pool.
What is a Liquidity Pool?
Liquidity pools use smart contracts on Ethereum’s blockchain to provide liquidity for decentralized exchanges. Liquidity providers can use their Ethereum wallet to send tokens to a liquidity pool, where investors’ funds are aggregated for liquidity on DEXes.
Uniswap charges a flat 0.3% transaction fee for every swap, and this fee is distributed proportionally to each investor in the liquidity pool. Depending on the pool you’re invested in and the amount of transactions on Uniswap, you can earn anywhere from 2% to 50% annual interest from liquidity provider fees.
Are Smart Contracts Safe?
While smart contracts have been hacked in the past, most smart contracts today are very secure. A good way to gauge the security of a smart contract is by looking at the value of the funds locked in the contract.
If there is a significant amount of assets stored in a smart contract, say over $1 million, the contract should be pretty secure. This is because if a hacker were able to hack the contract, they’d be able to seize all the funds that are held inside of it.
Essentially, you can view the amount of funds locked in smart contracts as a “bounty” for hackers – the bigger the bounty, the less likely it is that the smart contract can be hacked.
Frequently Asked Questions
Explore More: BEST DEFI YIELD FARMS