Skip to content

Commit 56e5b36

Browse files
Add Cashmere to fees and bridge aggregators (#4218)
* up up * add cashmere add cashmere * Update index.ts * Update index.ts * Delete bridge-aggregators/cashmere/index.ts * Reset daily revenue calculations to zero Set dailyHoldersRevenue and dailySupplySideRevenue to zero. --------- Co-authored-by: g1nt0ki <[email protected]>
1 parent 2765cbf commit 56e5b36

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

fees/cashmere/index.ts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import fetchURL from "../../utils/fetchURL";
2+
import { FetchOptions, FetchResult, SimpleAdapter } from "../../adapters/types";
3+
import { CHAIN } from "../../helpers/chains";
4+
5+
const CASHMERE_API_URL = "https://kapi.cashmere.exchange/defillama/fees";
6+
7+
const getUrl = (startTime: number, endTime: number): string => {
8+
return `${CASHMERE_API_URL}?from_timestamp=${startTime}&to_timestamp=${endTime}`;
9+
};
10+
11+
const fetch = async (options: FetchOptions): Promise<FetchResult> => {
12+
const url = getUrl(options.startTimestamp, options.endTimestamp);
13+
const response = await fetchURL(url);
14+
15+
return {
16+
dailyVolume: response.volumeUsd || 0,
17+
dailyFees: response.feesUsd || 0,
18+
dailyUserFees: response.feesUsd || 0,
19+
dailyRevenue: response.revenuesUsd || 0,
20+
dailyProtocolRevenue: response.protocolRevenueUsd || 0,
21+
dailyHoldersRevenue: 0,
22+
dailySupplySideRevenue:0,
23+
};
24+
};
25+
26+
const methodology = {
27+
Volume: "Total cross-chain volume of the Cashmere",
28+
Fees: "Total amount of fees paid by users for cross-chain Cashmere relayers",
29+
UserFees: "Same as Fees - all fees are paid directly by end-users for Cashmere relayers",
30+
Revenue: "All relayer fees are retained as protocol revenue",
31+
ProtocolRevenue: "100% of fees go to protocol treasury",
32+
HoldersRevenue: "No token holders revenue distribution - Cashmere operates as a service protocol without governance tokens",
33+
SupplySideRevenue: "No liquidity providers - Cashmere operates bridge infrastructure, not AMM liquidity pools",
34+
};
35+
36+
const adapter: SimpleAdapter = {
37+
version: 2,
38+
fetch,
39+
chains: [CHAIN.ETHEREUM], // Aggregate data across all chains, represented under Ethereum
40+
start: "2025-09-08",
41+
methodology,
42+
};
43+
44+
export default adapter;

0 commit comments

Comments
 (0)