We acknowledge Alpaca Finance’s Docs for providing much of the educational material explained in this article.
Leveraged yield farming (LYF) offers unique ways to profit and capture yield, making LYF protocols an important DeFi lego in any ecosystem. As a testament, the top LYF protocols on Ethereum (Alpha Finance) and BSC (Alpaca Finance) each have > $1 billion in TVL. In a very short time, Tulip Protocol — the top LYF protocol on Solana — also recently reached >$1 billion in TVL.
LYF is particularly profitable when a token pair’s farming yield is very high. The Solana ecosystem is particularly ripe for profitable LYF strategies because there exist many current (and likely future) token pairs with high APYs.
In this series on Tulip Protocol, we will try our best to give a ELI5 for what is LYF and, more usefully, spell out the different strategies to profit with LYF on Tulip Protocol.
What is Leveraged Yield Farming?
In LYF, users deposit a token as collateral, borrow tokens up to 3x leverage (i.e., deposit $1000 worth of tokens and borrow up to $2000 worth of tokens), and then farm ALL deposited and borrowed tokens on a DEX (i.e., Raydium or Orca) to earn trading fee rewards and farming rewards, which are autocompounded – all in one click.
If you haven’t farmed on a DEX, perhaps don’t jump into leveraged yield farming yet. First, provide liquidity on Raydium or Orca and stake your LP tokens into their farms. Going through this process will help you understand what is farming and what is LYF.
Here is an example:
1. Bullish Bob opens an ORCA-USDC farm on Tulip Protocol
Yield Farming APR - yield farming rewards from Orca’s Aquafarms (relative to value of deposited tokens)
Trading Fees APR - trading fee rewards from trading activity on Orca (relative to value of deposited tokens)
Borrowing Interest APR - interest for borrowing the USDC (relative to the value of deposited tokens).
2. Bullish Bob deposits $3000 worth of ORCA and borrows $6000 worth of USDC (3x leverage)
After clicking “Farm,” the protocol will automatically swap $1500 worth of USDC for $1500 worth of ORCA (using the Orca DEX) to make a 50:50 farming pair ($4500 in USDC + $4500 in ORCA). This liquidity will then be redirected to Orca, the LP tokens staked into Aquafarms, and all rewards autocompounded.
Because $1500 worth of borrowed USDC was swapped for ORCA, Bullish Bob’s exposure is now $4500 worth of ORCA. Compared to his original holdings of $3000 worth of ORCA, his exposure is now 1.5x leveraged long on the token. So, this is a good strategy if you are bullish on a token.
In terms of farming yields, Bullish Bob is earning 3x yield farming rewards. That is, he is earning 1x yield farming rewards on $9000. But, because his equity is only $3000, he is effectively earning 3x rewards, or 1000% APY on $3000. LYF can be particularly profitable for high APY pairs—if used correctly. So, please read on to understand LYF more and the associated risks.
3. Bullish Bob can track his position under the “Your Positions” tab
The definition of each header shows up if you hover your mouse over the “i”:
Position Value - Value of your LP tokens in the DEX
Debt Value - Value of your debt
Equity Value - Estimated value of what you would get if you closed your position
Kill Buffer - Liquidation Threshold (85%) - Debt Ratio (Debt Value/Position Value). Position gets liquidated if Kill Buffer hits 0%.
Congratulations! You just learned how to open your first LYF position. Generally, the best strategy is to hold the position long-term to earn those high yields.
Understanding Your Initial Net Exposure is Critical
When doing LYF, it is critical you understand your exposure to the tokens you are farming – that is, which/how many tokens you are long and short, so that you can understand your market risks. Luckily, it is pretty easy to calculate your initial market exposure: you are long on the tokens in your LPs and you are short on the tokens you borrow*. Your net exposure is the net value of the two.
*You are long on the tokens in your LPs because you are holding these tokens during the farming duration. You are short on the tokens you borrowed because you sold them to create the LP tokens. This may not be a technically accurate way for using the word “short", so just bear with us when we use this word in our explanation of calculations below.
What tokens you deposit does not affect your initial token exposure. If Bullish Bob deposited $3000 worth of USDC instead of $3000 worth of ORCA (borrowing $6000 worth of USDC in both cases), his LPs will have the same composition and his borrowed tokens will remain the same; thus, his net exposure will be the same - $4500 worth of ORCA. However, what tokens he deposit does matter in terms of saving on swap costs. If Bullish Bob deposited $3000 worth of USDC (and borrowing $6000 in USDC), then $4500 in USDC will be swapped for $4500 worth of ORCA. So, depositing $3000 worth of ORCA (assuming Bullish Bob already has it somewhere) will minimize his swap costs.
The Strategies
Ok, enough introduction. Let’s go through examples of how $10,000 can be used to profit on Tulip Protocol. LYF strategies can be categorized into four general types: leveraging long, shorting, hedging pseudo-delta neutral, and farming without leverage.
Strategy #1: Leveraging Long
If you are bullish on a token (e.g., ORCA), you can use Tulip Protocol to create a leveraged long position on the token (ORCA), while earning multiplied farming yields, in two ways:
1) Opening an ORCA-stablecoin(USDC) farm, borrowing the stablecoin using >2x leverage
Bullish Bob opens an ORCA-USDC farm, deposits $10,000 worth of tokens (preferably ORCA to minimize swap costs), and borrows $20,000 worth of USDC (3x leverage). After clicking “Farm,” $5000 in USDC will be swapped for $5000 in ORCA, creating a 50:50 proportion for farming ($15,000 in ORCA + $15,000 in USDC). Bullish Bob’s market exposure will be:
Long $15,000 in ORCA (tokens in LP)
Long $15,000 in USDC (tokens in LP)
Short $20,000 in USDC (tokens borrowed)
His initial net exposure will be long $15,000 in ORCA (longing/shorting a stablecoin is neutral because they generally remain at 1). Compared to his original holding of $10,000 in ORCA, he will now be 1.5x leveraged long on the token. In addition, he will be earning 3x farming yields + trading fees of 1000% APY!
Compared to leveraging long on a CEX, the advantage of using Tulip Protocol is 1) Bullish Bob is likely paying lower interest than on a CEX and 2) he’s putting his capital to work earning significant yields, as opposed to locking them up in a CEX.
2) Opening an ORCA-cryptoasset(e.g., SOL) farm, borrowing the cryptoasset using >2x leverage
Bullish Bob opens an ORCA-SOL farm, deposits $10,000 worth of tokens (preferably ORCA to minimize swap costs), and borrows $20,000 worth of SOL (3x leverage). After clicking “Farm,” $5000 in SOL will be swapped for $5000 in ORCA, creating a 50:50 proportion for farming ($15,000 in ORCA + $15,000 in SOL). Bullish Bob’s market exposure will be:
Long $15,000 in ORCA (tokens in LP)
Long $15,000 in SOL (tokens in LP)
Short $20,000 in SOL (tokens borrowed)
His initial net exposure will be long $15,000 in ORCA and short $5,000 in SOL. Compared to his original holding of $10,000 in ORCA, he will now be 1.5x leveraged long on the token. But, he will also be short $5,000 in SOL. To profit more than the first example (opening an ORCA-USDC farm), Bullish Bob is either betting that 1) that SOL will drop in value or 2) the farming yields of ORCA-SOL are higher than that of ORCA-USDC to the degree it can cover the losses from SOL rising.
During this time, Bullish Bob will be earning 3x farming yields + trading fees or 1000% APY on his capital!
Remember, you can tailor your leverage level. If Bullish Bob used 2.5x leverage in the two examples above, he will be 1.25x leveraged long on ORCA. If he used 2.2x leverage, he will be 1.1x leveraged long on ORCA.
In summary, if you want to leverage long on a token (e.g., ORCA), you can open an ORCA-stablecoin farm or an ORCA-cryptoasset (SOL) farm, borrowing the token opposite ORCA at >2x leverage. The first farm will be more profitable if the cryptoasset (SOL) rises; the second farm will be more profitable if the cryptoasset (SOL) falls. If you think the cryptoasset will remain flat (like a stablecoin), then just choose the farm with the higher APY.
Modeling Your Equity Over Time
When the non-borrowed token (ORCA) or the borrowed token (USDC or SOL) changes in price, the LPs will rebalance. If ORCA price rises relative to USDC or SOL, the LPs will contain fewer ORCA and more USDC or SOL. If ORCA price falls relative to USDC or SOL, the LPs will contain more ORCA and fewer USDC and SOL.
When prices change, calculating your new market exposure is easy. Just apply the same equation: long on tokens in LP + short on tokens borrowed. On Tulip Protocol, these metrics are conveniently shown in the “Your Positions” tab.
In the above position, the user is long 606 ORCA, long 11,147 USDC, and short 809 ORCA. Thus, the user’s current market exposure is short 203 ORCA.
The graph below models how your equity value (100% = $10,000) will change when the non-borrowed and borrowed tokens move.

Gray dotted line - Bullish Bob’s equity if he simply held $10,000 worth of ORCA in a wallet. His equity will fall/rise linearly with the price of ORCA (the non-borrowed token).
Black dotted line - Bullish Bob’s equity if he longed $15,000 in ORCA (1.5x leverage) on a CEX.
Black line - Bullish Bob’s equity when farming ORCA-USDC at 3x leverage (borrowing USDC) without considering farming yields. At time = 0, he is 1.5x leveraged long on ORCA. His equity will always be below the black dotted line due to impermanent loss.
Purple line - Bullish Bob’s equity for farming ORCA-USDC at 3x leverage (borrowing USDC), inclusive of farming yields. If farming yields are high, he will generally profit more compared to simply leveraging 1.5x on a CEX (and this is not considering borrowing interest on a CEX). However, this will take time and that is why LYF is a long-term strategy. This line also models ORCA-SOL at 3x leverage (borrowing SOL) if SOL remains flat (i.e., behaves like a stablecoin).
Green line - Bullish Bob’s equity for farming ORCA-SOL at 3x leverage (borrowing SOL), inclusive of farming yields. Because he has a slight short on SOL, if SOL increases by 20%, his equity will be less than the Purple Line. If ORCA increases by ~90% (where the Green and Purple Line intersects), the LPs will rebalance to contain more SOL, to the point where he no longer has a short position on SOL.
Red line - Bullish Bob’s equity for farming ORCA-SOL at 3x leverage (borrowing SOL), inclusive of farming yields. Because he has a slight short on SOL, if SOL decreases by 20%, his equity will be more than the Purple Line. If ORCA increases by ~60% (where the Red and Purple Line intersects), the LPs will rebalance to contain more SOL, to the point where he no longer has a short position on SOL.
Liquidation Risk
The liquidation threshold (maximum loan-to value; LTV) for all leveraged farms on Tulip Protocol is 85%. Meaning, if your Debt Ratio (Debt Value/Position Value) exceeds 85%, you risk getting liquidated. When you open a farm at 3x leverage, your Debt Ratio will begin at 66.67% ($20,000/$30,000). If you open a farm at 2.5x leverage, your Debt Ratio will begin at 60% ($15,000/$25,000). The Kill Buffer, shown on Tulip’s Dashboard, is equal to 85% minus the Debt Ratio. When the Kill Buffer hits 0%, you risk getting liquidated.
How much can ORCA fall before risking liquidation? The calculations can be complex, so we provide you a cheat sheet below. If you farm ORCA-USDC/SOL at 3x leverage (borrowing USDC or SOL), then ORCA relative to the borrowed token (ORCA/USDC or ORCA/SOL) can drop 38.5% before you risk liquidation. This sheet can be used at any point during your farming. Be particularly careful if the borrowed token (e.g., SOL) price rises, as this can accelerate the price ratio towards liquidation.
What if <2x leveraged is used?
Well, just use the same easy process above to calculate your initial net exposure. If you open an ORCA-SOL farm, deposit $10,000 worth of tokens (preferably $7,500 in ORCA and $2,500 in SOL to minimize swap fees) and borrow SOL at 1.5x leverage (borrowing $5,000 in SOL), then you’ll be farming $7,500 in ORCA + $7,500 in SOL. Your market exposure will be:
Long $7,500 in ORCA (tokens in LP)
Long $7,500 in SOL (tokens in LP)
Short $5,000 in SOL (tokens borrowed)
Your initial net exposure will be long $7,500 in ORCA and long $2,500 in SOL. Your capital of $10,000 is not leveraged, as you still have exposure to $10,000 in tokens. However, you’ll be earning 1.5x farming yields! As a general rule, when farming at <2x leverage, you will be long on both tokens, just less long on the token you borrow.
What if exactly 2x leveraged is used?
If you open a ORCA-stablecoin farm and borrow ORCA at 2x leverage, you will be minimally exposed to any market changes, so we categorize this as a pseudo-delta neutral strategy (see Part 3, Strategy #3). If you open an ORCA-stablecoin or ORCA-cryptoasset farm, borrowing the stablecoin or cryptoasset at 2x leverage, we call this the “Farming Without Leverage” strategy (see Part 4, Strategy #4).
Summary
LYF allows you to deposit tokens, borrow tokens up to 3x leverage, and farm all deposited and borrowed tokens on a DEX, while autocompounding rewards — all in one click. There are four main strategies for LYF - leveraging long (Part 1), shorting (Part 2), hedging pseudo-delta neutral (Part 3), and farming without leverage (Part 4). In all four strategies, you will be earning multiplied farming yields on your capital, instead of locking them up for margin trading on a CEX or DeFi protocol. Part 5 will explain how Tulip Protocol can sustainably generate revenue through its lending pools. Follow The Solana Grapevine to be the first to read Parts 2 to 4.
The Solana Grapevine is powered by Grape Protocol. For more alpha, join the Grape Discord. 🍇
This post was written and edited by a Solana Grapevine team member. If you would like to share your writing with the Solana community through our platform, please contact us via DM on Twitter at @SolanaGrapevine.
This content should not be construed as financial advice. Always do your own research before investing in crypto assets and using DeFi protocols.
Follow @SolanaGrapevine or subscribe to this newsletter to never miss an update.