> For the complete documentation index, see [llms.txt](https://sdk.unlockd.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sdk.unlockd.finance/getting-started/code-examples/minimum-repay.md).

# Minimum Repay

```typescript
import {minimumToRepay} from "@unlockdfinance/unlockd-ts";

const params = {
    initialLoans: [
        {
            valuation: 10000000n,
            ltv: 5000n,
        },
        {
            valuation: 10000000n,
            ltv: 5000n,
        },
    ],
    indicesToDelete: [1],
    totalDebt: 2n,
}
const result = minimumToRepay(params)
```
