/uniswap-v3-staker-subgraph

Uniswap V3 subgraph for staking event handling

Primary LanguageTypeScriptMIT LicenseMIT

Uniswap V3 Staker Subgraph

Note

This repo is archived. New github repository is used for staking data.

About

Fork of vbstreetz staker subgraph repository.
Purpose: handling Uniswap V3 staking events and displaying staking data in DAPPS.

Changes

Main differences from the forked repository:
img

  • Network: switched to mumbai/goerli testnets.
  • Schema update:
    • Positions: (mapped using Position view. Mapping logic referenced from: Uniswap V3 and applied in nft-positions-manager-mapping.ts).
      Added fields:
      • token0
      • token1
      • fee
    • Incentives: added array to the positions schema. (There can be more than 1 incentive per position).

TODO:

  • Handle unstaked (but not withdrawn) tokens.

Deployment

  1. Install packages
  2. Update package.json to:
    • Match the created subgraphs;
    • Edit deploy:<<network>> command with access keys and created subgraph name.
  3. Update Makefile to match the created subgraphs.
  4. Deploy e.g. to polygon testnet with make mumbai
  5. Visit the subgraphs and verify no errors in indexing.

References

License

MIT