/swaap-subgraph-v1

Swaap Protocol v1 subgraph.

Primary LanguageTypeScriptMIT LicenseMIT

drawing

Subgraph @ v1

Overview

Swaap Protocol is building the first market neutral AMM. This repository contains its core smart contracts.

For an in-depth documentation of Swaap, see our docs.

Get Started

Build

$ yarn # install all dependencies
$ yarn codegen # compile schemas
$ yarn build # build subgraph

Queries

The hosted version is available here.

Protocol aggregated informations:

{
  swaapProtocols(first: 1) {
    poolCount
    pools(first: 1, orderBy: liquidity, orderDirection: desc) {
      id
    }
    totalLiquidity
    totalSwapVolume
  }
}

Pool's details:

{
  pools(first: 1, orderBy: liquidity, orderDirection: desc) {
    id
    controller
    factoryID {
      id
    }
    tokens {
      symbol
    }
    liquidity
    totalSwapVolume
    holdersCount
  }
}

Licensing

This repository is largely inspired by Balancer Labs's subgraph.

The source code is licensed under the MIT License: see LICENSE.