# ITradingCommonUtils

*Interface for TradingCommonUtils library*

## TradePriceImpactInput

```solidity
struct TradePriceImpactInput {
  struct ITradingStorage.Trade trade;
  uint256 oraclePrice;
  uint256 spreadP;
  uint256 positionSizeCollateral;
}
```

## GovFeeCharged

```solidity
event GovFeeCharged(address trader, uint8 collateralIndex, uint256 amountCollateral)
```

*Emitted when gov fee is charged*

### Parameters

| Name             | Type    | Description                           |
| ---------------- | ------- | ------------------------------------- |
| trader           | address | address of the trader                 |
| collateralIndex  | uint8   | index of the collateral               |
| amountCollateral | uint256 | amount charged (collateral precision) |

## ReferralFeeCharged

```solidity
event ReferralFeeCharged(address trader, uint8 collateralIndex, uint256 amountCollateral)
```

*Emitted when referral fee is charged*

### Parameters

| Name             | Type    | Description                           |
| ---------------- | ------- | ------------------------------------- |
| trader           | address | address of the trader                 |
| collateralIndex  | uint8   | index of the collateral               |
| amountCollateral | uint256 | amount charged (collateral precision) |

## GnsOtcFeeCharged

```solidity
event GnsOtcFeeCharged(address trader, uint8 collateralIndex, uint256 amountCollateral)
```

*Emitted when GNS otc fee is charged*

### Parameters

| Name             | Type    | Description                           |
| ---------------- | ------- | ------------------------------------- |
| trader           | address | address of the trader                 |
| collateralIndex  | uint8   | index of the collateral               |
| amountCollateral | uint256 | amount charged (collateral precision) |

## TriggerFeeCharged

```solidity
event TriggerFeeCharged(address trader, uint8 collateralIndex, uint256 amountCollateral)
```

*Emitted when trigger fee is charged*

### Parameters

| Name             | Type    | Description                           |
| ---------------- | ------- | ------------------------------------- |
| trader           | address | address of the trader                 |
| collateralIndex  | uint8   | index of the collateral               |
| amountCollateral | uint256 | amount charged (collateral precision) |

## GTokenFeeCharged

```solidity
event GTokenFeeCharged(address trader, uint8 collateralIndex, uint256 amountCollateral)
```

*Emitted when gToken fee is charged*

### Parameters

| Name             | Type    | Description                           |
| ---------------- | ------- | ------------------------------------- |
| trader           | address | address of the trader                 |
| collateralIndex  | uint8   | index of the collateral               |
| amountCollateral | uint256 | amount charged (collateral precision) |


---

# Agent Instructions: 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:

```
GET https://docs.gains.trade/developer/technical-reference/contracts/interfaces/libraries/itradingcommonutils.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
