diff --git a/modules/network/arbitrum/services.ts b/modules/network/arbitrum/services.ts index b1e0c2505..dd678cd84 100644 --- a/modules/network/arbitrum/services.ts +++ b/modules/network/arbitrum/services.ts @@ -18,8 +18,16 @@ import { arbitrumNetworkData as data } from './data'; export const arbitrumCreateServices = () => ({ contentService: new GithubContentService(), poolAprServices: [ - new IbTokensAprService(data.ibAprConfig), - new PhantomStableAprService(), + new IbTokensAprService( + data.ibAprConfig, + data.chain.prismaId, + data.balancer.yieldProtocolFeePercentage, + data.balancer.swapProtocolFeePercentage, + ), + new PhantomStableAprService( + data.chain.prismaId, + data.balancer.yieldProtocolFeePercentage, + ), new BoostedPoolAprService(), new SwapFeeAprService(data.balancer.swapProtocolFeePercentage), new GaugeAprService(tokenService, [data.bal!.address]), diff --git a/modules/network/arbitrum/workers.ts b/modules/network/arbitrum/workers.ts index 771f37602..c9acd2095 100644 --- a/modules/network/arbitrum/workers.ts +++ b/modules/network/arbitrum/workers.ts @@ -22,27 +22,27 @@ export const arbitrumWorkerJobs = [ }, { name: 'update-liquidity-for-active-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(6, 'minutes') : every(2, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(8, 'minutes') : every(4, 'minutes'), }, { name: 'update-pool-apr', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(6, 'minutes') : every(2, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(7, 'minutes') : every(5, 'minutes'), }, { name: 'load-on-chain-data-for-pools-with-active-updates', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(4, 'minutes') : every(1, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(9, 'minutes') : every(5, 'minutes'), }, { name: 'sync-new-pools-from-subgraph', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(6, 'minutes') : every(2, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(12, 'minutes') : every(8, 'minutes'), }, { name: 'sync-tokens-from-pool-tokens', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(7, 'minutes'), }, { name: 'update-liquidity-24h-ago-for-all-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(15, 'minutes') : every(8, 'minutes'), }, { name: 'cache-average-block-time', @@ -50,29 +50,29 @@ export const arbitrumWorkerJobs = [ }, { name: 'sync-staking-for-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(15, 'minutes') : every(10, 'minutes'), }, { name: 'sync-latest-snapshots-for-all-pools', - interval: every(1, 'hours'), + interval: every(90, 'minutes'), }, { name: 'update-lifetime-values-for-all-pools', - interval: every(30, 'minutes'), + interval: every(45, 'minutes'), }, { name: 'sync-changed-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(2, 'minutes') : every(20, 'seconds'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(2, 'minutes') : every(1, 'minutes'), alarmEvaluationPeriod: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? 3 : 1, alarmDatapointsToAlarm: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? 3 : 1, }, { name: 'user-sync-wallet-balances-for-all-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(30, 'minutes') : every(10, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(29, 'minutes') : every(9, 'minutes'), }, { name: 'user-sync-staked-balances', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(30, 'minutes') : every(10, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(31, 'minutes') : every(11, 'minutes'), }, { name: 'sync-coingecko-coinids', @@ -86,14 +86,14 @@ export const arbitrumWorkerJobs = [ }, { name: 'update-fee-volume-yield-all-pools', - interval: every(1, 'hours'), + interval: every(75, 'minutes'), }, { name: 'sync-vebal-balances', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(9, 'minutes') : every(3, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(20, 'minutes') : every(14, 'minutes'), }, { name: 'sync-vebal-totalSupply', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(20, 'minutes') : every(16, 'minutes'), }, ]; diff --git a/modules/network/avalanche/services.ts b/modules/network/avalanche/services.ts index a8b3ec934..1066a062b 100644 --- a/modules/network/avalanche/services.ts +++ b/modules/network/avalanche/services.ts @@ -18,8 +18,16 @@ import { avalancheNetworkData as data } from './data'; export const avalancheCreateServices = () => ({ contentService: new GithubContentService(), poolAprServices: [ - new IbTokensAprService(data.ibAprConfig), - new PhantomStableAprService(), + new IbTokensAprService( + data.ibAprConfig, + data.chain.prismaId, + data.balancer.yieldProtocolFeePercentage, + data.balancer.swapProtocolFeePercentage, + ), + new PhantomStableAprService( + data.chain.prismaId, + data.balancer.yieldProtocolFeePercentage, + ), new BoostedPoolAprService(), new SwapFeeAprService(data.balancer.swapProtocolFeePercentage), new GaugeAprService(tokenService, [data.bal!.address]), diff --git a/modules/network/avalanche/workers.ts b/modules/network/avalanche/workers.ts index ce2d3f3a7..840775be1 100644 --- a/modules/network/avalanche/workers.ts +++ b/modules/network/avalanche/workers.ts @@ -22,27 +22,27 @@ export const avalancheWorkerJobs = [ }, { name: 'update-liquidity-for-active-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(6, 'minutes') : every(2, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(8, 'minutes') : every(4, 'minutes'), }, { name: 'update-pool-apr', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(6, 'minutes') : every(2, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(7, 'minutes') : every(5, 'minutes'), }, { name: 'load-on-chain-data-for-pools-with-active-updates', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(4, 'minutes') : every(1, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(9, 'minutes') : every(5, 'minutes'), }, { name: 'sync-new-pools-from-subgraph', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(6, 'minutes') : every(2, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(12, 'minutes') : every(8, 'minutes'), }, { name: 'sync-tokens-from-pool-tokens', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(7, 'minutes'), }, { name: 'update-liquidity-24h-ago-for-all-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(15, 'minutes') : every(8, 'minutes'), }, { name: 'cache-average-block-time', @@ -50,29 +50,29 @@ export const avalancheWorkerJobs = [ }, { name: 'sync-staking-for-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(15, 'minutes') : every(10, 'minutes'), }, { name: 'sync-latest-snapshots-for-all-pools', - interval: every(1, 'hours'), + interval: every(90, 'minutes'), }, { name: 'update-lifetime-values-for-all-pools', - interval: every(30, 'minutes'), + interval: every(45, 'minutes'), }, { name: 'sync-changed-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(2, 'minutes') : every(20, 'seconds'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(2, 'minutes') : every(1, 'minutes'), alarmEvaluationPeriod: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? 3 : 1, alarmDatapointsToAlarm: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? 3 : 1, }, { name: 'user-sync-wallet-balances-for-all-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(30, 'minutes') : every(10, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(29, 'minutes') : every(9, 'minutes'), }, { name: 'user-sync-staked-balances', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(30, 'minutes') : every(10, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(31, 'minutes') : every(11, 'minutes'), }, { name: 'sync-coingecko-coinids', @@ -86,14 +86,14 @@ export const avalancheWorkerJobs = [ }, { name: 'update-fee-volume-yield-all-pools', - interval: every(1, 'hours'), + interval: every(75, 'minutes'), }, { name: 'sync-vebal-balances', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(9, 'minutes') : every(3, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(20, 'minutes') : every(14, 'minutes'), }, { name: 'sync-vebal-totalSupply', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(20, 'minutes') : every(16, 'minutes'), }, ]; diff --git a/modules/network/base/services.ts b/modules/network/base/services.ts index f54103d44..7d09208b8 100644 --- a/modules/network/base/services.ts +++ b/modules/network/base/services.ts @@ -17,7 +17,12 @@ import { baseNetworkData as data } from './data'; export const baseCreateServices = () => ({ contentService: new GithubContentService(), poolAprServices: [ - new IbTokensAprService(data.ibAprConfig), + new IbTokensAprService( + data.ibAprConfig, + data.chain.prismaId, + data.balancer.yieldProtocolFeePercentage, + data.balancer.swapProtocolFeePercentage, + ), new BoostedPoolAprService(), new SwapFeeAprService(data.balancer.swapProtocolFeePercentage), new GaugeAprService(tokenService, [data.bal!.address]), diff --git a/modules/network/base/workers.ts b/modules/network/base/workers.ts index 1c9e925e2..2c3be1591 100644 --- a/modules/network/base/workers.ts +++ b/modules/network/base/workers.ts @@ -22,27 +22,27 @@ export const baseWorkerJobs = [ }, { name: 'update-liquidity-for-active-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(6, 'minutes') : every(2, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(8, 'minutes') : every(4, 'minutes'), }, { name: 'update-pool-apr', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(6, 'minutes') : every(2, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(7, 'minutes') : every(5, 'minutes'), }, { name: 'load-on-chain-data-for-pools-with-active-updates', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(4, 'minutes') : every(1, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(9, 'minutes') : every(5, 'minutes'), }, { name: 'sync-new-pools-from-subgraph', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(6, 'minutes') : every(2, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(12, 'minutes') : every(8, 'minutes'), }, { name: 'sync-tokens-from-pool-tokens', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(7, 'minutes'), }, { name: 'update-liquidity-24h-ago-for-all-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(15, 'minutes') : every(8, 'minutes'), }, { name: 'cache-average-block-time', @@ -50,29 +50,29 @@ export const baseWorkerJobs = [ }, { name: 'sync-staking-for-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(15, 'minutes') : every(10, 'minutes'), }, { name: 'sync-latest-snapshots-for-all-pools', - interval: every(1, 'hours'), + interval: every(90, 'minutes'), }, { name: 'update-lifetime-values-for-all-pools', - interval: every(30, 'minutes'), + interval: every(45, 'minutes'), }, { name: 'sync-changed-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(2, 'minutes') : every(20, 'seconds'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(2, 'minutes') : every(1, 'minutes'), alarmEvaluationPeriod: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? 3 : 1, alarmDatapointsToAlarm: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? 3 : 1, }, { name: 'user-sync-wallet-balances-for-all-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(30, 'minutes') : every(10, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(29, 'minutes') : every(9, 'minutes'), }, { name: 'user-sync-staked-balances', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(30, 'minutes') : every(10, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(31, 'minutes') : every(11, 'minutes'), }, { name: 'sync-coingecko-coinids', @@ -86,14 +86,14 @@ export const baseWorkerJobs = [ }, { name: 'update-fee-volume-yield-all-pools', - interval: every(1, 'hours'), + interval: every(75, 'minutes'), }, { name: 'sync-vebal-balances', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(9, 'minutes') : every(3, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(20, 'minutes') : every(14, 'minutes'), }, { name: 'sync-vebal-totalSupply', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(20, 'minutes') : every(16, 'minutes'), }, ]; diff --git a/modules/network/fantom/services.ts b/modules/network/fantom/services.ts index b84eef929..8ba0e8b9c 100644 --- a/modules/network/fantom/services.ts +++ b/modules/network/fantom/services.ts @@ -27,9 +27,17 @@ import { fantomNetworkData as data } from './data'; export const fantomCreateServices = () => ({ contentService: new SanityContentService(), poolAprServices: [ - new IbTokensAprService(data.ibAprConfig), + new IbTokensAprService( + data.ibAprConfig, + data.chain.prismaId, + data.balancer.yieldProtocolFeePercentage, + data.balancer.swapProtocolFeePercentage, + ), // new SpookySwapAprService(tokenService, data.spooky!.xBooContract), - new PhantomStableAprService(), + new PhantomStableAprService( + data.chain.prismaId, + data.balancer.yieldProtocolFeePercentage, + ), new BoostedPoolAprService(), new SwapFeeAprService(data.balancer.swapProtocolFeePercentage), new MasterchefFarmAprService(data.beets!.address), diff --git a/modules/network/fantom/workers.ts b/modules/network/fantom/workers.ts index 6b93b97e3..29317d6bc 100644 --- a/modules/network/fantom/workers.ts +++ b/modules/network/fantom/workers.ts @@ -62,34 +62,30 @@ export const fantomWorkerJobs = [ }, { name: 'sync-latest-snapshots-for-all-pools', - interval: every(1, 'hours'), + interval: every(90, 'minutes'), }, { name: 'update-lifetime-values-for-all-pools', - interval: every(30, 'minutes'), + interval: every(50, 'minutes'), }, { name: 'sync-changed-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(2, 'minutes') : every(20, 'seconds'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(2, 'minutes') : every(30, 'seconds'), alarmEvaluationPeriod: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? 3 : 1, alarmDatapointsToAlarm: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? 3 : 1, }, { name: 'user-sync-wallet-balances-for-all-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(5, 'minutes') : every(15, 'seconds'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(5, 'minutes') : every(20, 'seconds'), alarmEvaluationPeriod: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? 3 : 1, alarmDatapointsToAlarm: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? 3 : 1, }, { name: 'user-sync-staked-balances', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(5, 'minutes') : every(15, 'seconds'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(5, 'minutes') : every(20, 'seconds'), alarmEvaluationPeriod: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? 3 : 1, alarmDatapointsToAlarm: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? 3 : 1, }, - { - name: 'sync-user-snapshots', - interval: every(1, 'hours'), - }, { name: 'sync-latest-reliquary-snapshots', interval: every(1, 'hours'), diff --git a/modules/network/gnosis/data.ts b/modules/network/gnosis/data.ts index 36e77a7d9..631256c64 100644 --- a/modules/network/gnosis/data.ts +++ b/modules/network/gnosis/data.ts @@ -1,5 +1,6 @@ import { BigNumber } from '@ethersproject/bignumber'; -import { NetworkData } from "../network-config-types"; +import { DeploymentEnv, NetworkData } from "../network-config-types"; +import { env } from '../../../app/env'; export const gnosisNetworkData: NetworkData = { chain: { @@ -37,7 +38,8 @@ export const gnosisNetworkData: NetworkData = { tokenPrices: { maxHourlyPriceHistoryNumDays: 100, }, - rpcUrl: 'https://rpc.gnosis.gateway.fm', + rpcUrl: + (env.DEPLOYMENT_ENV as DeploymentEnv) === 'main' ? `https://rpc.gnosischain.com` : 'https://gnosis.drpc.org', rpcMaxBlockRange: 2000, protocolToken: 'bal', bal: { diff --git a/modules/network/gnosis/services.ts b/modules/network/gnosis/services.ts index 9c42f85bd..33b3e25f5 100644 --- a/modules/network/gnosis/services.ts +++ b/modules/network/gnosis/services.ts @@ -18,8 +18,16 @@ import { gnosisNetworkData as data } from './data'; export const gnosisCreateServices = () => ({ contentService: new GithubContentService(), poolAprServices: [ - new IbTokensAprService(data.ibAprConfig), - new PhantomStableAprService(), + new IbTokensAprService( + data.ibAprConfig, + data.chain.prismaId, + data.balancer.yieldProtocolFeePercentage, + data.balancer.swapProtocolFeePercentage, + ), + new PhantomStableAprService( + data.chain.prismaId, + data.balancer.yieldProtocolFeePercentage, + ), new BoostedPoolAprService(), new SwapFeeAprService(data.balancer.swapProtocolFeePercentage), new GaugeAprService(tokenService, [data.bal!.address]), diff --git a/modules/network/gnosis/workers.ts b/modules/network/gnosis/workers.ts index 90503b138..716c9dd6f 100644 --- a/modules/network/gnosis/workers.ts +++ b/modules/network/gnosis/workers.ts @@ -22,27 +22,27 @@ export const gnosisWorkerJobs = [ }, { name: 'update-liquidity-for-active-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(6, 'minutes') : every(2, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(8, 'minutes') : every(4, 'minutes'), }, { name: 'update-pool-apr', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(6, 'minutes') : every(2, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(7, 'minutes') : every(5, 'minutes'), }, { name: 'load-on-chain-data-for-pools-with-active-updates', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(4, 'minutes') : every(1, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(9, 'minutes') : every(5, 'minutes'), }, { name: 'sync-new-pools-from-subgraph', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(6, 'minutes') : every(2, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(12, 'minutes') : every(8, 'minutes'), }, { name: 'sync-tokens-from-pool-tokens', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(7, 'minutes'), }, { name: 'update-liquidity-24h-ago-for-all-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(15, 'minutes') : every(8, 'minutes'), }, { name: 'cache-average-block-time', @@ -50,29 +50,29 @@ export const gnosisWorkerJobs = [ }, { name: 'sync-staking-for-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(15, 'minutes') : every(10, 'minutes'), }, { name: 'sync-latest-snapshots-for-all-pools', - interval: every(1, 'hours'), + interval: every(90, 'minutes'), }, { name: 'update-lifetime-values-for-all-pools', - interval: every(30, 'minutes'), + interval: every(45, 'minutes'), }, { name: 'sync-changed-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(2, 'minutes') : every(20, 'seconds'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(2, 'minutes') : every(1, 'minutes'), alarmEvaluationPeriod: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? 3 : 1, alarmDatapointsToAlarm: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? 3 : 1, }, { name: 'user-sync-wallet-balances-for-all-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(30, 'minutes') : every(10, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(29, 'minutes') : every(9, 'minutes'), }, { name: 'user-sync-staked-balances', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(30, 'minutes') : every(10, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(31, 'minutes') : every(11, 'minutes'), }, { name: 'sync-coingecko-coinids', @@ -86,14 +86,14 @@ export const gnosisWorkerJobs = [ }, { name: 'update-fee-volume-yield-all-pools', - interval: every(1, 'hours'), + interval: every(75, 'minutes'), }, { name: 'sync-vebal-balances', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(9, 'minutes') : every(3, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(20, 'minutes') : every(14, 'minutes'), }, { name: 'sync-vebal-totalSupply', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(20, 'minutes') : every(16, 'minutes'), }, ]; diff --git a/modules/network/mainnet/services.ts b/modules/network/mainnet/services.ts index c02c6aa99..4b0aaa0e1 100644 --- a/modules/network/mainnet/services.ts +++ b/modules/network/mainnet/services.ts @@ -18,8 +18,16 @@ import { mainnetNetworkData as data } from './data'; export const mainnetCreateServices = () => ({ contentService: new GithubContentService(), poolAprServices: [ - new IbTokensAprService(data.ibAprConfig), - new PhantomStableAprService(), + new IbTokensAprService( + data.ibAprConfig, + data.chain.prismaId, + data.balancer.yieldProtocolFeePercentage, + data.balancer.swapProtocolFeePercentage, + ), + new PhantomStableAprService( + data.chain.prismaId, + data.balancer.yieldProtocolFeePercentage, + ), new BoostedPoolAprService(), new SwapFeeAprService(data.balancer.swapProtocolFeePercentage), new GaugeAprService(tokenService, [data.bal!.address]), diff --git a/modules/network/mainnet/workers.ts b/modules/network/mainnet/workers.ts index a5d727860..9ac78a128 100644 --- a/modules/network/mainnet/workers.ts +++ b/modules/network/mainnet/workers.ts @@ -22,27 +22,27 @@ export const mainnetWorkerJobs = [ }, { name: 'update-liquidity-for-active-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(6, 'minutes') : every(2, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(8, 'minutes') : every(4, 'minutes'), }, { name: 'update-pool-apr', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(6, 'minutes') : every(2, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(7, 'minutes') : every(5, 'minutes'), }, { name: 'load-on-chain-data-for-pools-with-active-updates', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(4, 'minutes') : every(1, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(9, 'minutes') : every(5, 'minutes'), }, { name: 'sync-new-pools-from-subgraph', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(6, 'minutes') : every(2, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(12, 'minutes') : every(8, 'minutes'), }, { name: 'sync-tokens-from-pool-tokens', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(7, 'minutes'), }, { name: 'update-liquidity-24h-ago-for-all-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(15, 'minutes') : every(8, 'minutes'), }, { name: 'cache-average-block-time', @@ -50,29 +50,29 @@ export const mainnetWorkerJobs = [ }, { name: 'sync-staking-for-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(15, 'minutes') : every(10, 'minutes'), }, { name: 'sync-latest-snapshots-for-all-pools', - interval: every(1, 'hours'), + interval: every(90, 'minutes'), }, { name: 'update-lifetime-values-for-all-pools', - interval: every(30, 'minutes'), + interval: every(45, 'minutes'), }, { name: 'sync-changed-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(2, 'minutes') : every(20, 'seconds'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(2, 'minutes') : every(1, 'minutes'), alarmEvaluationPeriod: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? 3 : 1, alarmDatapointsToAlarm: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? 3 : 1, }, { name: 'user-sync-wallet-balances-for-all-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(30, 'minutes') : every(10, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(29, 'minutes') : every(9, 'minutes'), }, { name: 'user-sync-staked-balances', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(30, 'minutes') : every(10, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(31, 'minutes') : every(11, 'minutes'), }, { name: 'sync-coingecko-coinids', @@ -86,15 +86,15 @@ export const mainnetWorkerJobs = [ }, { name: 'update-fee-volume-yield-all-pools', - interval: every(1, 'hours'), + interval: every(75, 'minutes'), }, { name: 'sync-vebal-balances', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(9, 'minutes') : every(3, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(20, 'minutes') : every(14, 'minutes'), }, { name: 'sync-vebal-totalSupply', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(20, 'minutes') : every(16, 'minutes'), }, { name: 'sync-vebal-voting-gauges', diff --git a/modules/network/optimism/services.ts b/modules/network/optimism/services.ts index aad00a5c1..f6c08924a 100644 --- a/modules/network/optimism/services.ts +++ b/modules/network/optimism/services.ts @@ -19,8 +19,16 @@ import { optimismNetworkData as data } from './data'; export const optimismCreateServices = () => ({ contentService: new SanityContentService(), poolAprServices: [ - new IbTokensAprService(data.ibAprConfig), - new PhantomStableAprService(), + new IbTokensAprService( + data.ibAprConfig, + data.chain.prismaId, + data.balancer.yieldProtocolFeePercentage, + data.balancer.swapProtocolFeePercentage, + ), + new PhantomStableAprService( + data.chain.prismaId, + data.balancer.yieldProtocolFeePercentage, + ), new BoostedPoolAprService(), new SwapFeeAprService(data.balancer.swapProtocolFeePercentage), new GaugeAprService(tokenService, [data.beets!.address, data.bal!.address]), diff --git a/modules/network/optimism/workers.ts b/modules/network/optimism/workers.ts index 09eb9d46f..cfbcdcebe 100644 --- a/modules/network/optimism/workers.ts +++ b/modules/network/optimism/workers.ts @@ -58,34 +58,30 @@ export const optimismWorkerJobs = [ }, { name: 'sync-latest-snapshots-for-all-pools', - interval: every(1, 'hours'), + interval: every(90, 'minutes'), }, { name: 'update-lifetime-values-for-all-pools', - interval: every(30, 'minutes'), + interval: every(50, 'minutes'), }, { name: 'sync-changed-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(2, 'minutes') : every(20, 'seconds'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(2, 'minutes') : every(30, 'seconds'), alarmEvaluationPeriod: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? 3 : 1, alarmDatapointsToAlarm: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? 3 : 1, }, { name: 'user-sync-wallet-balances-for-all-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(5, 'minutes') : every(15, 'seconds'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(5, 'minutes') : every(20, 'seconds'), alarmEvaluationPeriod: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? 3 : 1, alarmDatapointsToAlarm: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? 3 : 1, }, { name: 'user-sync-staked-balances', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(5, 'minutes') : every(15, 'seconds'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(5, 'minutes') : every(20, 'seconds'), alarmEvaluationPeriod: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? 3 : 1, alarmDatapointsToAlarm: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? 3 : 1, }, - { - name: 'sync-user-snapshots', - interval: every(1, 'hours'), - }, { name: 'sync-coingecko-coinids', interval: every(2, 'hours'), diff --git a/modules/network/polygon/services.ts b/modules/network/polygon/services.ts index 01de850de..dedc95700 100644 --- a/modules/network/polygon/services.ts +++ b/modules/network/polygon/services.ts @@ -18,8 +18,16 @@ import { polygonNetworkData as data } from './data'; export const polygonCreateServices = () => ({ contentService: new GithubContentService(), poolAprServices: [ - new IbTokensAprService(data.ibAprConfig), - new PhantomStableAprService(), + new IbTokensAprService( + data.ibAprConfig, + data.chain.prismaId, + data.balancer.yieldProtocolFeePercentage, + data.balancer.swapProtocolFeePercentage, + ), + new PhantomStableAprService( + data.chain.prismaId, + data.balancer.yieldProtocolFeePercentage, + ), new BoostedPoolAprService(), new SwapFeeAprService(data.balancer.swapProtocolFeePercentage), new GaugeAprService(tokenService, [data.bal!.address]), diff --git a/modules/network/polygon/workers.ts b/modules/network/polygon/workers.ts index 80418760a..9275a63f6 100644 --- a/modules/network/polygon/workers.ts +++ b/modules/network/polygon/workers.ts @@ -22,27 +22,27 @@ export const polygonWorkerJobs = [ }, { name: 'update-liquidity-for-active-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(6, 'minutes') : every(2, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(8, 'minutes') : every(4, 'minutes'), }, { name: 'update-pool-apr', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(6, 'minutes') : every(2, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(7, 'minutes') : every(5, 'minutes'), }, { name: 'load-on-chain-data-for-pools-with-active-updates', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(4, 'minutes') : every(1, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(9, 'minutes') : every(5, 'minutes'), }, { name: 'sync-new-pools-from-subgraph', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(6, 'minutes') : every(2, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(12, 'minutes') : every(8, 'minutes'), }, { name: 'sync-tokens-from-pool-tokens', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(7, 'minutes'), }, { name: 'update-liquidity-24h-ago-for-all-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(15, 'minutes') : every(8, 'minutes'), }, { name: 'cache-average-block-time', @@ -50,29 +50,29 @@ export const polygonWorkerJobs = [ }, { name: 'sync-staking-for-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(15, 'minutes') : every(10, 'minutes'), }, { name: 'sync-latest-snapshots-for-all-pools', - interval: every(1, 'hours'), + interval: every(90, 'minutes'), }, { name: 'update-lifetime-values-for-all-pools', - interval: every(30, 'minutes'), + interval: every(45, 'minutes'), }, { name: 'sync-changed-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(2, 'minutes') : every(20, 'seconds'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(2, 'minutes') : every(1, 'minutes'), alarmEvaluationPeriod: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? 3 : 1, alarmDatapointsToAlarm: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? 3 : 1, }, { name: 'user-sync-wallet-balances-for-all-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(20, 'minutes') : every(10, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(29, 'minutes') : every(9, 'minutes'), }, { name: 'user-sync-staked-balances', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(20, 'minutes') : every(10, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(31, 'minutes') : every(11, 'minutes'), }, { name: 'sync-coingecko-coinids', @@ -86,14 +86,14 @@ export const polygonWorkerJobs = [ }, { name: 'update-fee-volume-yield-all-pools', - interval: every(1, 'hours'), + interval: every(75, 'minutes'), }, { name: 'sync-vebal-balances', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(9, 'minutes') : every(3, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(20, 'minutes') : every(14, 'minutes'), }, { name: 'sync-vebal-totalSupply', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(20, 'minutes') : every(16, 'minutes'), }, ]; diff --git a/modules/network/zkevm/services.ts b/modules/network/zkevm/services.ts index 3a426071d..3998520ea 100644 --- a/modules/network/zkevm/services.ts +++ b/modules/network/zkevm/services.ts @@ -18,8 +18,16 @@ import { zkevmNetworkData as data } from './data'; export const zkevmCreateServices = () => ({ contentService: new GithubContentService(), poolAprServices: [ - new IbTokensAprService(data.ibAprConfig), - new PhantomStableAprService(), + new IbTokensAprService( + data.ibAprConfig, + data.chain.prismaId, + data.balancer.yieldProtocolFeePercentage, + data.balancer.swapProtocolFeePercentage, + ), + new PhantomStableAprService( + data.chain.prismaId, + data.balancer.yieldProtocolFeePercentage, + ), new BoostedPoolAprService(), new SwapFeeAprService(data.balancer.swapProtocolFeePercentage), new GaugeAprService(tokenService, [data.bal!.address]), diff --git a/modules/network/zkevm/workers.ts b/modules/network/zkevm/workers.ts index 62b541622..f6a3127ff 100644 --- a/modules/network/zkevm/workers.ts +++ b/modules/network/zkevm/workers.ts @@ -22,27 +22,27 @@ export const zkevmWorkerJobs = [ }, { name: 'update-liquidity-for-active-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(6, 'minutes') : every(2, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(8, 'minutes') : every(4, 'minutes'), }, { name: 'update-pool-apr', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(6, 'minutes') : every(2, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(7, 'minutes') : every(5, 'minutes'), }, { name: 'load-on-chain-data-for-pools-with-active-updates', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(4, 'minutes') : every(1, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(9, 'minutes') : every(5, 'minutes'), }, { name: 'sync-new-pools-from-subgraph', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(6, 'minutes') : every(2, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(12, 'minutes') : every(8, 'minutes'), }, { name: 'sync-tokens-from-pool-tokens', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(7, 'minutes'), }, { name: 'update-liquidity-24h-ago-for-all-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(15, 'minutes') : every(8, 'minutes'), }, { name: 'cache-average-block-time', @@ -50,29 +50,29 @@ export const zkevmWorkerJobs = [ }, { name: 'sync-staking-for-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(15, 'minutes') : every(10, 'minutes'), }, { name: 'sync-latest-snapshots-for-all-pools', - interval: every(1, 'hours'), + interval: every(90, 'minutes'), }, { name: 'update-lifetime-values-for-all-pools', - interval: every(30, 'minutes'), + interval: every(45, 'minutes'), }, { name: 'sync-changed-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(2, 'minutes') : every(20, 'seconds'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(2, 'minutes') : every(1, 'minutes'), alarmEvaluationPeriod: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? 3 : 1, alarmDatapointsToAlarm: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? 3 : 1, }, { name: 'user-sync-wallet-balances-for-all-pools', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(30, 'minutes') : every(10, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(29, 'minutes') : every(9, 'minutes'), }, { name: 'user-sync-staked-balances', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(30, 'minutes') : every(10, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(31, 'minutes') : every(11, 'minutes'), }, { name: 'sync-coingecko-coinids', @@ -86,14 +86,14 @@ export const zkevmWorkerJobs = [ }, { name: 'update-fee-volume-yield-all-pools', - interval: every(1, 'hours'), + interval: every(75, 'minutes'), }, { name: 'sync-vebal-balances', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(9, 'minutes') : every(3, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(20, 'minutes') : every(14, 'minutes'), }, { name: 'sync-vebal-totalSupply', - interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(10, 'minutes') : every(5, 'minutes'), + interval: (env.DEPLOYMENT_ENV as DeploymentEnv) === 'canary' ? every(20, 'minutes') : every(16, 'minutes'), }, ];