DeFi Lenses

Definition

Our DeFi lens endpoints provide in-depth views of DEXs/protocols and the way they operate. There are four lenses: Protocol, Asset/Pool, Wallet, and Governance.


Protocol: Shows what is happening in the protocol as a whole over a fixed period of time. Depending on the DEX or lending protocol, this may include but is not limited to:

  • Protocol actions (collateral, deposits, repays, borrows, withdraws, liquidations)
  • Asset IDs, asset symbols, or markets
  • Borrow Rates or Debts
  • Wallet addresses of the user or repayer.

Asset/Pool: Retrieves information about all of the actions that occurred for a specific asset or a specific liquidity pool (asset_asset) on the protocol within a certain time span. Depending on the DEX or lending protocol, this may include but is not limited to:

  • Asset actions (collateral, deposits, repays, borrows, withdraws, liquidations)
  • User
  • Swaps or mints
  • Amount of token(s)

To find what assets each protocol supports, please query the information section for the specified protocol.


Wallet: Retrieves information about all of the actions taken by a specific wallet on the protocol within a certain time span. Depending on the DEX or lending protocol, this may include but is not limited to:

  • Wallet actions (collateral, deposits, repays, borrows, withdraws, liquidations)
  • Borrow Rates or Debts
  • Transaction amounts
  • Asset IDs, asset symbols, or markets

Wallet Portfolio Lens:
Get insight into an individual wallet’s balance as it participates in a DeFi ecosystem. This may include collateral supplied, assets borrowed, net worth, impermanent loss, and risk metrics/health factors.


Governance: Retrieves information about all of the governance actions that occurred for the protocol within a certain time span. Depending on the DEX or lending protocol, this may include but is not limited to:

  • Vote support (true or false)
  • Voting Power
  • User
  • Proposal ID or description

Details

Not every DEX or lending protocol has every lens, and different exchanges may use differing terminology. For example, the Asset lens for Aave is the structural equivalent of the Pool lens for Uniswap v2, since Uniswap uses asset pairs (asset_asset) to create a pool.


API Endpoints

DeFi Lenses

/DeFi/lens/overview/information
/DeFi/lens/asset/information


Availability

Our DeFi lens endpoints are available via REST API for historical (time series) data.


Frequently Asked Questions

Why are only certain lending protocols/DEXs supported in the DeFi Lenses?

  • We choose the most active protocols to give lens-level insights on. If there is a popular protocol not available, chances are we are already working on adding it!

Why do different protocols have different lenses offered?

  • Every protocol is different and may use different terminology. Additionally, not all protocols have their own voting token.