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 Columns

Unique Key: unique_id
Column NameData TypeDescription
projectVARCHARProject name (ex. polymarket).
protocolVARCHARProtocol name (ex. polymarket).
actionVARCHARType of action (deposit, withdrawal, transfer, convert).
from_wallet_typeVARCHARWallet creation type of sender (MagicLink or GnosisSafe).
from_wallet_descriptionVARCHARHuman-readable description of sender wallet type.
to_wallet_typeVARCHARWallet creation type of receiver (MagicLink or GnosisSafe).
to_wallet_descriptionVARCHARHuman-readable description of receiver wallet type.
from_addressVARCHARAddress sending the tokens.
to_addressVARCHARAddress receiving the tokens.
token_addressVARCHARAddress of the token being transferred.
token_nameVARCHARName of the token being transferred.
token_symbolVARCHARSymbol of the token being transferred (USDC or USDC.e).
raw_amount_strVARCHARRaw token amount as string (before decimal adjustment).
raw_amountFLOATRaw token amount as float (before decimal adjustment).
amount_strVARCHARNormalized token amount as string.
amountFLOATNormalized token amount as float.
usd_amountFLOATUSD value of the token amount.
usd_exchange_rateFLOATUSD exchange rate for the token.
transaction_from_addressVARCHARTransaction originator address.
transaction_to_addressVARCHARTransaction destination address.
transaction_hashVARCHARTransaction hash containing the action.
transaction_indexNUMBERIndex of the transaction in the block.
log_indexNUMBERIndex of the log within the transaction.
block_timestampTIMESTAMP_NTZ(9)Timestamp of the block containing the action.
block_numberNUMBERBlock number containing the action.
block_hashVARCHARHash of the block containing the action.
unique_idVARCHARUnique identifier for the transfer event.
_created_atTIMESTAMP_NTZ(9)Record creation timestamp.
_updated_atTIMESTAMP_NTZ(9)Record update timestamp.

Sample Query

Analyze user deposits and withdrawals by wallet type:
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