diff --git a/dexs/sushiswap/classic.ts b/dexs/sushiswap/classic.ts index db8c5b738..28cefb3d4 100644 --- a/dexs/sushiswap/classic.ts +++ b/dexs/sushiswap/classic.ts @@ -109,7 +109,7 @@ const classic = Object.keys(endpointsClassic).reduce( ...acc, [chain]: { fetch: chain == "boba" ? graphsClassicBoba(chain as Chain) : graphsClassic(chain as Chain), - start: chain == "boba" ? getStartTimestamp({ ...startTimeQueryClassic, dailyDataField: "factoryDaySnapshots", chain }) : getStartTimestamp({ ...startTimeQueryClassic, chain }), + start: 1711982400, meta: { methodology: { Fees: "SushiSwap charges a flat 0.3% fee", diff --git a/dexs/sushiswap/trident.ts b/dexs/sushiswap/trident.ts index 15aa5a621..afe056a0b 100644 --- a/dexs/sushiswap/trident.ts +++ b/dexs/sushiswap/trident.ts @@ -25,7 +25,7 @@ const startTimeQueryTrident = { const tridentQuery = gql` query trident($number: Int) { - factory( + factory( id: "ALL" block: { number: $number } ) { @@ -60,7 +60,7 @@ const trident = Object.keys(endpointsTrident).reduce( dailyUserFees: afterRes.factory.feesUSD - beforeRes.factory.feesUSD } }, - start: getStartTimestamp({ ...startTimeQueryTrident, chain }), + start: 1711982400, }, }), {} diff --git a/dexs/sushiswap/v3.ts b/dexs/sushiswap/v3.ts index 3d4951134..6df8c9a09 100644 --- a/dexs/sushiswap/v3.ts +++ b/dexs/sushiswap/v3.ts @@ -2,6 +2,7 @@ import * as sdk from "@defillama/sdk"; import { Chain } from "@defillama/sdk/build/general"; import { CHAIN } from "../../helpers/chains"; import { getGraphDimensions2 } from "../../helpers/getUniSubgraph"; +import { FetchOptions } from "../../adapters/types"; const endpointsV3 = { [CHAIN.ARBITRUM_NOVA]: "https://api.goldsky.com/api/public/project_clslspm3c0knv01wvgfb2fqyq/subgraphs/sushi-v3/v3-arbitrum-nova/gn", @@ -83,7 +84,28 @@ const v3 = Object.keys(endpointsV3).reduce( (acc, chain) => ({ ...acc, [chain]: { - fetch: v3Graphs(chain as Chain), + fetch: async (options: FetchOptions) => { + try { + const res = (await v3Graphs(chain as Chain)(options)) + return { + totalVolume: res?.totalVolume || 0, + dailyVolume: res?.dailyVolume || 0, + totalFees: res?.totalFees || 0, + totalUserFees: res?.totalUserFees || 0, + dailyFees: res?.dailyFees, + dailyUserFees: res?.dailyUserFees || 0 + } + } catch { + return { + totalVolume: 0, + dailyVolume: 0, + totalFees: 0, + totalUserFees: 0, + dailyFees: 0, + dailyUserFees: 0 + } + } + }, start: startTimeV3[chain], meta: { methodology: {