Skip to main content
Schema: near.defi Table: fact_intents Type: Base Table

Description

This table contains all intent-based transactions on the NEAR Protocol blockchain, capturing user intents for token transfers, swaps, and other DeFi operations through the intents.near protocol. The data includes both NEP-245 and DIP-4 standard intents, providing comprehensive tracking of intent creation, execution, and fulfillment. This table enables analysis of intent-based trading patterns, MEV protection mechanisms, and user behavior in intent-driven DeFi protocols.

Key Use Cases

  • Intent-based trading analysis and pattern recognition
  • MEV protection mechanism effectiveness analysis
  • User behavior analysis in intent-driven protocols
  • Cross-protocol intent execution tracking
  • Intent fulfillment rate analysis and optimization
  • Referral program analysis and user acquisition tracking
  • Intent-based DeFi protocol performance monitoring

Important Relationships

  • Links to core.fact_transactions through tx_hash for transaction context
  • Connects to core.fact_blocks through block_id for temporal context
  • Provides intent data for defi.ez_intents with enhanced metadata
  • Supports defi.ez_dex_swaps with intent execution analysis
  • Enables analysis in stats.ez_core_metrics_hourly for intent metrics
  • Powers cross-protocol analysis with other DeFi activities

Commonly-used Fields

  • tx_hash: Essential for linking to transaction details and verification
  • block_timestamp: Primary field for time-series analysis and trend detection
  • log_event: Critical for intent type classification and analysis
  • owner_id: Important for user behavior analysis and intent tracking
  • amount_raw and token_id: Essential for intent value analysis
  • referral: Important for referral program analysis and user acquisition
  • receipt_succeeded: Critical for intent fulfillment rate analysis

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 predecessor_id, 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 tx_receiver 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., mt_transfer, mt_burn, mt_mint)
LOG_INDEXNUMBERSequential index of the log entry within the receipt
LOG_EVENT_INDEXNUMBERPosition of the event in the log_data array
OWNER_IDTEXTOwner of the minted NFT
OLD_OWNER_IDTEXTSender account ID for transfer events
NEW_OWNER_IDTEXTReceiver account ID for transfer events
MEMOTEXTOptional log message within the transaction (often null). This field contains additional information or context about the transfer, such as transaction notes, reference numbers, or descriptive text. Memos are commonly used in cross-chain bridges, exchange deposits, or other scenarios where additional context is needed to identify or process the transfer. The memo field is optional and frequently null for standard transfers.
AMOUNT_INDEXNUMBERPosition of the amount in the flattened amounts array from the NEP245 event
AMOUNT_RAWTEXTUnadjusted amount of tokens as it appears on-chain (not decimal adjusted). This is the raw token amount before any decimal precision adjustments are applied. For example, if transferring 1 NEAR token, the amount_raw would be 1000000000000000000000000 (1e24) since NEAR has 24 decimal places. This field preserves the exact on-chain representation of the token amount for precise calculations and verification.
TOKEN_IDVARIANTThe identifier of the token being transferred or minted.
REFERRALTEXTID of the referring protocol, as extracted from the Receipt log.
DIP4_VERSIONTEXTVersion of the DIP4 standard that emitted the log for this action.
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.
FACT_INTENTS_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.