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

# overnight_v1_optimism

> Tables in tt-contracts.overnight_v1_optimism

## Tables

### DAIExchange\_EventExchange\_event

Exchange event logs from Overnight Finance's DAI vault on Optimism, capturing mint and redeem operations with amounts, fees, and sender addresses for tracking user deposits and withdrawals from the yield-bearing DAI product.

<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_label`         | `STRING`    | Label describing the type of operation or transaction. Common values include 'mint', 'redeem', and 'buy'.                                                      |
  | `in_amount`        | `STRING`    | Input amount for the swap, transaction, or operation. Numeric string representation of token quantity in smallest denomination.                                |
  | `in_fee`           | `STRING`    | Fee amount charged for the transaction or operation. String-encoded integer value representing the fee in the smallest unit of the relevant token or currency. |
  | `in_sender`        | `STRING`    | Address that initiated the transaction or operation. Hex-encoded, 0x-prefixed, 42-character string.                                                            |
  | `in_referral`      | `STRING`    | Referral code identifier associated with the transaction. Numeric string representation, often '0' when no referral is present.                                |
</Accordion>

<Accordion title="Sample Data">
  | in\_fee             | address                                    | removed | in\_label | in\_amount              | in\_sender                                 | log\_index | in\_referral | block\_number | block\_timestamp         | transaction\_hash                                                  |
  | ------------------- | ------------------------------------------ | ------- | --------- | ----------------------- | ------------------------------------------ | ---------- | ------------ | ------------- | ------------------------ | ------------------------------------------------------------------ |
  | 6500000000000000000 | 0x7c7938b6a1ef49470aa53da53be9a0baa8ce0b10 | false   | redeem    | 12993500000000000000000 | 0x2d8879046f1559e53eb052e949e9544bcb72f414 | 62         |              | 111655681     | 2023-11-02T07:28:59.000Z | 0x234b5206568a589437484d1b58da45235b62e975d97579292d1ada4c0d853fe0 |
  | 7214623173717706941 | 0x7c7938b6a1ef49470aa53da53be9a0baa8ce0b10 | false   | redeem    | 14422031724261696175669 | 0x2d8879046f1559e53eb052e949e9544bcb72f414 | 192        |              | 111655928     | 2023-11-02T07:37:13.000Z | 0x9de7a293497cfad6fc4e6a0ebe9eaed12a827e959ba4bfd7bf6bb418a9b21acb |
  | 244479638559852305  | 0x7c7938b6a1ef49470aa53da53be9a0baa8ce0b10 | false   | redeem    | 488714797481144757946   | 0x4bde8be121d80349662cb98be900d5d03a78cacf | 71         |              | 97310793      | 2023-05-10T20:51:45.000Z | 0xa3e1cb3c754bf96fc018adb316d8c450e08b56160b3a21be81c2aa9f61d4982b |
</Accordion>

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

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

***

### DAIExchange\_PayoutEvent\_event

Payout events from Overnight Finance's DAI exchange contract on Optimism, tracking profit distributions, insurance premiums/losses, and liquidity index updates. Used for analyzing yield generation, risk management metrics, and liquidity pool performance over time.

<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_profit`            | `STRING`    | Profit amount generated by the protocol operation or position. String-encoded integer representing token amounts in the smallest denomination.                                       |
  | `in_newLiquidityIndex` | `STRING`    | Updated liquidity index value after the payout event. String-encoded integer with 27-digit precision representing the protocol's cumulative liquidity scaling factor.                |
  | `in_excessProfit`      | `STRING`    | Profit amount exceeding the protocol's retention threshold, distributed to excess profit mechanisms. String-encoded integer representing token amounts in the smallest denomination. |
  | `in_insurancePremium`  | `STRING`    | Premium amount allocated to the protocol's insurance fund from payout operations. String-encoded integer representing token amounts in the smallest denomination.                    |
  | `in_insuranceLoss`     | `STRING`    | Loss amount absorbed by the protocol's insurance mechanism. String-encoded integer representing token amounts in the smallest denomination.                                          |
</Accordion>

<Accordion title="Sample Data">
  | address                                    | removed | in\_profit            | log\_index | block\_number | block\_timestamp         | in\_excessProfit | in\_insuranceLoss | transaction\_hash                                                  | in\_insurancePremium | in\_newLiquidityIndex        |
  | ------------------------------------------ | ------- | --------------------- | ---------- | ------------- | ------------------------ | ---------------- | ----------------- | ------------------------------------------------------------------ | -------------------- | ---------------------------- |
  | 0x7c7938b6a1ef49470aa53da53be9a0baa8ce0b10 | false   | 252744251411751894644 | 36         | 87067773      | 2023-04-07T00:01:44.000Z | 0                | 0                 | 0x09bb2ca074ce05e2e331717fe34a66d7f02bbbc35121edb2f0adbb1f166227ec | 0                    | 1006480757951611105081964954 |
  | 0x7c7938b6a1ef49470aa53da53be9a0baa8ce0b10 | false   | 735584643471774640917 | 87         | 102211069     | 2023-05-28T05:03:47.000Z | 0                | 0                 | 0xcde6030bc86901d0bd46fb6d021e61c74b5b91acbb63cf61656c4288a19f3ba4 | 0                    | 1020516670743580289389748972 |
  | 0x7c7938b6a1ef49470aa53da53be9a0baa8ce0b10 | false   | 77023269164339692264  | 44         | 115201550     | 2024-01-23T09:24:37.000Z | 0                | 0                 | 0xed33c9d6fe541c5c2c959b1e8a8937075306fcc256ba686e16c876988df4d054 | 0                    | 1058937127916754943243395093 |
</Accordion>

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

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

***

### ETS\_PayoutEvent\_event

Payout events from Overnight Finance's ETS (Exchange Traded Strategy) vaults on Optimism, capturing profit/loss settlements, fee distributions, and collector payments. Used for analyzing vault performance, fee structures, and revenue distribution across Overnight's yield strategies.

<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_tvlFee`          | `STRING`    | Fee amount calculated based on total value locked (TVL). String-encoded integer representing token amounts in the smallest denomination.                                                                                      |
  | `in_profitFee`       | `STRING`    | Fee amount deducted from profit. String-encoded integer representing token amounts in the smallest denomination.                                                                                                              |
  | `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.                                                                                   |
  | `in_bufferBalance`   | `STRING`    | Amount of funds held in the protocol's buffer reserve at payout time, denominated in the smallest token unit. This value is zero in all sample transactions, indicating buffers may be typically empty or utilized elsewhere. |
  | `in_collectorAmount` | `STRING`    | Amount of tokens collected as fees by the protocol collector address, denominated in the smallest token unit. Always equals `in_profitFee` when profit is positive; zero when losses occur.                                   |
</Accordion>

<Accordion title="Sample Data">
  | address                                    | in\_loss | removed | in\_profit | in\_tvlFee | log\_index | block\_number | in\_profitFee | block\_timestamp         | in\_bufferBalance | transaction\_hash                                                  | in\_collectorAmount |
  | ------------------------------------------ | -------- | ------- | ---------- | ---------- | ---------- | ------------- | ------------- | ------------------------ | ----------------- | ------------------------------------------------------------------ | ------------------- |
  | 0x4de6bc3934d3b86a183e857c3c8cdd3e5b3013c3 | 0        | false   | 5784320    | 0          | 60         | 106906134     | 1446079       | 2023-07-15T08:50:45.000Z | 0                 | 0x8e095094179aa6c3530ddf58c7a5c89d82538a6916c8a2eaf9cd92b09875370c | 1446079             |
  | 0xd4d441021e3f142cb6c6bcbcc8f27b0c3dd71e13 | 0        | false   | 129260089  | 0          | 13         | 106905940     | 32315022      | 2023-07-15T08:44:17.000Z | 0                 | 0x072242f2451ea53ea820c108444b4d98d6e430103ff7c4e0798a50db4a2949f6 | 32315022            |
  | 0x210d2a3e81853fc5f12c8439184eb635055c5104 | 0        | false   | 297474505  | 0          | 28         | 106901059     | 74368626      | 2023-07-15T06:01:35.000Z | 0                 | 0xbb21b64c513836e95382fabdaaaa80321d973af02253baab32532ccfd99c436c | 74368626            |
</Accordion>

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

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

***

### ETS\_RoleGranted\_event

Role assignment events from Overnight Finance's Exchange Traded Strategy (ETS) contracts on Optimism, tracking when accounts are granted specific roles. Used for analyzing access control changes and protocol governance activity.

<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_role`          | `STRING`    | Role identifier for access control. 66-character keccak256 hash including 0x prefix.                                                                 |
  | `in_account`       | `STRING`    | Account address involved in the transaction or operation. Hex-encoded, 0x-prefixed, 42-character string.                                             |
  | `in_sender`        | `STRING`    | Address that initiated the transaction or operation. Hex-encoded, 0x-prefixed, 42-character string.                                                  |
</Accordion>

<Accordion title="Sample Data">
  | address                                    | in\_role                                                           | removed | in\_sender                                 | log\_index | in\_account                                | block\_number | block\_timestamp         | transaction\_hash                                                  |
  | ------------------------------------------ | ------------------------------------------------------------------ | ------- | ------------------------------------------ | ---------- | ------------------------------------------ | ------------- | ------------------------ | ------------------------------------------------------------------ |
  | 0x3ee76e2bdf81fb9fc3ff0dcc0290e18aacaa5c1a | 0x27a24ddfa5cfe2c98bd8943f471303d66685da3e4b3e1c041c7aae68d3eba29c | false   | 0x106a524c49b924a92194f6fe4f3da81c2d42e607 | 1          | 0x5f392dc5d86439318e2895625ee5e436f9155075 | 68969282      | 2023-01-18T16:59:50.000Z | 0x025e04b93bc875c75cec5e84b210debd155e542d21334d08a6ad6db73ba34b45 |
  | 0x3ee76e2bdf81fb9fc3ff0dcc0290e18aacaa5c1a | 0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775 | false   | 0x106a524c49b924a92194f6fe4f3da81c2d42e607 | 0          | 0x5f392dc5d86439318e2895625ee5e436f9155075 | 68969282      | 2023-01-18T16:59:50.000Z | 0x025e04b93bc875c75cec5e84b210debd155e542d21334d08a6ad6db73ba34b45 |
  | 0xb7ff28a21b9daf2f9f0136601098e66c49d32510 | 0x0000000000000000000000000000000000000000000000000000000000000000 | false   | 0x5cb01385d3097b6a189d1ac8ba3364d900666445 | 1          | 0x5cb01385d3097b6a189d1ac8ba3364d900666445 | 68980334      | 2023-01-18T17:32:15.000Z | 0x14cb40e9b73766274bfe845ea8cc77499e0570583a437f6139aabb3a553fd90c |
</Accordion>

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

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

***

### OldDAIExchange\_PayoutEvent\_event

Profit distribution events from Overnight Finance's deprecated DAI exchange contract on Optimism, recording regular profit payouts and excess profit distributions with updated liquidity index values. Used for tracking yield generation performance and protocol revenue distribution over time.

<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_profit`            | `STRING`    | Profit amount generated by the protocol operation or position. String-encoded integer representing token amounts in the smallest denomination.                                       |
  | `in_newLiquidityIndex` | `STRING`    | Updated liquidity index value after the payout event. String-encoded integer with 27-digit precision representing the protocol's cumulative liquidity scaling factor.                |
  | `in_excessProfit`      | `STRING`    | Profit amount exceeding the protocol's retention threshold, distributed to excess profit mechanisms. String-encoded integer representing token amounts in the smallest denomination. |
</Accordion>

<Accordion title="Sample Data">
  | address                                    | removed | in\_profit            | log\_index | block\_number | block\_timestamp         | in\_excessProfit      | transaction\_hash                                                  | in\_newLiquidityIndex        |
  | ------------------------------------------ | ------- | --------------------- | ---------- | ------------- | ------------------------ | --------------------- | ------------------------------------------------------------------ | ---------------------------- |
  | 0x7c7938b6a1ef49470aa53da53be9a0baa8ce0b10 | false   | 790491480857464028443 | 33         | 75687448      | 2023-02-21T07:00:30.000Z | 899340856199401641139 | 0x048fab880c1517e6e2121deed502cdb48a801ac42c7b22de6ca25bba3a2d17e2 | 1019450840765484227412324707 |
  | 0x7c7938b6a1ef49470aa53da53be9a0baa8ce0b10 | false   | 79021599397168792100  | 32         | 45311156      | 2022-12-04T14:04:43.000Z | 0                     | 0x100d86b08be130b6c12ce7f40d30e61ed103a6a95035023b0e8671e331bcaaa6 | 1004482437140159171301847983 |
  | 0x7c7938b6a1ef49470aa53da53be9a0baa8ce0b10 | false   | 98283056575943820156  | 33         | 62907473      | 2023-01-09T06:59:56.000Z | 0                     | 0x2241ba2e3854b70dfa97e344345fe22d851171aa79442820009df5e17147b293 | 1010558181654245393350668412 |
</Accordion>

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

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

***

### OldETS\_PayoutEvent\_event

Payout event records from Overnight Finance's legacy Exchange Traded Strategy (ETS) contracts on Optimism, tracking profit/loss distributions, Total Value Locked (TVL) fees, and profit fees. Used for analyzing protocol fee structure and historical vault performance before contract upgrades.

<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_tvlFee`        | `STRING`    | Fee amount calculated based on total value locked (TVL). String-encoded integer representing token amounts in the smallest denomination.             |
  | `in_profitFee`     | `STRING`    | Fee amount deducted from profit. String-encoded integer representing token amounts in the smallest denomination.                                     |
  | `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 | in\_tvlFee | log\_index | block\_number | in\_profitFee | block\_timestamp         | transaction\_hash                                                  |
  | ------------------------------------------ | ---------------------------- | ------- | ---------- | ---------- | ---------- | ------------- | ------------- | ------------------------ | ------------------------------------------------------------------ |
  | 0xe80772eaf6e2e18b651f160bc9158b2a5cafca65 | 1005937188975173596111576216 | false   | 14751888   | 2484658602 | 44         | 20748002      | 2499410490    | 2022-08-27T06:59:48.000Z | 0xd1ef7ce9aa0e7cd5d7fcdbc7ce00f6ddd141e38a94912aecd2eced2f070c15c7 |
  | 0xa88f8c02ebde678de623c6bcfc886de82e18ad00 | 451670                       | false   | 0          | 0          | 66         | 40429964      | 0             | 2022-11-21T09:14:59.000Z | 0x7702ab3ed12d7051d7aed7d0862d7af42e30bec2afd0437375e7b30ed4566424 |
  | 0x5651d18f066e132bb90102954429aef1a636576f | 0                            | false   | 1068235    | 53860      | 48         | 40430293      | 188511        | 2022-11-21T09:15:29.000Z | 0x50321710a6dfae44b516be57470fad20165c40b7467e27c4b21981b02b994c3e |
</Accordion>

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

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

***

### OldSkims\_VelodromeSkimAndBribeReward\_event

Velodrome DEX (Decentralized Exchange) skim and bribe reward events on Optimism from Overnight Finance's deprecated contract implementation. Tracks reward distributions from liquidity pools and associated bribe contracts with amounts 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_pool`          | `STRING`    | Contract address of the pool being referenced in the event. Hex-encoded, 0x-prefixed, 42-character string.                                           |
  | `in_bribe`         | `STRING`    | Contract address of the bribe contract associated with the gauge or pool. 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\_pool                                   | removed | in\_bribe                                  | in\_amount | log\_index | block\_number | block\_timestamp         | transaction\_hash                                                  |
  | ------------------------------------------ | ------------------------------------------ | ------- | ------------------------------------------ | ---------- | ---------- | ------------- | ------------------------ | ------------------------------------------------------------------ |
  | 0x1b3b7b72e0bbff68c1311459218aef5de5716c53 | 0x98dc12979a34ee2f7099b1cbd65f9080c5a3284f | false   | 0xad6d543c3015ff9833ac057312e4562b791334b2 | 1462184    | 84         | 74035402      | 2023-02-13T08:48:21.000Z | 0xbca8f4179210db6fafe431e8b9d6e6917b52d7a8816808802ea3a15a5782da3f |
  | 0x1b3b7b72e0bbff68c1311459218aef5de5716c53 | 0xdf4bb088b1f02881ad4497b6fa7c1e4f81b61c0a | false   | 0x35f4ea9fa8a081c8fad8033cb93877bc621c8ee0 | 97         | 77         | 74035402      | 2023-02-13T08:48:21.000Z | 0xbca8f4179210db6fafe431e8b9d6e6917b52d7a8816808802ea3a15a5782da3f |
  | 0x1b3b7b72e0bbff68c1311459218aef5de5716c53 | 0x8a9cd3dce710e90177b4332c108e159a15736a0f | false   | 0x41a7540ec8cb3afafe16a834abe0863f22016ec0 | 66434541   | 70         | 74035402      | 2023-02-13T08:48:21.000Z | 0xbca8f4179210db6fafe431e8b9d6e6917b52d7a8816808802ea3a15a5782da3f |
</Accordion>

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

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

***

### OldSkims\_VelodromeSkimReward\_event

Reward skim events from Overnight Finance's legacy Velodrome liquidity pool strategy on Optimism, recording collected rewards by pool address and amount. Used for tracking yield harvesting operations and fee collection from Velodrome automated market maker (AMM) 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_pool`          | `STRING`    | Contract address of the pool being referenced in the event. 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\_pool                                   | removed | in\_amount | log\_index | block\_number | block\_timestamp         | transaction\_hash                                                  |
  | ------------------------------------------ | ------------------------------------------ | ------- | ---------- | ---------- | ------------- | ------------------------ | ------------------------------------------------------------------ |
  | 0x1b3b7b72e0bbff68c1311459218aef5de5716c53 | 0xa99817d2d286c894f8f3888096a5616d06f20d46 | false   | 243571507  | 63         | 74035402      | 2023-02-13T08:48:21.000Z | 0xbca8f4179210db6fafe431e8b9d6e6917b52d7a8816808802ea3a15a5782da3f |
  | 0x1b3b7b72e0bbff68c1311459218aef5de5716c53 | 0x67124355cce2ad7a8ea283e990612ebe12730175 | false   | 435199813  | 57         | 74035402      | 2023-02-13T08:48:21.000Z | 0xbca8f4179210db6fafe431e8b9d6e6917b52d7a8816808802ea3a15a5782da3f |
  | 0x1b3b7b72e0bbff68c1311459218aef5de5716c53 | 0xf2438edf9d5db2dbc6866ef01c9eb7ca1ca8ad13 | false   | 3692532    | 60         | 74035402      | 2023-02-13T08:48:21.000Z | 0xbca8f4179210db6fafe431e8b9d6e6917b52d7a8816808802ea3a15a5782da3f |
</Accordion>

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

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

***

### OldUSDExchange\_PayoutEvent\_event

Profit distribution events from Overnight Finance's legacy USD+ stablecoin exchange contract on Optimism, capturing daily yield payouts with profit amounts and updated liquidity index values. Used for tracking historical yield generation and rebasing mechanics before protocol upgrades.

<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_profit`            | `STRING`    | Profit amount generated by the protocol operation or position. String-encoded integer representing token amounts in the smallest denomination.                                       |
  | `in_newLiquidityIndex` | `STRING`    | Updated liquidity index value after the payout event. String-encoded integer with 27-digit precision representing the protocol's cumulative liquidity scaling factor.                |
  | `in_excessProfit`      | `STRING`    | Profit amount exceeding the protocol's retention threshold, distributed to excess profit mechanisms. String-encoded integer representing token amounts in the smallest denomination. |
</Accordion>

<Accordion title="Sample Data">
  | address                                    | removed | in\_profit | log\_index | block\_number | block\_timestamp         | in\_excessProfit | transaction\_hash                                                  | in\_newLiquidityIndex        |
  | ------------------------------------------ | ------- | ---------- | ---------- | ------------- | ------------------------ | ---------------- | ------------------------------------------------------------------ | ---------------------------- |
  | 0xe80772eaf6e2e18b651f160bc9158b2a5cafca65 | false   | 1129586103 | 136        | 69254273      | 2023-01-20T07:47:27.000Z | 0                | 0x03fc77f9b9469e755b642382e7fd6001890c478514414fd9d0fcac5ddb078bd8 | 1055176820319626059009957676 |
  | 0xe80772eaf6e2e18b651f160bc9158b2a5cafca65 | false   | 2321708260 | 193        | 62907792      | 2023-01-09T07:00:26.000Z | 373145318        | 0xa7c21d328d02e93cb82e67ccd8bc613ca28018f1e65de7e87384d5859669466a | 1051948305195257462020395026 |
  | 0xe80772eaf6e2e18b651f160bc9158b2a5cafca65 | false   | 1785625764 | 198        | 45155789      | 2022-12-04T05:30:03.000Z | 272667811        | 0x7afcedf17b9088a6415a6e455a0eb4de4e8ad620486539ee242980f0f7d4bad3 | 1042057148343202197428142976 |
</Accordion>

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

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

***

### Skimmer\_PoolOperation\_event

Skimmer contract events tracking liquidity pool operations (skim and bribe) from Overnight protocol on Optimism, primarily involving Velodrome DEX pools. Records token transfers with pool identifiers, amounts, and operation types for analyzing protocol fee collection and incentive distribution strategies.

<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_dexName`       | `STRING`    | DEX (decentralized exchange) name where the pool operation occurred. Always "Velodrome" in this Optimism-based Overnight protocol dataset.                                                       |
  | `in_operation`     | `STRING`    | Enumerated operation type identifier for the event. Integer code representing the specific operation that triggered the event.                                                                   |
  | `in_poolName`      | `STRING`    | Human-readable identifier for the liquidity pool where the operation occurred. Typically includes the pool type (sAMM/vAMM) and token pair constituents, sourced from the DEX protocol metadata. |
  | `in_pool`          | `STRING`    | Contract address of the pool being referenced in the event. 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_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                                    | in\_pool                                   | removed | in\_token                                  | in\_amount            | log\_index | in\_dexName | in\_poolName   | block\_number | in\_operation | block\_timestamp         | transaction\_hash                                                  |
  | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------- | ------------------------------------------ | --------------------- | ---------- | ----------- | -------------- | ------------- | ------------- | ------------------------ | ------------------------------------------------------------------ |
  | 0x9030d5c596d636eefc8f0ad7b2788ae7e9ef3d46 | 0xf59c9a5110852a82434e02d1a43169b5fd9897be | 0x69c28d5bbe392ef48c0dc347c575023daf0cd243 | false   | 0x970d50d09f3a656b43e11b0d45241a84e3a6e011 | 460224312207924349256 | 34         | Velodrome   | sAMM-USD+/DAI+ | 88333504      | Skim          | 2023-04-10T00:06:29.000Z | 0xded59f0fe7f068ffbbf065f396fad46309ca9db661fca20f9d20f6f23f3de063 |
  | 0x9030d5c596d636eefc8f0ad7b2788ae7e9ef3d46 | 0xf59c9a5110852a82434e02d1a43169b5fd9897be | 0x69c28d5bbe392ef48c0dc347c575023daf0cd243 | false   | 0x73cb180bf0521828d8849bc8cf2b920918e23032 | 458262667             | 104        | Velodrome   | sAMM-USD+/DAI+ | 88333336      | Skim          | 2023-04-10T00:05:29.000Z | 0x4ae1a85041770f69655f68f448c5a9fcb065bd6a148926e3d856e73ce7ceda2a |
  | 0x9030d5c596d636eefc8f0ad7b2788ae7e9ef3d46 | 0xf59c9a5110852a82434e02d1a43169b5fd9897be | 0xf2438edf9d5db2dbc6866ef01c9eb7ca1ca8ad13 | false   | 0x73cb180bf0521828d8849bc8cf2b920918e23032 | 250027                | 112        | Velodrome   | vAMM-USD+/USDC | 88333336      | Skim          | 2023-04-10T00:05:29.000Z | 0x4ae1a85041770f69655f68f448c5a9fcb065bd6a148926e3d856e73ce7ceda2a |
</Accordion>

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

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

***

### USDExchange\_EventExchange\_event

Mint and redemption events from Overnight Finance's USD+ stablecoin exchange contract on Optimism. Tracks user deposits and withdrawals with amounts, fees, and optional referral codes for analyzing USD+ supply dynamics and user activity.

<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_label`         | `STRING`    | Label describing the type of operation or transaction. Common values include 'mint', 'redeem', and 'buy'.                                                      |
  | `in_amount`        | `STRING`    | Input amount for the swap, transaction, or operation. Numeric string representation of token quantity in smallest denomination.                                |
  | `in_fee`           | `STRING`    | Fee amount charged for the transaction or operation. String-encoded integer value representing the fee in the smallest unit of the relevant token or currency. |
  | `in_sender`        | `STRING`    | Address that initiated the transaction or operation. Hex-encoded, 0x-prefixed, 42-character string.                                                            |
  | `in_referral`      | `STRING`    | Referral code identifier associated with the transaction. Numeric string representation, often '0' when no referral is present.                                |
</Accordion>

<Accordion title="Sample Data">
  | in\_fee | address                                    | removed | in\_label | in\_amount | in\_sender                                 | log\_index | in\_referral | block\_number | block\_timestamp         | transaction\_hash                                                  |
  | ------- | ------------------------------------------ | ------- | --------- | ---------- | ------------------------------------------ | ---------- | ------------ | ------------- | ------------------------ | ------------------------------------------------------------------ |
  | 0       | 0xe80772eaf6e2e18b651f160bc9158b2a5cafca65 | false   | mint      | 30000000   | 0xfc500a074676b4488dbd1eeccf0407a6600ca6b1 | 13         |              | 39454927      | 2022-11-18T21:30:42.000Z | 0xb0a1a3e5a83052b5808cae52fb099858e8d28ba3255473793627d150699d6431 |
  | 0       | 0xe80772eaf6e2e18b651f160bc9158b2a5cafca65 | false   | mint      | 10000000   | 0xfc500a074676b4488dbd1eeccf0407a6600ca6b1 | 13         |              | 39474716      | 2022-11-18T23:51:07.000Z | 0x2128ebbd638b8c2184e4911b26ecd160295a478b5d95f935650c5b267fcb4458 |
  | 0       | 0xe80772eaf6e2e18b651f160bc9158b2a5cafca65 | false   | mint      | 20000000   | 0xfc500a074676b4488dbd1eeccf0407a6600ca6b1 | 13         |              | 39475793      | 2022-11-18T23:58:09.000Z | 0x563eb649806a0e301d875f45fff88da7d9d058159b5bb7d52b6b78a14147d4f3 |
</Accordion>

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

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

***

### USDExchange\_PayoutEvent\_event

Payout events from Overnight Finance USD+ stablecoin vault on Optimism, tracking profit distributions, insurance premiums and losses, and liquidity index updates. Used to analyze yield generation patterns and protocol risk management over time.

<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_profit`            | `STRING`    | Profit amount generated by the protocol operation or position. String-encoded integer representing token amounts in the smallest denomination.                                       |
  | `in_newLiquidityIndex` | `STRING`    | Updated liquidity index value after the payout event. String-encoded integer with 27-digit precision representing the protocol's cumulative liquidity scaling factor.                |
  | `in_excessProfit`      | `STRING`    | Profit amount exceeding the protocol's retention threshold, distributed to excess profit mechanisms. String-encoded integer representing token amounts in the smallest denomination. |
  | `in_insurancePremium`  | `STRING`    | Premium amount allocated to the protocol's insurance fund from payout operations. String-encoded integer representing token amounts in the smallest denomination.                    |
  | `in_insuranceLoss`     | `STRING`    | Loss amount absorbed by the protocol's insurance mechanism. String-encoded integer representing token amounts in the smallest denomination.                                          |
</Accordion>

<Accordion title="Sample Data">
  | address                                    | removed | in\_profit | log\_index | block\_number | block\_timestamp         | in\_excessProfit | in\_insuranceLoss | transaction\_hash                                                  | in\_insurancePremium | in\_newLiquidityIndex        |
  | ------------------------------------------ | ------- | ---------- | ---------- | ------------- | ------------------------ | ---------------- | ----------------- | ------------------------------------------------------------------ | -------------------- | ---------------------------- |
  | 0xe80772eaf6e2e18b651f160bc9158b2a5cafca65 | false   | 3128199810 | 183        | 99303640      | 2023-05-18T05:03:00.000Z | 0                | 0                 | 0x6e5c201895a0e8246c70cabc69b3cfd6863731ea0495b6eb16bde53dfdeddf12 | 0                    | 1070764649623975868679431609 |
  | 0xe80772eaf6e2e18b651f160bc9158b2a5cafca65 | false   | 511382472  | 215        | 112492453     | 2023-11-21T16:21:23.000Z | 0                | 0                 | 0x2bb51d60f4ec567f55df63966742d5f5e654a87d17e15d267d8359d9e133e2a5 | 88972625             | 1108611329166780350898533708 |
  | 0xe80772eaf6e2e18b651f160bc9158b2a5cafca65 | false   | 878251807  | 175        | 113589885     | 2023-12-17T02:02:27.000Z | 0                | 0                 | 0xf58e2eecdb88a8d1687c69f238204cce8e715c83b27c91280bf601d0babf2535 | 92031358             | 1113665911153655039123869511 |
</Accordion>

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

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

***
