# Operation - Withdraw

The Stability Pool in the Satoshi Protocol SDK offers critical functions for managing liquidity and stability within the decentralized finance environment. It allows users to deposit and withdraw satUSD stablecoins, contributing to the pool's ability to offset bad debts and providing a mechanism for earning rewards.

### **Key Steps**:

1. **Convert Withdrawal Amount**:
   * Similar to deposit, use `parseUnits` to specify the amount to withdraw in the proper unit.
2. **Execute Withdrawal Transaction**:
   * Use the `doWithdraw` method to retrieve satUSD stablecoins from the Stability Pool. This updates the user's contribution and the overall balance of the pool.

### **Example**

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

async function withdrawFromStabilityPool() {
  // Step 1: Define the withdrawal amount in SAT stablecoins
  const withdrawAmt = parseUnits('2', DEBT_TOKEN_DECIMALS);  // Withdrawing 2 SAT

  // Step 2: Execute the withdrawal transaction
  const receipt = await satoshiClient.StabilityPool.doWithdraw(withdrawAmt);

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

withdrawFromStabilityPool();
```


---

# 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/stability-pool/operation-withdraw.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.
