> For the complete documentation index, see [llms.txt](https://docs.piperx.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.piperx.xyz/developer/sdks/create-pool/concentrated-pool.md).

# Concentrated Pool

### Steps to Integration

There are three steps in conducting a create pool: 1) prepare input, 2) approve tokens, 3) conduct create pool. You need to install PiperX sdk and import it to proceed.

```javascript
import { v3AddLiquidity, v3PositionManagerTokenApproval, v3CreatePool } from '@piperx/sdk/src/core'
import { WIP_ADDRESS } from '@piperx/sdk/src/constant'
```

#### Prepare Input

You need the following inputs before you can create a pool&#x20;

<pre class="language-typescript"><code class="lang-typescript">token1_address: address, // if it is $IP native token, use WIP_ADDRESS
token2_address: address, // if it is $IP native token, use WIP_ADDRESS
amount1: bigint, // amount of token 1 you want to deposit to the pool
amount2: bigint, // amount of token 2 you want to deposit to the pool
amount1Min: bigint, // minimal amount of token 1 you want to deposit to the pool
<strong>amount2Min: bigint, // minmial amount of token 2 you want to deposit to the pool
</strong>initital_price: bigint, 
// initial price for token2 / token1, 
// note that, this is purely token2 amount / token1 amount, so you have to
// convert the decimal beforehand.
tickLower: number, // define the lower range of your liquidity provision priceLower = 1.0001^tickLower
tickUpper: number, // define the upper range of your liquidity provision priceUpper = 1.0001^tickUpper
expire_time: bigint// expiration timestamp for creating the pool
signer: ethers.Signer
</code></pre>

Note that, if you are creating pool with $IP token, you should pass in the PiperX wrapped $IP token address, because the $IP token is not a ERC-20 token. For example, if you are create  $IP to $USDC pool, please use wrapped $IP address `WIP_ADDRESS`

#### Approve tokens

You need to approve the router contract to both your tokens to create this pool

```typescript
await v3PositionManagerTokenApproval(token1_address, amount1, signer)
await v3PositionManagerTokenApproval(token2_address, amount2, signer)
```

#### Creating the pool

```typescript
await v3CreatePool(token0, token1, fee, initialPrice, signer)
await v3AddLiquidity(
    token1: string,
    token2: string,
    amount1: bigint,
    amount2: bigint,
    amount1Min: bigint,
    amount2Min: bigint,
    tickLower: number,
    tickUpper: number,
    fee: number
    expire_time: bigint,
    signer: ethers.Signer
)
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.piperx.xyz/developer/sdks/create-pool/concentrated-pool.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
