diff --git a/package.json b/package.json index 63b88ca1a..96133db84 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@paraswap/dex-lib", - "version": "3.11.4", + "version": "3.11.5", "main": "build/index.js", "types": "build/index.d.ts", "repository": "https://github.com/paraswap/paraswap-dex-lib", diff --git a/src/dex/algebra/algebra.ts b/src/dex/algebra/algebra.ts index b18e65927..559d31092 100644 --- a/src/dex/algebra/algebra.ts +++ b/src/dex/algebra/algebra.ts @@ -61,8 +61,8 @@ type PoolPairsInfo = { const PoolsRegistryHashKey = `${CACHE_PREFIX}_poolsRegistry`; -// const ALGEBRA_CLEAN_NOT_EXISTING_POOL_TTL_MS = 3 * 24 * 60 * 60 * 1000; // 3 days -// const ALGEBRA_CLEAN_NOT_EXISTING_POOL_INTERVAL_MS = 24 * 60 * 60 * 1000; // Once in a day +const ALGEBRA_CLEAN_NOT_EXISTING_POOL_TTL_MS = 3 * 24 * 60 * 60 * 1000; // 3 days +const ALGEBRA_CLEAN_NOT_EXISTING_POOL_INTERVAL_MS = 24 * 60 * 60 * 1000; // Once in a day const ALGEBRA_EFFICIENCY_FACTOR = 3; const ALGEBRA_TICK_GAS_COST = 24_000; // Ceiled const ALGEBRA_TICK_BASE_OVERHEAD = 75_000; @@ -168,23 +168,24 @@ export class Algebra extends SimpleExchange implements IDex { // Init listening to new pools creation await this.factory.initialize(blockNumber); - //// COMMENTING DEPRECATED LOGIC: as we now invalidate pools on creation this is not needed anymore - // if (!this.dexHelper.config.isSlave) { - // const cleanExpiredNotExistingPoolsKeys = async () => { - // const maxTimestamp = - // Date.now() - ALGEBRA_CLEAN_NOT_EXISTING_POOL_TTL_MS; - // await this.dexHelper.cache.zremrangebyscore( - // this.notExistingPoolSetKey, - // 0, - // maxTimestamp, - // ); - // }; - - // this.intervalTask = setInterval( - // cleanExpiredNotExistingPoolsKeys.bind(this), - // ALGEBRA_CLEAN_NOT_EXISTING_POOL_INTERVAL_MS, - // ); - // } + if (!this.dexHelper.config.isSlave) { + const cleanExpiredNotExistingPoolsKeys = async () => { + const maxTimestamp = + Date.now() - ALGEBRA_CLEAN_NOT_EXISTING_POOL_TTL_MS; + await this.dexHelper.cache.zremrangebyscore( + this.notExistingPoolSetKey, + 0, + maxTimestamp, + ); + }; + + void cleanExpiredNotExistingPoolsKeys(); + + this.intervalTask = setInterval( + cleanExpiredNotExistingPoolsKeys.bind(this), + ALGEBRA_CLEAN_NOT_EXISTING_POOL_INTERVAL_MS, + ); + } } /* diff --git a/src/dex/algebra/config.ts b/src/dex/algebra/config.ts index ae374b7d1..515145dd6 100644 --- a/src/dex/algebra/config.ts +++ b/src/dex/algebra/config.ts @@ -27,8 +27,7 @@ export const AlgebraConfig: DexConfigMap = { chunksCount: 3, initRetryFrequency: 30, algebraStateMulticall: '0xa6bc273A238867dD74F2bBbD5fBbA3c941C939B9', - subgraphURL: - 'https://api.studio.thegraph.com/query/44554/quickswap-v3-02/0.0.7', + subgraphURL: '3L5Y5brtgvzDoAFGaPs63xz27KdviCdzRuY12spLSBGU', uniswapMulticall: '0x61530d6E1c7A47BBB3e48e8b8EdF7569DcFeE121', deployer: '0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270', version: 'v1.1', diff --git a/src/dex/uniswap-v3/config.ts b/src/dex/uniswap-v3/config.ts index e2b2a0678..363671e15 100644 --- a/src/dex/uniswap-v3/config.ts +++ b/src/dex/uniswap-v3/config.ts @@ -285,8 +285,7 @@ export const UniswapV3Config: DexConfigMap = { chunksCount: 5, initRetryFrequency: 30, initHash: `0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54`, - subgraphURL: - 'https://api.studio.thegraph.com/query/44554/uniswap-v3/version/latest', + subgraphURL: 'E9PLkFzXVX1a9YFtLLyXmLV93ihAUFCvgrnrdnTrnFeN', }, }, SpookySwapV3: {