From a0626ca2e4490d5443ea6bfa90afaaff4e79d914 Mon Sep 17 00:00:00 2001 From: jeuryink Date: Tue, 25 Nov 2025 19:10:12 -0500 Subject: [PATCH 1/5] support nado --- dexs/nado/index.ts | 151 ++++++++++++++++++++++++++++++++++++++ fees/nado.ts | 178 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 329 insertions(+) create mode 100644 dexs/nado/index.ts create mode 100644 fees/nado.ts diff --git a/dexs/nado/index.ts b/dexs/nado/index.ts new file mode 100644 index 0000000000..81dd8d3cbd --- /dev/null +++ b/dexs/nado/index.ts @@ -0,0 +1,151 @@ +import { BreakdownAdapter, FetchOptions } from "../../adapters/types"; +import { CHAIN } from "../../helpers/chains"; +import { httpGet, httpPost } from "../../utils/fetchURL"; + +interface IProducts { + spot_products: number[]; + perp_products: number[]; + margined_products: number[]; +} + +// Nado (Private Alpha) +// Production API on Ink Mainnet +const gatewayInkUrl = "https://gateway.prod.nado.xyz/v1"; +const archiveInkUrl = "https://archive.prod.nado.xyz/v1"; + +type TURL = { + [s: string]: { + gateway: string; + archive: string; + }; +}; + +const url: TURL = { + [CHAIN.INK]: { + gateway: gatewayInkUrl, + archive: archiveInkUrl, + }, +}; + +const fetchValidSymbols = async ( + fetchOptions: FetchOptions +): Promise => { + const symbols = await httpGet(`${url[fetchOptions.chain].gateway}/symbols`); + return symbols.map((product: { product_id: number }) => product.product_id); +}; + +const fetchProducts = async ( + fetchOptions: FetchOptions +): Promise => { + const validSymbols = await fetchValidSymbols(fetchOptions); + const allProducts = ( + await httpGet(`${url[fetchOptions.chain].gateway}/query?type=all_products`) + ).data; + return { + spot_products: allProducts.spot_products + .map((product: { product_id: number }) => product.product_id) + .filter((id: number) => validSymbols.includes(id) && id > 0), + perp_products: allProducts.perp_products + .map((product: { product_id: number }) => product.product_id) + .filter((id: number) => validSymbols.includes(id)), + margined_products: allProducts.spot_products + .map((product: { product_id: number }) => product.product_id) + .filter((id: number) => validSymbols.includes(id) && id > 0), + }; +}; + +const computeVolume = async ( + timestamp: number, + productIds: number[], + fetchOptions: FetchOptions +) => { + if (productIds.length > 0) { + const snapshots = ( + await httpPost(url[fetchOptions.chain].archive, { + market_snapshots: { + interval: { + count: 2, + granularity: 86400, + max_time: timestamp, + }, + product_ids: productIds, + }, + }) + ).snapshots; + const lastCumulativeVolumes: Record = + snapshots[0].cumulative_volumes; + const prevCumulativeVolumes: Record = + snapshots[1].cumulative_volumes; + const totalVolume = Number( + Object.values(lastCumulativeVolumes).reduce( + (acc, current) => acc + BigInt(current), + BigInt(0) + ) / BigInt(10 ** 18) + ); + const totalVolumeOneDayAgo = Number( + Object.values(prevCumulativeVolumes).reduce( + (acc, current) => acc + BigInt(current), + BigInt(0) + ) / BigInt(10 ** 18) + ); + const dailyVolume = totalVolume - totalVolumeOneDayAgo; + return { + totalVolume: totalVolume ? `${totalVolume}` : undefined, + dailyVolume: dailyVolume ? `${dailyVolume}` : undefined, + timestamp: timestamp, + }; + } else { + return { + totalVolume: undefined, + dailyVolume: undefined, + timestamp: timestamp, + }; + } + +}; + +const fetchSpots = async ( + timeStamp: number, + _: any, + fetchOptions: FetchOptions +) => { + const spotProductIds = (await fetchProducts(fetchOptions)).spot_products; + return computeVolume(timeStamp, spotProductIds, fetchOptions); +}; + +const fetchPerps = async ( + timeStamp: number, + _: any, + fetchOptions: FetchOptions +) => { + const perpProductIds = (await fetchProducts(fetchOptions)).perp_products; + const marginedProductIds = (await fetchProducts(fetchOptions)) + .margined_products; + return await computeVolume( + timeStamp, + perpProductIds.concat(marginedProductIds), + fetchOptions + ); +}; + +// Start time for Nado on Ink Mainnet - November 16, 2025 +const inkStartTime = 1731715200; + +const adapter: BreakdownAdapter = { + breakdown: { + swap: { + [CHAIN.INK]: { + fetch: fetchSpots, + start: inkStartTime, + }, + }, + derivatives: { + [CHAIN.INK]: { + fetch: fetchPerps, + start: inkStartTime, + }, + }, + }, +}; + +export default adapter; diff --git a/fees/nado.ts b/fees/nado.ts new file mode 100644 index 0000000000..bf45a5931e --- /dev/null +++ b/fees/nado.ts @@ -0,0 +1,178 @@ +import { CHAIN } from "../helpers/chains"; +import { Adapter, FetchOptions, FetchResultFees } from "../adapters/types"; +import { httpPost } from "../utils/fetchURL"; + +interface MarketSnapshots { + interval: { + count: number; + granularity: number; + max_time: number; + }; +} + +interface QueryBody { + market_snapshots: MarketSnapshots; +} + +interface IData { + [s: string]: string; +} + +interface Snapshot { + [s: string]: IData; +} + +interface Response { + snapshots: Snapshot[]; +} + +// Nado (Private Alpha) +// Production API on Ink Mainnet +const archiveInkUrl = "https://archive.prod.nado.xyz/v1"; + +type TURL = { + [s: string]: string; +}; + +const url: TURL = { + [CHAIN.INK]: archiveInkUrl, +}; + +const query = async ( + max_time: number, + fetchOptions: FetchOptions +): Promise => { + const body: QueryBody = { + market_snapshots: { + interval: { + count: 2, + granularity: 86400, + max_time: max_time, + }, + }, + }; + + const response = await httpPost(url[fetchOptions.chain], body); + return response; +}; + +const sumAllProductStats = (stat_map: IData): number => { + let stat_sum = 0; + for (const v of Object.values(stat_map)) { + stat_sum += parseInt(v); + } + return stat_sum / 1e18; +}; + +const get24hrStat = async ( + field: string, + max_time: number, + fetchOptions: FetchOptions +): Promise => { + const response = await query(max_time, fetchOptions); + const cur_res: Snapshot = response.snapshots[0]; + const past_res: Snapshot = response.snapshots[1]; + return ( + sumAllProductStats(cur_res[field]) - sumAllProductStats(past_res[field]) + ); +}; + +const getCumulativeStat = async ( + field: string, + max_time: number, + fetchOptions: FetchOptions +): Promise => { + const response = await query(max_time, fetchOptions); + const cur_res = response.snapshots[0]; + return sumAllProductStats(cur_res[field]); +}; + +const getCumulativeFees = async ( + max_time: number, + fetchOptions: FetchOptions +): Promise => { + const fees = await getCumulativeStat( + "cumulative_taker_fees", + max_time, + fetchOptions + ); + const sequencer_fees = await getCumulativeStat( + "cumulative_sequencer_fees", + max_time, + fetchOptions + ); + return fees - sequencer_fees; +}; + +const getCumulativeRevenue = async ( + max_time: number, + fetchOptions: FetchOptions +): Promise => { + const fees = await getCumulativeFees(max_time, fetchOptions); + const rebates = await getCumulativeStat( + "cumulative_maker_fees", + max_time, + fetchOptions + ); + return fees + rebates; +}; + +const get24hrFees = async ( + max_time: number, + fetchOptions: FetchOptions +): Promise => { + const fees = await get24hrStat( + "cumulative_taker_fees", + max_time, + fetchOptions + ); + const sequencer_fees = await get24hrStat( + "cumulative_sequencer_fees", + max_time, + fetchOptions + ); + return fees - sequencer_fees; +}; + +const get24hrRevenue = async ( + max_time: number, + fetchOptions: FetchOptions +): Promise => { + const fees = await get24hrFees(max_time, fetchOptions); + const rebates = await get24hrStat( + "cumulative_maker_fees", + max_time, + fetchOptions + ); + return fees + rebates; +}; + +const fetch = async ( + timestamp: number, + _: any, + fetchOptions: FetchOptions +): Promise => { + const dailyFees = await get24hrFees(timestamp, fetchOptions); + const dailyRevenue = await get24hrRevenue(timestamp, fetchOptions); + const totalFees = await getCumulativeFees(timestamp, fetchOptions); + const totalRev = await getCumulativeRevenue(timestamp, fetchOptions); + return { + dailyFees: `${dailyFees}`, + dailyRevenue: `${dailyRevenue}`, + totalRevenue: `${totalRev}`, + totalFees: `${totalFees}`, + timestamp, + }; +}; + +const adapter: Adapter = { + adapter: { + [CHAIN.INK]: { + fetch: fetch, + runAtCurrTime: true, + start: "2025-11-16", + }, + }, +}; + +export default adapter; From 9c772c9ddcc0f1dbb2813cd85af82aeebe6ebe03 Mon Sep 17 00:00:00 2001 From: jeuryink Date: Tue, 2 Dec 2025 14:30:49 -0500 Subject: [PATCH 2/5] fix timestamp --- dexs/nado/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dexs/nado/index.ts b/dexs/nado/index.ts index 81dd8d3cbd..2a4a8e8a28 100644 --- a/dexs/nado/index.ts +++ b/dexs/nado/index.ts @@ -129,7 +129,7 @@ const fetchPerps = async ( }; // Start time for Nado on Ink Mainnet - November 16, 2025 -const inkStartTime = 1731715200; +const inkStartTime = 1763251200; const adapter: BreakdownAdapter = { breakdown: { From ed31504366b8b3b3c81c863b995fb92c04227f7f Mon Sep 17 00:00:00 2001 From: jeuryink Date: Tue, 2 Dec 2025 14:42:05 -0500 Subject: [PATCH 3/5] use simple adapter --- dexs/nado/index.ts | 153 +++++++++++++++++++++++++-------------------- 1 file changed, 84 insertions(+), 69 deletions(-) diff --git a/dexs/nado/index.ts b/dexs/nado/index.ts index 2a4a8e8a28..ae57e6cf8b 100644 --- a/dexs/nado/index.ts +++ b/dexs/nado/index.ts @@ -1,4 +1,4 @@ -import { BreakdownAdapter, FetchOptions } from "../../adapters/types"; +import { FetchOptions, SimpleAdapter } from "../../adapters/types"; import { CHAIN } from "../../helpers/chains"; import { httpGet, httpPost } from "../../utils/fetchURL"; @@ -59,93 +59,108 @@ const computeVolume = async ( productIds: number[], fetchOptions: FetchOptions ) => { - if (productIds.length > 0) { - const snapshots = ( - await httpPost(url[fetchOptions.chain].archive, { - market_snapshots: { - interval: { - count: 2, - granularity: 86400, - max_time: timestamp, - }, - product_ids: productIds, - }, - }) - ).snapshots; - const lastCumulativeVolumes: Record = - snapshots[0].cumulative_volumes; - const prevCumulativeVolumes: Record = - snapshots[1].cumulative_volumes; - const totalVolume = Number( - Object.values(lastCumulativeVolumes).reduce( - (acc, current) => acc + BigInt(current), - BigInt(0) - ) / BigInt(10 ** 18) - ); - const totalVolumeOneDayAgo = Number( - Object.values(prevCumulativeVolumes).reduce( - (acc, current) => acc + BigInt(current), - BigInt(0) - ) / BigInt(10 ** 18) - ); - const dailyVolume = totalVolume - totalVolumeOneDayAgo; + if (!productIds.length) { return { - totalVolume: totalVolume ? `${totalVolume}` : undefined, - dailyVolume: dailyVolume ? `${dailyVolume}` : undefined, - timestamp: timestamp, + totalVolume: undefined, + dailyVolume: undefined, }; - } else { + } + + const response = await httpPost(url[fetchOptions.chain].archive, { + market_snapshots: { + interval: { + count: 2, + granularity: 86400, + max_time: timestamp, + }, + product_ids: productIds, + }, + }); + + const snapshots = response?.snapshots; + if (!Array.isArray(snapshots) || snapshots.length < 2) { return { totalVolume: undefined, dailyVolume: undefined, - timestamp: timestamp, }; } - -}; -const fetchSpots = async ( - timeStamp: number, - _: any, - fetchOptions: FetchOptions -) => { - const spotProductIds = (await fetchProducts(fetchOptions)).spot_products; - return computeVolume(timeStamp, spotProductIds, fetchOptions); + const lastCumulativeVolumes: Record = + snapshots[0].cumulative_volumes; + const prevCumulativeVolumes: Record = + snapshots[1].cumulative_volumes; + const totalVolume = Number( + Object.values(lastCumulativeVolumes).reduce( + (acc, current) => acc + BigInt(current), + BigInt(0) + ) / BigInt(10 ** 18) + ); + const totalVolumeOneDayAgo = Number( + Object.values(prevCumulativeVolumes).reduce( + (acc, current) => acc + BigInt(current), + BigInt(0) + ) / BigInt(10 ** 18) + ); + const dailyVolume = totalVolume - totalVolumeOneDayAgo; + + return { + totalVolume, + dailyVolume, + }; }; -const fetchPerps = async ( - timeStamp: number, +// Start time for Nado on Ink Mainnet - November 16, 2025 +const inkStartTime = 1763251200; + +const fetch = async ( + timestamp: number, _: any, fetchOptions: FetchOptions ) => { - const perpProductIds = (await fetchProducts(fetchOptions)).perp_products; - const marginedProductIds = (await fetchProducts(fetchOptions)) - .margined_products; - return await computeVolume( - timeStamp, - perpProductIds.concat(marginedProductIds), - fetchOptions + const products = await fetchProducts(fetchOptions); + const perpAndMarginedProducts = products.perp_products.concat( + products.margined_products ); + + const [spotVolumes, derivativeVolumes] = await Promise.all([ + computeVolume(timestamp, products.spot_products, fetchOptions), + computeVolume(timestamp, perpAndMarginedProducts, fetchOptions), + ]); + + const dailyVolume = + (spotVolumes.dailyVolume ?? 0) + (derivativeVolumes.dailyVolume ?? 0); + const totalVolume = + (spotVolumes.totalVolume ?? 0) + (derivativeVolumes.totalVolume ?? 0); + + return { + dailyVolume: dailyVolume ? `${dailyVolume}` : undefined, + totalVolume: totalVolume ? `${totalVolume}` : undefined, + timestamp, + }; }; -// Start time for Nado on Ink Mainnet - November 16, 2025 -const inkStartTime = 1763251200; +const methodology = { + Volume: + "Sums spot, perp, and margined product volume from Nado's Archive market_snapshots on Ink Mainnet.", +}; -const adapter: BreakdownAdapter = { - breakdown: { - swap: { - [CHAIN.INK]: { - fetch: fetchSpots, - start: inkStartTime, - }, - }, - derivatives: { - [CHAIN.INK]: { - fetch: fetchPerps, - start: inkStartTime, - }, +const breakdownMethodology = { + Volume: { + swap: "Spot product trading volume (product_ids > 0) filtered to valid symbols.", + derivatives: + "Perpetual and margined product trading volume filtered to valid symbols.", + }, +}; + +const adapter: SimpleAdapter = { + adapter: { + [CHAIN.INK]: { + fetch, + start: inkStartTime, }, }, + methodology, + breakdownMethodology, }; export default adapter; From a165e1023fd78b89f6f45f4345e08af612162b70 Mon Sep 17 00:00:00 2001 From: treeoflife2 Date: Thu, 4 Dec 2025 15:15:33 +0530 Subject: [PATCH 4/5] separate listing for nado spot and nado perp --- dexs/nado-perp/index.ts | 110 ++++++++++++++++++++++++++++++ dexs/{nado => nado-spot}/index.ts | 66 ++++-------------- fees/nado.ts | 62 ++--------------- 3 files changed, 128 insertions(+), 110 deletions(-) create mode 100644 dexs/nado-perp/index.ts rename dexs/{nado => nado-spot}/index.ts (64%) diff --git a/dexs/nado-perp/index.ts b/dexs/nado-perp/index.ts new file mode 100644 index 0000000000..b2b85bef47 --- /dev/null +++ b/dexs/nado-perp/index.ts @@ -0,0 +1,110 @@ +import { FetchOptions, SimpleAdapter } from "../../adapters/types"; +import { CHAIN } from "../../helpers/chains"; +import { httpGet, httpPost } from "../../utils/fetchURL"; + +interface IProducts { + perp_products: number[]; +} + +// Nado (Private Alpha) +// Production API on Ink Mainnet +const gatewayInkUrl = "https://gateway.prod.nado.xyz/v1"; +const archiveInkUrl = "https://archive.prod.nado.xyz/v1"; + +type TURL = { + [s: string]: { + gateway: string; + archive: string; + }; +}; + +const url: TURL = { + [CHAIN.INK]: { + gateway: gatewayInkUrl, + archive: archiveInkUrl, + }, +}; + +const fetchValidSymbols = async ( + fetchOptions: FetchOptions +): Promise => { + const symbols = await httpGet(`${url[fetchOptions.chain].gateway}/symbols`); + return symbols.map((product: { product_id: number }) => product.product_id); +}; + +const fetchProducts = async ( + fetchOptions: FetchOptions +): Promise => { + const validSymbols = await fetchValidSymbols(fetchOptions); + const allProducts = ( + await httpGet(`${url[fetchOptions.chain].gateway}/query?type=all_products`) + ).data; + return { + perp_products: allProducts.perp_products + .map((product: { product_id: number }) => product.product_id) + .filter((id: number) => validSymbols.includes(id)) + }; +}; + +const computeVolume = async ( + timestamp: number, + productIds: number[], + fetchOptions: FetchOptions +) => { + if (!productIds.length) { + return { dailyVolume: undefined }; + } + + const response = await httpPost(url[fetchOptions.chain].archive, { + market_snapshots: { + interval: { + count: 2, + granularity: 86400, + max_time: timestamp, + }, + product_ids: productIds, + }, + }); + + const snapshots = response?.snapshots; + if (!Array.isArray(snapshots) || snapshots.length < 2) { + return { dailyVolume: undefined }; + } + + const lastCumulativeVolumes: Record = + snapshots[0].cumulative_volumes; + const prevCumulativeVolumes: Record = + snapshots[1].cumulative_volumes; + const totalVolume = Number( + Object.values(lastCumulativeVolumes).reduce( + (acc, current) => acc + BigInt(current), + BigInt(0) + ) / BigInt(10 ** 18) + ); + const totalVolumeOneDayAgo = Number( + Object.values(prevCumulativeVolumes).reduce( + (acc, current) => acc + BigInt(current), + BigInt(0) + ) / BigInt(10 ** 18) + ); + const dailyVolume = totalVolume - totalVolumeOneDayAgo; + + return { dailyVolume }; +}; + + +const fetch = async (timestamp: number, _: any, fetchOptions: FetchOptions) => { + const products = await fetchProducts(fetchOptions); + const perpVolumes = await computeVolume(timestamp, products.perp_products, fetchOptions); + return { dailyVolume: perpVolumes.dailyVolume }; +}; + + +const adapter: SimpleAdapter = { + version: 1, + fetch, + chains: [CHAIN.INK], + start: '2025-11-15', +}; + +export default adapter; diff --git a/dexs/nado/index.ts b/dexs/nado-spot/index.ts similarity index 64% rename from dexs/nado/index.ts rename to dexs/nado-spot/index.ts index ae57e6cf8b..4d18636f10 100644 --- a/dexs/nado/index.ts +++ b/dexs/nado-spot/index.ts @@ -4,7 +4,6 @@ import { httpGet, httpPost } from "../../utils/fetchURL"; interface IProducts { spot_products: number[]; - perp_products: number[]; margined_products: number[]; } @@ -45,13 +44,11 @@ const fetchProducts = async ( spot_products: allProducts.spot_products .map((product: { product_id: number }) => product.product_id) .filter((id: number) => validSymbols.includes(id) && id > 0), - perp_products: allProducts.perp_products - .map((product: { product_id: number }) => product.product_id) - .filter((id: number) => validSymbols.includes(id)), margined_products: allProducts.spot_products .map((product: { product_id: number }) => product.product_id) .filter((id: number) => validSymbols.includes(id) && id > 0), - }; + + }; }; const computeVolume = async ( @@ -61,7 +58,6 @@ const computeVolume = async ( ) => { if (!productIds.length) { return { - totalVolume: undefined, dailyVolume: undefined, }; } @@ -80,7 +76,6 @@ const computeVolume = async ( const snapshots = response?.snapshots; if (!Array.isArray(snapshots) || snapshots.length < 2) { return { - totalVolume: undefined, dailyVolume: undefined, }; } @@ -103,64 +98,27 @@ const computeVolume = async ( ); const dailyVolume = totalVolume - totalVolumeOneDayAgo; - return { - totalVolume, - dailyVolume, - }; + return { dailyVolume }; }; -// Start time for Nado on Ink Mainnet - November 16, 2025 -const inkStartTime = 1763251200; -const fetch = async ( - timestamp: number, - _: any, - fetchOptions: FetchOptions -) => { +const fetch = async (timestamp: number, _: any, fetchOptions: FetchOptions) => { const products = await fetchProducts(fetchOptions); - const perpAndMarginedProducts = products.perp_products.concat( - products.margined_products - ); - const [spotVolumes, derivativeVolumes] = await Promise.all([ + const [spotVolumes, marginedVolumes] = await Promise.all([ computeVolume(timestamp, products.spot_products, fetchOptions), - computeVolume(timestamp, perpAndMarginedProducts, fetchOptions), + computeVolume(timestamp, products.margined_products, fetchOptions), ]); - - const dailyVolume = - (spotVolumes.dailyVolume ?? 0) + (derivativeVolumes.dailyVolume ?? 0); - const totalVolume = - (spotVolumes.totalVolume ?? 0) + (derivativeVolumes.totalVolume ?? 0); - - return { - dailyVolume: dailyVolume ? `${dailyVolume}` : undefined, - totalVolume: totalVolume ? `${totalVolume}` : undefined, - timestamp, - }; -}; - -const methodology = { - Volume: - "Sums spot, perp, and margined product volume from Nado's Archive market_snapshots on Ink Mainnet.", + const dailyVolume = (spotVolumes.dailyVolume ?? 0) + (marginedVolumes.dailyVolume ?? 0); + return { dailyVolume }; }; -const breakdownMethodology = { - Volume: { - swap: "Spot product trading volume (product_ids > 0) filtered to valid symbols.", - derivatives: - "Perpetual and margined product trading volume filtered to valid symbols.", - }, -}; const adapter: SimpleAdapter = { - adapter: { - [CHAIN.INK]: { - fetch, - start: inkStartTime, - }, - }, - methodology, - breakdownMethodology, + version: 1, + fetch, + chains: [CHAIN.INK], + start: '2025-11-15', }; export default adapter; diff --git a/fees/nado.ts b/fees/nado.ts index bf45a5931e..16e0da2c6f 100644 --- a/fees/nado.ts +++ b/fees/nado.ts @@ -77,46 +77,6 @@ const get24hrStat = async ( ); }; -const getCumulativeStat = async ( - field: string, - max_time: number, - fetchOptions: FetchOptions -): Promise => { - const response = await query(max_time, fetchOptions); - const cur_res = response.snapshots[0]; - return sumAllProductStats(cur_res[field]); -}; - -const getCumulativeFees = async ( - max_time: number, - fetchOptions: FetchOptions -): Promise => { - const fees = await getCumulativeStat( - "cumulative_taker_fees", - max_time, - fetchOptions - ); - const sequencer_fees = await getCumulativeStat( - "cumulative_sequencer_fees", - max_time, - fetchOptions - ); - return fees - sequencer_fees; -}; - -const getCumulativeRevenue = async ( - max_time: number, - fetchOptions: FetchOptions -): Promise => { - const fees = await getCumulativeFees(max_time, fetchOptions); - const rebates = await getCumulativeStat( - "cumulative_maker_fees", - max_time, - fetchOptions - ); - return fees + rebates; -}; - const get24hrFees = async ( max_time: number, fetchOptions: FetchOptions @@ -154,25 +114,15 @@ const fetch = async ( ): Promise => { const dailyFees = await get24hrFees(timestamp, fetchOptions); const dailyRevenue = await get24hrRevenue(timestamp, fetchOptions); - const totalFees = await getCumulativeFees(timestamp, fetchOptions); - const totalRev = await getCumulativeRevenue(timestamp, fetchOptions); - return { - dailyFees: `${dailyFees}`, - dailyRevenue: `${dailyRevenue}`, - totalRevenue: `${totalRev}`, - totalFees: `${totalFees}`, - timestamp, - }; + + return { dailyFees, dailyRevenue }; }; const adapter: Adapter = { - adapter: { - [CHAIN.INK]: { - fetch: fetch, - runAtCurrTime: true, - start: "2025-11-16", - }, - }, + version: 1, + fetch, + chains: [CHAIN.INK], + start: '2025-11-15', }; export default adapter; From 78a7a7c345cff91e0cd78678b29f3495f4af7a46 Mon Sep 17 00:00:00 2001 From: treeoflife2 Date: Sat, 6 Dec 2025 17:26:05 +0530 Subject: [PATCH 5/5] add methodology --- fees/nado.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/fees/nado.ts b/fees/nado.ts index 16e0da2c6f..fd3d414174 100644 --- a/fees/nado.ts +++ b/fees/nado.ts @@ -115,14 +115,21 @@ const fetch = async ( const dailyFees = await get24hrFees(timestamp, fetchOptions); const dailyRevenue = await get24hrRevenue(timestamp, fetchOptions); - return { dailyFees, dailyRevenue }; + return { dailyFees, dailyRevenue, dailyProtocolRevenue: dailyRevenue }; }; +const methodology = { + Fees: 'spot and perp trading fees paid by users', + Revenue: 'trading fees - maker rebates goes to the protocol treasury', + ProtocolRevenue: 'net trading fees goes to the protocol treasury', +} + const adapter: Adapter = { version: 1, fetch, chains: [CHAIN.INK], start: '2025-11-15', + methodology, }; export default adapter;