> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vanna.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# Leveraged Yield

> Borrow on Margin, then farm the borrowed funds on Blend, Soroswap or Aquarius, and unwind safely.

Leveraged yield means borrowing from Vanna and deploying the loan into a Farm pool, so you earn on more than your own capital. On Stellar you do it in two steps, Margin then Farm, or ask [Copilot](https://docs.vanna.finance/stellar/guides/copilot.md) to plan both.

## Open a position

**1. Deposit and borrow**

On **Margin → Leverage your Assets**, deposit collateral and borrow the token the pool needs, for example XLM or BLUSDC for Blend, or SoUSDC for the Soroswap XLM / SoUSDC pool. See [Borrow](https://docs.vanna.finance/stellar/guides/margin/borrow.md).

**2. Farm it**

Open the pool on **Farm** and supply or add liquidity from the margin account. On Blend, **Source** shows that borrowed funds are used first. See [Blend](https://docs.vanna.finance/stellar/guides/farm/blend-pools.md) or [LP Pools](https://docs.vanna.finance/stellar/guides/farm/amm-liquidity.md).

**3. Check the account**

On Margin, **Borrowed money is in** now shows the amount in **Farm**. Watch the health factor and the Liquidation buffer.

![Margin Current Positions account map with collateral, account value, four borrowed assets each with Repay, and a footer showing Borrowed money is in Farm \$579.18 and Idle \$747.47](https://mintcdn.com/vannafinance/nTvFas2wipJFpeKy/images/stellar/margin/margin-positions.png?fit=max\&auto=format\&n=nTvFas2wipJFpeKy\&q=85\&s=189cdb77f05d2ffd0a548d683eb6c215)

After farming: the account map shows borrowed money split between Farm and Idle. Click the image to zoom.

## Does it pay?

Your net yield is roughly:

```text theme={null}
farm APY × amount farmed − borrow APY × amount borrowed
```

Both rates are variable. Compare the pool's supply APY (Farm) with the asset's **Borrow APY** (Earn) and your **Net Borrow Rate** (Margin) before you start. On testnet, rates can swing a lot.

> [!WARNING]
>
> Borrowing XLM to supply XLM to Blend cancels out XLM price moves on that leg. Borrowing USDC to farm XLM does not: you are now long XLM with leverage, and an XLM drop lowers your health factor.

## Unwind

**1. Exit the farm**

Withdraw from Blend or remove liquidity. Tokens return to the margin account.

**2. Swap if needed**

If you got back a different token than you owe, [swap](https://docs.vanna.finance/stellar/guides/trade/spot-swap.md) for the debt asset.

**3. Repay**

[Repay](https://docs.vanna.finance/stellar/guides/margin/repay.md) each loan in its own asset.

**4. Withdraw**

[Transfer](https://docs.vanna.finance/stellar/guides/margin/transfer-collateral.md) what's left to your wallet.

Each step is its own transaction. If one fails, the earlier ones stay done; check your balances before retrying.

> [!WARNING]
>
> At or below a Health Factor of 1.1, a priced account with debt is a liquidation candidate. The current liquidation path transfers remaining collateral to the liquidator; it does not automatically close the SmartAccount.

See [Sample Strategies](https://docs.vanna.finance/stellar/guides/sample-strategies.md) for worked examples.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.