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

# gearbox_v1_ethereum

> Tables in tt-contracts.gearbox_v1_ethereum

## Tables

### CreditManager\_CloseCreditAccount\_event

Credit account closure events from Gearbox V1 protocol on Ethereum, recording the owner, recipient, and remaining funds when leveraged credit positions are closed. Used for analyzing protocol liquidations, user position management, and capital efficiency.

<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_owner`          | `STRING`    | Address that owns or controls the shares or position being deposited or withdrawn. Hex-encoded, 0x-prefixed, 42-character string.                                                                                                                                        |
  | `in_to`             | `STRING`    | Destination address receiving tokens or assets in the operation. Hex-encoded, 0x-prefixed, 42-character string.                                                                                                                                                          |
  | `in_remainingFunds` | `STRING`    | Amount of funds returned to the credit account owner after closing their position, denominated in the smallest unit of the underlying asset. Values are string-encoded integers representing wei or similar base units, typically ranging from billions to quadrillions. |
</Accordion>

<Accordion title="Sample Data">
  | in\_to                                     | address                                    | removed | in\_owner                                  | log\_index | block\_number | block\_timestamp         | transaction\_hash                                                  | in\_remainingFunds |
  | ------------------------------------------ | ------------------------------------------ | ------- | ------------------------------------------ | ---------- | ------------- | ------------------------ | ------------------------------------------------------------------ | ------------------ |
  | 0x2cb2e17d23ee7fcf8691afd998f52b1af362ded5 | 0x2664cc24cbad28749b3dd6fc97a6b402484de527 | false   | 0x2cb2e17d23ee7fcf8691afd998f52b1af362ded5 | 136        | 14163098      | 2022-02-08T03:48:11.000Z | 0xd0ff6abd64ee4f5ee06bc309b5f3cccf6801b802c6187fc347611416577d3007 | 1101503693         |
  | 0xfe22b1709a8ef6aeb49d0e35128a0d3eb315cde1 | 0x2664cc24cbad28749b3dd6fc97a6b402484de527 | false   | 0xfe22b1709a8ef6aeb49d0e35128a0d3eb315cde1 | 313        | 14163145      | 2022-02-08T03:59:40.000Z | 0x0ae5ab8b50e2205c05d503ce49cc1216d98019641acb11a7032ce9da16436269 | 7832548697         |
  | 0xa89c470df27ffcbe80926dcdae86a4d19aaab59d | 0x2664cc24cbad28749b3dd6fc97a6b402484de527 | false   | 0xa89c470df27ffcbe80926dcdae86a4d19aaab59d | 163        | 14481296      | 2022-03-29T13:15:26.000Z | 0x9043addc4758b30e723028d1d32af12264f572b179430345fe8b3d8a4a4dc9db | 10674235118        |
</Accordion>

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

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

***

### CreditManager\_LiquidateCreditAccount\_event

Liquidation events from Gearbox v1 protocol credit accounts on Ethereum, recording when undercollateralized positions are closed by liquidators. Contains account owner addresses, liquidator addresses, and remaining funds after liquidation for analyzing protocol risk and liquidation efficiency.

<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_owner`          | `STRING`    | Address that owns or controls the shares or position being deposited or withdrawn. Hex-encoded, 0x-prefixed, 42-character string.                                                                                                                     |
  | `in_liquidator`     | `STRING`    | Address of the account executing the liquidation operation. Hex-encoded, 0x-prefixed, 42-character string.                                                                                                                                            |
  | `in_remainingFunds` | `STRING`    | Amount of funds remaining in the credit account after liquidation, denominated in the smallest unit of the underlying token (e.g., wei for ETH). These are the residual funds returned to the original account owner after debt and fees are settled. |
</Accordion>

<Accordion title="Sample Data">
  | address                                    | removed | in\_owner                                  | log\_index | block\_number | in\_liquidator                             | block\_timestamp         | transaction\_hash                                                  | in\_remainingFunds    |
  | ------------------------------------------ | ------- | ------------------------------------------ | ---------- | ------------- | ------------------------------------------ | ------------------------ | ------------------------------------------------------------------ | --------------------- |
  | 0x777e23a2acb2fcbb35f6ccf98272d03c722ba6eb | false   | 0xfe32a37f15ee4a4b59715530e5817d1322b9df80 | 105        | 14054765      | 0xad4b61f5bce7841e0c5dea42f8f00a17e95bfd9a | 2022-01-22T10:07:13.000Z | 0xbd31df0470f24216acdf05da0a1669aa0e0152fd5c046a333ccfe9af3526cd9a | 430521967763687774556 |
  | 0x2664cc24cbad28749b3dd6fc97a6b402484de527 | false   | 0x9b3f49a186670194f625199b822fcbdfd3feacf7 | 962        | 14054312      | 0x43faf3f8bef053d901c572edc32f055c20efb764 | 2022-01-22T08:28:02.000Z | 0x6ff228c928958b7c8837fd7bb7283c4cd9f874245abb6a12d5e1e9b83433d0ef | 1589808977            |
  | 0x2664cc24cbad28749b3dd6fc97a6b402484de527 | false   | 0xd01a2311ca001241502394d25bc08b0ad8cd2229 | 265        | 14688158      | 0x42ccf4f456d7c7febf274242caccd74aaa0a53d7 | 2022-04-30T22:06:28.000Z | 0xeed949c9174bbbe772befe4c7d8f7aec651dc0a4e8df3b8fb5e664f9ac7fb9f5 | 373900120             |
</Accordion>

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

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

***

### CreditManager\_OpenCreditAccount\_event

Credit account opening events from Gearbox V1 protocol on Ethereum, capturing initial collateral amounts, borrowed amounts, and account addresses when users open leveraged positions. Used for analyzing leverage ratios, borrowing patterns, and user acquisition across different Gearbox credit managers.

<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_sender`        | `STRING`    | Address that initiated the transaction or operation. Hex-encoded, 0x-prefixed, 42-character string.                                                  |
  | `in_onBehalfOf`    | `STRING`    | Address of the account receiving the benefit of the operation. Hex-encoded, 0x-prefixed, 42-character string.                                        |
  | `in_creditAccount` | `STRING`    | Address of the credit account associated with the operation. Hex-encoded, 0x-prefixed, 42-character string.                                          |
  | `in_amount`        | `STRING`    | Input amount for the swap, transaction, or operation. Numeric string representation of token quantity in smallest denomination.                      |
  | `in_borrowAmount`  | `STRING`    | Amount borrowed in the transaction. Denominated in the smallest unit of the underlying token.                                                        |
  | `in_referralCode`  | `STRING`    | Referral code identifier associated with the operation. Numeric string representation of the code used to track referral-based incentives.           |
</Accordion>

<Accordion title="Sample Data">
  | address                                    | removed | in\_amount             | in\_sender                                 | log\_index | block\_number | in\_onBehalfOf                             | block\_timestamp         | in\_borrowAmount       | in\_referralCode | in\_creditAccount                          | transaction\_hash                                                  |
  | ------------------------------------------ | ------- | ---------------------- | ------------------------------------------ | ---------- | ------------- | ------------------------------------------ | ------------------------ | ---------------------- | ---------------- | ------------------------------------------ | ------------------------------------------------------------------ |
  | 0x968f9a68a98819e2e6bb910466e191a7b6cf02f0 | false   | 2500000000000000000    | 0x4f952c4c5415b2609899abdc2f8f352f600d14d6 | 315        | 14068880      | 0x41797b5e0398af475422f6f33f2dc81d9a24ae33 | 2022-01-24T14:37:43.000Z | 7500000000000000000    | 0                | 0xc5d4f0bbbdf94ce68d3a88d4caafd8dc9241e4f1 | 0x298ba5c617bcc469ad03b7dae38a2fc6bee778a58b8d3f27d9a6b9a32cdfb8f0 |
  | 0x968f9a68a98819e2e6bb910466e191a7b6cf02f0 | false   | 300000000000000000     | 0x4f952c4c5415b2609899abdc2f8f352f600d14d6 | 150        | 14070449      | 0x696969536948c9902a622ddb9d959ae4038f5cbb | 2022-01-24T20:25:52.000Z | 900000000000000000     | 0                | 0x653d7a1a903827a5195b21283ea9714b6f1b3f7d | 0xa8282ef62d8a6d451e0d74d061f209abd2def9f2d17696ae919f2a1e38a37dc9 |
  | 0x777e23a2acb2fcbb35f6ccf98272d03c722ba6eb | false   | 3657471542816664360101 | 0x67de6d9bd31f8baf7147a953fc1f42b71b0c9c6e | 440        | 14070618      | 0x67de6d9bd31f8baf7147a953fc1f42b71b0c9c6e | 2022-01-24T20:58:58.000Z | 6437149915357329273777 | 0                | 0x08dd8994b7897a93c201ca7be6a16dc20422891a | 0xd11abbf000e12b3f7b29ce672830e0c3cabd7472ed6577d55a5805ccb2c0c2cf |
</Accordion>

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

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

***

### CreditManager\_RepayCreditAccount\_event

Credit account repayment events from Gearbox V1 leveraged trading protocol on Ethereum. Records when users close their leveraged positions by repaying borrowed funds, including the account owner and recipient addresses.

<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_owner`         | `STRING`    | Address that owns or controls the shares or position being deposited or withdrawn. Hex-encoded, 0x-prefixed, 42-character string.                    |
  | `in_to`            | `STRING`    | Destination address receiving tokens or assets in the operation. Hex-encoded, 0x-prefixed, 42-character string.                                      |
</Accordion>

<Accordion title="Sample Data">
  | in\_to                                     | address                                    | removed | in\_owner                                  | log\_index | block\_number | block\_timestamp         | transaction\_hash                                                  |
  | ------------------------------------------ | ------------------------------------------ | ------- | ------------------------------------------ | ---------- | ------------- | ------------------------ | ------------------------------------------------------------------ |
  | 0x092518f41762e9874d925cfbe26dc3f7e2b73881 | 0x968f9a68a98819e2e6bb910466e191a7b6cf02f0 | false   | 0x092518f41762e9874d925cfbe26dc3f7e2b73881 | 306        | 13940428      | 2022-01-04T17:57:27.000Z | 0x34772f0d3ca2c59d9e18f0fb99336c05e2367cd1de0c469a9f6ea8937f715798 |
  | 0x72fa7697238e2c89c9b07e9200aa05f1481ecde1 | 0x2664cc24cbad28749b3dd6fc97a6b402484de527 | false   | 0x72fa7697238e2c89c9b07e9200aa05f1481ecde1 | 589        | 15002798      | 2022-06-21T14:48:35.000Z | 0xe9162d444ba3d2b8128d53b16a9682123975b3d3ea08b355c66b841d6ff83348 |
  | 0x4d5daadc1bf9aa1c023fe1a9f75545b3863dfd14 | 0xc38478b0a4bafe964c3526eeff534d70e1e09017 | false   | 0x4d5daadc1bf9aa1c023fe1a9f75545b3863dfd14 | 365        | 14741436      | 2022-05-09T08:37:11.000Z | 0xf7ac262a21a393d5b82e33adf93204700a1e77fda37b0ed28937487d6f0ef35c |
</Accordion>

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

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

***

### CurveGearWethPool\_TokenExchange\_event

Token swap events from the Gearbox V1 Curve-GEAR-WETH liquidity pool on Ethereum. Tracks exchanges between GEAR tokens and WETH with buyer addresses, token amounts, and pool identifiers for analyzing liquidity provision and trading patterns.

<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_sold_id`       | `STRING`    | Index of the token sold in the exchange transaction within the pool's token array. String-encoded integer identifier.                                   |
  | `in_tokens_sold`   | `STRING`    | Quantity of tokens sold by the buyer in the exchange transaction. String-encoded integer representing the amount in the smallest unit of the token.     |
  | `in_bought_id`     | `STRING`    | Index of the token purchased in the exchange transaction within the pool's token array. String-encoded integer identifier.                              |
  | `in_tokens_bought` | `STRING`    | Quantity of tokens received by the buyer in the exchange transaction. String-encoded integer representing the amount in the smallest unit of the token. |
</Accordion>

<Accordion title="Sample Data">
  | address                                    | removed | in\_buyer                                  | log\_index | in\_sold\_id | block\_number | in\_bought\_id | in\_tokens\_sold    | block\_timestamp         | in\_tokens\_bought       | transaction\_hash                                                  |
  | ------------------------------------------ | ------- | ------------------------------------------ | ---------- | ------------ | ------------- | -------------- | ------------------- | ------------------------ | ------------------------ | ------------------------------------------------------------------ |
  | 0x0e9b5b092cad6f1c5e6bc7f89ffe1abb5c95f1c2 | false   | 0x0000000000a84d1a9b0063a910315c7ffa9cd248 | 32         | 1            | 16690778      | 0              | 1513740050000000000 | 2023-02-23T11:23:59.000Z | 151661438788147688162434 | 0xb0abf7546bf0dc8676ea92eb24086af875e0ba45a48166c7910c5310fb6ddfc1 |
  | 0x0e9b5b092cad6f1c5e6bc7f89ffe1abb5c95f1c2 | false   | 0x0000000000a84d1a9b0063a910315c7ffa9cd248 | 5          | 1            | 16693545      | 0              | 2900195210000000000 | 2023-02-23T20:43:35.000Z | 292303592424577309307041 | 0xdc2e88779500024919ffaba935a17f9c5b4c24cc3891d344efdb2639e4c649ce |
  | 0x0e9b5b092cad6f1c5e6bc7f89ffe1abb5c95f1c2 | false   | 0x0000000000a84d1a9b0063a910315c7ffa9cd248 | 5          | 1            | 16693557      | 0              | 1988896090000000000 | 2023-02-23T20:46:11.000Z | 200503465375110284017955 | 0xa49a6491f0d90baef47489a7de5574541d1578c70bc42951cdb76e948e8d6a9c |
</Accordion>

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

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

***

### Pool\_AddLiquidity\_event

Liquidity provision events recording deposits into decentralized exchange (DEX) pools. Contains deposited asset addresses, amounts, liquidity position identifiers, and updated pool liquidity balances for tracking capital inflows and position creation.

<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_sender`        | `STRING`    | Address that initiated the transaction or operation. Hex-encoded, 0x-prefixed, 42-character string.                                                  |
  | `in_onBehalfOf`    | `STRING`    | Address of the account receiving the benefit of the operation. Hex-encoded, 0x-prefixed, 42-character string.                                        |
  | `in_amount`        | `STRING`    | Input amount for the swap, transaction, or operation. Numeric string representation of token quantity in smallest denomination.                      |
  | `in_referralCode`  | `STRING`    | Referral code identifier associated with the operation. Numeric string representation of the code used to track referral-based incentives.           |
</Accordion>

<Accordion title="Sample Data">
  | address                                    | removed | in\_amount           | in\_sender                                 | log\_index | block\_number | in\_onBehalfOf                             | block\_timestamp         | in\_referralCode | transaction\_hash                                                  |
  | ------------------------------------------ | ------- | -------------------- | ------------------------------------------ | ---------- | ------------- | ------------------------------------------ | ------------------------ | ---------------- | ------------------------------------------------------------------ |
  | 0x24946bcbbd028d5abb62ad9b635eb1b1a67af668 | false   | 28307000697721617867 | 0x39be637c2d57c3b3f3bb4d732eed83b95aa19f55 | 536        | 18209204      | 0x39be637c2d57c3b3f3bb4d732eed83b95aa19f55 | 2023-09-25T00:22:59.000Z | 0                | 0xc1ce75600b983d9634da2bde47ade25302876ea1694f7d6649c754a0686923b8 |
  | 0x24946bcbbd028d5abb62ad9b635eb1b1a67af668 | false   | 57016960695686067454 | 0x6dcdddaae2bb72bdc6e04548d86c19fb819f863b | 1262       | 18209604      | 0x6dcdddaae2bb72bdc6e04548d86c19fb819f863b | 2023-09-25T01:43:35.000Z | 0                | 0x68ec976062ce3b815fb0d3ca64cd9a6da8815db4d41e92ca1f63ec8e53b35c94 |
  | 0x24946bcbbd028d5abb62ad9b635eb1b1a67af668 | false   | 31471950184256160898 | 0xe50b139167c8eb1a29d686e65a1c11f173cda156 | 148        | 18209446      | 0xe50b139167c8eb1a29d686e65a1c11f173cda156 | 2023-09-25T01:11:59.000Z | 0                | 0x363ced3c42fa5aa2f691986c9baeb0a5018b42d8c8684ed18adace17c64d9c83 |
</Accordion>

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

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

***

### Pool\_Borrow\_event

Borrow events emitted when users take loans from lending pools, recording borrower address, borrowed amount, and applicable interest rate. Used for tracking lending protocol utilization and debt 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_creditManager` | `STRING`    | Address of the credit manager contract that controls the credit account. Hex-encoded, 0x-prefixed, 42-character string.                              |
  | `in_creditAccount` | `STRING`    | Address of the credit account associated with the operation. Hex-encoded, 0x-prefixed, 42-character string.                                          |
  | `in_amount`        | `STRING`    | Input amount for the swap, transaction, or operation. Numeric string representation of token quantity in smallest denomination.                      |
</Accordion>

<Accordion title="Sample Data">
  | address                                    | removed | in\_amount               | log\_index | block\_number | block\_timestamp         | in\_creditAccount                          | in\_creditManager                          | transaction\_hash                                                  |
  | ------------------------------------------ | ------- | ------------------------ | ---------- | ------------- | ------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------------------------------ |
  | 0x86130bdd69143d8a4e5fc50bf4323d48049e98e4 | false   | 199013154866             | 365        | 17018609      | 2023-04-10T15:14:47.000Z | 0x3989960db37ed4c56aae29f950d923b7b70684d0 | 0x95357303f995e184a7998da6c6ea35cc728a1900 | 0xe18485c0ca9f2869b8d9be2f05b1c6b5226db3263d8163760f61eb7b50a4eb35 |
  | 0xb03670c20f87f2169a7c4ebe35746007e9575901 | false   | 175400000000000000000    | 205        | 16294237      | 2022-12-30T01:15:59.000Z | 0xe7fcb650ed4265680300c52326bc5057730c5ff0 | 0x5887ad4cb2352e7f01527035faa3ae0ef2ce2b9b | 0x44df42d9b2f980f39109bbede7cab8ca822e62e5b480f47464bfb3b7e30643c9 |
  | 0x24946bcbbd028d5abb62ad9b635eb1b1a67af668 | false   | 999228308218207772645437 | 107        | 16295828      | 2022-12-30T06:34:47.000Z | 0x489a6804aa6232f61f9bd47de4b810d265ab2251 | 0x672461bfc20dd783444a830ad4c38b345ab6e2f7 | 0x4193baad4e3711b1067c182d3275e43b8501336300b4a28836608bb77447a8e5 |
</Accordion>

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

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

***

### Pool\_RemoveLiquidity\_event

Liquidity withdrawal events from decentralized exchange pools recording the removal of assets by liquidity providers. Contains withdrawal amounts, recipient addresses, and pool state changes including updated liquidity balances and token identifiers.

<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_sender`        | `STRING`    | Address that initiated the transaction or operation. Hex-encoded, 0x-prefixed, 42-character string.                                                  |
  | `in_to`            | `STRING`    | Destination address receiving tokens or assets in the operation. Hex-encoded, 0x-prefixed, 42-character string.                                      |
  | `in_amount`        | `STRING`    | Input amount for the swap, transaction, or operation. Numeric string representation of token quantity in smallest denomination.                      |
</Accordion>

<Accordion title="Sample Data">
  | in\_to                                     | address                                    | removed | in\_amount              | in\_sender                                 | log\_index | block\_number | block\_timestamp         | transaction\_hash                                                  |
  | ------------------------------------------ | ------------------------------------------ | ------- | ----------------------- | ------------------------------------------ | ---------- | ------------- | ------------------------ | ------------------------------------------------------------------ |
  | 0xbe0affe00de6bbdb717d2c7af7f9feb45311320d | 0x24946bcbbd028d5abb62ad9b635eb1b1a67af668 | false   | 15630000000000000000000 | 0xbe0affe00de6bbdb717d2c7af7f9feb45311320d | 295        | 16520263      | 2023-01-30T14:33:23.000Z | 0xa463759c76d5e60a6f63744dae1883e97a064730f2cbcc2a4c77e2057a946333 |
  | 0x64163b7f5558c54c2494fe18e09ba8ee2ec7bc8a | 0x24946bcbbd028d5abb62ad9b635eb1b1a67af668 | false   | 99632632461500843691347 | 0x64163b7f5558c54c2494fe18e09ba8ee2ec7bc8a | 366        | 16520441      | 2023-01-30T15:09:23.000Z | 0x2614acf012b1f5cdf864b72d6039b85a6ff2b7ca7a55aca9c945796816e4811b |
  | 0xac03363f1dfd8087f8ee7775a703ace890a06d7f | 0x24946bcbbd028d5abb62ad9b635eb1b1a67af668 | false   | 33693601130327569256871 | 0xac03363f1dfd8087f8ee7775a703ace890a06d7f | 534        | 16521848      | 2023-01-30T19:51:47.000Z | 0x545157df0cea336342004a9cc29e9e842a289dfdc89bb9dca618060b1cf2f283 |
</Accordion>

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

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

***

### Pool\_Repay\_event

Loan repayment events from Gearbox V1 credit accounts on Ethereum, recording borrowed amounts repaid and resulting profit or loss to the lending pool. Tracks credit manager addresses and pool-level P\&L for analyzing protocol performance and leverage usage.

<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_creditManager`  | `STRING`    | Address of the credit manager contract that controls the credit account. Hex-encoded, 0x-prefixed, 42-character string.                                                                                |
  | `in_borrowedAmount` | `STRING`    | Principal amount borrowed that is being repaid in this transaction, denominated in the pool's base token with full precision. Values are string-encoded integers representing the smallest token unit. |
  | `in_profit`         | `STRING`    | Profit amount generated by the protocol operation or position. String-encoded integer representing token amounts in the smallest denomination.                                                         |
  | `in_loss`           | `STRING`    | Loss amount incurred by the protocol operation or position. String-encoded integer representing token amounts in the smallest denomination.                                                            |
</Accordion>

<Accordion title="Sample Data">
  | address                                    | in\_loss | removed | in\_profit | log\_index | block\_number | block\_timestamp         | in\_creditManager                          | transaction\_hash                                                  | in\_borrowedAmount |
  | ------------------------------------------ | -------- | ------- | ---------- | ---------- | ------------- | ------------------------ | ------------------------------------------ | ------------------------------------------------------------------ | ------------------ |
  | 0x86130bdd69143d8a4e5fc50bf4323d48049e98e4 | 0        | false   | 2649309479 | 195        | 17426820      | 2023-06-07T06:47:47.000Z | 0x95357303f995e184a7998da6c6ea35cc728a1900 | 0x0a8c0b67be351399e04542c55faa64009790b52cb04f6fcaf34ad66eee0ac316 | 999353671351       |
  | 0x86130bdd69143d8a4e5fc50bf4323d48049e98e4 | 0        | false   | 225767329  | 76         | 17790850      | 2023-07-28T10:05:59.000Z | 0x95357303f995e184a7998da6c6ea35cc728a1900 | 0x8b4bd538259981198398e6404e06e951b3bd8221d33a781ae67f4c9fdcbc95a4 | 300000000000       |
  | 0x86130bdd69143d8a4e5fc50bf4323d48049e98e4 | 0        | false   | 2150293    | 332        | 15804929      | 2022-10-22T16:46:11.000Z | 0x2664cc24cbad28749b3dd6fc97a6b402484de527 | 0xbfd7fddbeb193d0d713cea31f87297b47af046be75f3a5cdd07b358e971f3114 | 6000000000         |
</Accordion>

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

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

***

### TokenDistributor\_NewVestingContract\_event

Vesting contract creation events from Gearbox V1 protocol's TokenDistributor on Ethereum, linking token holders to their vesting contract addresses. Used for tracking token distribution schedules and analyzing vesting participant allocations.

<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_holder`          | `STRING`    | Ethereum address of the token holder for whom the vesting contract was created. This is the beneficiary who will receive tokens according to the vesting schedule.                         |
  | `in_vestingContract` | `STRING`    | Contract address of the newly created vesting contract for the token holder. Hex-encoded, 0x-prefixed 40-character Ethereum address unique to each holder in the distribution event.       |
  | `in_votingPower`     | `INT64`     | Voting power allocated to the token holder in the vesting contract at the time of creation. All sample values are 0, indicating voting power may be granted later in the vesting schedule. |
</Accordion>

<Accordion title="Sample Data">
  | address                                    | removed | in\_holder                                 | log\_index | block\_number | in\_votingPower | block\_timestamp         | transaction\_hash                                                  | in\_vestingContract                        |
  | ------------------------------------------ | ------- | ------------------------------------------ | ---------- | ------------- | --------------- | ------------------------ | ------------------------------------------------------------------ | ------------------------------------------ |
  | 0xbf57539473913685688d224ad4e262684b23dd4c | false   | 0x512de6920f4d78401ec759a4ba6a81cceaf2a486 | 153        | 13811178      | 0               | 2021-12-15T17:51:13.000Z | 0x6b1ca4a9f7ca8689955ab3a16258fda068eb4c162bc3e0454a638f2107f2733c | 0x01756dcf8248f5e5c5a6e8e2bdfe47439008e231 |
  | 0xbf57539473913685688d224ad4e262684b23dd4c | false   | 0xc524ed0fd1af56ce04becfa8ffbc73ffc085be3a | 163        | 13811178      | 0               | 2021-12-15T17:51:13.000Z | 0x6b1ca4a9f7ca8689955ab3a16258fda068eb4c162bc3e0454a638f2107f2733c | 0x151a79fb8ba57b04613d955cb48d59879c552268 |
  | 0xbf57539473913685688d224ad4e262684b23dd4c | false   | 0x4d108e41b380aecd04693690996192beee29174c | 133        | 13811178      | 0               | 2021-12-15T17:51:13.000Z | 0x6b1ca4a9f7ca8689955ab3a16258fda068eb4c162bc3e0454a638f2107f2733c | 0xdf63f75cac46e0d7ec18ebcd35e1dfe15318fa26 |
</Accordion>

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

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

***

### TokenDistributorV2\_VestingContractAdded\_event

Event logs tracking vesting contract registrations in Gearbox V1 token distribution system on Ethereum. Records holder addresses, vesting amounts, contract addresses, and voting power categories for governance token allocation analysis.

<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_holder`              | `STRING`    | Ethereum address of the token recipient who will receive vested tokens through the associated vesting contract. Always appears as a hex-encoded, 0x-prefixed 40-character string.                         |
  | `in_vestingContract`     | `STRING`    | Contract address of the vesting schedule created for the token holder. Hex-encoded, 0x-prefixed 40-character Ethereum address representing the deployed vesting contract instance.                        |
  | `in_amount`              | `STRING`    | Input amount for the swap, transaction, or operation. Numeric string representation of token quantity in smallest denomination.                                                                           |
  | `in_votingPowerCategory` | `STRING`    | Category classifying the voting power tier of the vesting contract holder. Common values include TYPE\_ONE, with other tiers potentially used to differentiate governance weight in the Gearbox protocol. |
</Accordion>

<Accordion title="Sample Data">
  | address                                    | removed | in\_amount                | in\_holder                                 | log\_index | block\_number | block\_timestamp         | transaction\_hash                                                  | in\_vestingContract                        | in\_votingPowerCategory |
  | ------------------------------------------ | ------- | ------------------------- | ------------------------------------------ | ---------- | ------------- | ------------------------ | ------------------------------------------------------------------ | ------------------------------------------ | ----------------------- |
  | 0xf7512b2b20cf427add8b01d8cdeef97a4b0e2c27 | false   | 1111111000000000000000000 | 0xe27b57a99e5cac0e0f16ee0d5d768126b05422a8 | 373        | 18047555      | 2023-09-02T08:10:47.000Z | 0xc9dfca10342d2cd2ee57f12e7d05a422db2c9dc34668af21a7c3cddf6ed98616 | 0xc287d91e1ca0e10a5bd47e900f71d6a5ca75e3e5 | TYPE\_ONE               |
  | 0xf7512b2b20cf427add8b01d8cdeef97a4b0e2c27 | false   | 30000000000000000000000   | 0x32945e04d34fdc2431aa3370e82393a6141769fe | 158        | 16988516      | 2023-04-06T08:46:59.000Z | 0x076625ba475cdfee19da6f52de7af914a76c2deb10bae51a53913b7819383d24 | 0xb4c69c8c5dc1a51064bff83edb47ea17b481554d | TYPE\_ONE               |
  | 0xf7512b2b20cf427add8b01d8cdeef97a4b0e2c27 | false   | 33333000000000000000000   | 0xc9396c19c5ce1cb80be5a2c7f52d1cef88ac866e | 55         | 16988482      | 2023-04-06T08:39:47.000Z | 0xc5e094082d724456d6b8211fddeec153dfec4d4d5e5113968e8a6ac03798cfa4 | 0x22f5d645c4a24dad2501b7ed84de6d54e23d7cc1 | TYPE\_ONE               |
</Accordion>

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

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

***
