---
title: quoteSurrender
description: Quote burning collateral to cancel a chosen amount of debt.
---

> **For AI agents:** the complete documentation index is at [llms.txt](/llms.txt). Append `.md` to any page URL for its markdown version.

Burns `collateralForDebtUp(amount, floor)` AVM and reduces debt by `amount`. Irreversible on-chain. Spot does not move; `priceImpact` is `null`.

This is how a holder exits a position without repaying USDC: they give up the locked tokens and the matching debt disappears. Remaining free collateral stays in the position.

## Import

```ts
import { quoteSurrender } from "@repo/contract-client/math";
```

## Usage

```ts
import { parseUsdc } from "@repo/contract-client";
import { quoteSurrender } from "@repo/contract-client/math";

const quote = quoteSurrender(snapshot, position, parseUsdc("10"));

quote.debtToCancelRaw;
quote.collateralBurned;
quote.position.collateralAvm;
quote.position.debtRaw;
quote.priceImpact; // null
```

`collateralBurned` is [lockedCollateral](/developers/math/locked-collateral) for that debt slice (ceil), which is the same helper as [collateralForDebtUp](/developers/math/collateral-for-debt-up).

## Return Value

`SurrenderQuote`

| Field              | Meaning                |
| ------------------ | ---------------------- |
| `kind`             | `'surrender'`          |
| `debtToCancelRaw`  | USDC of debt cancelled |
| `collateralBurned` | AVM burned             |
| `position`         | After the burn         |
| `priceImpact`      | `null`                 |

## Parameters

### snapshot

- **Type:** `MarketSnapshot`

Provides floor price.

```ts
quoteSurrender(snapshot, position, parseUsdc("10"));
```

### position

- **Type:** `PersonalPosition`

Must hold enough collateral and at least `amount` debt.

### amount

- **Type:** `UsdcRaw`

Debt to cancel. Must be ≤ `position.debtRaw`.

```ts
quoteSurrender(snapshot, position, asUsdcRaw(position.debtRaw));
```

## Error

| Error                                              | When                                     |
| -------------------------------------------------- | ---------------------------------------- |
| `ProtocolRevertError` `InsufficientFreeCollateral` | Burn exceeds collateral                  |
| `ProtocolRevertError` `ZeroAmount`                 | `amount > position.debtRaw` or too small |

## Tips

- Max size is `getMaxActions(...).maxSurrenderDebtRaw`. Pause zeros it.
