Skip to main content
Schema: near.defi Table: ez_lending Type: View

Description

This table provides an enhanced view of all lending protocol transactions on the NEAR Protocol blockchain, primarily capturing activities on the Burrow lending protocol with token metadata, pricing information, and decimal adjustments. The table includes both raw and adjusted amounts, USD values, and comprehensive token context, making it the primary table for lending analytics and risk assessment. This easy view eliminates the need for complex joins and calculations, providing ready-to-use data for DeFi lending analysis and reporting.

Key Use Cases

  • Lending protocol volume analysis with accurate decimal-adjusted amounts and USD values
  • Borrowing and lending pattern analysis and risk assessment with economic context
  • Collateral utilization analysis and liquidation monitoring with value calculations
  • Interest rate impact analysis and yield optimization
  • Protocol health monitoring and risk metrics calculation
  • User behavior analysis in lending protocols with value context
  • Cross-protocol lending comparison and performance benchmarking

Important Relationships

  • Enhances defi.fact_lending with pricing and metadata from price.ez_prices_hourly
  • Combines token metadata from core.dim_ft_contract_metadata for complete token context
  • Supports defi.ez_intents with lending intent analysis
  • Enables analysis in stats.ez_core_metrics_hourly for lending metrics
  • Provides foundation for all lending-related analytics and reporting
  • Powers cross-protocol analysis with other DeFi activities

Commonly-used Fields

  • amount and amount_usd: Essential for accurate lending volume analysis
  • block_timestamp: Primary field for time-series analysis and trend detection
  • actions: Critical for lending action classification and analysis
  • sender_id: Important for user behavior analysis and lending patterns
  • platform: Critical for protocol-specific analysis and comparison
  • symbol: Important for token identification and lending analysis
  • token_address: Essential for token-specific lending activity analysis

Columns

Column NameData TypeDescription
PLATFORMTEXT
TX_HASHTEXTUnique identifier (hash) of this transaction.
BLOCK_IDNUMBER
BLOCK_TIMESTAMPTIMESTAMP_NTZThe date and time at which the block began.
SENDER_IDTEXTThe id, or wallet address, of the sender from the receipt action.
ACTIONSTEXTThe action that the user is taking.
Deposit: user is depositing funds to be used for lending Withdraw: user has changed their mind and are no longer willing to lend, so they withdraw their asset | | CONTRACTADDRESS | TEXT | The address of the deployed contract for the token, nft, or other smart contract. | | TOKEN_ADDRESS | VARIANT | The contract address corresponding to the token, view details of the contract by following this address on the chain explorer. | | NAME | TEXT | The name of the asset. | | SYMBOL | TEXT | Token symbol (e.g., ‘wNEAR’, ‘SWEAT’). This field contains the abbreviated identifier for the token as commonly used in trading pairs, price feeds, and user interfaces. Token symbols are typically 2-6 characters long and provide a quick way to identify tokens without using their full contract addresses. Examples include ‘NEAR’ for the native token, ‘wNEAR’ for wrapped NEAR, and ‘USDC’ for USD Coin. | | AMOUNT_RAW | NUMBER | Unadjusted 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. | | AMOUNT_ADJ | NUMBER | Decimal adjusted amount of tokens (as float, rounded - use this generally). This field provides the token amount after applying the appropriate decimal precision adjustments based on the token’s decimal places. For example, if transferring 1 NEAR token, the amount_adj would be 1.0 after dividing the raw amount (1e24) by 10^24. This field is the most commonly used representation for token amounts in analytics and reporting as it provides human-readable values. | | AMOUNT | FLOAT | The amount of tokens transferred If in the ez view, this number is decimal adjusted to actual amount. If in silver level or a fact_ view, the raw amount is presented | | PRICE_USD | FLOAT | | | TOKEN_IS_VERIFIED | BOOLEAN | Boolean flag indicating whether the token or price record is verified by Flipside’s crosschain curation process. Verified tokens are prioritized for analytics and are considered reliable for most use cases. Unverified tokens may be incomplete, deprecated, or experimental. | | AMOUNT_USD | FLOAT | USD value of the token transfer (null if hourly price not available). This field provides the dollar equivalent value of the token transfer by multiplying the decimal-adjusted token amount by the token’s USD price at the time of the transfer. This field is null when price data is unavailable, which can occur for new tokens, tokens with low liquidity, or during periods when price feeds are unavailable. | | EZ_LENDING_ID | TEXT | A unique identifier for the record. | | INSERTED_TIMESTAMP | TIMESTAMP_NTZ | | | MODIFIED_TIMESTAMP | TIMESTAMP_NTZ | | | TOKEN_IS_VERIFIED_2 | BOOLEAN | |