Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions lib/cron/cache-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,12 @@
const v4TrackedEthThreshold = 0.01 // Pools need at least 0.01 of trackedEth to be selected
const v4BaseTrackedEthThreshold = 0.1 // Pools on Base need at least 0.1 of trackedEth to be selected
const v4UntrackedUsdThreshold = 0 // v4 subgraph totalValueLockedUSDUntracked returns 0, even with the pools that have appropriate liqudities and correct pool pricing
const v4LiquidityThreshold = Number.MAX_VALUE

export const v3TrackedEthThreshold = 0.01 // Pools need at least 0.01 of trackedEth to be selected
export const v3BaseTrackedEthThreshold = 0.1 // Pools on Base need at least 0.1 of trackedEth to be selected
const v3UntrackedUsdThreshold = 25000 // Pools need at least 25K USD (untracked) to be selected (for metrics only)
const v3LiquidityThreshold = Number.MAX_VALUE

export const v2TrackedEthThreshold = 0.025 // Pairs need at least 0.025 of trackedEth to be selected
export const v2BaseTrackedEthThreshold = 0.1 // Pairs on Base need at least 0.1 of trackedEth to be selected
Expand All @@ -131,7 +133,8 @@
true,
v3TrackedEthThreshold,
v3UntrackedUsdThreshold,
v3LiquidityThreshold,
v3SubgraphUrlOverride(ChainId.MAINNET)

Check failure on line 137 in lib/cron/cache-config.ts

View workflow job for this annotation

GitHub Actions / Run tests

Expected 1-7 arguments, but got 8.
Comment on lines 133 to 137
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This V3Protocol constructor call (and all similar calls throughout the file) is passing 8 arguments, but the constructor is only expecting 7. The new 'v3LiquidityThreshold' parameter has been added here, but the V3Protocol class definition needs to be updated to accept this new parameter. Similar updates are needed for all V3Protocol and V4Protocol instantiations in this file.

Spotted by Diamond (based on CI logs)

Is this helpful? React 👍 or 👎 to let us know.

),
},
{
Expand All @@ -145,7 +148,8 @@
true,
v3TrackedEthThreshold,
v3UntrackedUsdThreshold,
v3LiquidityThreshold,
v3SubgraphUrlOverride(ChainId.ARBITRUM_ONE)

Check failure on line 152 in lib/cron/cache-config.ts

View workflow job for this annotation

GitHub Actions / Run tests

Expected 1-7 arguments, but got 8.
),
},
{
Expand All @@ -159,7 +163,8 @@
true,
v3TrackedEthThreshold,
v3UntrackedUsdThreshold,
v3LiquidityThreshold,
v3SubgraphUrlOverride(ChainId.POLYGON)

Check failure on line 167 in lib/cron/cache-config.ts

View workflow job for this annotation

GitHub Actions / Run tests

Expected 1-7 arguments, but got 8.
),
},
// Waiting for Alchemy subgraph
Expand All @@ -174,7 +179,8 @@
true,
v3TrackedEthThreshold,
v3UntrackedUsdThreshold,
v3LiquidityThreshold,
v3SubgraphUrlOverride(ChainId.OPTIMISM)

Check failure on line 183 in lib/cron/cache-config.ts

View workflow job for this annotation

GitHub Actions / Run tests

Expected 1-7 arguments, but got 8.
),
},
{
Expand All @@ -188,7 +194,8 @@
true,
v3TrackedEthThreshold,
v3UntrackedUsdThreshold,
v3LiquidityThreshold,
v3SubgraphUrlOverride(ChainId.CELO)

Check failure on line 198 in lib/cron/cache-config.ts

View workflow job for this annotation

GitHub Actions / Run tests

Expected 1-7 arguments, but got 8.
),
},
{
Expand All @@ -202,7 +209,8 @@
true,
v3TrackedEthThreshold,
v3UntrackedUsdThreshold,
v3LiquidityThreshold,
v3SubgraphUrlOverride(ChainId.BNB)

Check failure on line 213 in lib/cron/cache-config.ts

View workflow job for this annotation

GitHub Actions / Run tests

Expected 1-7 arguments, but got 8.
),
},
{
Expand All @@ -216,7 +224,8 @@
true,
v3TrackedEthThreshold,
v3UntrackedUsdThreshold,
v3LiquidityThreshold,
v3SubgraphUrlOverride(ChainId.AVALANCHE)

Check failure on line 228 in lib/cron/cache-config.ts

View workflow job for this annotation

GitHub Actions / Run tests

Expected 1-7 arguments, but got 8.
),
},
{
Expand All @@ -230,7 +239,8 @@
true,
v3BaseTrackedEthThreshold,
v3UntrackedUsdThreshold,
v3LiquidityThreshold,
v3SubgraphUrlOverride(ChainId.BASE)

Check failure on line 243 in lib/cron/cache-config.ts

View workflow job for this annotation

GitHub Actions / Run tests

Expected 1-7 arguments, but got 8.
),
},
{
Expand All @@ -244,7 +254,8 @@
true,
v3TrackedEthThreshold,
v3UntrackedUsdThreshold,
v3LiquidityThreshold,
v3SubgraphUrlOverride(ChainId.BLAST)

Check failure on line 258 in lib/cron/cache-config.ts

View workflow job for this annotation

GitHub Actions / Run tests

Expected 1-7 arguments, but got 8.
),
},
{
Expand All @@ -258,7 +269,8 @@
true,
v3TrackedEthThreshold,
v3UntrackedUsdThreshold,
v3LiquidityThreshold,
v3SubgraphUrlOverride(ChainId.UNICHAIN)

Check failure on line 273 in lib/cron/cache-config.ts

View workflow job for this annotation

GitHub Actions / Run tests

Expected 1-7 arguments, but got 8.
),
},
{
Expand All @@ -272,6 +284,7 @@
true,
v3TrackedEthThreshold,
v3UntrackedUsdThreshold,
v3LiquidityThreshold,
v3SubgraphUrlOverride(ChainId.WORLDCHAIN)
),
},
Expand All @@ -286,6 +299,7 @@
true,
v3TrackedEthThreshold,
v3UntrackedUsdThreshold,
v3LiquidityThreshold,
v3SubgraphUrlOverride(ChainId.ZORA)
),
},
Expand All @@ -300,6 +314,7 @@
true,
v3TrackedEthThreshold,
v3UntrackedUsdThreshold,
v3LiquidityThreshold,
v3SubgraphUrlOverride(ChainId.SONEIUM)
),
},
Expand Down Expand Up @@ -496,6 +511,7 @@
true,
v4TrackedEthThreshold,
v4UntrackedUsdThreshold,
v4LiquidityThreshold,
v4SubgraphUrlOverride(ChainId.SEPOLIA)
),
},
Expand All @@ -510,6 +526,7 @@
true,
v4TrackedEthThreshold,
v4UntrackedUsdThreshold,
v4LiquidityThreshold,
v4SubgraphUrlOverride(ChainId.ARBITRUM_ONE)
),
},
Expand All @@ -524,6 +541,7 @@
true,
v4BaseTrackedEthThreshold,
v4UntrackedUsdThreshold,
v4LiquidityThreshold,
v4SubgraphUrlOverride(ChainId.BASE)
),
},
Expand All @@ -538,6 +556,7 @@
true,
v4TrackedEthThreshold,
v4UntrackedUsdThreshold,
v4LiquidityThreshold,
v4SubgraphUrlOverride(ChainId.POLYGON)
),
},
Expand All @@ -552,6 +571,7 @@
true,
v4TrackedEthThreshold,
v4UntrackedUsdThreshold,
v4LiquidityThreshold,
v4SubgraphUrlOverride(ChainId.WORLDCHAIN)
),
},
Expand All @@ -566,6 +586,7 @@
true,
v4TrackedEthThreshold,
v4UntrackedUsdThreshold,
v4LiquidityThreshold,
v4SubgraphUrlOverride(ChainId.ZORA)
),
},
Expand All @@ -580,6 +601,7 @@
true,
v4TrackedEthThreshold,
v4UntrackedUsdThreshold,
v4LiquidityThreshold,
v4SubgraphUrlOverride(ChainId.UNICHAIN)
),
},
Expand All @@ -594,6 +616,7 @@
true,
v4TrackedEthThreshold,
v4UntrackedUsdThreshold,
v4LiquidityThreshold,
v4SubgraphUrlOverride(ChainId.BLAST)
),
},
Expand All @@ -608,6 +631,7 @@
true,
v4TrackedEthThreshold,
v4UntrackedUsdThreshold,
v4LiquidityThreshold,
v4SubgraphUrlOverride(ChainId.MAINNET)
),
},
Expand All @@ -622,6 +646,7 @@
true,
v4TrackedEthThreshold,
v4UntrackedUsdThreshold,
v4LiquidityThreshold,
v4SubgraphUrlOverride(ChainId.SONEIUM)
),
},
Expand All @@ -636,6 +661,7 @@
true,
v4TrackedEthThreshold,
v4UntrackedUsdThreshold,
v4LiquidityThreshold,
v4SubgraphUrlOverride(ChainId.BNB)
),
},
Expand Down
Loading