For the complete documentation index, see llms.txt. This page is also available as Markdown.

Leverage

Derivations for leveraged collateral exposure, equity, CR, liquidation price, and repayment cost.

A leveraged Trove holds more collateral than the initial deposit funds on its own. USDHN debt finances the additional exposure. The app's flash-assisted transaction changes the position once and settles its temporary liquidity in that transaction; the resulting USDHN debt continues to accrue interest.

Borrow, swap, and add collateral

A manual loop repeats these actions:

  1. Borrow USDHN against collateral.

  2. Swap USDHN into more of the branch's collateral.

  3. Add that collateral to the same Trove.

Both posted collateral and debt increase. When the extra debt grows faster than the collateral's value, CR falls. The leverage zapper combines the required collateral and debt changes through the branch's configured pools.

The app's mainnet configuration includes KAIA and earnUSDT leverage routes. Its testnet configuration also includes HNKAIA leverage. A Trove opened through a leverage zapper retains the same branch's collateral, interest, redemption, and liquidation rules.

Equity and leverage

Let:

  • V be the collateral value in dollars.

  • D be the USDHN debt, including principal, accrued interest, and charged fees, valued at $1 per USDHN for this calculation.

  • E = V − D be equity in this valuation.

For E > 0, collateral exposure per dollar of equity is:

L=VE=VV−DL=\frac{V}{E}=\frac{V}{V-D}

Without debt, L = 1. At L = 2, one dollar of equity supports two dollars of collateral exposure. Fees, liquidation penalties, and the cost of exchanging assets are additional deductions from realized proceeds.

If the market price of one USDHN is p, mark-to-market equity before execution costs is V − pD. The protocol's collateral-ratio calculation and the market cost of buying USDHN for repayment are separate quantities.

Converting CR to leverage

For D > 0, the collateral ratio is:

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

Use a ratio such as 2.0 for 200%. For CR > 1:

L=VV−D=11−D/V=11−1/CR=CRCR−1L=\frac{V}{V-D} =\frac{1}{1-D/V} =\frac{1}{1-1/CR} =\frac{CR}{CR-1}
CR
Leverage under this valuation

300% = 3.0

1.5×

200% = 2.0

2.0×

150% = 1.5

3.0×

At CR = 1, equity is zero and this leverage expression is undefined. Lower CR above that boundary means greater leverage and a smaller collateral-value buffer.

Liquidation-price relationship

Let Q > 0 be the collateral quantity, P its unit price, D > 0 the debt, and MCR the branch's minimum collateral ratio. With quantity and debt fixed:

CR=QPD,Pliq=MCR⋅DQCR=\frac{QP}{D},\qquad P_{liq}=\frac{MCR\cdot D}{Q}

Substituting the current collateral ratio gives:

Pliq=PnowMCRCRnowP_{liq}=P_{now}\frac{MCR}{CR_{now}}

The equality describes the threshold with fixed debt and collateral and the same price-feed valuation. Accrued interest, a redemption, or a position adjustment changes those inputs. The actual liquidation condition uses the branch's current price and CR rules.

Increasing leverage lowers CR, which moves the threshold closer to the current price. CDP collateral ratios covers the branch thresholds and their calculation.

A worked position

Use an initial collateral deposit worth $1,000, a final CR of 200%, USDHN priced at $1, and no interest, fees, or swap price impact in this calculation.

Since L = 2/(2 − 1) = 2, the resulting position has:

Quantity
Calculation
Value

Collateral value V

2 × $1,000

$2,000

Debt D

$2,000 / 2

1,000 USDHN

Equity E

$2,000 − $1,000

$1,000

If the collateral price falls 20% while quantity and debt stay fixed:

  • Collateral value falls to $1,600.

  • Debt remains 1,000 USDHN.

  • CR falls to 160%.

  • Equity falls to $600: a 40% loss on the initial equity.

Whether the Trove is liquidatable at that point depends on its branch's MCR. A yield-bearing collateral asset can accrue value while the debt accrues interest; both affect the next position value.

Increase, decrease, and close

Action
Settlement
Position after success

Increase leverage

Acquire more collateral and borrow USDHN to settle temporary liquidity.

More collateral and more debt.

Decrease leverage

Use temporary liquidity to repay debt and spend part of the collateral to settle it.

Less collateral and less debt.

Close with USDHN

Pay the entire live debt from the wallet.

No open Trove; collateral is returned.

Close using collateral

Repay the live debt with temporary liquidity and use collateral for flash settlement.

No open Trove; remaining collateral and route tokens are returned.

A partial repayment must preserve the branch's minimum debt. Full repayment uses the close operation. The KAIA branch unwraps returned WKAIA to KAIA; the earnUSDT route unwraps wEarnUSDT collateral to earnUSDT for settlement and returns the remainder.

Opening and leverage adjustments enforce maxDebt. A collateral-funded close carries troveId and profitReceiver, without a user-specified minimum output. The app shows 100% slippage for that close. Its return estimate does not bound the actual settlement cost.

Repayment price and exit liquidity

For a debt of 1,000 USDHN:

USDHN market price

Cost to buy 1,000 USDHN before swap fees

$1.02

$1,020

$0.98

$980

A larger debt increases the dollar effect of a USDHN price change. A collateral-funded close also depends on both the collateral route and the USDHN/USDT pool being able to settle the required amounts.

Interest raises debt over time, even with a flat collateral price. A stressed pool can increase price impact, require more collateral for repayment, or make the transaction revert. A revert preserves the Trove state; it does not reverse earlier approvals or refund the failed transaction's network fee.

An LST or receipt token returned on closing keeps its own withdrawal rules. In particular, bKAIA withdrawal requires a withdrawal request and later collection when the ticket is ready. A secondary-market sale has a different liquidity-dependent price. bKAIA and HNKAIA describes those paths.

Leverage positions gives the app procedure. StableSwap mechanics explains swap bounds and pool-price effects, and Zappers covers manager permissions and returned tokens.

Last updated

Was this helpful?