Skip to main content

Compound V2 Liquidation Metrics

Note: This example is built on version 0.0.21 (current version is >= 0.0.36).

This repo contains an example Envio indexer built using TypeScript for the Compound V2 forks across multiple chains.

This repo was forked from the original indexer built by Joss Duff, one of Envio's first grantees.

LiquidateBorrow event from the pool contracts of below Compound V2 forks are indexed, specifically storing the amount of tokens seized and liquidators.

Addresses of all the pool contracts are stored in the config.yaml file.

Protocols indexed

  1. Compound V2 on Ethereum Mainnet
  2. Flux Finance on Ethereum Mainnet
  3. Iron Bank on Ethereum Mainnet
  4. Strike Finance on Ethereum Mainnet
  5. Iron Bank on Optimism
  6. Sonne Finance on Optimism
  7. Benqi Lending on Avalanche C-chain
  8. Iron Bank on Avalanche C-chain
  9. Venus on BSC

The indexer has been built using v0.0.21 of Envio.

Steps to run the indexer

  1. Clone the repo
  2. Install any other pre-requisite packages for Envio listed here
  3. Install Envio via npm i -g envio@v0.0.21
  4. Generate indexing code via envio codegen
  5. Run the indexer via envio dev (make sure you have Docker running)
  6. Stop the indexer via envio stop