This tiny blockchain indexer scrapes LiquidationCall
events emitted by the AAVE V2 Lending Pool contract and serves the data over a GraphQL API. It is built with the Subsquid framework, hence the term "squid".
I wrote about how I made it in this Medium post. WARNING: This version uses modern Subsquid features that were not available when I was writing the post. Check out this branch for an archived version.
Dependencies: NodeJS, Docker.
To see it in action, begin by spinning up a processor, a process that ingests the data from the Ethereum Archive:
$ git clone https://github.com/abernatskiy/liquidations-squid
$ cd liquidations-squid/
$ npm i
$ sqd build
$ sqd up # starts a Postgres database in a Docker container
$ sqd process # begins data ingestion
Then start the GraphQL server:
$ sqd serve
GraphQL playground should be available at localhost:4350/graphql.