Skip to main content
Schema: aptos.defi Table: ez_lending_repayments Type: Base Table

Description

This table tracks all lending repayments across multiple DeFi lending protocols on Aptos, combining data from Echelon and Echo protocols. It captures when users repay their borrowed assets to lending markets, including complete transaction context, token metadata, and USD pricing information. This includes both self-repayments and third-party repayments.

Key Use Cases

  • Lending protocol repayment analysis and debt management tracking
  • DeFi user behavior analysis and repayment pattern identification
  • Protocol health monitoring and bad debt risk assessment
  • Cross-protocol repayment efficiency analysis
  • Borrower creditworthiness and repayment behavior evaluation

Important Relationships

  • Utilizes token price data from price.ez_prices_hourly for USD calculations
  • References token metadata from core.dim_tokens for decimal precision
  • Complements defi.ez_lending_borrows and defi.ez_lending_liquidations for complete lending activity analysis

Commonly-used Fields

  • tx_hash: Essential for linking to transaction details and verification
  • payer and borrower: Core fields for user behavior analysis and wallet tracking
  • token_address and token_symbol: Key for filtering by specific tokens and DeFi analysis
  • amount_raw and amount_usd: Critical for value calculations and financial analysis
  • platform: Important for protocol comparison and multi-protocol analysis
  • block_timestamp: Primary field for time-series analysis and trend detection

Columns

Column NameData TypeDescription
PLATFORMTEXTThe name of the lending platform where the activity occurred (e.g., ‘echelon’, ‘echo’). Used to identify which specific lending protocol handled the transaction.
Data type: String Example:
  • echelon
  • echo
Business Context:
  • Enables filtering and analysis by specific lending platforms
  • Supports cross-protocol comparisons and platform performance metrics
  • Essential for multi-protocol lending analytics and protocol adoption tracking | | PROTOCOL | TEXT | The protocol name for the lending platform, typically matching the platform name. Used for protocol identification and categorization in analytics.
Data type: String Example:
  • echelon
  • echo
Business Context:
  • Provides consistent protocol naming across different data sources
  • Enables protocol-specific analysis and reporting
  • Supports protocol comparison and market share analysis | | PROTOCOL_VERSION | TEXT | The version of the lending protocol being used (e.g., ‘v1’, ‘v2’). Indicates which iteration of the protocol’s smart contracts handled the transaction.
Data type: String Example:
  • v1
  • v2
Business Context:
  • Tracks protocol upgrades and version adoption
  • Enables analysis of protocol evolution and feature usage
  • Important for understanding protocol maturity and stability | | BLOCK_NUMBER | NUMBER | Also known as block height. The block number indicates the position of a block in the blockchain, increasing sequentially after the addition of each new block.
Data type: Integer Example:
  • 12345678
  • 98765432
Business Context:
  • Primary identifier for ordering and filtering blockchain data chronologically.
  • Essential for block-level analysis and network growth tracking.
  • Enables correlation of transactions, transfers, and events to specific blocks. | | BLOCK_TIMESTAMP | TIMESTAMP_NTZ | The date and time at which the block was produced on the Aptos blockchain.
Data type: Timestamp Example:
  • 2024-01-15 14:30:25.123456
Business Context:
  • Primary field for time-series analysis and temporal filtering of blockchain activity.
  • Essential for trend analysis, volume calculations, and historical comparisons.
  • Enables time-based grouping and aggregation for analytics and reporting. | | VERSION | NUMBER | The version number, also known as the height, represents the sequential position of a transaction in the Aptos blockchain. The first transaction has a version of 0, and each subsequent transaction increments by 1.
Data type: Integer Example:
  • 0 (genesis transaction)
  • 12345678
  • 98765432
Business Context:
  • Unique identifier for ordering transactions chronologically across the entire blockchain.
  • Essential for transaction sequencing and version-based analysis.
  • Enables precise transaction tracking and blockchain state verification. | | TX_HASH | TEXT | Transaction hash is a unique 66-character identifier that is generated when a transaction is executed on the Aptos blockchain.
Data type: String Example:
  • 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
Business Context:
  • Primary identifier for linking transaction data across all related tables.
  • Essential for transaction verification and blockchain explorer lookups.
  • Enables correlation of transfers, events, and state changes to specific transactions. | | EVENT_INDEX | NUMBER | Unique identifier for an event within a transaction, representing the sequential order of events emitted during transaction execution.
Data type: Integer Example:
  • 0 (first event in transaction)
  • 1 (second event in transaction)
  • 5 (sixth event in transaction)
Business Context:
  • Essential for determining the chronological order of events within a transaction.
  • Critical for event correlation and transaction flow analysis.
  • Enables precise event sequencing and debugging of complex transactions. | | EVENT_ADDRESS | TEXT | The first segment of the event type, representing the account address that emitted the event.
Data type: String Example:
  • 0x1
  • 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
Business Context:
  • Essential for identifying the source account that emitted the event.
  • Critical for event source analysis and account event tracking.
  • Enables event source analytics and account-based event correlation. | | PAYER | TEXT | The address of the account that paid for a repayment transaction. This can be the borrower themselves or a third party (e.g., a liquidator or helper service).
Data type: String Example:
  • 0x1234567890abcdef1234567890abcdef12345678
Business Context:
  • Identifies who is making repayments (self vs. third-party)
  • Enables analysis of repayment patterns and user behavior
  • Important for understanding debt management and protocol health | | BORROWER | TEXT | The address of the account that borrowed assets from the lending protocol. Borrowers must provide collateral to secure their loans.
Data type: String Example:
  • 0x1234567890abcdef1234567890abcdef12345678
Business Context:
  • Core field for user behavior analysis and risk assessment
  • Enables tracking of borrowing patterns and credit risk
  • Essential for understanding user engagement and protocol utilization | | TOKEN_ADDRESS | TEXT | The full address of the token on the Aptos blockchain, containing the account, module, and resource identifiers.
Data type: String Example:
  • 0x1::coin::AptosCoin (native APT token)
  • 0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::coin::USDC
Business Context:
  • Primary identifier for filtering and grouping transactions by specific tokens.
  • Essential for DeFi analysis, token flow tracking, and protocol-specific analytics.
  • Enables correlation with token metadata for symbol and decimal information. | | TOKEN_SYMBOL | TEXT | The symbol of the token involved in the action (e.g., APT, USDC, USDT). Used to identify the asset type in analytics and reporting.
Data type: String Example:
  • APT
  • USDC
  • USDT
Business Context:
  • Enables grouping and filtering of transfers by token.
  • Supports analytics on asset flows, protocol usage, and user preferences.
  • Provides human-readable identification for tokens in reports and dashboards. | | TOKEN_IS_VERIFIED | BOOLEAN | A flag indicating if the asset has been verified by the Flipside team. | | AMOUNT_RAW | NUMBER | Original token amount without decimal adjustment.
Example: 1000500000 | | AMOUNT | FLOAT | Decimal-adjusted token amount for human-readable values. Example: 1000.50 | | AMOUNT_USD | FLOAT | USD value of the amount at transaction time. Example: 1000.50 | | EZ_LENDING_REPAYMENTS_ID | TEXT | The unique primary key identifier for each row in the table, ensuring data integrity and uniqueness. Data type: String Example:
  • 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
Business Context:
  • Essential for data integrity and unique row identification.
  • Critical for join operations and data relationship management.
  • Enables precise data retrieval and referential integrity maintenance. | | INSERTED_TIMESTAMP | TIMESTAMP_NTZ | The UTC timestamp when the row was inserted into the table, representing when the data was first recorded.
Data type: Timestamp Example:
  • 2024-01-15 14:30:25.123456
Business Context:
  • Essential for data lineage tracking and insertion timing analysis.
  • Critical for understanding data freshness and processing delays.
  • Enables data quality analysis and processing performance monitoring. | | MODIFIED_TIMESTAMP | TIMESTAMP_NTZ | The UTC timestamp when the row was last modified, representing when the data was most recently updated.
Data type: Timestamp Example:
  • 2024-01-15 14:30:25.123456
Business Context:
  • Essential for data freshness analysis and update tracking.
  • Critical for understanding data modification patterns and change frequency.
  • Enables data quality monitoring and update performance analysis. |