Skip to content

Commit

Permalink
add fibonacci-dex
Browse files Browse the repository at this point in the history
  • Loading branch information
dtmkeng committed Feb 27, 2025
1 parent 8ff87dc commit e47b970
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 3 deletions.
1 change: 1 addition & 0 deletions helpers/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ export enum CHAIN {
BERACHAIN = "berachain",
UNICHAIN = "unichain",
STORY = 'sty',
FORMNETWORK = "formnetwork",
}

// Don´t use
Expand Down
5 changes: 2 additions & 3 deletions protocols/burrbear.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ const fetchVolume = async (options: FetchOptions) => {
const adapters: SimpleAdapter = {
version: 2,
adapter: {
[CHAIN.ABSTRACT]: {
fetch: fetchVolume,
runAtCurrTime: true
[CHAIN.BERACHAIN]: {
fetch: fetchVolume
}
}
}
Expand Down
37 changes: 37 additions & 0 deletions protocols/fibonacci-dex.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { CHAIN } from "../helpers/chains";
import { getGraphDimensions } from "../helpers/getUniSubgraph";
import { Adapter } from "../adapters/types";


const fetch = getGraphDimensions({
graphUrls: {
[CHAIN.FORMNETWORK]: "https://formapi.0xgraph.xyz/api/public/f96b70ac-d704-4e09-b300-ff0fb4992df2/subgraphs/analytics/v0.0.1/gn",
},
totalVolume: {
factory: "factories",
field: "totalVolumeUSD",
},
dailyVolume: {
factory: "algebraDayData",
field: "volumeUSD",
},
totalFees: {
factory: "factories",
field: "totalFeesUSD",
},
dailyFees: {
factory: "algebraDayData",
field: "feesUSD",
},
});

const adapters: Adapter = {
adapter: {
[CHAIN.FORMNETWORK]: {
fetch: fetch(CHAIN.FORMNETWORK),
start: '2024-10-29',
},
},
};

export default adapters;

0 comments on commit e47b970

Please sign in to comment.