> For the complete documentation index, see [llms.txt](https://docs.dragonswap.app/dragonswap/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dragonswap.app/dragonswap/resources/developer-resources/smart-contracts/dragonswapv2/core/libraries/liquiditymath.md).

# LiquidityMath

### Functions[​](https://docs.uniswap.org/contracts/v3/reference/core/libraries/LiquidityMath#functions) <a href="#functions" id="functions"></a>

#### addDelta[​](https://docs.uniswap.org/contracts/v3/reference/core/libraries/LiquidityMath#adddelta) <a href="#adddelta" id="adddelta"></a>

```solidity
  function addDelta(
    uint128 x,
    int128 y
  ) internal pure returns (uint128 z)
```

Add a signed liquidity delta to liquidity and revert if it overflows or underflows

**Parameters:**[**​**](https://docs.uniswap.org/contracts/v3/reference/core/libraries/LiquidityMath#parameters)

| Name | Type    | Description                                    |
| ---- | ------- | ---------------------------------------------- |
| `x`  | uint128 | The liquidity before change                    |
| `y`  | int128  | The delta by which liquidity should be changed |

**Return Values:**[**​**](https://docs.uniswap.org/contracts/v3/reference/core/libraries/LiquidityMath#return-values)

| Name | Type    | Description         |
| ---- | ------- | ------------------- |
| `z`  | uint128 | The liquidity delta |
