What are Liquidity Pools and How do they Work?
A liquidity pool is a supply of crypto assets that are underpinned by a smart contract that outlines the terms under which those assets are traded, and executes the trading of those assets according to the terms in the smart contract.
A healthy supply of liquidity from a variety of providers are essential to the long-term growth and stability of a crypto asset or protocol, so protocols incentivize depositing liquidity into their pools by offering liquidity provider (LP) tokens to users who deposit their assets.
LP tokens, which typically follow the ERC-20 standard, can then be used in a variety of ways to benefit the liquidity provider’s portfolio. LP tokens can be used for governance votes and can be staked to farm yield for the supplier, among other things.
“Pooling” in DeFi vs. TradFi
In traditional finance (TradFi), currency exchanges like the stock exchange maintain an order book and coordinate “matches” between buyers and sellers of an asset. For each successful match, traders are charged exchange fees that go directly to exchange operators.
In DeFi, the smart contracts hold liquidity reserves of various tokens, and trades are executed autonomously against these reserves. Prices are set automatically using the constant product market maker mechanism, which keeps overall reserves of a given asset in relative equilibrium. Reserves are pooled between a network of liquidity providers who supply the system with tokens and receive a proportional share of the transaction fees accrued.
In Tradfi, the centralized organizers of the exchange set the fee price and traders are obliged to pay it, no matter how exorbitant. In DeFi, the “organizer” of the exchange is a smart contract, which eliminates the need to pay fees to a centralized service provider. This allows the contributors to a liquidity pool to share the benefits of an asset’s market success in proportion to the amount of liquidity they have provided to the pool.
How to add Liquidity to a Liquidity Pool
The following example demonstrates what happens when a user contributes to a liquidity pool on Uniswap, one of the most well-known Decentralized Exchange (DEX) platforms in DeFi.
The user in this example wants to provide ETH and DAI to a Uniswap pool. After adding their assets, they will receive Uniswap LP tokens, which represent a share of the underlying assets in the Uniswap smart contract.
When supplying liquidity to Uniswap, the assets need to be provided in 50/50 proportions. For example, when adding $1000 in liquidity to the ETH-DAI pool, $500 ETH and $500 DAI must be added.
Zap-in to Liquidity Pools on Zapper to Minimize Transactions.
The user in our example only holds ETH, but still wants to contribute to the ETH-DAI Uniswap pool. In order to complete this transaction on Uniswap, the user must first convert half of the ETH to DAI and then submit a second transaction to add the liquidity.
On Zapper, the user in this example would be able to contribute to the ETH-DAI pool in a single transaction. When the user contributes $1000 ETH to the Uniswap ETH-DAI pool, Zapper’s smart contract will automatically convert half of the supplied ETH to DAI and submit the liquidity to the pool all at once. Zapper’s smart contract will also pass the LP tokens back to the provider at the end of the transaction. Check out our article on Zaps to learn more about how this feature works.