> ## 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.

# saddlefinance_v1_fantom

> Tables in tt-contracts.saddlefinance_v1_fantom

## Tables

### MetaSwap\_TokenSwap\_event

Token swap events from Saddle Finance MetaSwap pools containing buyer address, token indices, and swap amounts. Records pool-to-pool token exchanges with soldId and boughtId representing token positions within the liquidity pool.

<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_buyer`         | `STRING`    | Address of the account purchasing tokens or assets in the transaction. Hex-encoded, 0x-prefixed, 42-character string.                                |
  | `in_tokensSold`    | `STRING`    | Quantity of tokens sold in the swap transaction. Numeric string value representing the raw token amount without decimal adjustment.                  |
  | `in_tokensBought`  | `STRING`    | Quantity of tokens acquired in the swap transaction. Numeric string value representing the raw token amount without decimal adjustment.              |
  | `in_soldId`        | `STRING`    | Index identifier for the token being sold in the swap. Numeric string value representing the position of the sold token in the swap pool.            |
  | `in_boughtId`      | `STRING`    | Index identifier for the token being acquired in the swap. Numeric string value representing the position of the purchased token in the swap pool.   |
</Accordion>

<Accordion title="Sample Data">
  | address                                    | removed | in\_buyer                                  | in\_soldId | log\_index | in\_boughtId | block\_number | in\_tokensSold       | block\_timestamp         | in\_tokensBought | transaction\_hash                                                  |
  | ------------------------------------------ | ------- | ------------------------------------------ | ---------- | ---------- | ------------ | ------------- | -------------------- | ------------------------ | ---------------- | ------------------------------------------------------------------ |
  | 0xbea9f78090bdb9e662d8cb301a00ad09a5b756e9 | false   | 0x50ae81c68b499386065f7e6f89bbe14da64a6c04 | 0          | 128        | 1            | 52551657      | 5966846004211870811  | 2022-12-19T18:50:48.000Z | 5958121          | 0x17821bd6556e4840442709ea66a920d50a30c1d1cc563c83d8e846fba9c9f17f |
  | 0xbea9f78090bdb9e662d8cb301a00ad09a5b756e9 | false   | 0x93131efee501d5721737c32576238f619548edda | 0          | 271        | 1            | 52537164      | 14400000000000000000 | 2022-12-19T08:48:08.000Z | 14267017         | 0xf36098cd618822cbc0f2ecde600fe2d665994e23e7fb1ee0cd88bf9d73fb81f6 |
  | 0xbea9f78090bdb9e662d8cb301a00ad09a5b756e9 | false   | 0x3319161b131401124e61ffcdff0aa7f6fdcbbfed | 0          | 47         | 1            | 52530562      | 8410309791674270652  | 2022-12-19T03:48:57.000Z | 8376894          | 0x2ce1a2835e50689d26a95f33372fc2234ebf89e0fa5fb64a9fc199fa75b691dc |
</Accordion>

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

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

***

### PoolRegistry\_AddPool\_event

Pool registration events emitted when a new liquidity pool is added to the Saddle Finance registry. Contains pool configuration including token addresses, LP (Liquidity Provider) token, asset type classification, approval status, and optional metapool parameters.

<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_poolAddress`   | `STRING`                                                                                                                                                                                                                                                     | Contract address of the liquidity pool. Hex-encoded, 0x-prefixed, 42-character string.                                                                                                                                                                                              |
  | `in_index`         | `STRING`                                                                                                                                                                                                                                                     | Liquidity index at the time of the event. Numeric string representation of the scaled interest rate accumulator in ray units (1e27).                                                                                                                                                |
  | `in_poolData`      | `STRUCT<poolAddress STRING, lpToken STRING, typeOfAsset INT64, poolName STRING, targetAddress STRING, tokens STRING, underlyingTokens STRING, basePoolAddress STRING, metaSwapDepositAddress STRING, isSaddleApproved BOOL, isRemoved BOOL, isGuarded BOOL>` | Structured data containing liquidity pool configuration and metadata for Saddle Finance pools. Includes pool and LP token addresses, asset type, pool name (hex-encoded bytes32), token addresses (comma-separated), base pool references for metapools, and approval status flags. |
</Accordion>

<Accordion title="Sample Data">
  | address                                    | removed | in\_index | log\_index | in\_poolData                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | block\_number | in\_poolAddress                            | block\_timestamp         | transaction\_hash                                                  |
  | ------------------------------------------ | ------- | --------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | ------------------------------------------ | ------------------------ | ------------------------------------------------------------------ |
  | 0x88cc4aa0dd6cf126b00c012dda9f6f4fd9388b17 | false   | 1         | 0          | \{"tokens":"0xb67fa6defce4042070eb1ae1511dcd6dcc6a532e,0xc969dd0a7ab0f8a0c5a69c0839db39b6c928bc08","lpToken":"0x1c1091558709788c671c82753e69cfcf1a29c6c9","poolName":"0x4652415842502d616c5553440000000000000000000000000000000000000000","isGuarded":false,"isRemoved":false,"poolAddress":"0xab374155a7b6ca520d23de8db6a85471ceafb620","typeOfAsset":2,"targetAddress":"0xab374155a7b6ca520d23de8db6a85471ceafb620","basePoolAddress":"0xbea9f78090bdb9e662d8cb301a00ad09a5b756e9","isSaddleApproved":true,"underlyingTokens":"0xb67fa6defce4042070eb1ae1511dcd6dcc6a532e,0xdc301622e621166bd8e82f2ca0a26c13ad0be355,0x04068da6c83afcfa0e13ba15a6696662335d5b75","metaSwapDepositAddress":"0x5dd186f8809147f96d3ffc4508f3c82694e58c9c"} | 41480323      | 0xab374155a7b6ca520d23de8db6a85471ceafb620 | 2022-06-27T19:00:05.000Z | 0xde07e3eae3e4142ac7492dda1f78085e7e2e080ea529c7c6119d1dc8797124cc |
  | 0x88cc4aa0dd6cf126b00c012dda9f6f4fd9388b17 | false   | 2         | 1          | \{"tokens":"0x049d68029688eabf473097a2fc38ef61633a3c7a,0xc969dd0a7ab0f8a0c5a69c0839db39b6c928bc08","lpToken":"0x21ea072844fd4abed72539750c054e009d877f72","poolName":"0x4652415842502d55534454000000000000000000000000000000000000000000","isGuarded":false,"isRemoved":false,"poolAddress":"0xdb5c5a6162115ce9a188e7d773c4d011f421bbe5","typeOfAsset":2,"targetAddress":"0xdb5c5a6162115ce9a188e7d773c4d011f421bbe5","basePoolAddress":"0xbea9f78090bdb9e662d8cb301a00ad09a5b756e9","isSaddleApproved":true,"underlyingTokens":"0x049d68029688eabf473097a2fc38ef61633a3c7a,0xdc301622e621166bd8e82f2ca0a26c13ad0be355,0x04068da6c83afcfa0e13ba15a6696662335d5b75","metaSwapDepositAddress":"0x4a5208f83a17e030a18830521e4064e80728c4fc"} | 41480323      | 0xdb5c5a6162115ce9a188e7d773c4d011f421bbe5 | 2022-06-27T19:00:05.000Z | 0xde07e3eae3e4142ac7492dda1f78085e7e2e080ea529c7c6119d1dc8797124cc |
  | 0x88cc4aa0dd6cf126b00c012dda9f6f4fd9388b17 | false   | 3         | 41         | \{"tokens":"0xb67fa6defce4042070eb1ae1511dcd6dcc6a532e,0xc969dd0a7ab0f8a0c5a69c0839db39b6c928bc08","lpToken":"0xd7d1b50c8ef77d9ab410723f81363c8b252c729f","poolName":"0x4652415842502d616c5553440000000000000000000000000000000000000000","isGuarded":false,"isRemoved":false,"poolAddress":"0x4e1484607760118ebe2ab07c0c71f1b4d9671e01","typeOfAsset":2,"targetAddress":"0x4e1484607760118ebe2ab07c0c71f1b4d9671e01","basePoolAddress":"0xbea9f78090bdb9e662d8cb301a00ad09a5b756e9","isSaddleApproved":true,"underlyingTokens":"0xb67fa6defce4042070eb1ae1511dcd6dcc6a532e,0xdc301622e621166bd8e82f2ca0a26c13ad0be355,0x04068da6c83afcfa0e13ba15a6696662335d5b75","metaSwapDepositAddress":"0x0e510c9b20a5d136e75f7fd2a5f344bd98f9d875"} | 41952966      | 0x4e1484607760118ebe2ab07c0c71f1b4d9671e01 | 2022-07-03T23:33:29.000Z | 0x444159de54ac2145114c397c051512caeee1b11aed2eb70e07f1a799af90316f |
</Accordion>

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

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

***

### SwapFlashLoan\_TokenSwap\_event

Token swap events from Saddle Finance and Zyberswap liquidity pools recording buyer address, sold and bought token identifiers, and token quantities exchanged. Used for tracking decentralized exchange (DEX) trading activity and price impact analysis across automated market maker (AMM) 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_buyer`         | `STRING`    | Address of the account purchasing tokens or assets in the transaction. Hex-encoded, 0x-prefixed, 42-character string.                                |
  | `in_tokensSold`    | `STRING`    | Quantity of tokens sold in the swap transaction. Numeric string value representing the raw token amount without decimal adjustment.                  |
  | `in_tokensBought`  | `STRING`    | Quantity of tokens acquired in the swap transaction. Numeric string value representing the raw token amount without decimal adjustment.              |
  | `in_soldId`        | `STRING`    | Index identifier for the token being sold in the swap. Numeric string value representing the position of the sold token in the swap pool.            |
  | `in_boughtId`      | `STRING`    | Index identifier for the token being acquired in the swap. Numeric string value representing the position of the purchased token in the swap pool.   |
</Accordion>

<Accordion title="Sample Data">
  | address                                    | removed | in\_buyer                                  | in\_soldId | log\_index | in\_boughtId | block\_number | in\_tokensSold | block\_timestamp         | in\_tokensBought    | transaction\_hash                                                  |
  | ------------------------------------------ | ------- | ------------------------------------------ | ---------- | ---------- | ------------ | ------------- | -------------- | ------------------------ | ------------------- | ------------------------------------------------------------------ |
  | 0xbea9f78090bdb9e662d8cb301a00ad09a5b756e9 | false   | 0x5bab9d61f84630a76fa9e2f67739f2da694b5402 | 1          | 12         | 0            | 63651667      | 4538984        | 2023-06-06T01:02:22.000Z | 4569983300542971491 | 0x8068ee9afccf2af720b6e3391effc18a29abd9e09ec321240c369facb2dc0af2 |
  | 0xbea9f78090bdb9e662d8cb301a00ad09a5b756e9 | false   | 0x5bab9d61f84630a76fa9e2f67739f2da694b5402 | 1          | 77         | 0            | 63666659      | 3466697        | 2023-06-06T08:52:26.000Z | 3486554220057846377 | 0x27c114654ca86892e3a49bd28ec20b950ade5073c6a33187460ff3ff181431bb |
  | 0xbea9f78090bdb9e662d8cb301a00ad09a5b756e9 | false   | 0x8f4e8a8acface47507afee6302b793f3612ceaf1 | 1          | 11         | 0            | 63683863      | 7975140        | 2023-06-06T17:21:45.000Z | 8011273375228729931 | 0x37173f51bc1d06b11d5ec9c70ae9425675d88400d1922ef2809517a9e4afccb3 |
</Accordion>

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

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

***
