-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #645 from DefiLlama/agni-fi
add agni-fi
- Loading branch information
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |