> For the complete documentation index, see [llms.txt](https://docs.hann.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hann.finance/protocol/loops.md).

# Leverage

Open, adjust, or close leveraged Troves and understand changes to collateral, debt, and liquidation exposure.

Leverage increases collateral exposure by borrowing USDHN and using it to fund additional collateral. A loop repeats borrowing, swapping, and adding collateral to the same Trove. Hann Finance's leverage zappers perform the position change and flash settlement in one transaction.

![Borrowed USDHN is swapped for KAIA, which returns to the same Trove as additional collateral. Collateral exposure and debt both increase.](https://2221521122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8nyFCptMbCTgKUyVYlHX%2Fuploads%2Fgit-blob-46378c124dfb62b68f8a38187baa39447bb108c3%2Fleverage-loop.svg?alt=media)

*The additional collateral is financed by debt. Increasing exposure increases both the position's gains and its losses from a collateral-price move.*

## Available collateral

| Collateral | Mainnet app                              | Token handling                                         |
| ---------- | ---------------------------------------- | ------------------------------------------------------ |
| KAIA       | Leverage available                       | The zapper wraps deposited KAIA as WKAIA collateral.   |
| earnUSDT   | Leverage available                       | Deposited earnUSDT is wrapped as wEarnUSDT collateral. |
| HNKAIA     | Standard borrowing; leverage is disabled | HNKAIA leverage is exposed in the testnet app.         |

The app uses the selected branch's configured route and leverage zapper. The quote includes the route's effect on the final debt. A higher exposure can require more USDHN than a calculation based on oracle price alone.

## Open a leveraged position

1. Connect your wallet and open `/leverage`.
2. Select KAIA or earnUSDT and enter the initial deposit.
3. Set the desired collateral exposure using the exposure field or leverage slider. Review the resulting debt, collateral ratio, liquidation price, upfront fee, and borrowing rate.
4. Use Expert mode to choose the interest-rate mode or enter a manual rate. The standard view uses the app's automatic rate selection.
5. Keep KAIA for the gas-compensation deposit and network fee. Authorize the ERC-20 collateral transfer when using earnUSDT, then confirm the transaction.
6. Check the new position's actual collateral, debt, and rate after confirmation.

The transaction opens a base Trove, adds the requested leveraged collateral through flash liquidity, and settles that temporary obligation. It leaves one Trove with the final collateral and USDHN debt. Opening is disabled while required quotes are pending, the deposit or debt fails the displayed limits, or the branch is shut down.

## Adjust leverage

Open the position and choose its leverage adjustment. Set the new exposure, then review the before-and-after collateral, debt, collateral ratio, and liquidation price.

* **Increase leverage:** the route adds collateral and increases debt to fund settlement.
* **Decrease leverage:** the route repays debt and uses part of the collateral to settle the temporary liquidity.

Confirm the manager permission requested by the app before the adjustment. Both directions use a final debt cap, `maxDebt`, derived from the quote and execution tolerance. A transaction that exceeds it reverts. The same Trove also supports standard collateral additions and USDHN repayments through the standard branch zapper.

## Close a position

The position offers two repayment sources:

| Close method                 | What funds repayment                                                                  | What is returned                                                               |
| ---------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| Repay with wallet-held USDHN | Your wallet pays the full live debt, including accrued interest.                      | Collateral and the gas-compensation deposit.                                   |
| Close using collateral       | Flash liquidity repays the debt; part of the collateral settles the flash obligation. | The remaining collateral and route tokens, plus the released gas compensation. |

The collateral-funded close uses the configured route and the debt at execution time. Its confirmation screen displays `100%` slippage, and the call has no user-selected minimum received. The displayed net return is an estimate; poor liquidity increases the collateral spent, and insufficient settlement liquidity makes the transaction revert. Returned KAIA and earnUSDT follow their branch's wrapping and payout rules.

## Exposure, debt, and collateral ratio

The collateral ratio is collateral value divided by USDHN debt:

$$
CR=\frac{V}{D}
$$

Here `V` is collateral value from the branch's price feed, and `D` includes principal, accrued interest, and charged fees. Increasing debt relative to collateral lowers CR and brings the liquidation price closer to the current collateral price.

For a repeated borrowing model, let each round fund new collateral worth a fraction `ℓ` of the previous round's collateral, with `0 ≤ ℓ < 1`. Starting from one unit of collateral, the exposure after `n` additional rounds is:

$$
G\_n=1+\ell+\ell^2+\cdots+\ell^n=\frac{1-\ell^{n+1}}{1-\ell}
$$

This calculation holds prices fixed and excludes swap fees, borrowing fees, interest, and execution delays. The app's quote uses the configured route and its current pool state.

## Costs and exit conditions

Borrowing interest increases debt while the position remains open. Swaps, flash settlement, upfront fees, and price impact affect how much exposure the initial deposit buys and how much collateral remains on exit. Yield from earnUSDT or another yield-bearing asset is a separate source of return; it does not erase borrowing costs or debt.

If the collateral ratio falls below the branch's minimum, the Trove is liquidatable. Repaid debt or added collateral changes that ratio without increasing leverage. A reverted transaction leaves the Trove unchanged, while previously confirmed approvals remain set and network gas is spent.

Closing an LST-backed position and converting the returned asset into KAIA are separate actions. bKAIA withdrawal uses a request followed by collection when the withdrawal ticket is ready; a secondary-market exit depends on swap liquidity. [bKAIA and HNKAIA](/protocol/bkaia-and-hnkaia.md) covers those asset conversions.

[Leverage mechanics](/mechanics/deep-dives/looping-and-leverage.md) derives equity, leverage, CR, and liquidation-price relationships. [Zappers](/protocol/zapper.md) explains authorization and settlement.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.hann.finance/protocol/loops.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
