From ead75028ce741cf17a9a0023819ea0761a9da45f Mon Sep 17 00:00:00 2001 From: CLAM <> Date: Tue, 14 Oct 2025 17:50:18 +0200 Subject: [PATCH 1/2] adjust fees and update graph link --- fees/gliquid/index.ts | 107 ++++++++++++++++++++---------------------- 1 file changed, 51 insertions(+), 56 deletions(-) diff --git a/fees/gliquid/index.ts b/fees/gliquid/index.ts index 1d9857c591..8e5d04d6c1 100644 --- a/fees/gliquid/index.ts +++ b/fees/gliquid/index.ts @@ -1,58 +1,53 @@ -// // Source: https://gliquids-organization.gitbook.io/gliquid/about-us/fee-structure - -// import request, { gql } from "graphql-request"; -// import { FetchOptions, SimpleAdapter } from "../../adapters/types"; -// import { CHAIN } from "../../helpers/chains"; - -// const endpoint = "https://api.goldsky.com/api/public/project_cmb20ryy424yb01wy7zwd7xd1/subgraphs/analytics/1.2.3/gn" - - -// const fetch = async ({ startOfDay }: FetchOptions) => { -// const query = gql` -// query GetFees($date: Int!) { -// algebraDayDatas(where: { date: $date }) { -// feesUSD -// } -// } -// `; -// const feesRes = await request(endpoint, query, { -// date: startOfDay, -// }); - -// const dailyFees = feesRes.algebraDayDatas[0].feesUSD; -// const dailyProtocolRevenue = dailyFees * 0.13; -// const dailySupplySideRevenue = dailyFees * 0.87; - -// return { -// dailyFees, -// dailyUserFees: dailyFees, -// dailyRevenue: dailyProtocolRevenue, -// dailyProtocolRevenue, -// dailySupplySideRevenue, -// dailyHoldersRevenue: 0, -// }; -// }; - - -// const adapter: SimpleAdapter = { -// version: 2, -// adapter: { -// [CHAIN.HYPERLIQUID]: { -// fetch: fetch, -// start: "2025-05-29", -// }, -// }, -// methodology: { -// Fees: "Swap fees paid by users.", -// UserFees: "Swap fees paid by users", -// Revenue: "Total revenue from fees", -// ProtocolRevenue: "5% of fee goes to the protocol", -// SupplySideRevenue: "95% of fee goes to the supply side", -// }, -// }; - -// export default adapter; - -import adapter from "../../dexs/gliquid"; +// Source: https://gliquids-organization.gitbook.io/gliquid/about-us/fee-structure + +import request, { gql } from "graphql-request"; +import { FetchOptions, SimpleAdapter } from "../../adapters/types"; +import { CHAIN } from "../../helpers/chains"; + +const endpoint = + "https://api.goldsky.com/api/public/project_cmb20ryy424yb01wy7zwd7xd1/subgraphs/analytics/1.3.0/gn"; + +const fetch = async ({ startOfDay }: FetchOptions) => { + const query = gql` + query GetFees($date: Int!) { + algebraDayDatas(where: { date: $date }) { + feesUSD + } + } + `; + const feesRes = await request(endpoint, query, { + date: startOfDay, + }); + + const dailyFees = feesRes.algebraDayDatas[0].feesUSD; + const dailyProtocolRevenue = 0; + const dailySupplySideRevenue = dailyFees * 1; + + return { + dailyFees, + dailyUserFees: dailyFees, + dailyRevenue: dailyProtocolRevenue, + dailyProtocolRevenue, + dailySupplySideRevenue, + dailyHoldersRevenue: 0, + }; +}; + +const adapter: SimpleAdapter = { + version: 2, + adapter: { + [CHAIN.HYPERLIQUID]: { + fetch: fetch, + start: "2025-05-29", + }, + }, + methodology: { + Fees: "Swap fees paid by users.", + UserFees: "Swap fees paid by users", + Revenue: "Total revenue from fees", + ProtocolRevenue: "5% of fee goes to the protocol", + SupplySideRevenue: "95% of fee goes to the supply side", + }, +}; export default adapter; From ef6ca2f1a91ea6523833efe4214e6fea52395757 Mon Sep 17 00:00:00 2001 From: treeoflife2 Date: Fri, 17 Oct 2025 22:25:50 +0530 Subject: [PATCH 2/2] update source and correct methodology --- fees/gliquid/index.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/fees/gliquid/index.ts b/fees/gliquid/index.ts index 8e5d04d6c1..89d4c9c35a 100644 --- a/fees/gliquid/index.ts +++ b/fees/gliquid/index.ts @@ -1,4 +1,5 @@ // Source: https://gliquids-organization.gitbook.io/gliquid/about-us/fee-structure +// Past Source: https://gliquids-organization.gitbook.io/gliquid/about-us/fee-structure import request, { gql } from "graphql-request"; import { FetchOptions, SimpleAdapter } from "../../adapters/types"; @@ -37,17 +38,17 @@ const adapter: SimpleAdapter = { version: 2, adapter: { [CHAIN.HYPERLIQUID]: { - fetch: fetch, + fetch, start: "2025-05-29", }, }, methodology: { Fees: "Swap fees paid by users.", UserFees: "Swap fees paid by users", - Revenue: "Total revenue from fees", - ProtocolRevenue: "5% of fee goes to the protocol", - SupplySideRevenue: "95% of fee goes to the supply side", + Revenue: "0% of fees goes to the protocol, previously it was 13% gliquid and algebra team", + ProtocolRevenue: "0% of fee goes to the protocol, previously it was 10%", + SupplySideRevenue: "100% of fee goes to the supply side, previously it was 87%", }, }; -export default adapter; +export default adapter; \ No newline at end of file