> For the complete documentation index, see [llms.txt](https://stackfi-2.gitbook.io/stackfi-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stackfi-2.gitbook.io/stackfi-docs/leverage-farming.md).

# Leverage Farming

While a developer can run all of the complex interactions onchain, executing these by going protocol to protocol is a tough task. Stackfi devs have worked this out, to have the dApp help non-technical users ape into strategies with one click thanks to "One-Click Strategies".

What it enables in 1 go, is:

* Open a Credit Account based on your preferred collateral, leverage
* Swap assets if needed to the ones needed for a specific farm you chose
* LP, stake, etc. to end up in that destination as you have chosen.

Done! From assets X Y Z -> to taking leverage with Stackfi -> to swapping those into other assets -> to depositing and then staking in the protocols you chose. All in one click!

Concrete Examples:

* Leverage Points & Restaking
* Leveraged stablecoin farming
* Leveraged liquid staking
* Leveraged vanilla yVaults
* Arbitrage of correlated assets

**How to Avoid Liquidations**

How to Avoid Liquidations Don't fall prey to the liquidation bots – protect your funds!

Liquidations exist to protect liquidity providers' capital. As a leverage user, you can avoid liquidations and also avoid paying fees to liquidators and the protocol.

Health Factor (HF):

* HF represents the health of your Credit Account.
* Keep HF > 1 to avoid liquidation.
* A market crash can drop positions 25%+ quickly, so stay cautious.

What can I do if my HF is close to 1?

1. Add Collateral:

* The simplest way to raise your HF.
* Add more of the same asset (or base debt asset) to reduce risk.

1. Change Strategy or Farm:

* If you're in a highly volatile directional position (e.g. short ETH in a bull market), consider switching to a more stable or base asset strategy.

1. Decrease Debt:

* Repay part of the borrowed funds using your collateral.
* This lowers your leverage and raises your HF.

Correlated Collateral:

* In cases like stablecoin debt + stablecoin farm or AVAX debt + stAVAX farm, LTV ratios are tighter.
* These cases allow higher leverage (even up to 9x) but still beware of oracle price fluctuations.

Check Health Factor:

* Go to your Credit Account and view the "Manage" tab.
* For margin trading, the liquidation point is also shown visually on the chart.
* For farming, HF is shown directly in the Credit Account dashboard.

Tip: All HF data is on-chain and auditable.

You can even run your own liquidation bot to help secure the protocol. Chat with other liquidators and community members in the Discord to learn more.
