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

# Algebra Protocol Events

### Table Details

| Property          | Value                                 |
| ----------------- | ------------------------------------- |
| Table Name        | `polygon.dex.algebra_protocol_events` |
| Table Status      | Production-Ready                      |
| Unique Key        | `block_timestamp`, `unique_id`        |
| Clustering Key(s) | `block_timestamp::date`               |

### Table Columns

| Column Name                     | Data Type         | Description                                                                                                                                                                                                                                              |
| ------------------------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| event                           | VARCHAR(16777216) | Tron staking event type. Includes `v1_stake`, `v1_unstake`, `v2_stake`, `v2_unstake`, `v2_cancel_unstaking`, `v2_withdraw_unstaked`, `claim_reward`, and others.                                                                                         |
| project                         | VARCHAR(16777216) | Business name of the protocol being used (e.g. `uniswap`, `aave`, `lido`, `paraswap`). Consistent across verticals — every table with a `project` column uses this field to identify the top-level protocol brand.                                       |
| protocol                        | VARCHAR(16777216) | Specific version or variant of the protocol (e.g. `uniswap_v3`, `aave_v2`, `stargate_v2`). Qualifies the `project` field with version information.                                                                                                       |
| factory\_address                | VARCHAR(42)       | Address of the factory contract that deployed this liquidity pool. Factory contracts create and track pool instances for a given protocol version.                                                                                                       |
| liquidity\_pool\_address        | VARCHAR(42)       | Contract address of the liquidity pool where this trade was executed. Null when the routing path is not emitted by the event (common for aggregator trades).                                                                                             |
| owner\_address                  | VARCHAR(42)       | Address of the token or position owner. In NFT contexts, the wallet that holds the token; in staking contexts, the account that initiated the stake.                                                                                                     |
| sender\_address                 | VARCHAR(42)       | Address that initiated the bridge transfer on the source chain.                                                                                                                                                                                          |
| recipient\_address              | VARCHAR(42)       | Address that will receive the tokens on the destination chain. May be null if the destination address is not emitted in the source-chain event.                                                                                                          |
| token0\_address                 | VARCHAR(42)       | Contract address of the first token in a liquidity pool (token0 is the lower address by convention in Uniswap-style AMMs).                                                                                                                               |
| token0\_name                    | VARCHAR(16777216) | Full name of token0 in the liquidity pool.                                                                                                                                                                                                               |
| token0\_symbol                  | VARCHAR(16777216) | Ticker symbol of token0 in the liquidity pool.                                                                                                                                                                                                           |
| token0\_decimals                | NUMBER(38,0)      | Decimal precision of token0 in the liquidity pool.                                                                                                                                                                                                       |
| token0\_amount\_raw\_str        | VARCHAR(16777216) | Raw (not decimal-adjusted) amount of token0 as a string.                                                                                                                                                                                                 |
| token0\_amount\_raw             | FLOAT             | Raw amount of token0 involved in this event, not decimal-adjusted.                                                                                                                                                                                       |
| token0\_amount\_str             | VARCHAR(16777216) | Decimal-adjusted amount of token0 as a string for full precision.                                                                                                                                                                                        |
| token0\_amount                  | FLOAT             | Decimal-adjusted amount of token0 involved in this event.                                                                                                                                                                                                |
| token0\_amount\_usd             | FLOAT             | USD value of the token0 amount in this event.                                                                                                                                                                                                            |
| token0\_price\_usd              | FLOAT             | USD price per unit of token0 at the time of this event.                                                                                                                                                                                                  |
| token1\_address                 | VARCHAR(42)       | Contract address of the second token in a liquidity pool (token1 is the higher address by convention in Uniswap-style AMMs).                                                                                                                             |
| token1\_name                    | VARCHAR(16777216) | Full name of token1 in the liquidity pool.                                                                                                                                                                                                               |
| token1\_symbol                  | VARCHAR(16777216) | Ticker symbol of token1 in the liquidity pool.                                                                                                                                                                                                           |
| token1\_decimals                | NUMBER(38,0)      | Decimal precision of token1 in the liquidity pool.                                                                                                                                                                                                       |
| token1\_amount\_raw\_str        | VARCHAR(16777216) | Raw (not decimal-adjusted) amount of token1 as a string.                                                                                                                                                                                                 |
| token1\_amount\_raw             | FLOAT             | Raw amount of token1 involved in this event, not decimal-adjusted.                                                                                                                                                                                       |
| token1\_amount\_str             | VARCHAR(16777216) | Decimal-adjusted amount of token1 as a string for full precision.                                                                                                                                                                                        |
| token1\_amount                  | FLOAT             | Decimal-adjusted amount of token1 involved in this event.                                                                                                                                                                                                |
| token1\_amount\_usd             | FLOAT             | USD value of the token1 amount in this event.                                                                                                                                                                                                            |
| token1\_price\_usd              | FLOAT             | USD price per unit of token1 at the time of this event.                                                                                                                                                                                                  |
| usd\_amount                     | FLOAT             | USD value of the token amount at the time of the event, computed using the hourly USD exchange rate.                                                                                                                                                     |
| liquidity                       | VARCHAR(16777216) | Current active liquidity of the pool or position. In Uniswap V3/V4, this is the liquidity available within the current tick range.                                                                                                                       |
| fee                             | NUMBER(38,0)      | Fee tier of the liquidity pool, expressed in hundredths of a basis point (e.g. 3000 = 0.3%). Paid by traders to liquidity providers on each swap.                                                                                                        |
| tick\_spacing                   | NUMBER(38,0)      | Minimum tick interval between initializable price ticks in this pool. Higher fee tiers typically have larger tick spacing.                                                                                                                               |
| sqrt\_price\_x96                | VARCHAR(16777216) | Square root of the current spot price of the pool, stored as a Q64.96 fixed-point number (multiplied by 2^96). Used in Uniswap V3/V4 math.                                                                                                               |
| tick                            | FLOAT             | Current price tick of the AMM pool. In Uniswap V3/V4, the price is represented as `1.0001^tick`. Only meaningful for concentrated liquidity AMMs.                                                                                                        |
| tick\_lower                     | FLOAT             | Lower tick boundary for concentrated liquidity position                                                                                                                                                                                                  |
| tick\_upper                     | FLOAT             | Upper tick boundary for concentrated liquidity position                                                                                                                                                                                                  |
| price\_lower\_0\_1              | VARCHAR(16777216) | Lower bound of the Uniswap v3 position's price range, expressed as token0 per token1.                                                                                                                                                                    |
| price\_upper\_0\_1              | VARCHAR(16777216) | Upper bound of the Uniswap v3 position's price range, expressed as token0 per token1.                                                                                                                                                                    |
| price\_lower\_1\_0              | VARCHAR(16777216) | Lower bound of the Uniswap v3 position's price range, expressed as token1 per token0 (inverse of price\_upper\_0\_1).                                                                                                                                    |
| price\_upper\_1\_0              | VARCHAR(16777216) | Upper bound of the Uniswap v3 position's price range, expressed as token1 per token0 (inverse of price\_lower\_0\_1).                                                                                                                                    |
| transaction\_from\_address      | VARCHAR(42)       | Address of the externally-owned account (EOA) that signed and submitted the transaction. This is the wallet that paid gas, which may differ from the `from_address` of an individual token transfer if a contract is routing tokens on behalf of a user. |
| transaction\_to\_address        | VARCHAR(42)       | Address the transaction was sent to (the top-level `to` field of the transaction). May be a router, aggregator, or bridge contract rather than the direct recipient of assets.                                                                           |
| transaction\_hash               | VARCHAR(66)       | Hash of the transaction that produced this record. Uniquely identifies a transaction within the blockchain.                                                                                                                                              |
| transaction\_index              | NUMBER(38,0)      | Zero-based position of the transaction within its block. The first transaction in a block has index 0.                                                                                                                                                   |
| transaction\_fees               | FLOAT             | Total gas fees paid for this transaction in the chain's native token.                                                                                                                                                                                    |
| transaction\_fees\_usd          | FLOAT             | Total gas fees paid for this transaction, converted to USD.                                                                                                                                                                                              |
| fee\_details                    | VARIANT           | JSON object containing a breakdown of fee components (e.g. protocol fee, gas rebate, relayer fee). Structure varies by bridge protocol.                                                                                                                  |
| selector                        | VARCHAR(16777216) | First 4 bytes of the transaction calldata, identifying the function being called. Null for plain native-currency transfers. Also known as the function selector.                                                                                         |
| log\_index                      | NUMBER(38,0)      | Zero-based position of this event log within its transaction. The first log emitted by a transaction has index 0.                                                                                                                                        |
| block\_timestamp                | TIMESTAMP\_NTZ(9) | Timestamp (UTC) of the block that contains this record.                                                                                                                                                                                                  |
| block\_number                   | NUMBER(38,0)      | Sequential number of the block that contains this record. Starts at 0 (genesis block) and increments by 1 for each new block.                                                                                                                            |
| block\_hash                     | VARCHAR(66)       | Cryptographic hash of the block header that contains this record. Uniquely identifies a block.                                                                                                                                                           |
| unique\_id                      | VARCHAR(16777216) | Allium's deterministic unique identifier for this row. Generated from the fields that uniquely identify the record (e.g. transaction hash + log index). Stable across full refreshes.                                                                    |
| \_created\_at                   | TIMESTAMP\_NTZ(9) | Timestamp of when the entry was created in the database.                                                                                                                                                                                                 |
| \_updated\_at                   | TIMESTAMP\_NTZ(9) | Timestamp of when the entry was last updated in the database.                                                                                                                                                                                            |
| \_changed\_since\_full\_refresh | BOOLEAN           | Indicates if the record has changed since the last full data refresh.                                                                                                                                                                                    |
