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

# Avenia Pay Volume 🌱

### Table Details

| Property     | Value                                |
| ------------ | ------------------------------------ |
| Table Name   | `polygon.payments.avenia_pay_volume` |
| Table Status | Beta 🌱                              |
| Unique Key   | `transaction_hash`, `unique_id`      |

### Table Columns

| Column Name                | Data Type         | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| -------------------------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| transaction\_hash          | VARCHAR(66)       | Hash of the transaction that produced this record. Uniquely identifies a transaction within the blockchain.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| 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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| 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.                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| from\_address              | VARCHAR(42)       | Address that initiated or sent from in this event. For token transfers, the account whose balance decreased. For transactions, the transaction sender (msg.sender).                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| to\_address                | VARCHAR(42)       | Address that received in this event. For token transfers, the account whose balance increased. For transactions, the destination address (may be a smart contract).                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| flow\_direction            | VARCHAR(8)        | Direction of this stablecoin transfer relative to Avenia. `IN` = an external party sent the stablecoin TO an Avenia address (customer funding a USD→BRL conversion or USDC arriving for a swap). `OUT` = Avenia sent the stablecoin TO an external party (USDC payout after a BRL→USD conversion). `INTERNAL` = both sides are Avenia-controlled — router-to-router self-transfers (flash escrow during swap execution) or router↔operator rebalances. Note that Dune's UNION-ALL methodology counts INTERNAL transfers twice (once on the from-side, once on the to-side) while this model counts each transfer once. |
| avenia\_address            | VARCHAR(42)       | The Avenia-controlled address party to this transfer — the sender for `OUT` and `INTERNAL`, the receiver for `IN`. One of: the router (`0xe41d3fcb...`), the original operator wallet (`0x1189d07d...`), the payment-routing relayer contract (`0xa5e1a817...`), the mint-staging operator (`0xbd22c4c7...`), or the burn-staging operator (`0xe3a25228...`).                                                                                                                                                                                                                                                          |
| counterparty\_address      | VARCHAR(42)       | The other party in a bilateral event (transfer, trade, etc.) relative to the `address` column. If `address` is the sender, `counterparty_address` is the recipient, and vice versa.                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| token\_address             | VARCHAR(42)       | Contract address of the token. For EVM chains, native currency (e.g. ETH, MATIC) is represented as the zero address (0x0000000000000000000000000000000000000000). For Solana, this is the mint address.                                                                                                                                                                                                                                                                                                                                                                                                                |
| token\_symbol              | VARCHAR(16777216) | Ticker symbol of the token (e.g. "USDC", "WETH").                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| token\_name                | VARCHAR(16777216) | Full name of the token (e.g. "USD Coin", "Wrapped Ether").                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| currency                   | VARCHAR(16777216) | Fiat currency this stablecoin is pegged to, as an ISO 4217 code in lowercase (e.g. `usd`, `eur`, `jpy`).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| base\_asset                | VARCHAR(16777216) | Canonical name of the stablecoin (e.g. `USDC`, `USDT`, `DAI`). Groups together all deployments of the same stablecoin across chains and issuers.                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| is\_bridge                 | BOOLEAN           | True if this stablecoin token is a bridged representation (e.g. USDC bridged from Ethereum to an L2 via a third-party bridge). False if it is the canonical deployment by the issuer.                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| amount                     | FLOAT             | Token amount normalized by the token's decimal precision (amount\_raw / 10^decimals). This is the human-readable value (e.g. 1.5 USDC rather than 1500000).                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| amount\_str                | VARCHAR(16777216) | Normalized token amount stored as a string to preserve full precision. Equivalent to `amount` but avoids floating-point truncation for very large or very small values.                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| raw\_amount                | FLOAT             | Token amount in the smallest indivisible unit (not decimal-adjusted). Same concept as `amount_raw` — the column is named `raw_amount` in models that follow the `raw_` prefix convention.                                                                                                                                                                                                                                                                                                                                                                                                                              |
| raw\_amount\_str           | VARCHAR(16777216) | Raw collateral amount in USDC base units (6 decimals), as a string.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| usd\_amount                | FLOAT             | USD value of the token amount at the time of the event, computed using the hourly USD exchange rate.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| 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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
