# Deposit v2

This endpoint allows users to deposit assets into a liquidity pool by submitting the required details, such as the pool contract address and the amount of assets to be deposited. This process is crucial for users who want to increase the liquidity of the pool and potentially earn rewards or fees. Use this endpoint to securely and efficiently add assets to the pool, contributing to the stability and performance of the ecosystem.

## Request

<table><thead><tr><th>Body Param</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td>sender</td><td>String - Required<br>The address of the user initiating the deposit transaction.</td><td>"0x960376b3F62f41E7e66809a05D1C5afdFD60A0E9"</td></tr><tr><td>pool_address</td><td>String - Required<br>The address of the pool</td><td>"0x989E8F547FbCa65f4FB0af41e50e4058e6c68166"</td></tr><tr><td>days_to_lock</td><td>Integer<br>Number of days to lock the deposit in the liquidity pool.<br><strong>Note:</strong> <strong>Required</strong> for all pools except Katana, which uses <code>lock_time</code> instead.</td><td>5</td></tr><tr><td>lock_time</td><td>Integer<br>Number of minutes to lock the deposit in the liquidity pool.<br><strong>Note:</strong> Only suported by the Katana pool. For other pools, use <code>days_to_lock</code>.</td><td>5</td></tr><tr><td>deposit</td><td>Object<br>An object containing the asset address and the amount to deposit as a string. The amount should be in its machine-readable form.<br><br>This parameter is required only if <code>single asset</code> is false.</td><td><p></p><pre class="language-json"><code class="lang-json">{
    "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599": "400000000",
    "0x6B175474E89094C44Da98b954EedeAC495271d0F": "2000000000000000000",
    "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2": "1000000000000000000",
    "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48": "2000000"
}
</code></pre></td></tr><tr><td>chain_id</td><td><p>Integer - Required</p><p>The unique identifier of the blockchain network where the deposit will be made.</p></td><td>1</td></tr><tr><td>output_pool_tokens</td><td>Integer - Optional<br>The total number of pool tokens the user wants to receive. It is only valid for single-asset deposits.</td><td>10000</td></tr><tr><td>single_asset</td><td>Bool - Optional<br>A boolean that indicates whether only one asset is being deposited. <br>Default = False</td><td>true</td></tr><tr><td>single_token</td><td><p>String</p><p>Required only when <code>single_asset</code> is true. This represents the address of the single asset being deposited.</p></td><td>0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599</td></tr></tbody></table>

## Response

Deposit object

| Field                      | Description                                                                                                                                                                                                                                                                                                                          |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| sender                     | String - The address of the user who initiated the deposit transaction.                                                                                                                                                                                                                                                              |
| n\_days                    | <p>Integer - The number of days the assets will be locked in the pool, matching the <code>days\_to\_lock</code> from the request.<br><strong>Note:</strong> Supported for all pools except Katana. For katana, returns <code>lock\_time</code>.</p>                                                                                  |
| lock\_time                 | <p>Integer - The number of minutes the assets will be locked in the pool, matching the <code>lock\_time</code> from the request.<br><strong>Note:</strong> Only supported by the Katana pool. For other pools, returns <code>n\_days</code>.</p>                                                                                     |
| good\_until                | The timestamp indicating how long the deposit details, including the signature, are valid.                                                                                                                                                                                                                                           |
| pool\_tokens               | String - The total number of pool tokens that will be given to the user as a result of the deposit.                                                                                                                                                                                                                                  |
| signature                  | Object - A [EIP 2098 "short signature" representation](https://eips.ethereum.org/EIPS/eip-2098) for the signature from the Clipper Exchange server                                                                                                                                                                                   |
| clipper\_exchange\_address | The address of the Clipper exchange contract where the deposit is being made.                                                                                                                                                                                                                                                        |
| deposit\_amounts           | <p>List - A list of the amounts to be deposited for each asset. If an asset was not provided in the request, the amount returned will be 0. For example, if 3 assets were provided in a 4-asset pool, the response will include an amount of 0 for the missing asset.<br><br>For  single asset deposit this field is not present</p> |
| amount                     | String - (Single-asset deposits only) The total amount of the single asset that is being deposited into the pool.                                                                                                                                                                                                                    |
| token                      | String - (Single-asset deposits only) The address of the token that is being deposited into the pool.                                                                                                                                                                                                                                |
| extra\_data                | <p>Encode LP token price and prices list into ABI-compatible bytes.<br><strong>Note:</strong> Only supported by the Katana pool. </p>                                                                                                                                                                                                |

## Examples

#### Deposit Multiple Assets

If you want to deposit multiples assets.

***Request***

```bash
curl -X POST "https://blade-api.sushi.com/rfq/v2/deposit" \
-H "Content-Type: application/json" \
-d '{
  "deposit": {
    "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1": "2000000000000000000"
  },
  "sender": "0x54298A80a06068587E13b9dC1AC090259A98D5cD",
  "days_to_lock": 10,
  "chain_id": 10,
  "single_asset": false,
  "pool_address": "0x5130f6cE257B8F9bF7fac0A0b519Bd588120ed40"
}'
```

***Response***

```json
{
    "sender": "0x54298A80a06068587E13b9dC1AC090259A98D5cD",
    "n_days": 10,
    "pool_tokens": "29438108002416884",
    "good_until": 1729657240,
    "signature": {
        "v": 28,
        "r": "0x7c37b52021ea25ed38cbaf4def111eb9b5e6f0c1dc6c34ded53b9824c40febbf",
        "s": "0x66ce09126a23cadf277877e556f2d6c5bc3ad1e7080368a13bb0349208d30396"
    },
    "clipper_exchange_address": "0x5130f6cE257B8F9bF7fac0A0b519Bd588120ed40",
    "deposit_amounts": [
        "0",
        "0",
        "0",
        "0",
        "2000000000000000000",
        "0",
        "0"
    ]
}
```

**Katana Example:**

***Request***

```bash
curl -X POST "https://blade-api.sushi.com/rfq/v2/deposit" \
-H "Content-Type: application/json" \
-d '{
  "deposit": {
    "0x0913DA6Da4b42f538B445599b46Bb4622342Cf52": "2000000000000000000"
  },
  "sender": "0x54298A80a06068587E13b9dC1AC090259A98D5cD",
  "lock_time":720,
  "chain_id": 747474,
  "single_asset": false,
  "pool_address": "0x989E8F547FbCa65f4FB0af41e50e4058e6c68166"
}'
```

***Response***

```json
{
    "sender": "0x54298A80a06068587E13b9dC1AC090259A98D5cD",
    "pool_tokens": "1911697202535426211354545867456512",
    "good_until": 1754952442,
    "signature": {
        "v": 27,
        "r": "0xa4be6ab4120b2d55e383f9489e317c05911097cf38b92f8dffe393fed23c07ec",
        "s": "0x66d48deb50124d9e4d20c5f6ce570fd930f6bb8a1cd67bae68daef5fbf89112c"
    },
    "clipper_exchange_address": "0x989E8F547FbCa65f4FB0af41e50e4058e6c68166",
    "extra_data": "0x000000000000000000000000000000000000000098b593221fc2d138f0a669c5000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000e475704f93603000000000000000000000000000000000000000000000000019257a485f5ec7000000",
    "deposit_amounts": [
        "0",
        "2000000000000000000"
    ],
    "lock_time": 720
}
```

#### Deposit With Specific output pool token

If you want to deposit and specify how many pool tokens receive.

***Request***

```bash
curl -X POST "https://blade-api.sushi.com/rfq/v2/deposit" \
-H "Content-Type: application/json" \
-d '{
  "sender": "0x54298A80a06068587E13b9dC1AC090259A98D5cD",
  "days_to_lock": 10,
  "chain_id": 10,
  "single_asset": true,
  "output_pool_tokens": 29438108002416884,
  "single_token": "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1"
  "pool_address": "0x5130f6cE257B8F9bF7fac0A0b519Bd588120ed40"
}'
```

***Response***

```json
{
    "sender": "0x54298A80a06068587E13b9dC1AC090259A98D5cD",
    "n_days": 10,
    "pool_tokens": "29438108002416884",
    "good_until": 1729657750,
    "signature": {
        "v": 28,
        "r": "0x8abcd885e7c151158e21288124b6cac461088ecd9ac07938752667277de2f581",
        "s": "0x4716077b4ee2eaf0668d0c219c507581efa61c287e1bdfe32597fb5d19609641"
    },
    "clipper_exchange_address": "0x5130f6cE257B8F9bF7fac0A0b519Bd588120ed40",
    "amount": "1998512049104122112",
    "token": "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1"
}
```
