> ## 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 MegaETH, with the protocol revenue share.

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

Current coverage includes GMX 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        | v2                                                                 |
| chain             | Blockchain network.                                                                                     | varchar        | megaeth                                                            |
| block\_timestamp  | Block timestamp of the fee event.                                                                       | timestamp\_ntz | 2026-04-10 03:13:09                                                |
| block\_date       | Calendar date of the fee event (UTC).                                                                   | date           | 2026-04-10                                                         |
| block\_number     | Block number containing the event.                                                                      | number         | 12,993,778                                                         |
| transaction\_hash | Transaction hash.                                                                                       | varchar        | 0x48c8773e4dd4f800b52fedf359f43743c84ad7d14aa66157071e278a8cdc6820 |
| log\_index        | Position of the event log within the block.                                                             | number         | 78                                                                 |
| unique\_id        | Unique identifier for the row.                                                                          | varchar        | txn-0x48c8773e...\_log\_index-78                                   |
| trader            | Wallet address charged the fee. Null for pool swap fees, which are not attributable to a single trader. | varchar        | 0xf18ddb0e5dd2807f6c4d3fe2553f94e6904d80cb                         |
| market\_address   | GMX market address. Null for swap fees, which are not tied to a single market.                          | varchar        | 0x9b1b72720f6d277f3b1e607a0c5fab1b300248b1                         |
| market\_symbol    | Symbol of the market's index token.                                                                     | varchar        | WETH                                                               |
| asset\_address    | Address of the token the fee is denominated in.                                                         | varchar        | 0xfafddbb3fc7688494971a79cc65dca3ef82079e7                         |
| fee\_type         | Fee category: position, liquidation, or swap.                                                           | varchar        | position                                                           |
| fee\_usd          | Total fee for the event in USD.                                                                         | number         | 0.006129                                                           |
| revenue\_usd      | Protocol's retained share of the fee in USD.                                                            | number         | 0.003064                                                           |
| extra\_fields     | VARIANT column with protocol-specific fee detail.                                                       | variant        |                                                                    |

### Sample Query

```sql theme={null}
SELECT *
FROM megaeth.perpetuals.fees
WHERE block_date = '2026-04-10'
LIMIT 100;
```
