Skip to main content
Schema: near.intents Table: ez_fees Type: Base Table

What

Description

This table tracks all fees collected from intent executions on the NEAR blockchain using the DIP4 (Decentralized Intent Protocol v4) standard. The data captures fee collection events from intent protocol interactions, providing a detailed view of protocol revenue by extracting and flattening fees from DIP4 event logs. Each row represents a single fee payment in a specific token, with complete token metadata, pricing information, and execution context. The model enriches raw fee data with token labels from crosschain metadata and USD valuations from price feeds, enabling comprehensive fee analysis across different tokens and time periods.

Key Use Cases

  • Intent protocol revenue analysis and fee tracking over time
  • Fee token distribution analysis to understand which tokens are preferred for fee payments
  • Cost analysis for intent execution from the user perspective
  • Protocol economics research comparing fee structures across different intent implementations
  • Referral program analysis by tracking fee attribution to referral accounts
  • Cross-chain fee analysis for bridged tokens used in intent executions

Important Relationships

  • Sources fee events from silver.logs_dip4 which parses DIP4 standard event logs
  • Joins with core.dim_ft_contract_metadata to enrich fee tokens with blockchain, symbol, and decimal information
  • Uses price.ez_prices_hourly to calculate USD values for fees at execution time
  • Related to intents.ez_intents which provides the broader intent execution context including transfers and outcomes
  • Can be joined with core.fact_transactions using tx_hash for complete transaction details
  • Can be joined with core.fact_receipts using receipt_id for receipt execution details

Commonly-used Fields

  • block_timestamp: Essential for time-series analysis of fee trends and protocol revenue over time
  • tx_hash and receipt_id: Critical for linking to transaction and receipt details for complete execution context
  • intent_hash: Key field for correlating fees with specific intent executions across tables
  • account_id: Important for analyzing which accounts are generating the most fee volume
  • fee_symbol and fee_amount_usd: Core fields for revenue analysis and understanding fee token preferences
  • fee_amount_adj: Human-readable fee amount used in most analytics after decimal adjustment
  • referral: Essential for tracking referral program effectiveness and fee attribution
  • receipt_succeeded: Critical filter to analyze only successful fee collections vs failed attempts

Columns

Column NameData TypeDescription
BLOCK_TIMESTAMPTIMESTAMP_NTZThe date and time at which the block began.
BLOCK_IDNUMBERThe height of the chain this block corresponds with.
TX_HASHTEXTUnique identifier (hash) of this transaction.
RECEIPT_IDTEXTThe identifying hash for a receipt.
RECEIVER_IDTEXTAccount reacting to the receipt from predecessorid, can be relay, a contract, or a user of a relay, etc. This field identifies the account that is processing the receipt and executing the associated action. In most cases, this is a smart contract that is being called, but it can also be a user account in relay transactions or the system account for certain operations. This differs from txreceiver and is specific to the receipt being processed.
PREDECESSOR_IDTEXTAccount that called the relevant receipt (often the same as tx_signer, but can be system as well). This field identifies the account that directly invoked the receipt being processed. In simple transactions, this is typically the same as the transaction signer. However, in cross-contract calls or system operations, this may be a different account or the system account. This is crucial for understanding the call chain and access control in NEAR’s execution model.
LOG_EVENTTEXTType of NEP245 event (e.g., mttransfer, mtburn, mt_mint)
DIP4_VERSIONTEXTVersion of the DIP4 standard that emitted the log for this action.
LOG_INDEXNUMBERSequential index of the log entry within the receipt
LOG_EVENT_INDEXNUMBERPosition of the event in the log_data array
ACCOUNT_IDTEXTNEAR account ID that initiated the intent execution. This field identifies the user or contract account that created and submitted the intent to the protocol. In intent-based systems, this represents the account whose desired outcome is being fulfilled by the intent execution, and who typically pays fees for the service.
INTENT_HASHTEXTUnique hash identifier for the intent, extracted from the DIP4 event log. This hash uniquely identifies the specific intent execution and can be used to track and correlate all activities related to a particular intent across different tables and events. The intent hash is generated by the intent protocol and serves as the primary reference for linking intent-related data including fees, transfers, and execution details.
REFERRALTEXTID of the referring protocol, as extracted from the Receipt log.
GAS_BURNTNUMBERGas burned for the receipt action. This field represents the amount of computational resources consumed specifically for the receipt being processed. Gas burning is the mechanism by which NEAR charges for computational work, and this field tracks the exact amount burned for this particular receipt action. In raw number format with 16 decimal places, to adjust divide by POW(10,16) or multiply by 1e-16.
RECEIPT_SUCCEEDEDBOOLEANBoolean indicating whether the receipt was successfully processed. This field tracks the execution status of the receipt, which is crucial for understanding transaction outcomes. While most transactions succeed, individual receipts within a transaction can fail due to various reasons such as insufficient gas, contract errors, or invalid parameters. This field is essential for filtering successful operations and analyzing failure patterns.
DIP4_IDTEXTUnique identifier for the DIP4 log event, generated as a surrogate key combining transaction hash, receipt ID, and log indices. This ID uniquely identifies a specific DIP4 event emission within the NEAR blockchain and is used to ensure data integrity and prevent duplicate records in incremental processing.
FEE_TOKEN_IDTEXTFull token identifier string for the fee token as it appears in the fees_collected object from the DIP4 log. This field contains the complete token reference including the token standard prefix and contract address (e.g., “nep141:wrap.near” or “nep245:usdt.tether-token.near”). This raw format preserves the exact on-chain representation and token standard information, which is essential for accurate token identification and cross-referencing with metadata.
FEE_ASSET_IDENTIFIERTEXTExtracted asset identifier from the fee token ID, containing only the contract address portion after the token standard prefix. This field is derived from the feetokenid by extracting the contract address following the “nep141:”, “nep171:”, or “nep245:” prefix using regex pattern matching. For example, “nep141:wrap.near” becomes “wrap.near”. This normalized format is used to join with token metadata tables and enable consistent token identification across different token standards.
FEE_AMOUNT_RAWTEXTUnadjusted raw fee amount as it appears on-chain before decimal adjustments. This field contains the exact fee amount value from the feescollected object in the DIP4 log, represented as a string to preserve precision for large numbers. To convert to decimal-adjusted amounts, divide by 10^decimals using the feedecimals field. This raw format is essential for precise fee calculations, reconciliation with on-chain data, and maintaining numerical accuracy for high-value transactions.
FEE_BLOCKCHAINTEXTSource blockchain for the fee token, derived from the token metadata. For tokens on NEAR, this value is “near”. For cross-chain tokens bridged to NEAR, this indicates the origin blockchain (e.g., “ethereum”, “bsc”, “polygon”). This field enables cross-chain fee analysis and helps identify which blockchain ecosystems are being used to pay intent execution fees.
FEE_CONTRACT_ADDRESSTEXTContract address of the fee token on its source blockchain. For NEAR native tokens, this is the NEAR contract address (e.g., “wrap.near”). For bridged tokens, this is the original contract address on the source chain (e.g., “0xdac17f958d2ee523a2206206994597c13d831ec7” for USDT on Ethereum). The value “native” indicates the blockchain’s native token. This field enables precise token identification for pricing, metadata lookups, and cross-chain token tracking.
FEE_IS_NATIVEBOOLEANBoolean flag indicating whether the fee token is the native token of its blockchain. TRUE indicates the fee was paid in the blockchain’s native token (e.g., NEAR, ETH, MATIC), while FALSE indicates a fungible token contract. This distinction is important for fee analysis as native tokens often have different pricing mechanics, liquidity characteristics, and user preferences compared to ERC-20 or NEP-141 tokens.
FEE_SYMBOLTEXTToken symbol for the fee token (e.g., ‘NEAR’, ‘USDT’, ‘USDC’). This field provides the human-readable abbreviated identifier for the token in which the intent execution fee was paid. Fee tokens are commonly stablecoins or native protocol tokens, and this symbol enables easy identification for reporting, analytics, and user interfaces without needing to reference contract addresses.
FEE_DECIMALSNUMBERNumber of decimal places for the fee token. This field specifies the precision needed to convert from the raw on-chain fee amount to a human-readable decimal value. For example, if feedecimals is 6, divide feeamount_raw by 10^6 (1,000,000) to get the decimal-adjusted amount. Different tokens use different decimal precision based on their design (NEAR uses 24, USDT uses 6, most ERC-20s use 18).
FEE_AMOUNT_ADJFLOATDecimal-adjusted fee amount collected from the intent execution. This field provides the fee amount after applying the appropriate decimal precision adjustments based on the fee token’s decimal places. For example, if a fee of 1 USDT was collected, the feeamountadj would be 1.0 after dividing the raw amount by 10^6 (USDT has 6 decimal places). This field is the most commonly used representation for fee amounts in analytics and reporting as it provides human-readable values. This field is null…
FEE_PRICEFLOATUSD price of the fee token at the time of the intent execution, used to calculate feeamountusd. This price is derived from Flipside’s crosschain price feeds using ASOF JOIN logic to get the most recent price at or before the block_timestamp. For stablecoin fees (symbols matching ‘USD%’), the price defaults to 1.0 if no price data is available. The price matching prioritizes contract address matches over symbol matches to ensure accuracy for tokens with similar symbols.
FEE_AMOUNT_USDFLOATUSD value of the fee collected from the intent execution. This field provides the dollar equivalent value of the fee by multiplying the decimal-adjusted fee amount by the fee token’s USD price at the time of the intent execution. This standardized USD representation enables protocol revenue analysis, fee tracking across different tokens, and cost comparisons over time. The field uses ZEROIFNULL to ensure zero values when price data is unavailable rather than null, which simplifies aggregation…
FEE_TOKEN_IS_VERIFIEDBOOLEANBoolean flag indicating whether the fee token is verified in Flipside’s crosschain price feeds. Verified tokens have undergone Flipside’s curation process and are considered reliable for analytics and financial calculations. Unverified tokens may have incomplete metadata, unreliable pricing, or may be experimental tokens. This field defaults to FALSE when price data is unavailable, helping analysts assess the reliability of fee calculations.
EZ_FEES_IDTEXTA unique identifier for the record.
INSERTED_TIMESTAMPTIMESTAMP_NTZThe timestamp at which the record was initially created and inserted into this table.
MODIFIED_TIMESTAMPTIMESTAMP_NTZThe timestamp at which this record was last modified by an internal process.
_INVOCATION_IDTEXTA job ID to identify the run that last modified a record.