somnia.core Table: dim_labels Type: Base Table
What
The labels table is a critical dimension for blockchain analysis, providing one-to-one address identifiers that transform opaque addresses into recognizable entities. Labels are categorized into types (cex, dex, defi, etc.) and subtypes (hot_wallet, treasury, etc.) to enable sophisticated filtering and analysis.Key Use Cases
- Track centralized exchange flows (deposits, withdrawals, hot/cold wallet movements)
- Analyze DeFi protocol usage and cross-protocol interactions
- Monitor whale and institutional wallet activities
- Identify token contracts and their movements
- Assess labeling coverage for active addresses
- Create entity-based transaction flow analysis
Important Relationships
- Join with fact_transactions: Identify exchange flows, protocol usage
- Join with ez_token_transfers: Track token movements by entity type
- Join with dim_contracts: Combine with contract metadata
Commonly-used Fields
address: Primary key for joining with transaction tableslabel_type: High-level category (cex, dex, defi, token, etc.)label_subtype: Specific categorization within type (hot_wallet, pool, etc.)project_name: Protocol or entity nameaddress_name: Most specific, granular labelblockchain: Network identifier for multi-chain queries
Sample Queries
Exchange Flow AnalysisColumns
| Column Name | Data Type | Description |
|---|---|---|
| BLOCKCHAIN | TEXT | The blockchain network for this label. Required for multi-chain label queries. Example: ‘ethereum’ |
| CREATOR | TEXT | The source or creator of this label entry. Labels from verified sources may be more reliable. Example: ‘flipside’ |
| ADDRESS | TEXT | The blockchain address (0x format) that this label describes. Lowercase hex string used as primary key for joining. Example: ‘0x1234567890123456789012345678901234567890’ |
| ADDRESS_NAME | TEXT | The most specific, granular label for this address. Provides maximum detail for precise identification. Example: ‘Binance 14’ |
| LABEL_TYPE | TEXT | High-level category describing the address’s primary function. Core types include cex, dex, defi, token, nft, bridge, games, whale, institution, and l2. Example: ‘cex’ |
| LABEL_SUBTYPE | TEXT | Specific categorization within the label type. Used for detailed filtering within broader categories. Example: ‘hot_wallet’ |
| LABEL | TEXT | High-level label identifying the general entity or wallet type. Often combines projectname with labelsubtype. Example: ‘Binance Hot Wallet’ |
| DIM_LABELS_ID | TEXT | Primary key - unique identifier for each row ensuring data integrity. Format: Usually VARCHAR containing composite key generated using MD5 hash of the relevant columns. Example: MD5(blocknumber, txhash, trace_index) Usage: Deduplication in incremental loads Join operations for data quality checks Troubleshooting specific records Important: Implementation varies by table - check table-specific documentation. |
| INSERTED_TIMESTAMP | TIMESTAMP_NTZ | UTC timestamp when the record was first added to the Flipside database. Format: TIMESTAMP_NTZ Use Cases: Data freshness monitoring Incremental processing markers Debugging data pipeline issues SLA tracking Query Example: |
| MODIFIED_TIMESTAMP | TIMESTAMP_NTZ | UTC timestamp of the most recent update to this record. Format: TIMESTAMP_NTZ Triggers for Updates: Data corrections Enrichment additions Reprocessing for accuracy Schema migrations Monitoring Usage: |