Repaying debt on a multiply position reduces your outstanding debt balance, lowers your LTV (Loan-to-Value) ratio, and improves position health. This example shows how to repay USDC debt on a TSLAx multiply position using the Klend SDK.
Multiply Repay with xStocks
Repay debt on a TSLAx multiply position to reduce leverage and improve position health.1
Import Dependencies
2
Load Market and Initialize RPC
3
Load the Multiply Obligation
A Multiply position is its own obligation, addressed by the collateral and debt mints.4
5
Build the Transaction
6
Borrow and Multiply SDK Methods
Multiply operations use
MultiplyObligation. Vanilla operations use VanillaObligation. The obligation type determines which PDA is derived for your position.