Skip to main content

Someone wanted to learn this too, so Grasp built them a personal learning path.

You can keep exploring this one or create your own

Understanding Liquidity Mining and LP Tokens

Hello! Welcome to your next lesson.

In our last session, we explored the concept of impermanent loss, the inherent opportunity cost and risk that liquidity providers (LPs) take on when asset prices diverge. This naturally raises a critical question for your project: if providing liquidity is risky, how do you convince people to do it for your token?

The answer lies in creating incentives that outweigh the risks. Today, we'll dive into the most popular mechanism for this: liquidity mining. You will learn about the mechanics of how liquidity mining programs work and understand the crucial purpose of the LP tokens that users receive from Uniswap. This knowledge is the foundation for designing a system that attracts the liquidity your token needs to thrive.

1. The LP Token: Your Ticket to the Game

When you, or any user, provide liquidity to a Uniswap pool (like your MYT/ETH pool), the protocol mints and sends a special token to your wallet in return. This is called an LP (Liquidity Provider) token.

At its simplest, an LP token is a receipt. It represents your proportional share of the assets in the liquidity pool. When you want to withdraw your underlying assets (plus any accrued trading fees), you must return your LP tokens to the pool.

Liquidity Provider and LP Tokens Exchange
This image illustrates the fundamental exchange: a Liquidity Provider (LP) deposits assets into a liquidity pool and, in return, receives LP tokens that represent their share of the pool.

However, an LP token is far more powerful than just a receipt. From a technical standpoint, it is typically a standard ERC-20 token. This means it's transferable, tradable, and, most importantly, can be used as an input for other smart contracts. This "composability" is what makes liquidity mining possible.

To understand the flow, let's walk through the steps of becoming a liquidity provider.

What Is Liquidity Mining Your Beginner DeFi Guide

The article 'What Is Liquidity Mining Your Beginner DeFi Guide' provides a very clear walkthrough of a user's journey to becoming an LP. This will solidify your understanding of the first step in our process.

Read the subsection titled 'The Journey of a Liquidity Provider'. Focus on the three steps described: choosing a pair, depositing into the pool, and receiving the LP token.

2. What is Liquidity Mining?

Now that we've established the importance of the LP token, let's define the core concept of this lesson.

Liquidity mining is the process of distributing a project's native tokens to users who provide liquidity to the protocol. It is a powerful incentive mechanism designed to solve the "cold start" problem for new tokens, attracting the deep liquidity needed to facilitate efficient trading.

Let's watch a short video that introduces this concept using some famous early examples in DeFi.

What Is YIELD FARMING? DEFI Explained (Compound, Balancer, Curve, Synthetix, Ren)

The Finematics video 'What Is YIELD FARMING? DEFI Explained' gives a concise and dynamic introduction to liquidity mining.

Watch the segment from 02:41 to 04:27. This part introduces liquidity mining and its role in incentivizing users beyond standard yield.

As the video explains, the rewards from liquidity mining are provided on top of the standard trading fees an LP already earns. This extra incentive is often what makes providing liquidity profitable, especially when accounting for the risk of impermanent loss.

Liquidity Mining vs. Staking vs. Yield Farming

It's common for newcomers to get these terms confused. As a developer, it's useful to have precise definitions.

What is Liquidity Mining? DeFi rewards, risks, and examples

To get a formal definition and clarify these distinctions, let's turn to the article 'What is Liquidity Mining? DeFi rewards, risks, and examples' from Cube.Exchange.

Read the 'Introduction' and 'Definition & Core Concepts' sections. Also, review the first FAQ, 'What is the difference between liquidity mining and yield farming?'. Pay close attention to the distinctions the article makes.

To summarize the key differences:

  • Traditional Staking: Typically involves locking up a single asset (like ETH) to help secure a Proof-of-Stake network. The user acts as a validator or delegator.
  • Liquidity Mining: A specific incentive scheme where a user provides liquidity (a pair of assets) to an AMM, receives an LP token, and then stakes that LP token to earn rewards.
  • Yield Farming: A broader, more active strategy of moving assets across various DeFi protocols to maximize returns ("yield"). A yield farmer might engage in liquidity mining as one of their tactics.

3. The Mechanics of a Liquidity Mining Program

A liquidity mining program involves two distinct user actions, which correspond to two separate smart contracts (or sets of contracts):

  1. Providing Liquidity: The user interacts with the AMM (e.g., Uniswap) to deposit their token pair into a liquidity pool. They receive LP tokens in return.
  2. Staking the LP Token: The user then takes their new LP tokens and locks them in a separate staking contract created by your project. This contract is what distributes your native token as a reward over time.

This second step is the "mining" part. By staking their LP tokens, users signal a commitment to your project, and in return, they "mine" your new tokens.

The following resource explains this two-part reward system very well and provides a helpful table of key terms.

What Is Liquidity Mining Your Beginner DeFi Guide

Let's revisit the 'What Is Liquidity Mining' guide to see a clear explanation of this two-step process.

Read the sections 'From Providing Liquidity to Mining Rewards' and 'Key Terms in Liquidity Mining Explained'. The analogy of staking an LP token as 'planting a seed' is particularly useful for building intuition.

Here is the table of key terms from the article for your reference:

Term Simple Definition Role in the Process
Liquidity Pool A smart contract that holds a pair of crypto assets. The "market stall" where you deposit tokens and traders make swaps.
Liquidity Provider A user who deposits assets into a liquidity pool. The person supplying the inventory that makes the AMM work.
LP Token A receipt token representing your share of the pool. Your proof of deposit, used to withdraw funds and claim rewards.
Staking Locking up your LP tokens in a separate smart contract. The action that makes you eligible for extra rewards from the protocol.
Yield Farm The specific contract or pool where you stake LP tokens. The "garden" where your staked LP tokens "farm" new token rewards.
Test your understanding!

A user wants to participate in the liquidity mining program for your MYT token. They have both MYT and ETH in their wallet.

Describe the two distinct actions they must perform, and for each action, name the primary smart contract they interact with (conceptually) and what they get in return.

Show answer
  1. Action 1: Provide Liquidity

    • Contract Interaction: They interact with the Uniswap Router/Pool contract for the MYT/ETH pair.
    • What they get: They receive MYT/ETH LP tokens representing their share of the pool. They also start earning a portion of the trading fees from this pool.
  2. Action 2: Stake LP Tokens

    • Contract Interaction: They interact with your project's staking contract (the "yield farm").
    • What they get: They start earning MYT tokens as a reward for as long as their LP tokens are staked.

4. The Purpose and Value of Reward Tokens

This brings us to the final piece of the puzzle. Why would a user go through all this trouble to earn your MYT token? What gives it value?

The tokens distributed through liquidity mining are typically governance tokens. Holding these tokens gives users a say in the future of the project. This can include voting on proposals such as:

  • Changing the protocol's fee structure.
  • Directing treasury funds to new initiatives.
  • Upgrading smart contracts.
  • Adjusting the rate of liquidity mining rewards.

By distributing governance tokens, you are decentralizing ownership and control. You give your most committed users—the liquidity providers—a stake in the project's long-term success. This alignment of incentives is a cornerstone of DeFi and is critical for building a strong, engaged community around your token.

Conclusion

In this lesson, you've connected the risk of impermanent loss with the powerful reward mechanism of liquidity mining. You now understand the full lifecycle of a liquidity provider who wants to maximize their earnings.

Key Takeaways:

  • LP Tokens are ERC-20 tokens that act as a receipt for a user's share in a liquidity pool. Their composable nature allows them to be used in other smart contracts.
  • Liquidity Mining is the process of rewarding these LPs with a project's native token to incentivize them to provide and maintain liquidity.
  • The core mechanic is a two-step process: (1) Provide liquidity to get LP tokens, then (2) Stake those LP tokens in a separate contract to earn rewards.
  • The reward tokens are often governance tokens, which give holders a voice in the project's future, aligning the incentives of the project and its community.

Preview of the Next Lesson:
You now have the complete theoretical picture of how to incentivize liquidity for your token. The next logical step is to build it. In our next lesson, you will put your developer skills to work by implementing a staking contract that accepts and rewards users for staking their LP tokens. This will be a major step in building out the ecosystem for your token.

Can't find a good explanation? Sign up and we'll make it for you

Sign up