# Operation - Deposit

### Key Steps

1. **Convert Collateral Amount**:
   * Convert the desired amount of collateral into Wei using the `parseEther` function from the `viem` library. This ensures that the amount is in the smallest denomination of ether, which is necessary for precise blockchain transactions.
2. **Record the Deposit**:
   * Once the transaction is confirmed, record the deposit within the protocol by calling the `doDeposit` function. This step updates the user's trove to reflect the added collateral, which could affect their minting capacity and collateral-to-debt ratio.

### Usage

This function is typically used when a user wishes to:

* **Increase Minting Capacity**: By adding more collateral, a user can safely mint more satUSD stablecoins while maintaining a healthy collateral-to-debt ratio.
* **Enhance Financial Security**: More collateral in a trove provides a larger buffer against potential liquidation in case of market volatility.

### Example

```typescript
import { parseEther } from 'viem';
import { protocolConfig, wbtcABI } from 'satoshi-sdk';

async function addCollateral() {
  // Step 1: Convert the amount to add to Wei
  const addedCollAmt = parseEther('0.2');  // Let's add 0.2 BTC worth of WBTC
  const collateral = protocolConfig.COLLATERALS[0];  // WBTC Collateral

  // Step 2: Record the deposit in the protocol
  const receipt = await satoshiClient.Postition.doDeposit({
    collateral,
    addedCollAmt,
  });

  console.log('Deposit successful:', receipt);
}

addCollateral();
```


---

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