From 5e6bcd496723601e22fe31d1f8ece4d4d7eda456 Mon Sep 17 00:00:00 2001 From: franz Date: Fri, 10 Nov 2023 16:08:17 +0100 Subject: [PATCH 1/6] change fantom rpc --- modules/network/fantom.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/network/fantom.ts b/modules/network/fantom.ts index 38ba6a11c..585731b16 100644 --- a/modules/network/fantom.ts +++ b/modules/network/fantom.ts @@ -94,9 +94,7 @@ const fantomNetworkData: NetworkData = { maxHourlyPriceHistoryNumDays: 100, }, rpcUrl: - (env.DEPLOYMENT_ENV as DeploymentEnv) === 'main' - ? `https://rpc.fantom.gateway.fm` - : `https://rpc.fantom.network`, + (env.DEPLOYMENT_ENV as DeploymentEnv) === 'main' ? `https://rpc.fantom.network` : `https://rpc.fantom.network`, rpcMaxBlockRange: 1000, sanity: { projectId: '1g2ag2hb', From 9e0c6e04377d4e30266ecc6c0d7174ddf1c451d5 Mon Sep 17 00:00:00 2001 From: gmbronco <83549293+gmbronco@users.noreply.github.com> Date: Mon, 20 Nov 2023 05:36:21 +0100 Subject: [PATCH 2/6] fix: beetswars apr --- .../apr-data-sources/fantom/beetswars-gauge-voting-apr.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/pool/lib/apr-data-sources/fantom/beetswars-gauge-voting-apr.ts b/modules/pool/lib/apr-data-sources/fantom/beetswars-gauge-voting-apr.ts index 676bbcc97..93af8076b 100644 --- a/modules/pool/lib/apr-data-sources/fantom/beetswars-gauge-voting-apr.ts +++ b/modules/pool/lib/apr-data-sources/fantom/beetswars-gauge-voting-apr.ts @@ -20,7 +20,10 @@ export class BeetswarsGaugeVotingAprService implements PoolAprService { const response = await axios.get('https://www.beetswars.live/api/trpc/chart.chartdata'); - const votingAprs: number[] = response.data.result.data.json.chartdata.votingApr; + const raw: number[] = response.data.result.data.json.chartdata.votingApr; + + // Filter out non-numbers and infinity values + const votingAprs = raw.filter((apr) => apr && isFinite(apr)); const minApr = 0; const maxApr = votingAprs[votingAprs.length - 1] / 100; From f8b4f52c61472595c82429227e2868650bd50861 Mon Sep 17 00:00:00 2001 From: franz Date: Mon, 20 Nov 2023 18:45:29 +0100 Subject: [PATCH 3/6] exlcude tru matic --- modules/network/mainnet.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/network/mainnet.ts b/modules/network/mainnet.ts index 8e77f13ff..986c83a63 100644 --- a/modules/network/mainnet.ts +++ b/modules/network/mainnet.ts @@ -57,7 +57,7 @@ const data: NetworkData = { coingecko: { nativeAssetId: 'ethereum', platformId: 'ethereum', - excludedTokenAddresses: [], + excludedTokenAddresses: ['0xa43a7c62d56df036c187e1966c03e2799d8987ed'], // truMatic, has coingecko entry but no price }, tokenPrices: { maxHourlyPriceHistoryNumDays: 100, @@ -378,10 +378,7 @@ export const mainnetNetworkConfig: NetworkConfig = { data.balancer.yieldProtocolFeePercentage, data.balancer.swapProtocolFeePercentage, ), - new PhantomStableAprService( - data.chain.prismaId, - data.balancer.yieldProtocolFeePercentage, - ), + new PhantomStableAprService(data.chain.prismaId, data.balancer.yieldProtocolFeePercentage), new BoostedPoolAprService(), new SwapFeeAprService(data.balancer.swapProtocolFeePercentage), new GaugeAprService(tokenService, [data.bal!.address]), From d1d4993f9462c277f2fee5b40d77be01a5cd29fe Mon Sep 17 00:00:00 2001 From: gmbronco <83549293+gmbronco@users.noreply.github.com> Date: Mon, 4 Dec 2023 16:39:36 +0100 Subject: [PATCH 4/6] fix onchain call for gyro supply --- modules/pool/lib/pool-onchain-data.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/pool/lib/pool-onchain-data.ts b/modules/pool/lib/pool-onchain-data.ts index ca333d132..7a799a481 100644 --- a/modules/pool/lib/pool-onchain-data.ts +++ b/modules/pool/lib/pool-onchain-data.ts @@ -83,7 +83,6 @@ const getTotalSupplyFn = (type: PoolInput['type'], version: number) => { } else if ( type === 'COMPOSABLE_STABLE' || (type === 'WEIGHTED' && version > 1) || - (type === 'GYROE' && version > 1) || (type === 'UNKNOWN' && version > 1) ) { return 'getActualSupply'; From 6e2b97e8c52973da357c6709d0b023d039cfe75f Mon Sep 17 00:00:00 2001 From: gmbronco <83549293+gmbronco@users.noreply.github.com> Date: Mon, 11 Dec 2023 15:17:16 +0100 Subject: [PATCH 5/6] reduce profile sampling in Sentry (#569) --- worker/worker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worker/worker.ts b/worker/worker.ts index 45cd2e0ed..c5da70337 100644 --- a/worker/worker.ts +++ b/worker/worker.ts @@ -17,7 +17,7 @@ export async function startWorker() { new ProfilingIntegration(), ], tracesSampleRate: 0.2, - profilesSampleRate: 1.0, + profilesSampleRate: 0.1, }); app.use(Sentry.Handlers.requestHandler()); From f029c27a473249af52650feb614eb2d40a320771 Mon Sep 17 00:00:00 2001 From: franz Date: Mon, 18 Dec 2023 16:42:20 +0100 Subject: [PATCH 6/6] change fantom fantom_rpc --- modules/network/fantom.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/network/fantom.ts b/modules/network/fantom.ts index 0a0d6fef5..9d800ae38 100644 --- a/modules/network/fantom.ts +++ b/modules/network/fantom.ts @@ -95,7 +95,7 @@ const fantomNetworkData: NetworkData = { maxHourlyPriceHistoryNumDays: 100, }, rpcUrl: - (env.DEPLOYMENT_ENV as DeploymentEnv) === 'main' ? `https://rpc.fantom.network` : `https://rpc.fantom.network`, + (env.DEPLOYMENT_ENV as DeploymentEnv) === 'main' ? `https://rpc.ankr.com/fantom` : `https://rpc.fantom.network`, rpcMaxBlockRange: 1000, sanity: { projectId: '1g2ag2hb', @@ -347,7 +347,10 @@ export const fantomNetworkConfig: NetworkConfig = { new UserSyncReliquaryFarmBalanceService(fantomNetworkData.reliquary!.address), ], services: { - balancerSubgraphService: new BalancerSubgraphService(fantomNetworkData.subgraphs.balancer, fantomNetworkData.chain.id), + balancerSubgraphService: new BalancerSubgraphService( + fantomNetworkData.subgraphs.balancer, + fantomNetworkData.chain.id, + ), }, /* For sub-minute jobs we set the alarmEvaluationPeriod and alarmDatapointsToAlarm to 1 instead of the default 3.