> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gains.trade/llms.txt
> Use this file to discover all available pages before exploring further.

# IPairsStorage

*Contains the types for the GNSPairsStorage facet*

## PairsStorage

```solidity theme={null}
struct PairsStorage {
  mapping(uint256 => struct IPairsStorage.Pair) pairs;
  mapping(uint256 => struct IPairsStorage.Group) groups;
  mapping(uint256 => struct IPairsStorage.Fee) fees;
  mapping(string => mapping(string => bool)) isPairListed;
  mapping(uint256 => uint256) pairCustomMaxLeverage;
  uint256 currentOrderId;
  uint256 pairsCount;
  uint256 groupsCount;
  uint256 feesCount;
  mapping(uint256 => struct IPairsStorage.GroupLiquidationParams) groupLiquidationParams;
  mapping(uint256 => struct IPairsStorage.FeeGroup) feeGroups;
  struct IPairsStorage.GlobalTradeFeeParams globalTradeFeeParams;
  uint256[38] __gap;
}
```

## Pair

```solidity theme={null}
struct Pair {
  string from;
  string to;
  struct IPairsStorage.Feed feed;
  uint256 spreadP;
  uint256 groupIndex;
  uint256 feeIndex;
}
```

## Group

```solidity theme={null}
struct Group {
  string name;
  bytes32 job;
  uint256 minLeverage;
  uint256 maxLeverage;
}
```

## GlobalTradeFeeParams

```solidity theme={null}
struct GlobalTradeFeeParams {
  uint24 referralFeeP;
  uint24 govFeeP;
  uint24 triggerOrderFeeP;
  uint24 gnsOtcFeeP;
  uint24 gTokenFeeP;
  uint136 __placeholder;
}
```

## FeeGroup

```solidity theme={null}
struct FeeGroup {
  uint40 totalPositionSizeFeeP;
  uint40 totalLiqCollateralFeeP;
  uint40 oraclePositionSizeFeeP;
  uint32 minPositionSizeUsd;
  uint104 __placeholder;
}
```

## TradeFees

```solidity theme={null}
struct TradeFees {
  uint256 totalFeeCollateral;
  uint256 referralFeeCollateral;
  uint256 govFeeCollateral;
  uint256 triggerOrderFeeCollateral;
  uint256 gnsOtcFeeCollateral;
  uint256 gTokenFeeCollateral;
}
```

## GroupLiquidationParams

```solidity theme={null}
struct GroupLiquidationParams {
  uint40 maxLiqSpreadP;
  uint40 startLiqThresholdP;
  uint40 endLiqThresholdP;
  uint24 startLeverage;
  uint24 endLeverage;
}
```

## FeedCalculation

```solidity theme={null}
enum FeedCalculation {
  DEFAULT,
  INVERT,
  COMBINE
}
```

## Feed

@custom:deprecated

```solidity theme={null}
struct Feed {
  address feed1;
  address feed2;
  enum IPairsStorage.FeedCalculation feedCalculation;
  uint256 maxDeviationP;
}
```

## Fee

@custom:deprecated

```solidity theme={null}
struct Fee {
  string name;
  uint256 openFeeP;
  uint256 closeFeeP;
  uint256 oracleFeeP;
  uint256 triggerOrderFeeP;
  uint256 minPositionSizeUsd;
}
```
