# SONEX V3 Contract Deployments and Liquidity Guide

## **Introduction**

SONEX currently supports **V3 contract deployments** exclusively, offering advanced features to enable seamless pool creation, liquidity provisioning, and trading. This guide explains the deployed contracts, their functions, and how to interact with them for pool creation and liquidity management.

***

### **Contract Addresses**

Below is the complete list of SONEX V3 contract addresses:

| **Type**                           | **Contract Address**                                                                                                              |
| ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| **UniswapV3Factory**               | [0x3E4ff8662820E3dec3DACDb66ef1FFad5Dc5Ab83](https://soneiumscan.example/address/0x3E4ff8662820E3dec3DACDb66ef1FFad5Dc5Ab83#code) |
| **FACTORY\_MULTICALL**             | [0x73348e34bE30A2275E78f88185542f986c4Fe6E9](https://soneiumscan.example/address/0x73348e34bE30A2275E78f88185542f986c4Fe6E9#code) |
| **PROXY\_ADMIN**                   | [0x947391374Fe2d4ED1173F644049104993cF2AE00](https://soneiumscan.example/address/0x947391374Fe2d4ED1173F644049104993cF2AE00#code) |
| **TRANSPARENT\_UPGRADABLE\_PROXY** | [0xD5B959339E58f0A1dd2dD53412c32B0c8872F05c](https://soneiumscan.example/address/0xD5B959339E58f0A1dd2dD53412c32B0c8872F05c#code) |
| **TICK\_LENS**                     | [0xf8369D9023657749521FB1Bef6F7A520ce898A13](https://soneiumscan.example/address/0xf8369D9023657749521FB1Bef6F7A520ce898A13#code) |
| **SWAP\_ROUTER**                   | [0xDEf357D505690F1b0032a74C3b581163c23d1535](https://soneiumscan.example/address/0xDEf357D505690F1b0032a74C3b581163c23d1535#code) |
| **SWAP\_ROUTER\_V2**               | [0xd2DdF58Bcc188F335061e41C73ED2A8894c2dD98](https://soneiumscan.example/address/0xd2DdF58Bcc188F335061e41C73ED2A8894c2dD98#code) |
| **NFT\_DESCRIPTOR**                | [0x80557c2EaE4A28E7101d6D7473f87f73Dfd07d71](https://soneiumscan.example/address/0x80557c2EaE4A28E7101d6D7473f87f73Dfd07d71#code) |
| **POSITION\_DESCRIPTOR**           | [0x9C31f28b0f46CCa5D2CD64485936984C271382A1](https://soneiumscan.example/address/0x9C31f28b0f46CCa5D2CD64485936984C271382A1#code) |
| **NonfungiblePositionManager**     | [0x6f5F9d55f727928b644B04d987B1c0Cf50AF8C0B](https://soneiumscan.example/address/0x6f5F9d55f727928b644B04d987B1c0Cf50AF8C0B#code) |
| **QUOTER**                         | [0x12528928e792e6665d52d77c1F59d3e1adBD14DA](https://soneiumscan.example/address/0x12528928e792e6665d52d77c1F59d3e1adBD14DA#code) |
| **QUOTER\_V2**                     | [0x715BE426a0c8E0A14aBc0130f08F06aa41B1f218](https://soneiumscan.example/address/0x715BE426a0c8E0A14aBc0130f08F06aa41B1f218#code) |

***

## **Key Features**

### **1. createAndInitializePoolIfNecessary （Contract: NonfungiblePositionManager）**

Creates a new pool if it does not exist, then initializes if not initialized

#### Note：

* This method can be bundled with others via IMulticall for the first action (e.g. mint) performed against a pool.

#### **Parameter：**

* **token0：The contract address of token0 of the pool.**
* **token1：**&#x54;he contract address of token1 of the pool.
* **fee：**&#x54;he fee amount of the v3 pool for the specified token pair.
* **sqrtPriceX96：**&#x54;he initial square root price of the pool as a Q64.96 value.

#### Return：

* **pool：**&#x52;eturns the pool address based on the pair of tokens and fee, will return the newly created pool address if necessar

```solidity
  function createAndInitializePoolIfNecessary(
    address token0,
    address token1,
    uint24 fee,
    uint160 sqrtPriceX96
  ) external returns (address pool)
```

#### 2. Mint （**Contract: NonfungiblePositionManager**）

Creates a new position wrapped in a NFT. ( Adds liquidity )

#### Note :

* Call this when the pool does exist and is initialized. Note that if the pool is created but not initialized a method does not exist, i.e. the pool is assumed to be initialized.

#### **Parameter :**

* **struct INonfungiblePositionManager.MintParams：**&#x54;he params necessary to mint a position, encoded as `MintParams` in calldata.

#### Return :

* **tokenId：The ID of the token that represents the minted position.**
* **liquidity：The amount of liquidity for this position.**
* **amount0：The amount of token0.**
* **amount1：The amount of token1.**

```solidity
  function mint(
    struct INonfungiblePositionManager.MintParams params
  ) external returns (uint256 tokenId, uint128 liquidity, uint256 amount0, uint256 amount1)
```

#### 3. getPool **(Contract: UniswapV3Factory )**

Use the `getPool` function in the **FACTORY** contract to check if a pool already exists.

#### **Parameter：**

* **tokenA：**&#x54;he contract address of either token0 or token1.
* **tokenB：**&#x54;he contract address of the other token.
* **fee：**&#x54;he fee collected upon every swap in the pool, denominated in hundredths of a bip.

#### Return：

* **pool：**&#x54;he pool address.

```solidity
  function getPool(
    address tokenA,
    address tokenB,
    uint24 fee
  ) external view returns (address pool)
```

#### 4. **decreaseLiquidity**（**Contract: NonfungiblePositionManager**）

Decreases the amount of liquidity in a position and accounts it to the position (**remove Liquidity**)

#### **Parameter：**

* **struct INonfungiblePositionManager.DecreaseLiquidityParams :** tokenId The ID of the token for which liquidity is being decreased,

#### Return：

* **amount0：**&#x54;he amount of token0 accounted to the position's tokens owed.
* **amount1：**&#x54;he amount of token0 accounted to the position's tokens owed.

```solidity
function decreaseLiquidity(
   struct INonfungiblePositionManager.DecreaseLiquidityParams params
) external returns (uint256 amount0, uint256 amount1)
```

### **5. burn**（**Contract: NonfungiblePositionManager**）

Burns a token ID, which deletes it from the NFT contract.

#### Note :

* The token must have 0 liquidity and all tokens must be collected first.

#### **Parameter：**

* **tokenId：**&#x54;he ID of the token that is being burned.

```solidity
function burn(
   uint256 tokenId
) external
```

#### 6. **positions (Contract: NonfungiblePositionManager)**

Returns the position information associated with a given token ID.

#### Note :

* Throws if the token ID is not valid.

#### **Parameter：**

* **tokenId：**&#x54;he ID of the token that represents the position.

#### Return：

* **nonce：**&#x54;he nonce for permits.
* **operator：**&#x54;he address that is approved for spending.
* **token0：**&#x54;he address of the token0 for a specific pool.
* **token1：**&#x54;he address of the token1 for a specific pool.
* **fee：**&#x54;he fee associated with the pool.
* **tickLower：**&#x54;he lower end of the tick range for the position.
* **tickUpper：**&#x54;he higher end of the tick range for the position.
* **liquidity：**&#x54;he liquidity of the position.
* **feeGrowthInside0LastX128：**&#x54;he fee growth of token0 as of the last action on the individual position.
* **feeGrowthInside1LastX128：**&#x54;he fee growth of token1 as of the last action on the individual position.
* **tokensOwed0：**&#x54;he uncollected amount of token0 owed to the position as of the last computation.
* **tokensOwed1：**&#x54;he uncollected amount of token1 owed to the position as of the last computation

```solidity
function getPool(
   address tokenA,
   address tokenB,
   uint24 fee
) external view returns (address pool)
```
