What Is Yield Farming?

Definition
DEFINITION

Yield farming rewards users for provisioning liquidity or providing other value-adding services to a decentralized application’s ecosystem.

Decentralized finance (DeFi) has experienced a period of rapid growth in the last few years, with its aggregate Total Value Locked (TVL) reaching upwards of a quarter of a trillion dollars. The flourishing DeFi ecosystem is made up of trust-minimized financial applications that can be accessed by anyone with an Internet connection.

Fueling this growth is the high-speed nature of development and innovation within DeFi—smart contract developers across the world have been rapidly building, iterating upon, and deploying new decentralized applications at an unprecedented pace. The power of DeFi’s permissionless composability has led to many new financial primitives that previously couldn't exist due to the inefficiencies, opaqueness, and counterparty risk present in today’s traditional financial system. One of these innovations is yield farming, also referred to as liquidity mining.

In this article, we’ll showcase the value proposition of yield farming for DeFi protocols, cover its benefits and risks, and examine how projects have successfully bootstrapped liquidity and token distributions through increasingly sophisticated yield farming schemes.

What Is Yield Farming (Liquidity Mining)?

Yield farming, or liquidity mining, is a recent financial primitive in DeFi that rewards users for provisioning liquidity or providing other value-adding services to a dApp’s ecosystem. In essence, yield farming rewards incentivize users to generate value for an on-chain protocol. Yield farmers (depositors) are rewarded proportional to their deposit in an application’s native token, granting the depositing user a higher Annual Percentage Return (APR) on their provisioned liquidity.

Yield farming is often implemented with two primary goals in mind:

  • Bootstrapping liquidity —Incentivizing users to deposit and lock up their liquidity into a DeFi application, growing the TVL and bootstrapping the supply side of the ecosystem. For example, when more liquidity is available on a DEX, slippage is decreased for users and the volatility of certain tokens, such as algorithmic stablecoins, can also be reduced. Furthermore, growth in the demand side of the ecosystem can be fostered if a superior offering relative to competitors is created.
  • Distributing token —Fairly distributing a DeFi application’s native token to protocol users who take on the opportunity cost of depositing their funds on the platform. The “fair” distribution of governance tokens can allow for greater participation in decentralized governance processes since a portion of the supply is distributed across a greater number of entities.

The token rewards from yield farming are an addition to any built-in revenue streams inherently generated by the protocol, such as trading fees within a decentralized exchange or interest from lending in a decentralized money market. Some projects also offer yield farming rewards for other services, including supporting community, marketing, or developer initiatives.

Different DeFi protocols take different approaches to yield farming depending on the exact goals they aim to achieve, which may include one or both of the objectives above. Yield farming has enabled countless projects to bootstrap their growth at a quicker pace to secure hundreds of millions to billions in user funds.

How Does Yield Farming Work?

Protocols that have followed the liquidity mining model include a wide range of applications, from decentralized exchanges to money markets, yield aggregators, and beyond. These projects have benefited from creating a network of early users who actively bootstrap the project’s liquidity and participate in the protocol’s governance. The initial implementations of yield farming, however, were employed to directly boost the liquidity of a specific asset.

Yield Farming Implementations and Strategies

One of the earliest pioneers of yield farming was Synthetix, a synthetic asset protocol powered by Chainlink Price Feeds. Synthetix launched a liquidity mining mechanism in 2019 to reward sETH/ETH liquidity providers on Uniswap, with users who deposited their sETH/ETH liquidity pool tokens from Uniswap into a staking contract earning a proportional amount of SNX tokens (Synthetix's native token) to their share of liquidity provided.

In effect, not only did liquidity providers earn extra yield on top of Uniswap trading fees (helping offset impermanent loss), but the barrier to entry was lowered for new traders entering the Synthetix ecosystem as there was now a way to seamlessly convert ETH into sETH (Synthetix’s ETH synth) with much lower slippage. Users who acquired sETH could then enter the Synthetix ecosystem and acquire other synths that provided exposure to other assets. Over time, Synthetix’s yield farming program shifted to begin providing SNX rewards to users who deposit sUSD (Synthetix’s stablecoin) on Curve Finance, alongside other popular stablecoins.

A diagram showing Synthetix’s liquidity mining model.
Synthetix's pioneering liquidity mining model.


While Synthetix was truly a pioneer in this regard, the next iteration of yield farming—still often used in the market—was largely popularized by Compound, a decentralized money market now powered by Chainlink Price Feeds, and the launch of its COMP governance token in June 2020. Compound rewards users with COMP for both supplying and borrowing capital on the platform. The launch of this yield farming mechanism in 2020, kickstarted an explosion of new DeFi projects and yield farms, known as “DeFi Summer” by blockchain enthusiasts, that utilized yield farming strategies in similar ways. With each successive launch, various flavors of yield farming have been tested in real-time to gauge their effectiveness and improve upon suboptimal strategies.

Another notable advancement in yield farming mechanics was pioneered by Curve, a decentralized exchange (DEX) for low-slippage trades. Curve features a unique model for directing yield farming rewards within its liquidity pools through its native token, CRV. Holders can “vote lock” their CRV to receive vote escrow CRV (veCRV), where the longer they lock for, the more veCRV they receive, which decays over time until the underlying CRV is unlocked. Vote locking allows holders to vote on governance proposals, direct CRV emission rewards towards specific liquidity pools, and receive a portion of all exchange trading fees. Curve’s “veToken” model offers a unique way to align long-term incentives between liquidity providers and governance participants.

Curve has come to make up a significant portion of the DeFi space in terms of Total Value Locked and provides a way for stablecoin protocols to obtain deep liquidity and achieve peg stability. This makes the ability to direct CRV token emissions on its exchange compelling not just for users seeking yield but also for protocols seeking liquidity for their token. This has led to different DeFi protocols competing to capture Curve governance power by incentivizing CRV token holders to stake their CRV on their protocol instead of Curve, commonly known as the “Curve Wars”. Convex Finance, a protocol managing a significant portion of the veCRV supply, allows users to 1-way convert their CRV to cvxCRV, which entitles them to the usual rewards earned from veCRV but also to additional boosted rewards through the Convex platform.

The Curve Wars illustrate how the permissionless composability of DeFi and effective incentive alignment through sophisticated yield farming dynamics can create successful strategies for bootstrapping long-lasting communities.

Liquidity and Network Effects

In order to further explore why DeFi protocols are willing to distribute tokens passively to users, it’s important to understand the key importance of liquidity within DeFi. As decentralized applications are fully open-source, their primary defensive economic moat is their community and deposited liquidity. A protocol looking to sustain itself over the long term needs to extend its focus beyond business logic to bootstrapping a lasting network effect tied to its underlying utility. In other words, a network is about more than just the code itself; it’s about adoption, users, community support, the value and utility being generated, and more.

It is for this reason that many protocols decide to employ yield farming as a means of generating liquidity with the goal that it will lead to a superior experience for users and greater adoption. As more and more liquidity (supply) is added to a DeFi application, the more users it attracts (demand), who then pay fees to the supply side, attracting more user deposits—a virtuous cycle of growth. This cycle is designed to propel a protocol by continually absorbing liquidity, as users and liquidity providers alike naturally gravitate toward applications with the lowest slippage and highest yield.

It’s worth noting that this effect works similarly in the inverse scenario—if less and less liquidity is available in a protocol, the fewer users it attracts, which in turn generates even less liquidity, and so on. This can result in a subpar user experience as the protocol is unable to generate and attract liquidity and create liquidity-based network effects for its product.

While a protocol having liquidity in this fashion can be seen as a defensible market advantage, it does not make it completely resilient to changing market dynamics. Yield farming incentives can also be used to siphon liquidity from other protocols, where if enough liquidity migrates over, the liquidity network effect moves from the old protocol to the new. This approach is commonly known as a vampire attack. While vampire attacks can be successful in attracting liquidity for a new protocol, while also boosting the old protocol’s TVL through increased attention, they also highlight the importance of factors beyond liquidity, such as users, unique utility, brand awareness, and more. In the end, yield farming is simply a tool that can be used to achieve a multitude of goals.

While the tokens generated from yield farming incentivize users to deposit liquidity, they can also provide users a claim on a portion of the fees the DeFi application generates and encourage participation in governance. These governance decisions can include voting on proposals regarding the future development of the protocol or the addition of new yield farming pools. However, in order for the governance process to be truly decentralized, tokens need to be distributed across a wide array of independent users. This is where the second feature of yield farming comes into play—token distribution.

Fair Token Distribution

Although not its original goal, yield farming can also serve as a “fair” distribution model for tokens. Instead of just allocating tokens to a select few investors and insiders, tokens can be given directly to community members through an equal access model based on users providing specific contributions. The distributed tokens allow the community to collectively own the protocol in greater share and make changes to it as needed.

Projects that utilize yield farming for token distribution aim to ensure that not only is the token supply distributed among many parties, but that tokens are given directly to the users who provide value to the protocol’s ecosystem. In effect, this can create a strong community of token holders who are highly incentivized to grow the protocol and increase the value of their tokens. Stakeholders with strong incentives are much more likely to stick around for the long term and continue providing value to the ecosystem.

An early example of this “fair” distribution model in 2020 was YFI, the native governance token of Yearn Finance—a smart contract protocol designed to automate the provisioning of liquidity across DeFi applications based on the best yield opportunities. When yield farming as a concept was still very new, Yearn minted and openly distributed 30,000 YFI tokens to liquidity providers for a variety of pools over the course of two weeks. The majority of YFI was farmed by entities that had a deep understanding of the DeFi ecosystem and subsequently grouped together to form the initial YFI community.

Largely thanks to this “fair launch”, Yearn has grown to become a pioneering digital organization managed by a decentralized community of contributors. It was possible for a community to organically form in a democratic manner and further the growth of the Yearn ecosystem due to community members having a direct financial incentive in the future of the protocol. In essence, yield farming enabled Yearn to simultaneously bootstrap two very important components to any DeFi protocol: grow a network effect of user-driven liquidity and create a passionate community driving the protocol forward.

With that said, the Yearn community later voted to mint an additional 6,666 YFI tokens to more closely align the core contributor community’s incentives with the protocol’s long-term success, equipping the organization with the resources needed to build a solid foundation for continual operation. While the DeFi community often gravitates towards projects founded on the principle of community ownership, the practicalities of managing a decentralized organization also need to be taken into account for a healthy, robust, and resilient ecosystem.

Yield Farming vs. Staking

Yield farming has some parallels to staking and the two terms are often used interchangeably. Staking is a term used to describe the locking up of tokens as collateral to help secure a blockchain network or smart contract protocol. Staking is also commonly used to refer to cryptocurrency deposits designated towards provisioning DeFi liquidity, accessing yield rewards, and obtaining governance rights. As such, yield farming and staking may refer to a similar user action—depositing tokens into a smart contract—but can widely differ as well. With that said, protocols commonly refer to depositing tokens into a liquidity pool as “staking”.

The term “yield farming” is also used to refer to the execution of automated yield-generating strategies in the DeFi ecosystem. Developers can create sophisticated yield farming strategies that generate returns through an interconnected loop of deposits into multiple protocols. A class of protocols called yield aggregators specialize in providing these strategies as a service to users in smart contracts known as vaults that automatically execute yield-generating strategies based on what is optimal at the current time. In exchange for a performance fee (a percentage of the profits generated), users can get access to higher yield without having to know all the complexities of the underlying strategies. This can serve as a gas-efficient way to earn yield from across the DeFi ecosystem, expanding access to a wider range of users.

The evolution of yield farming has led to the creation of new nomenclature within the DeFi community regarding the different types of pools supported by yield farming projects, namely the terms “pool 1” and “pool 2”, largely spearheaded by the original YFI yield farm. “Pool 1” allows users to stake various pre-existing tokens that already have a liquid secondary market (e.g. ETH, stablecoins, etc.) “Pool 2” refers to yield farming pools that require exposure to the token being farmed, which directly bootstraps liquidity for said token so users in pool 1 have the option to take profits on their yield.

Yield Farming Risks

Yield farming has enabled a wide array of decentralized applications, each providing its own unique value proposition and iteration upon the original design. However, higher rewards than what users can expect from the traditional financial industry also bring a set of risks.

Some of the risks of yield farming can include but are not limited to:

  • Smart contract risk —Blockchains are considered highly secure for conducting financial transactions. However, the internal business logic of smart contracts is dependent on code quality and the individual developer teams’ skill and experience. Smart contract bugs, hacks, and protocol exploits can occur in the DeFi ecosystem, leaving depositors susceptible to a loss of funds. Developers offset this risk through open-source peer-reviewed code, security audits, and good testing practices, but diligence is always required.
  • Liquidation risk —Some yield farming strategies involve using leverage in order to get increased exposure to a liquidity mining opportunity, exposing the user to liquidation risk (capital sold off to repay debt). In addition, during times of high market volatility and network congestion, the risk of liquidation is increased as it may become prohibitively expensive to top up collateral to prevent liquidation. Each user should consider this risk if they choose a strategy that involves leverage, otherwise opting for non-leveraged strategies.
  • Systemic risk —Due to the composability inherent to the smart contract ecosystem, a given DeFi application can have multiple dependencies on other DeFi protocols, effectively multiplying the potential risk of a smart contract bug in just one of them. Additionally, even if a specific smart contract is secure on its own, it may not be if layered incorrectly with other contracts. Understanding the protocol exposure of a position is crucial to mitigate excess risk.
  • Impermanent loss —Impermanent loss is the difference in value over time between depositing tokens into a multi-token pool in an automated market maker (AMM) for yield farming versus simply holding those tokens in a wallet. This loss occurs when the price of the tokens in the liquidity pool diverges in any direction. The reason it’s called ‘impermanent’ is that as long as the price ratio between the token pair in the pool returns to its value at the time of deposit, the ‘loss’ disappears. However, such a situation can be rare, making the losses in other cases permanent. Different protocols offer mitigation techniques to impermanent loss, while other protocols are not subject to this category of risk.
  • “Rugpull” risk —A “rugpull” is a term used to describe a situation when malicious actors launch a token only to extract as much value from it as possible before abandoning the project. Rugpulls can happen in various ways—by removing a considerable portion of the liquidity from an AMM, preventing selling in the token’s contract, minting a significant amount of new tokens, and more. DeFi users need to consider the risks associated with early-stage projects and do their own diligence before deciding to participate in a newly launched project.

DeFi Yield Farms Powered by Chainlink

To further boost the liquidity incentivization and fair distribution of tokens enabled by yield farming, smart contract developers can leverage additional infrastructure. Powered by decentralized oracle networks, Chainlink Price Feeds and Chainlink Automation can be used in a multitude of ways in yield farming.

  • Proportional pool rewards —DeFi protocols can integrate Chainlink Price Feeds to calculate the total USD value of staked assets in a multi-asset pool and distribute rewards proportionally. This allows them to cultivate a large pool of different assets, with greater rewards going to users who provide more valuable liquidity.
  • Auto-adjusting rewards —Chainlink Price Feeds can be used to provide the market price of an existing yield farming token on-chain. This allows for unique opportunities such as autonomously adjusting the number of tokens minted according to their market-wide price, potentially stabilizing the yield farming return for users. This Price Feed can also be used by other dApps to quickly create new DeFi-based financial products that support the token being farmed.
  • Automatic reward harvesting —Harvesting yield is a fundamental function of yield farming protocols. While users can manually initiate an on-chain transaction to trigger the smart contract to harvest yield, this can lead to a poor user experience and subject the protocol to downtime through manual intervention and the usage of centralized scripts. DeFi protocols can use Chainlink Automation to securely trigger yield harvesting functions, eliminate manual processes, and maximize the compounding efficiency of yield farming rewards.
  • Liquidations —Many DeFi protocols need a robust and reliable liquidation mechanism to prevent undercollateralized positions and ensure continued platform solvency. Chainlink Automation can monitor the health of user loans off-chain by consistently checking the collateralization of open loans. If a user’s borrow transaction is found to be undercollateralized, Chainlink Automation triggers the DeFi protocol’s liquidation function, helping to ensure that positions remain solvent even during times of extreme volatility and network congestion.

It remains to be seen how yield farming will change and evolve into the future, and whether current forms of yield farming will sustain long-term growth. A subset of DeFi protocols have attempted to improve upon the original designs of liquidity mining, a wave of innovation commonly referred to as DeFi 2.0. A primary focus of DeFi 2.0 protocols is to overcome long-term liquidity limitations through increasingly sophisticated liquidity incentivization models and incentive alignment. Innovation within DeFi isn't stopping, and yield farming as a financial primitive is likely to stick around to propel the industry towards the next wave of adoption.

If you're a developer and want to start building a yield farming application using Chainlink Price Feeds, check out our quick-start tutorial for a step-by-step guide on how to get started. To discuss an integration, reach out to an expert.

Learn more about blockchain technology

Get the latest Chainlink content straight to your inbox.