# Operation - Redemption

The Redeem operation within the TroveManager component of the Satoshi Protocol SDK allows users to exchange their satUSD stablecoins for an equivalent amount of collateral at the current redemption rate. This function is crucial for users who wish to exit their investment positions by converting their stablecoins back into the original collateral asset, typically during favorable market conditions.

### Key Steps

1. **Estimate Redeem Amount**:&#x20;
   * Determine the amount of satUSD stablecoins you wish to redeem. This should be specified using the `parseUnits` function, which converts the human-readable amount into the smallest unit of the debt token based on its decimals.
2. **Execute Redeem Transaction**:
   * Call the `doRedeem` method on the TroveManager with the specified collateral and the amount of satUSD stablecoins to be redeemed. This operation interacts with the blockchain to exchange the stablecoins for collateral.

### Example

```typescript
import { parseUnits } from '@ethersproject/units';
import { satoshiClient, collateral, DEBT_TOKEN_DECIMALS } from 'satoshi-sdk';

async function redeemCollateral() {
  // Step 1: Define the amount of SAT stablecoins you want to redeem
  const estimatedRedeemAmt = parseUnits('5', DEBT_TOKEN_DECIMALS);  // Redeeming 5 SAT

  // Step 2: Execute the redeem operation
  const receipt = await satoshiClient.Postition.doRedeem(collateral, estimatedRedeemAmt);

  // Output the transaction receipt
  console.log('Redeem Receipt:', receipt);
}

redeemCollateral();
```


---

# Agent Instructions: 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:

```
GET https://docs.river.inc/satoshi-protocol-v1/sdk/position/operation-redemption.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
