Skip to main content

Overview

Euler V2 provides a modular architecture for accessing, analyzing, and visualizing protocol data. This section covers the technical approaches for extracting data from the protocol, whether you're developing dashboards, bots, risk assessment tools, or conducting research.

Main Tools and Interfaces

  • Lens Contracts: On-chain read-only contracts that aggregate and expose protocol state for easy querying (e.g., balances, positions).
  • Direct Contract Calls: Query vaults, the EVC, and other core contracts directly using Solidity, web3 libraries or block explorers.
  • Event Logs: Listen to protocol events for real-time or historical data extraction.
  • Subgraph & Indexers: Use The Graph or similar tools for complex, cross-contract analytics and historical queries.

What You'll Find in This Section

  • How to use lens contracts for efficient on-chain data access
  • How to query vaults, the EVC, and sub-accounts directly
  • How to work with protocol events for analytics and monitoring
  • How to leverage off-chain tools (subgraph, Dune, custom indexers)
  • How to work with pull-based oracles like Pyth for both querying and transactions

Special Considerations for Pull-Based Oracles

Some Euler V2 vaults rely on pull-based oracles like Pyth, which require special handling:

  • Short staleness periods: Prices are only valid for 2-3 minutes
  • Manual updates required: You must fetch and update prices before interactions
  • Simulation for queries: Use EVC's batchSimulation for data querying without executing transactions

Tip: Euler V2's modular architecture means that data is often distributed across multiple contracts (vaults, EVC, periphery). This section will help you navigate and combine these sources for a complete picture.