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

# pooltogether_v4_optimism

> Tables in tt-contracts.pooltogether_v4_optimism

## Tables

### PrizeDistributor\_ClaimedDraw\_event

Prize claim events from PoolTogether V4 lottery protocol on Optimism, recording when users claim winnings from specific draw rounds. Tracks individual prize payouts with draw identifiers and user addresses for analyzing winner distribution and claim 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_user`          | `STRING`    | Address of the user account associated with the transaction or protocol operation. Hex-encoded, 0x-prefixed, 42-character string.                    |
  | `in_drawId`        | `STRING`    | Unique identifier for a prize draw in the PoolTogether lottery protocol. Numeric string representing the sequential draw number.                     |
  | `in_payout`        | `STRING`    | Payout amount awarded to the player or winner. Numeric string representation of token quantity in smallest denomination.                             |
</Accordion>

<Accordion title="Sample Data">
  | address                                    | in\_user                                   | removed | in\_drawId | in\_payout | log\_index | block\_number | block\_timestamp         | transaction\_hash                                                  |
  | ------------------------------------------ | ------------------------------------------ | ------- | ---------- | ---------- | ---------- | ------------- | ------------------------ | ------------------------------------------------------------------ |
  | 0x722e9bfc008358ac2d445a8d892cf7b62b550f3f | 0x6b44862103b8a45f5ec701b69ec28a5d6d304950 | false   | 698        | 99999980   | 5          | 109599784     | 2023-09-15T17:19:05.000Z | 0x7e5a5917c899ab5d8be84279d714795e44da8268eeef43627a411d73b892528b |
  | 0x722e9bfc008358ac2d445a8d892cf7b62b550f3f | 0x93146d9978d286ee085ba68ee1786a0b6eda64ec | false   | 646        | 9999993    | 15         | 109598043     | 2023-09-15T16:21:03.000Z | 0x8552539786c11b09ea33e08884b03d64a40b891c816ac38ea56ef501e83fbc9f |
  | 0x722e9bfc008358ac2d445a8d892cf7b62b550f3f | 0x93146d9978d286ee085ba68ee1786a0b6eda64ec | false   | 673        | 9999993    | 17         | 109598043     | 2023-09-15T16:21:03.000Z | 0x8552539786c11b09ea33e08884b03d64a40b891c816ac38ea56ef501e83fbc9f |
</Accordion>

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

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

***

### TwabRewards\_RewardsClaimed\_event

Reward claim events from PoolTogether V4's TWAB (Time-Weighted Average Balance) rewards system on Optimism, tracking token distributions to depositors across promotional campaigns and epoch periods. Used for analyzing incentive program participation and payout 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_promotionId`   | `STRING`       | Identifier for the specific PoolTogether reward promotion from which tokens are being claimed. Numeric string values (e.g., "7", "8") distinguish different promotional campaigns offering rewards to depositors.    |
  | `in_epochIds`      | `ARRAY<INT64>` | Array of epoch identifiers for which rewards are being claimed in this transaction. Each promotion is divided into time-based epochs, and users can claim accumulated rewards across multiple epochs simultaneously. |
  | `in_user`          | `STRING`       | Address of the user account associated with the transaction or protocol 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                                    | in\_user                                   | removed | in\_amount         | log\_index | in\_epochIds       | block\_number | in\_promotionId | block\_timestamp         | transaction\_hash                                                  |
  | ------------------------------------------ | ------------------------------------------ | ------- | ------------------ | ---------- | ------------------ | ------------- | --------------- | ------------------------ | ------------------------------------------------------------------ |
  | 0x1470c87e2db5247a36c60de3d65d7c972c62ea0f | 0x244ec27908974162dee23fe96b6f1fe9b6ea2809 | false   | 192700533981597829 | 2          | \[0,1,2,3,4,5,6,7] | 114957133     | 7               | 2024-01-17T17:37:23.000Z | 0x48042385a4b0dfea1c56f3584d644820dbef8d978010eb50af24bc9c3666ee82 |
  | 0x1470c87e2db5247a36c60de3d65d7c972c62ea0f | 0x7b5de5e29c5c1ddf4f8e15d93d0afc4f8fc6002c | false   | 11801972497108879  | 119        | \[7]               | 114950119     | 7               | 2024-01-17T13:43:35.000Z | 0xd25afa7c0b88f170de2e84e0f1ff4abd921316e852702c28f77eef6399628504 |
  | 0x1470c87e2db5247a36c60de3d65d7c972c62ea0f | 0xd0d3c22129c9d53c6c5f0bda74c46e2c4ffbff5a | false   | 144142881806223088 | 526        | \[0,1,2,3,4,5,6,7] | 114952219     | 7               | 2024-01-17T14:53:35.000Z | 0x8baa21c037ce94b229610486430f3f0fa61f0bb73a0b53ef8e1b0e650d59ccf6 |
</Accordion>

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

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

***

### YieldSourcePrizePool\_Deposited\_event

PoolTogether V4 deposit events recording token contributions to yield-generating prize pools. Captures operator, recipient, token address, and deposit amount for tracking user participation in the no-loss lottery protocol.

<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_operator`      | `STRING`    | Address authorized to execute the operation on behalf of the token owner. 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_token`         | `STRING`    | Token address involved in the transaction or 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\_token                                  | in\_amount | log\_index | in\_operator                               | block\_number | block\_timestamp         | transaction\_hash                                                  |
  | ------------------------------------------ | ------------------------------------------ | ------- | ------------------------------------------ | ---------- | ---------- | ------------------------------------------ | ------------- | ------------------------ | ------------------------------------------------------------------ |
  | 0x2f36fb6ec203c701fa786e737be8b0f6e651fd67 | 0x79bc8bd53244bc8a9c8c27509a2d573650a83373 | false   | 0x62bb4fc73094c83b5e952c2180b23fa7054954c4 | 2000000    | 14         | 0x2f36fb6ec203c701fa786e737be8b0f6e651fd67 | 72328964      | 2023-02-05T00:59:07.000Z | 0x703a82e72a3e35b68a5ec94e54d21e08175bf238a61c6fa4f3acb413a71267ce |
  | 0x77df96e69ad2aaf27766b72fe9b15fe17be7f9fa | 0x79bc8bd53244bc8a9c8c27509a2d573650a83373 | false   | 0x62bb4fc73094c83b5e952c2180b23fa7054954c4 | 2000000    | 14         | 0x77df96e69ad2aaf27766b72fe9b15fe17be7f9fa | 72435246      | 2023-02-05T17:13:12.000Z | 0x70cd65df229b79384763095f2715f3ecba4e471d44e7a60d25c4fd74b2154314 |
  | 0x9425129bc5ec9b4f385303b77215cac44727479e | 0x79bc8bd53244bc8a9c8c27509a2d573650a83373 | false   | 0x62bb4fc73094c83b5e952c2180b23fa7054954c4 | 2000000    | 14         | 0x9425129bc5ec9b4f385303b77215cac44727479e | 72345227      | 2023-02-05T04:06:12.000Z | 0xaea21cece8b74b1600d9d1ffa26f0cbe8f90517496fd198e6ced8e693996e19a |
</Accordion>

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

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

***

### YieldSourcePrizePool\_Withdrawal\_event

Withdrawal events from PoolTogether V4 yield source prize pools recording token redemptions and operator-authorized transfers. Tracks user address, token contract, withdrawal amount, and redeemed quantity for prize pool exit operations.

<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_operator`      | `STRING`    | Address authorized to execute the operation on behalf of the token owner. Hex-encoded, 0x-prefixed, 42-character string.                                  |
  | `in_from`          | `STRING`    | Address originating the transfer or operation. Hex-encoded, 0x-prefixed, 42-character string.                                                             |
  | `in_token`         | `STRING`    | Token address involved in the transaction or 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_redeemed`      | `STRING`    | Amount of underlying yield-bearing tokens redeemed in the withdrawal operation. Numeric string representation of token quantity in smallest denomination. |
</Accordion>

<Accordion title="Sample Data">
  | address                                    | in\_from                                   | removed | in\_token                                  | in\_amount | log\_index | in\_operator                               | in\_redeemed | block\_number | block\_timestamp         | transaction\_hash                                                  |
  | ------------------------------------------ | ------------------------------------------ | ------- | ------------------------------------------ | ---------- | ---------- | ------------------------------------------ | ------------ | ------------- | ------------------------ | ------------------------------------------------------------------ |
  | 0x79bc8bd53244bc8a9c8c27509a2d573650a83373 | 0x251f12b82ea9d6eef3b2210891a34a3c21b5a081 | false   | 0x62bb4fc73094c83b5e952c2180b23fa7054954c4 | 4300000    | 11         | 0x251f12b82ea9d6eef3b2210891a34a3c21b5a081 | 4300000      | 18065845      | 2022-08-06T14:14:42.000Z | 0x6c8beb0b84467fae1a78bf841d8df6cac459e633912a0b58cf147f975a152f7a |
  | 0x79bc8bd53244bc8a9c8c27509a2d573650a83373 | 0xe302b0fd3c0da272dfa99abd91b69566c63252c4 | false   | 0x62bb4fc73094c83b5e952c2180b23fa7054954c4 | 70000000   | 11         | 0xe302b0fd3c0da272dfa99abd91b69566c63252c4 | 70000000     | 17980437      | 2022-08-06T00:16:28.000Z | 0x1e1f2e0528b58a86c63727c6fe3e3e365ee57083c009adea917db8de2e4071ed |
  | 0x79bc8bd53244bc8a9c8c27509a2d573650a83373 | 0xa7ed40bb516d24cdbb334e92f09e9a8367205a55 | false   | 0x62bb4fc73094c83b5e952c2180b23fa7054954c4 | 70000000   | 11         | 0xa7ed40bb516d24cdbb334e92f09e9a8367205a55 | 70000000     | 18023790      | 2022-08-06T07:42:35.000Z | 0xcf4d31b6148ba5416dfd92778bef6208e19b09fdcf5a2f8e7a1a95cac9a86841 |
</Accordion>

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

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

***
