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

# User Actions 🌱

> Tracking of user actions including deposits, withdrawals, transfers, and USDC conversions.

The `polygon.predictions.user_actions` table tracks all user interactions including deposits, withdrawals, transfers, and USDC/USDC.e conversions.

Use this table for user behavior analysis, wallet activity tracking, and understanding fund flows in the prediction market ecosystem.

### Table Details

| Property | Value |
| - | - |
| Table Name | `polygon.predictions.user_actions` |
| Table Status | Beta 🌱 |
| Unique Key | `unique_id` |
| Clustering Key(s) | `block_timestamp::date` |
| Search Optimization | `from_address`, `to_address`, `transaction_hash`, `action` |

### Table Columns

| Column Name | Data Type | Description |
| - | - | - |
| project | VARCHAR(16777216) | Project name (ex. polymarket). |
| protocol | VARCHAR(16777216) | Protocol name (ex. polymarket). |
| action | VARCHAR(16777216) | Type of action (deposit, withdrawal, transfer, convert). |
| from\_wallet\_type | VARCHAR(16777216) | Wallet creation type of sender (MagicLink, GnosisSafe or DepositWallet). |
| from\_wallet\_description | VARCHAR(16777216) | Human-readable description of sender wallet type. |
| to\_wallet\_type | VARCHAR(16777216) | Wallet creation type of receiver (MagicLink, GnosisSafe or DepositWallet). |
| to\_wallet\_description | VARCHAR(16777216) | Human-readable description of receiver wallet type. |
| from\_address | VARCHAR(42) | Address sending the tokens. |
| to\_address | VARCHAR(42) | Address receiving the tokens. |
| token\_address | VARCHAR(42) | Address of the token being transferred. |
| token\_name | VARCHAR(16777216) | Name of the token being transferred. |
| token\_symbol | VARCHAR(16777216) | Symbol of the token being transferred (USDC or USDC.e). |
| raw\_amount\_str | VARCHAR(16777216) | Raw token amount as string (before decimal adjustment). |
| raw\_amount | FLOAT | Raw token amount as float (before decimal adjustment). |
| amount\_str | VARCHAR(16777216) | Normalized token amount as string. |
| amount | FLOAT | Normalized token amount as float. |
| usd\_amount | FLOAT | USD value of the token amount. |
| usd\_exchange\_rate | FLOAT | USD exchange rate for the token. |
| transaction\_from\_address | VARCHAR(42) | Transaction originator address. |
| transaction\_to\_address | VARCHAR(42) | Transaction destination address. |
| transaction\_hash | VARCHAR(66) | Transaction hash containing the action. |
| transaction\_index | NUMBER(38,0) | Index of the transaction in the block. |
| log\_index | NUMBER(38,0) | Index of the log within the transaction. |
| block\_timestamp | TIMESTAMP\_NTZ(9) | Timestamp of the block containing the action. |
| block\_number | NUMBER(38,0) | Block number containing the action. |
| block\_hash | VARCHAR(66) | Hash of the block containing the action. |
| unique\_id | VARCHAR(16777216) | Unique identifier for the transfer event. |
| \_created\_at | TIMESTAMP\_NTZ(9) | Record creation timestamp. |
| \_updated\_at | TIMESTAMP\_NTZ(9) | Record update timestamp. |

***

### Sample Query

> [tab] User Type Analysis
>
> Analyze user deposits and withdrawals by wallet type:
>
> ```sql theme={null}
> select
>   action,
>   CASE
>     when action = 'deposit' then to_wallet_type
>     when action = 'withdrawal' then from_wallet_type
>   END AS wallet_type,
>   count(*) as action_count
> from polygon.predictions.user_actions
> where block_timestamp >= current_timestamp - interval '30 days'
> and (action = 'withdrawal' or action = 'deposit')
> group by action, wallet_type
> ```
