Skip to content

Commit 9640e22

Browse files
committed
trac katana perps + paragon
1 parent 763fb1e commit 9640e22

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

dexs/katana-perps.ts

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import { CHAIN } from "../helpers/chains";
2+
import { FetchOptions, FetchResultV2, SimpleAdapter } from "../adapters/types";
3+
4+
const EXCHANGE_CONTRACT = '0x835Ba5b1B202773A94Daaa07168b26B22584637a';
5+
const QUOTE_TOKEN = '0x203A662b0BD271A6ed5a60EdFbd04bFce608FD36';
6+
7+
const ABIS = {
8+
TradeExecuted: 'event TradeExecuted (address buyWallet, address sellWallet, string baseAssetSymbol, string quoteAssetSymbol, uint64 baseQuantity, uint64 quoteQuantity, uint8 makerSide, int64 makerFeeQuantity, uint64 takerFeeQuantity)',
9+
}
10+
11+
async function fetch(options: FetchOptions): Promise<FetchResultV2> {
12+
const dailyVolume = options.createBalances();
13+
const dailyFees = options.createBalances();
14+
15+
const logs = await options.getLogs({ target: EXCHANGE_CONTRACT, eventAbi: ABIS.TradeExecuted });
16+
for (const log of logs) {
17+
dailyVolume.add(QUOTE_TOKEN, log.quoteQuantity);
18+
dailyFees.add(QUOTE_TOKEN, Math.abs(Number(log.makerFeeQuantity)), 'Maker Fees');
19+
dailyFees.add(QUOTE_TOKEN, log.takerFeeQuantity, 'Taker Fees');
20+
}
21+
22+
return {
23+
dailyVolume,
24+
dailyFees,
25+
}
26+
}
27+
28+
const adapter: SimpleAdapter = {
29+
version: 2,
30+
pullHourly: true,
31+
fetch,
32+
start: '2026-01-12',
33+
chains: [CHAIN.KATANA],
34+
skipBreakdownValidation: true,
35+
methodology: {
36+
Volume: 'Count trade size from TradeExecuted from exchange contract',
37+
Fees: 'Total fees paid by makers and takers',
38+
},
39+
breakdownMethodology: {
40+
Fees: {
41+
'Maker Fees': 'Fees paid by makers on trades',
42+
'Taker Fees': 'Fees paid by takers on trades',
43+
},
44+
}
45+
}
46+
47+
export default adapter;

factory/hyperliquid.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@ const hip3DexConfigs: Record<string, { dexId: string; start: string; methodology
464464
// "kinetiq-markets": { dexId: "km", start: "2025-12-16", methodologyName: "Kinetiq Markets" },
465465
"tradexyz": { dexId: "xyz", start: "2025-11-01", methodologyName: "Trade.xyz" },
466466
"ventuals": { dexId: "vntl", start: "2025-11-13", methodologyName: "Ventuals" },
467+
"paragon": { dexId: "para", start: "2026-04-01", methodologyName: "Paragon" },
467468
};
468469

469470
// HIP3 deployer OI configs: protocol name -> dexId
@@ -474,6 +475,7 @@ const hip3OiConfigs: Record<string, string> = {
474475
// "kinetiq-markets-oi": "km",
475476
"tradexyz-oi": "xyz",
476477
"ventuals-oi": "vntl",
478+
"paragon-oi": "para",
477479
};
478480

479481
function hip3Methodology(name: string) {

0 commit comments

Comments
 (0)