Skip to content

Commit

Permalink
fix(subgraph): include VIRTUAL tokens in V2 subgraph
Browse files Browse the repository at this point in the history
  • Loading branch information
xrsv committed Nov 29, 2024
1 parent 7bd2ff2 commit 4971408
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/providers/v2/subgraph-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,15 @@ export class V2SubgraphProvider implements IV2SubgraphProvider {
// Which helps filter pools with manipulated prices/liquidity.

// TODO: Remove. Temporary fix to ensure tokens without trackedReserveETH are in the list.
const FEI = '0x956f47f50a910163d8bf957cf5846d573e7f87ca';
const FEI= '0x956f47f50a910163d8bf957cf5846d573e7f87ca';
const VIRTUAL_BASE = '0x0b3e328455c4059eeb9e3f84b5543f74e24e7e1b';

const tracked = pools.filter(
(pool) =>
pool.token0.id == FEI ||
pool.token1.id == FEI ||
pool.token0.id.toLowerCase() == VIRTUAL_BASE ||
pool.token1.id.toLowerCase() == VIRTUAL_BASE ||
parseFloat(pool.trackedReserveETH) > this.trackedEthThreshold
);

Expand All @@ -269,6 +272,8 @@ export class V2SubgraphProvider implements IV2SubgraphProvider {
return (
pool.token0.id == FEI ||
pool.token1.id == FEI ||
pool.token0.id.toLowerCase() == VIRTUAL_BASE ||
pool.token1.id.toLowerCase() == VIRTUAL_BASE ||
parseFloat(pool.trackedReserveETH) > this.trackedEthThreshold ||
parseFloat(pool.reserveUSD) > this.untrackedUsdThreshold
);
Expand Down

0 comments on commit 4971408

Please sign in to comment.