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

# Fees

> GMX perpetuals fee events on Avalanche, with the protocol revenue share.

`avalanche.perpetuals.fees` contains one row per GMX fee event on Avalanche. `fee_type` categorizes each event as a position, liquidation, swap, mint, or redeem fee, and `revenue_usd` gives the protocol's retained share.

Current coverage includes GMX v1 and v2.

### Table Columns

| Column Name       | Description                                                                                             | Type           | Example                                                            |
| ----------------- | ------------------------------------------------------------------------------------------------------- | -------------- | ------------------------------------------------------------------ |
| project           | The perpetuals project.                                                                                 | varchar        | gmx                                                                |
| protocol          | The specific protocol within the project.                                                               | varchar        | gmx                                                                |
| version           | Protocol version.                                                                                       | varchar        | v1                                                                 |
| chain             | Blockchain network.                                                                                     | varchar        | avalanche                                                          |
| block\_timestamp  | Block timestamp of the fee event.                                                                       | timestamp\_ntz | 2022-08-23 14:54:13                                                |
| block\_date       | Calendar date of the fee event (UTC).                                                                   | date           | 2022-08-23                                                         |
| block\_number     | Block number containing the event.                                                                      | number         | 19,020,160                                                         |
| transaction\_hash | Transaction hash.                                                                                       | varchar        | 0x941f1063d1bd064e5a2d06a9dbc51439d4ef405bb978529d5f9edc5088ff2342 |
| log\_index        | Position of the event log within the block.                                                             | number         | 23                                                                 |
| unique\_id        | Unique identifier for the row.                                                                          | varchar        | txn-0x941f1063...\_log\_index-23                                   |
| trader            | Wallet address charged the fee. Null for pool swap fees, which are not attributable to a single trader. | varchar        | 0x4828063262b3b129636cc3ab20a6a4f61ac5f7bd                         |
| market\_address   | GMX market address. Null for swap and mint/redeem fees, which are not tied to a single market.          | varchar        | 0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7                         |
| market\_symbol    | Symbol of the market's index token.                                                                     | varchar        | WAVAX                                                              |
| asset\_address    | Address of the token the fee is denominated in.                                                         | varchar        | 0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7                         |
| fee\_type         | Fee category: position, liquidation, swap, mint, or redeem.                                             | varchar        | position                                                           |
| fee\_usd          | Total fee for the event in USD.                                                                         | number         | 154.822267                                                         |
| revenue\_usd      | Protocol's retained share of the fee in USD.                                                            | number         | 46.446681                                                          |
| extra\_fields     | VARIANT column with protocol-specific fee detail.                                                       | variant        |                                                                    |

### Sample Query

```sql theme={null}
SELECT *
FROM avalanche.perpetuals.fees
WHERE block_date = '2026-07-23'
LIMIT 100;
```
