Skip to main content

Lenses

Directory: src/Lens

Collection of contracts to assist with off-chain querying of the accounts and credit vaults' chain-state.

AccountLens

Contract for querying account-related information from the EVK credit vaults, EVC and rewards streams. It allows to calculate time to liquidation of a given account borrowing from a specific vault.

VaultLens

Contract for querying vault-related information including vault configuration, state, interest rates, LTV ratios, and price information.

IRMLens

Contract for querying interest rate model information. Used by the VaultLens.

OracleLens

Contract for querying oracle-related information. Used by the VaultLens.

UtilsLens

Contract containing utility functions for calculating interest rates, APYs, time to liquidation, and fetching price information. Used by the AccountLens and VaultLens.

LensTypes

Solidity file containing struct definitions used by the lens contracts for organizing and returning complex data structures.