# Operation - Mint

### Key Steps

1. **Parse Minting Amount**:
   * Convert the desired minting amount into the correct unit using the `parseUnits` function. This function requires specifying the number of decimals to use, which aligns with the debt token's specifications (usually 18 decimals, like Ethereum).
2. **Execute Minting Transaction**:
   * Call the `doBorrow` function with the necessary parameters, including the public and wallet clients, protocol configuration, collateral information, and the parsed minting amount.

### Usage

This function is typically used when a user needs to:

* **Increase Leverage**: Mint additional stablecoins to leverage their investment position further without selling existing collateral.
* **Manage Financial Needs**: Access additional funds for other investment opportunities or personal expenditures without liquidating their assets.

### Example

```typescript
import { parseUnits } from 'viem';
import { publicClient, walletClient, protocolConfig, collateral } from 'satoshi-sdk';

const DEBT_TOKEN_DECIMALS = 18; // Standard decimals for Ethereum-based tokens

async function increaseMinting() {
  // Step 1: Define the amount to mint
  const addMintingAmt = parseUnits('5', DEBT_TOKEN_DECIMALS);  // Mint an additional 5 SAT stablecoins

  // Step 2: Execute the minting transaction
  const receipt = await satoshiClient.Postition.doBorrow({
    publicClient,
    walletClient,
    protocolConfig,
    collateral,
    addMintingAmt,
  });

  console.log('Minting additional stablecoins successful:', receipt);
}

increaseMinting();
```


---

# 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-mint.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.
