Skip to content

Commit

Permalink
add agni-fi
Browse files Browse the repository at this point in the history
  • Loading branch information
dtmkeng committed Jul 21, 2023
1 parent 590a111 commit 107bc52
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions dexs/agni-fi/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { SimpleAdapter } from "../../adapters/types";
import { CHAIN } from "../../helpers/chains";
import { DEFAULT_TOTAL_VOLUME_FIELD, getGraphDimensions } from "../../helpers/getUniSubgraph";

const v3Endpoints = {
[CHAIN.MANTLE]: "https://agni.finance/graph/subgraphs/name/agni/exchange-v3"
}

const VOLUME_USD = "volumeUSD";

const v3Graphs = getGraphDimensions({
graphUrls: v3Endpoints,
totalVolume: {
factory: "factories",
field: DEFAULT_TOTAL_VOLUME_FIELD,
},
dailyVolume: {
factory: "pancakeDayData",
field: VOLUME_USD,
},
dailyFees: {
factory: "pancakeDayData",
field: "feesUSD",
},
feesPercent: {
type: "fees",
ProtocolRevenue: 0,
HoldersRevenue: 0,
Fees: 0,
UserFees: 100, // User fees are 100% of collected fees
SupplySideRevenue: 100, // 100% of fees are going to LPs
Revenue: 0 // Revenue is 100% of collected fees
}
});

const adapter: SimpleAdapter = {
adapter: {
[CHAIN.MANTLE]: {
fetch: v3Graphs(CHAIN.MANTLE),
start: async () => 1689724800,
},
},
};

export default adapter;

0 comments on commit 107bc52

Please sign in to comment.