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

# mux_v2_fantom

> Tables in tt-contracts.mux_v2_fantom

## Tables

### LiquidityPool\_AddAsset\_event

Event log recording the addition of a new asset to a MUX Protocol v2 liquidity pool, including asset identifier, token addresses, decimal precision, symbol, and stablecoin classification. Used for tracking pool composition changes and supported asset configurations.

<Accordion title="Columns">
  | Column               | Type        | Description                                                                                                                                          |
  | -------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `block_timestamp`    | `TIMESTAMP` | Timestamp when the block was produced. UTC timezone, millisecond precision.                                                                          |
  | `block_number`       | `INT64`     | Sequential identifier for the block in which the event or transaction was recorded. Integer value indicating the block's position in the blockchain. |
  | `transaction_hash`   | `STRING`    | Unique identifier for the transaction. 66-character hex string including 0x prefix.                                                                  |
  | `log_index`          | `INT64`     | Position of the event within the block's transaction logs. Zero-indexed integer representing the sequential order of log emission.                   |
  | `address`            | `STRING`    | Contract address that emitted the event. Hex-encoded, 0x-prefixed, 42-character string.                                                              |
  | `removed`            | `BOOL`      | Boolean flag indicating whether the event log was removed from the blockchain due to a chain reorganization.                                         |
  | `in_id`              | `INT64`     | Unique identifier for the position, record, or entity within the protocol. Numeric string representation.                                            |
  | `in_symbol`          | `STRING`    | Symbol of the token involved in the transaction or event.                                                                                            |
  | `in_decimals`        | `INT64`     | Number of decimal places for the token. Integer value defining precision for token amount representations.                                           |
  | `in_isStable`        | `BOOL`      | Boolean flag indicating whether the asset is classified as a stablecoin.                                                                             |
  | `in_tokenAddress`    | `STRING`    | Token contract address for the asset involved in the operation. Hex-encoded, 0x-prefixed, 42-character string.                                       |
  | `in_muxTokenAddress` | `STRING`    | Contract address of the MUX protocol's liquidity pool token for the asset. Hex-encoded, 0x-prefixed, 42-character string.                            |
</Accordion>

<Accordion title="Sample Data">
  | in\_id | address                                    | removed | in\_symbol                                                         | log\_index | in\_decimals | in\_isStable | block\_number | block\_timestamp         | in\_tokenAddress                           | transaction\_hash                                                  | in\_muxTokenAddress                        |
  | ------ | ------------------------------------------ | ------- | ------------------------------------------------------------------ | ---------- | ------------ | ------------ | ------------- | ------------------------ | ------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------ |
  | 8      | 0x2e81f443a11a943196c88afcb5a0d807721a88e6 | false   | 0x4f50000000000000000000000000000000000000000000000000000000000000 | 38         | 18           | false        | 53316181      | 2023-01-06T06:47:03.000Z | 0x0000000000000000000000000000000000000000 | 0x9de9705f256c748b114674c127f1932c591180829372f6853c0292b4722e593c | 0xf16f662bc827c7e2d28f4b5f4f47ca9cad63e424 |
  | 5      | 0x2e81f443a11a943196c88afcb5a0d807721a88e6 | false   | 0x4156415800000000000000000000000000000000000000000000000000000000 | 0          | 18           | false        | 37650486      | 2022-05-06T01:45:16.000Z | 0x0000000000000000000000000000000000000000 | 0x3703512b2fb8cda6300d5eaea0be51baf75c02bfdf1a0294277f2ee9dc58ca81 | 0x746ba48fc973596d0077573bda6185ca3bb9c3dc |
  | 6      | 0x2e81f443a11a943196c88afcb5a0d807721a88e6 | false   | 0x424e420000000000000000000000000000000000000000000000000000000000 | 18         | 18           | false        | 37650491      | 2022-05-06T01:45:20.000Z | 0x27f26f00e1605903645bbabc0a73e35027dccd45 | 0xd1328a1bd55ea3b16b37090fc876d0bae0c019113a4f2a30cf7fad0f8adb41c9 | 0x0b70ad251761fcff7cb42db35b10ea0208ecd07c |
</Accordion>

<Accordion title="Example Query">
  **Query with partition filter**

  ```sql theme={null}
  SELECT *
  FROM `tt-contracts.mux_v2_fantom.LiquidityPool_AddAsset_event`
  WHERE block_timestamp >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)
  LIMIT 100
  ```
</Accordion>

***

### LiquidityPool\_ClosePosition\_event

Position closure events from MUX Protocol liquidity pools containing trader address, position size, asset prices, profit/loss, fees, and remaining balances. Used for tracking leverage trading activity and calculating realized PnL across perpetual futures positions.

<Accordion title="Columns">
  | Column             | Type                                                                                                                                                                                                                                                                 | Description                                                                                                                                          |
  | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `block_timestamp`  | `TIMESTAMP`                                                                                                                                                                                                                                                          | Timestamp when the block was produced. UTC timezone, millisecond precision.                                                                          |
  | `block_number`     | `INT64`                                                                                                                                                                                                                                                              | Sequential identifier for the block in which the event or transaction was recorded. Integer value indicating the block's position in the blockchain. |
  | `transaction_hash` | `STRING`                                                                                                                                                                                                                                                             | Unique identifier for the transaction. 66-character hex string including 0x prefix.                                                                  |
  | `log_index`        | `INT64`                                                                                                                                                                                                                                                              | Position of the event within the block's transaction logs. Zero-indexed integer representing the sequential order of log emission.                   |
  | `address`          | `STRING`                                                                                                                                                                                                                                                             | Contract address that emitted the event. Hex-encoded, 0x-prefixed, 42-character string.                                                              |
  | `removed`          | `BOOL`                                                                                                                                                                                                                                                               | Boolean flag indicating whether the event log was removed from the blockchain due to a chain reorganization.                                         |
  | `in_trader`        | `STRING`                                                                                                                                                                                                                                                             | Address that initiated or executed the trade transaction. Hex-encoded, 0x-prefixed, 42-character string.                                             |
  | `in_assetId`       | `INT64`                                                                                                                                                                                                                                                              | Unique identifier for the asset or token involved in the operation. Hex-encoded, 0x-prefixed, 66-character string.                                   |
  | `in_args`          | `STRUCT<subAccountId STRING, collateralId INT64, profitAssetId INT64, isLong BOOL, amount STRING, assetPrice STRING, collateralPrice STRING, profitAssetPrice STRING, feeUsd STRING, hasProfit BOOL, pnlUsd STRING, remainPosition STRING, remainCollateral STRING>` | Structured input arguments passed to the contract function that triggered the event. Contains nested data specific to the operation being performed. |
</Accordion>

<Accordion title="Sample Data">
  | address                                    | in\_args                                                                                                                                                                                                                                                                                                                                                                                                                                  | removed | in\_trader                                 | log\_index | in\_assetId | block\_number | block\_timestamp         | transaction\_hash                                                  |
  | ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ------------------------------------------ | ---------- | ----------- | ------------- | ------------------------ | ------------------------------------------------------------------ |
  | 0x2e81f443a11a943196c88afcb5a0d807721a88e6 | \{"amount":"949380000000000000000","feeUsd":"670155396331212000","isLong":true,"pnlUsd":"16899343752000000000","hasProfit":false,"assetPrice":"449609820000000000","collateralId":0,"subAccountId":"0x1141eefa7a6e3ebe85fe60c7e6d8ed5a3d94c169000701000000000000000000","profitAssetId":7,"remainPosition":"0","collateralPrice":"1000000000000000000","profitAssetPrice":"449609820000000000","remainCollateral":"71102959919937908000"} | false   | 0x1141eefa7a6e3ebe85fe60c7e6d8ed5a3d94c169 | 1          | 7           | 55724887      | 2023-02-13T19:54:53.000Z | 0xf36360da781fa5b47e7f9b63eb7a24c0d6014bc1c8bd911fb5b66fa98cd6e6b5 |
  | 0x2e81f443a11a943196c88afcb5a0d807721a88e6 | \{"amount":"42680000000000000000","feeUsd":"98427091470400000","isLong":false,"pnlUsd":"9986654788000000000","hasProfit":true,"assetPrice":"2283236600000000000","collateralId":0,"subAccountId":"0x2e8ffde281d9e57eaa0c901847cebba7620b25f5000800000000000000000000","profitAssetId":0,"remainPosition":"0","collateralPrice":"1000000000000000000","profitAssetPrice":"1000000000000000000","remainCollateral":"8270782845699200000"}   | false   | 0x2e8ffde281d9e57eaa0c901847cebba7620b25f5 | 34         | 8           | 55667189      | 2023-02-13T01:18:03.000Z | 0xb2c5be1a8fbc16831f85160d5f78b25a02e7e51c6ceb47e573d8f5cb514e65b1 |
  | 0x2e81f443a11a943196c88afcb5a0d807721a88e6 | \{"amount":"18910000000000000000","feeUsd":"43609566534800000","isLong":false,"pnlUsd":"4481395805000000000","hasProfit":true,"assetPrice":"2283236600000000000","collateralId":7,"subAccountId":"0x2e8ffde281d9e57eaa0c901847cebba7620b25f5070800000000000000000000","profitAssetId":0,"remainPosition":"0","collateralPrice":"436200000000000000","profitAssetPrice":"1000000000000000000","remainCollateral":"7707225533447718931"}    | false   | 0x2e8ffde281d9e57eaa0c901847cebba7620b25f5 | 2          | 8           | 55667202      | 2023-02-13T01:18:15.000Z | 0x6318486ec7d0635524ffe2c776685990198fd93d8f7a8c718739c05cfed18eea |
</Accordion>

<Accordion title="Example Query">
  **Query with partition filter**

  ```sql theme={null}
  SELECT *
  FROM `tt-contracts.mux_v2_fantom.LiquidityPool_ClosePosition_event`
  WHERE block_timestamp >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)
  LIMIT 100
  ```
</Accordion>

***

### LiquidityPool\_Liquidate\_event

Position liquidation events from MUX Protocol perpetual futures contracts containing trader and liquidator addresses, position details, collateral amounts, profit/loss calculations, and penalty distributions to liquidity pools.

<Accordion title="Columns">
  | Column             | Type                                                                                                                                                                                                                                          | Description                                                                                                                                          |
  | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `block_timestamp`  | `TIMESTAMP`                                                                                                                                                                                                                                   | Timestamp when the block was produced. UTC timezone, millisecond precision.                                                                          |
  | `block_number`     | `INT64`                                                                                                                                                                                                                                       | Sequential identifier for the block in which the event or transaction was recorded. Integer value indicating the block's position in the blockchain. |
  | `transaction_hash` | `STRING`                                                                                                                                                                                                                                      | Unique identifier for the transaction. 66-character hex string including 0x prefix.                                                                  |
  | `log_index`        | `INT64`                                                                                                                                                                                                                                       | Position of the event within the block's transaction logs. Zero-indexed integer representing the sequential order of log emission.                   |
  | `address`          | `STRING`                                                                                                                                                                                                                                      | Contract address that emitted the event. Hex-encoded, 0x-prefixed, 42-character string.                                                              |
  | `removed`          | `BOOL`                                                                                                                                                                                                                                        | Boolean flag indicating whether the event log was removed from the blockchain due to a chain reorganization.                                         |
  | `in_trader`        | `STRING`                                                                                                                                                                                                                                      | Address that initiated or executed the trade transaction. Hex-encoded, 0x-prefixed, 42-character string.                                             |
  | `in_assetId`       | `INT64`                                                                                                                                                                                                                                       | Unique identifier for the asset or token involved in the operation. Hex-encoded, 0x-prefixed, 66-character string.                                   |
  | `in_args`          | `STRUCT<subAccountId STRING, collateralId INT64, profitAssetId INT64, isLong BOOL, amount STRING, assetPrice STRING, collateralPrice STRING, profitAssetPrice STRING, feeUsd STRING, hasProfit BOOL, pnlUsd STRING, remainCollateral STRING>` | Structured input arguments passed to the contract function that triggered the event. Contains nested data specific to the operation being performed. |
</Accordion>

<Accordion title="Sample Data">
  | address                                    | in\_args                                                                                                                                                                                                                                                                                                                                                                                                             | removed | in\_trader                                 | log\_index | in\_assetId | block\_number | block\_timestamp         | transaction\_hash                                                  |
  | ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ------------------------------------------ | ---------- | ----------- | ------------- | ------------------------ | ------------------------------------------------------------------ |
  | 0x2e81f443a11a943196c88afcb5a0d807721a88e6 | \{"amount":"384610000000000000000","feeUsd":"94031963534079999","isLong":false,"pnlUsd":"1772950562960000000","hasProfit":false,"assetPrice":"214697328000000000","collateralId":7,"subAccountId":"0x519605903d4329cadefd874dba491c8a3d09a946070700000000000000000000","profitAssetId":1,"collateralPrice":"214440000000000000","profitAssetPrice":"1000000000000000000","remainCollateral":"909534956295467265"}    | false   | 0x519605903d4329cadefd874dba491c8a3d09a946 | 117        | 7           | 49415246      | 2022-10-18T00:25:22.000Z | 0xb60de3e201fd4a1828634141a0936f6e72b13a0d19e3784bb530e09674de53a4 |
  | 0x2e81f443a11a943196c88afcb5a0d807721a88e6 | \{"amount":"384540000000000000000","feeUsd":"106338452039040000","isLong":false,"pnlUsd":"4394323159200000000","hasProfit":false,"assetPrice":"267170220000000000","collateralId":0,"subAccountId":"0x27730c0987755b3e405e60ed0d2cdca4a1e59ce4000700000000000000000000","profitAssetId":0,"collateralPrice":"1000000000000000000","profitAssetPrice":"1000000000000000000","remainCollateral":"420663738169280000"}  | false   | 0x27730c0987755b3e405e60ed0d2cdca4a1e59ce4 | 1          | 7           | 64105502      | 2023-06-14T17:59:56.000Z | 0x2792f43036cb032a0e9917bc2e19d3f65fb858921b6ce0c387ccce923d7d01c5 |
  | 0x2e81f443a11a943196c88afcb5a0d807721a88e6 | \{"amount":"11900000000000000","feeUsd":"1054541404524999999","isLong":true,"pnlUsd":"828519999999999999","hasProfit":false,"assetPrice":"1658600000000000000000","collateralId":7,"subAccountId":"0xde6546fce13a6b3a79090660c952796b39e4e0a5070301000000000000000000","profitAssetId":3,"collateralPrice":"252250000000000000","profitAssetPrice":"1658600000000000000000","remainCollateral":"238972568469257990"} | false   | 0xde6546fce13a6b3a79090660c952796b39e4e0a5 | 12         | 3           | 64113857      | 2023-06-14T20:32:09.000Z | 0xa1505ce7e90cb102d708f203762989f03d7382c57e6a3580e558fdff7089a57c |
</Accordion>

<Accordion title="Example Query">
  **Query with partition filter**

  ```sql theme={null}
  SELECT *
  FROM `tt-contracts.mux_v2_fantom.LiquidityPool_Liquidate_event`
  WHERE block_timestamp >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)
  LIMIT 100
  ```
</Accordion>

***

### LiquidityPool\_OpenPosition\_event

Perpetual futures position opening events from MUX Protocol liquidity pools containing trader address, asset and collateral identifiers, position size, entry price, leverage direction (long/short), fees charged, and remaining collateral balances. Used for tracking perpetual contract position entries and margin requirements.

<Accordion title="Columns">
  | Column             | Type                                                                                                                                                                                                          | Description                                                                                                                                          |
  | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `block_timestamp`  | `TIMESTAMP`                                                                                                                                                                                                   | Timestamp when the block was produced. UTC timezone, millisecond precision.                                                                          |
  | `block_number`     | `INT64`                                                                                                                                                                                                       | Sequential identifier for the block in which the event or transaction was recorded. Integer value indicating the block's position in the blockchain. |
  | `transaction_hash` | `STRING`                                                                                                                                                                                                      | Unique identifier for the transaction. 66-character hex string including 0x prefix.                                                                  |
  | `log_index`        | `INT64`                                                                                                                                                                                                       | Position of the event within the block's transaction logs. Zero-indexed integer representing the sequential order of log emission.                   |
  | `address`          | `STRING`                                                                                                                                                                                                      | Contract address that emitted the event. Hex-encoded, 0x-prefixed, 42-character string.                                                              |
  | `removed`          | `BOOL`                                                                                                                                                                                                        | Boolean flag indicating whether the event log was removed from the blockchain due to a chain reorganization.                                         |
  | `in_trader`        | `STRING`                                                                                                                                                                                                      | Address that initiated or executed the trade transaction. Hex-encoded, 0x-prefixed, 42-character string.                                             |
  | `in_assetId`       | `INT64`                                                                                                                                                                                                       | Unique identifier for the asset or token involved in the operation. Hex-encoded, 0x-prefixed, 66-character string.                                   |
  | `in_args`          | `STRUCT<subAccountId STRING, collateralId INT64, isLong BOOL, amount STRING, assetPrice STRING, collateralPrice STRING, newEntryPrice STRING, feeUsd STRING, remainPosition STRING, remainCollateral STRING>` | Structured input arguments passed to the contract function that triggered the event. Contains nested data specific to the operation being performed. |
</Accordion>

<Accordion title="Sample Data">
  | address                                    | in\_args                                                                                                                                                                                                                                                                                                                                                                                 | removed | in\_trader                                 | log\_index | in\_assetId | block\_number | block\_timestamp         | transaction\_hash                                                  |
  | ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ------------------------------------------ | ---------- | ----------- | ------------- | ------------------------ | ------------------------------------------------------------------ |
  | 0x2e81f443a11a943196c88afcb5a0d807721a88e6 | \{"amount":"5240000000000000","feeUsd":"110664608000000000","isLong":true,"assetPrice":"26399000000000000000000","collateralId":0,"subAccountId":"0xebfdc68363057beebfc331b0da871e696d2d0b62000401000000000000000000","newEntryPrice":"26399000000000000000000","remainPosition":"5240000000000000","collateralPrice":"1000000000000000000","remainCollateral":"9889335392000000000"}    | false   | 0xebfdc68363057beebfc331b0da871e696d2d0b62 | 4          | 4           | 63769169      | 2023-06-08T10:01:12.000Z | 0xf8b82509937cabd7d61fe4b7b968de0aa256cf5eddaf70adb4a68da15633877e |
  | 0x2e81f443a11a943196c88afcb5a0d807721a88e6 | \{"amount":"563100000000000000","feeUsd":"118144839883200000","isLong":true,"assetPrice":"262264340000000000000","collateralId":0,"subAccountId":"0xc16623cb1505c57c56b3dd9633dbb43991ab2804000601000000000000000000","newEntryPrice":"262264340000000000000","remainPosition":"563100000000000000","collateralPrice":"1000000000000000000","remainCollateral":"14751855160116800000"}   | false   | 0xc16623cb1505c57c56b3dd9633dbb43991ab2804 | 4          | 6           | 63750669      | 2023-06-08T01:27:22.000Z | 0x3bc3b874cf22e8c423e77d7a49ad7f302e6c247b6da866ca4babfd484bf19a1a |
  | 0x2e81f443a11a943196c88afcb5a0d807721a88e6 | \{"amount":"3364380000000000000000","feeUsd":"788074901213760000","isLong":true,"assetPrice":"292800940000000000","collateralId":0,"subAccountId":"0x5b6fa970bf7038f78d4e15d922ef6e8ffe3e6c6f000701000000000000000000","newEntryPrice":"292800940000000000","remainPosition":"3364380000000000000000","collateralPrice":"1000000000000000000","remainCollateral":"49211925098786240000"} | false   | 0x5b6fa970bf7038f78d4e15d922ef6e8ffe3e6c6f | 4          | 7           | 63750847      | 2023-06-08T01:30:40.000Z | 0x1ae8b2e789886d107f7fb25ec5b82b84f93c0529761dc71a7dbb27acf17b1032 |
</Accordion>

<Accordion title="Example Query">
  **Query with partition filter**

  ```sql theme={null}
  SELECT *
  FROM `tt-contracts.mux_v2_fantom.LiquidityPool_OpenPosition_event`
  WHERE block_timestamp >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)
  LIMIT 100
  ```
</Accordion>

***
