Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions adapters/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@ export type FetchResultOptions = FetchResultBase & {
openInterestAtEnd?: FetchResponseValue
};

// LIQUIDATIONS
export type FetchResultLiquidations = FetchResultBase & {
dailyCollateralLiquidated?: FetchResponseValue
dailyLiquidationVolume?: FetchResponseValue
};

export enum AdapterType {
FEES = 'fees',
Expand All @@ -211,9 +216,10 @@ export enum AdapterType {
// NFT_VOLUME = 'nft-volume', // not used anywhere?
ACTIVE_USERS = 'active-users',
NEW_USERS = 'new-users',
LIQUIDATIONS = 'liquidations',
}

export type FetchResult = FetchResultVolume & FetchResultFees & FetchResultAggregators & FetchResultOptions & FetchResultIncentives & FetchResultActiveUsers & FetchResultNewUsers
export type FetchResult = FetchResultVolume & FetchResultFees & FetchResultAggregators & FetchResultOptions & FetchResultIncentives & FetchResultActiveUsers & FetchResultNewUsers & FetchResultLiquidations

export const whitelistedDimensionKeys = new Set([
'startTimestamp', 'chain', 'timestamp', 'block',
Expand All @@ -222,7 +228,7 @@ export const whitelistedDimensionKeys = new Set([
'totalFees', 'dailyFees', 'dailyUserFees', 'dailyRevenue', 'dailyProtocolRevenue', 'dailyHoldersRevenue', 'dailySupplySideRevenue', 'dailyBribesRevenue', 'dailyTokenTaxes',
'tokenIncentives',
'dailyOtherIncome', 'dailyOperatingIncome', 'dailyNetIncome',, 'dailyPremiumVolume', 'dailyNotionalVolume',
'dailyActiveUsers', 'dailyNewUsers', 'dailyTransactionsCount', 'dailyGasUsed',
'dailyActiveUsers', 'dailyNewUsers', 'dailyTransactionsCount', 'dailyGasUsed', 'dailyCollateralLiquidated', 'dailyLiquidationVolume',
])
export const accumulativeKeySet = new Set([
'totalVolume', 'totalBridgeVolume', 'tokenIncentives', 'totalPremiumVolume', 'totalNotionalVolume',
Expand All @@ -235,4 +241,4 @@ export interface IJSON<T> {
[key: string]: T
}

export const ADAPTER_TYPES = Object.values(AdapterType).filter((adapterType: any) => adapterType !== AdapterType.PROTOCOLS)
export const ADAPTER_TYPES = Object.values(AdapterType).filter((adapterType: any) => adapterType !== AdapterType.PROTOCOLS)
58 changes: 58 additions & 0 deletions factory/aaveLiquidations.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import { aaveProtocolConfigs } from "../helpers/aave";
import { aaveLiquidationsExport } from "../helpers/aave/liquidations";
import { chainConfig as aaveV3ChainConfig } from "../fees/aave-v3";
import { chainConfig as sparkChainConfig } from "../fees/spark";
import { createFactoryExports } from "./registry";

type LiquidationConfig = Record<string, { pools: string[]; start?: string }>;

// create liquidation configs from aave fee configs so new protocols added to fee tracking are picked up
function toLiquidationConfig(
feeConfig: Record<string, { start?: any; pools: Array<{ lendingPoolProxy: string; version: number; ignoreLiquidation?: boolean }> }>,
): LiquidationConfig | null {
const result: LiquidationConfig = {};
for (const [chain, { pools, start }] of Object.entries(feeConfig)) {
// V1 uses a different LiquidationCall event (skips for now)
const addresses = pools
.filter((p) => !p.ignoreLiquidation && p.version >= 2)
.map((p) => p.lendingPoolProxy);
if (addresses.length > 0) {
result[chain] = { pools: addresses, start: start ? String(start) : undefined };
}
}
return Object.keys(result).length > 0 ? result : null;
}

// get configs from helpers/aave fee configs
const configs: Record<string, LiquidationConfig> = {};
for (const [name, { config }] of Object.entries(aaveProtocolConfigs)) {
const liquidationConfig = toLiquidationConfig(config as any);
if (liquidationConfig) {
configs[name] = liquidationConfig;
}
}

// get aave-v3 fee config
configs["aave-v3"] = {};
for (const [chain, { pools, start }] of Object.entries(aaveV3ChainConfig)) {
configs["aave-v3"][chain] = {
pools: (pools as Array<{ lendingPoolProxy: string }>).map((p) => p.lendingPoolProxy),
start,
};
}

// get spark fee config
configs["spark"] = {};
for (const [chain, { pools, start }] of Object.entries(sparkChainConfig)) {
configs["spark"][chain] = {
pools: pools.map((p) => p.lendingPoolProxy),
start,
};
}
Comment on lines +35 to +51
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Consider consolidating aave-v3 and spark into aaveProtocolConfigs.

These chain configs are handled separately from aaveProtocolConfigs. If they could be added to the centralized config in helpers/aave, future additions would automatically be picked up for both fees and liquidations.

Would you like me to investigate whether aave-v3 and spark can be integrated into aaveProtocolConfigs?

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@factory/aaveLiquidations.ts` around lines 35 - 51, Replace the separate
handling of aaveV3ChainConfig and sparkChainConfig by using the centralized
aaveProtocolConfigs from helpers/aave: import aaveProtocolConfigs, iterate its
entries and for each protocol key (e.g. "aave-v3", "spark") assign
configs[protocol] = { pools: pools.map(p => p.lendingPoolProxy), start }
(preserving the existing shape), and remove the duplicate loops over
aaveV3ChainConfig and sparkChainConfig; keep behavior identical for pool
extraction and start propagation to ensure backward compatibility.


const protocols: Record<string, any> = {};
for (const [name, config] of Object.entries(configs)) {
protocols[name] = aaveLiquidationsExport(config);
}

export const { protocolList, getAdapter } = createFactoryExports(protocols);
111 changes: 86 additions & 25 deletions factory/compoundV2.ts
Original file line number Diff line number Diff line change
@@ -1,89 +1,150 @@
import { compoundV2Export } from "../helpers/compoundV2";
import { compoundV2Export, compoundV2LiquidationsExport } from "../helpers/compoundV2";
import { CHAIN } from "../helpers/chains";
import { createFactoryExports } from "./registry";

type ChainConfig = {
comptroller: string;
start?: string;
};

type Config = {
comptrollers: Record<string, string>;
chains: Record<string, ChainConfig>;
options?: Record<string, any>;
};

const feesConfigs: Record<string, Config> = {
const configs: Record<string, Config> = {
"benqi-lending": {
comptrollers: { [CHAIN.AVAX]: "0x486Af39519B4Dc9a7fCcd318217352830E8AD9b4" },
chains: { [CHAIN.AVAX]: { comptroller: "0x486Af39519B4Dc9a7fCcd318217352830E8AD9b4", start: '2021-08-18' } },
options: { holdersRevenueRatio: 0, protocolRevenueRatio: 1 },
},
"canto-lending": {
comptrollers: { [CHAIN.CANTO]: "0x5E23dC409Fc2F832f83CEc191E245A191a4bCc5C" },
chains: { [CHAIN.CANTO]: { comptroller: "0x5E23dC409Fc2F832f83CEc191E245A191a4bCc5C", start: '2022-08-18' } },
options: { protocolRevenueRatio: 1 },
},
"capyfi": {
comptrollers: { [CHAIN.ETHEREUM]: "0x0b9af1fd73885aD52680A1aeAa7A3f17AC702afA", [CHAIN.WC]: "0x589d63300976759a0fc74ea6fA7D951f581252D7" },
chains: {
[CHAIN.ETHEREUM]: { comptroller: "0x0b9af1fd73885aD52680A1aeAa7A3f17AC702afA", start: '2025-05-20' },
[CHAIN.WC]: { comptroller: "0x589d63300976759a0fc74ea6fA7D951f581252D7", start: '2025-07-23' },
},
options: { protocolRevenueRatio: 1, blacklists: ["0xbaa6bc4e24686d710b9318b49b0bb16ec7c46bfa"] },
},
"deepr-finance": {
comptrollers: { [CHAIN.SHIMMER_EVM]: "0xF7E452A8685D57083Edf4e4CC8064EcDcF71D7B7", [CHAIN.IOTAEVM]: "0xee07121d97FDEA35675e02017837a7a43aeDa48F" },
chains: {
[CHAIN.SHIMMER_EVM]: { comptroller: "0xF7E452A8685D57083Edf4e4CC8064EcDcF71D7B7", start: '2024-01-09' },
[CHAIN.IOTAEVM]: { comptroller: "0xee07121d97FDEA35675e02017837a7a43aeDa48F", start: '2024-08-22' },
},
options: { holdersRevenueRatio: 1 },
},
"elara": {
comptrollers: { [CHAIN.ZIRCUIT]: "0x695aCEf58D1a10Cf13CBb4bbB2dfB7eDDd89B296" },
chains: { [CHAIN.ZIRCUIT]: { comptroller: "0x695aCEf58D1a10Cf13CBb4bbB2dfB7eDDd89B296", start: '2024-11-20' } },
options: { protocolRevenueRatio: 1 },
},
"fluxfinance": {
comptrollers: { [CHAIN.ETHEREUM]: "0x95Af143a021DF745bc78e845b54591C53a8B3A51" },
chains: { [CHAIN.ETHEREUM]: { comptroller: "0x95Af143a021DF745bc78e845b54591C53a8B3A51", start: '2023-02-02' } },
options: { protocolRevenueRatio: 1 },
},
"hover": {
comptrollers: { [CHAIN.KAVA]: "0x3A4Ec955a18eF6eB33025599505E7d404a4d59eC" },
chains: { [CHAIN.KAVA]: { comptroller: "0x3A4Ec955a18eF6eB33025599505E7d404a4d59eC", start: '2023-11-24' } },
},
"machfi": {
comptrollers: { [CHAIN.SONIC]: "0x646F91AbD5Ab94B76d1F9C5D9490A2f6DDf25730" },
chains: { [CHAIN.SONIC]: { comptroller: "0x646F91AbD5Ab94B76d1F9C5D9490A2f6DDf25730", start: '2025-01-01' } },
options: { protocolRevenueRatio: 1 },
},
"mendi-finance": {
comptrollers: { [CHAIN.LINEA]: "0x1b4d3b0421dDc1eB216D230Bc01527422Fb93103" },
chains: { [CHAIN.LINEA]: { comptroller: "0x1b4d3b0421dDc1eB216D230Bc01527422Fb93103", start: '2023-08-18' } },
options: { holdersRevenueRatio: 1, protocolRevenueRatio: 0 },
},
"morpho-compound": {
comptrollers: { [CHAIN.ETHEREUM]: "0x930f1b46e1d081ec1524efd95752be3ece51ef67" },
chains: { [CHAIN.ETHEREUM]: { comptroller: "0x930f1b46e1d081ec1524efd95752be3ece51ef67", start: '2023-07-01' } },
},
"qie-lend": {
comptrollers: { [CHAIN.QIEV3]: "0x69a31E3D361C69B37463aa67Ef93067dC760fBD4"},
chains: { [CHAIN.QIEV3]: { comptroller: "0x69a31E3D361C69B37463aa67Ef93067dC760fBD4" } },
},
"strike": {
comptrollers: { [CHAIN.ETHEREUM]: "0xe2e17b2CBbf48211FA7eB8A875360e5e39bA2602" },
chains: { [CHAIN.ETHEREUM]: { comptroller: "0xe2e17b2CBbf48211FA7eB8A875360e5e39bA2602", start: '2021-03-30' } },
options: { useExchangeRate: true, blacklists: ["0xc13fdf3af7ec87dca256d9c11ff96405d360f522", "0x1ebfd36223079dc79fefc62260db9e25f3f5e2c7"], protocolRevenueRatio: 1 },
},
"sumer": {
comptrollers: { [CHAIN.METER]: "0xcB4cdDA50C1B6B0E33F544c98420722093B7Aa88", [CHAIN.BASE]: "0x611375907733D9576907E125Fb29704712F0BAfA", [CHAIN.ARBITRUM]: "0xBfb69860C91A22A2287df1Ff3Cdf0476c5aab24A", [CHAIN.ETHEREUM]: "0x60A4570bE892fb41280eDFE9DB75e1a62C70456F", [CHAIN.ZKLINK]: "0xe6099D924efEf37845867D45E3362731EaF8A98D", [CHAIN.BSQUARED]: "0xdD9C863197df28f47721107f94eb031b548B5e48", [CHAIN.CORE]: "0x7f5a7aE2688A7ba6a9B36141335044c058a08b3E", [CHAIN.BSC]: "0x15B5220024c3242F7D61177D6ff715cfac4909eD", [CHAIN.BERACHAIN]: "0x16C7d1F9EA48F7DE5E8bc3165A04E8340Da574fA", [CHAIN.HEMI]: "0xB2fF02eEF85DC4eaE95Ab32AA887E0cC69DF8d8E" },
chains: {
[CHAIN.METER]: { comptroller: "0xcB4cdDA50C1B6B0E33F544c98420722093B7Aa88", start: '2023-11-13' },
[CHAIN.BASE]: { comptroller: "0x611375907733D9576907E125Fb29704712F0BAfA", start: '2024-01-09' },
[CHAIN.ARBITRUM]: { comptroller: "0xBfb69860C91A22A2287df1Ff3Cdf0476c5aab24A", start: '2023-12-04' },
[CHAIN.ETHEREUM]: { comptroller: "0x60A4570bE892fb41280eDFE9DB75e1a62C70456F", start: '2024-07-07' },
[CHAIN.ZKLINK]: { comptroller: "0xe6099D924efEf37845867D45E3362731EaF8A98D", start: '2024-08-12' },
[CHAIN.BSQUARED]: { comptroller: "0xdD9C863197df28f47721107f94eb031b548B5e48", start: '2024-10-18' },
[CHAIN.CORE]: { comptroller: "0x7f5a7aE2688A7ba6a9B36141335044c058a08b3E", start: '2024-12-13' },
[CHAIN.BSC]: { comptroller: "0x15B5220024c3242F7D61177D6ff715cfac4909eD", start: '2024-08-31' },
[CHAIN.BERACHAIN]: { comptroller: "0x16C7d1F9EA48F7DE5E8bc3165A04E8340Da574fA", start: '2025-02-08' },
[CHAIN.HEMI]: { comptroller: "0xB2fF02eEF85DC4eaE95Ab32AA887E0cC69DF8d8E", start: '2025-03-06' },
},
options: { protocolRevenueratio: 1 },
},
Comment on lines +78 to 81
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Typo in options key: protocolRevenueratio should be protocolRevenueRatio.

This typo may cause the option to be silently ignored.

🐛 Fix typo
     },
-    options: { protocolRevenueratio: 1 },
+    options: { protocolRevenueRatio: 1 },
   },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
[CHAIN.HEMI]: { comptroller: "0xB2fF02eEF85DC4eaE95Ab32AA887E0cC69DF8d8E", start: '2025-03-06' },
},
options: { protocolRevenueratio: 1 },
},
[CHAIN.HEMI]: { comptroller: "0xB2fF02eEF85DC4eaE95Ab32AA887E0cC69DF8d8E", start: '2025-03-06' },
},
options: { protocolRevenueRatio: 1 },
},
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@factory/compoundV2.ts` around lines 78 - 81, The options object in
factory/compoundV2.ts contains a typo: change the key
options.protocolRevenueratio to options.protocolRevenueRatio; update the object
literal where options: { protocolRevenueratio: 1 } to use the correct camelCase
key and search for any other occurrences of the misspelled symbol
(protocolRevenueratio) in the codebase to rename them to protocolRevenueRatio so
callers reading options or defaulting logic in the CompoundV2 factory use the
correct property name.

"takara-lend": {
comptrollers: { [CHAIN.SEI]: "0x71034bf5eC0FAd7aEE81a213403c8892F3d8CAeE" },
chains: { [CHAIN.SEI]: { comptroller: "0x71034bf5eC0FAd7aEE81a213403c8892F3d8CAeE", start: '2025-02-13' } },
options: { useExchangeRate: true, protocolRevenueRatio: 1 },
},
"traderjoe-lend": {
comptrollers: { [CHAIN.AVAX]: "0xdc13687554205E5b89Ac783db14bb5bba4A1eDaC" },
chains: { [CHAIN.AVAX]: { comptroller: "0xdc13687554205E5b89Ac783db14bb5bba4A1eDaC", start: '2021-10-11' } },
options: { protocolRevenueRatio: 1 },
},
"venus-finance": {
comptrollers: { [CHAIN.BSC]: "0xfD36E2c2a6789Db23113685031d7F16329158384", [CHAIN.ETHEREUM]: "0x687a01ecF6d3907658f7A7c714749fAC32336D1B", [CHAIN.OP_BNB]: "0xd6e3e2a1d8d95cae355d15b3b9f8e5c2511874dd", [CHAIN.ARBITRUM]: "0x317c1A5739F39046E20b08ac9BeEa3f10fD43326", [CHAIN.ERA]: "0xddE4D098D9995B659724ae6d5E3FB9681Ac941B1", [CHAIN.BASE]: "0x0C7973F9598AA62f9e03B94E92C967fD5437426C", [CHAIN.OPTIMISM]: "0x5593FF68bE84C966821eEf5F0a988C285D5B7CeC", [CHAIN.UNICHAIN]: "0xe22af1e6b78318e1Fe1053Edbd7209b8Fc62c4Fe" },
chains: {
[CHAIN.BSC]: { comptroller: "0xfD36E2c2a6789Db23113685031d7F16329158384", start: '2020-11-23' },
[CHAIN.ETHEREUM]: { comptroller: "0x687a01ecF6d3907658f7A7c714749fAC32336D1B", start: '2024-01-10' },
[CHAIN.OP_BNB]: { comptroller: "0xd6e3e2a1d8d95cae355d15b3b9f8e5c2511874dd", start: '2024-02-16' },
[CHAIN.ARBITRUM]: { comptroller: "0x317c1A5739F39046E20b08ac9BeEa3f10fD43326", start: '2024-05-30' },
[CHAIN.ERA]: { comptroller: "0xddE4D098D9995B659724ae6d5E3FB9681Ac941B1", start: '2024-09-06' },
[CHAIN.BASE]: { comptroller: "0x0C7973F9598AA62f9e03B94E92C967fD5437426C", start: '2024-12-07' },
[CHAIN.OPTIMISM]: { comptroller: "0x5593FF68bE84C966821eEf5F0a988C285D5B7CeC", start: '2024-10-01' },
[CHAIN.UNICHAIN]: { comptroller: "0xe22af1e6b78318e1Fe1053Edbd7209b8Fc62c4Fe", start: '2025-02-08' },
},
options: { protocolRevenueRatio: 0.6, holdersRevenueRatio: 0.4 },
},
"mare-finance-v2": {
comptrollers: { [CHAIN.KAVA]: "0xFcD7D41D5cfF03C7f6D573c9732B0506C72f5C72" },
chains: { [CHAIN.KAVA]: { comptroller: "0xFcD7D41D5cfF03C7f6D573c9732B0506C72f5C72", start: '2023-07-13' } },
},
"quantus": {
comptrollers: {
[CHAIN.MONAD]: '0xFc57bF0733e5e65d8549fc2922919Cfb97e62D5f',
[CHAIN.MEGAETH]: '0x1F1416EbbeAb7a13fC5B6111A1E77696Be600413',
chains: {
[CHAIN.MONAD]: { comptroller: '0xFc57bF0733e5e65d8549fc2922919Cfb97e62D5f', start: '2025-11-26' },
[CHAIN.MEGAETH]: { comptroller: '0x1F1416EbbeAb7a13fC5B6111A1E77696Be600413', start: '2026-02-08' },
},
},
};


const feesProtocols: Record<string, any> = {};
for (const [name, { comptrollers, options }] of Object.entries(feesConfigs)) {
for (const [name, { chains, options }] of Object.entries(configs)) {
const comptrollers: Record<string, string> = {};
for (const [chain, { comptroller }] of Object.entries(chains)) {
comptrollers[chain] = comptroller;
}
feesProtocols[name] = compoundV2Export(comptrollers, options);
}


export const { protocolList, getAdapter } = createFactoryExports(feesProtocols);

// Liquidations
type LiquidationConfig = Record<string, { comptroller: string; start?: string }>;

const liquidationConfigs: Record<string, LiquidationConfig> = {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as aave, can keep only the missing protocols here

"compound-v2": {
ethereum: { comptroller: '0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B', start: '2019-05-07' },
},
};

for (const [name, { chains }] of Object.entries(configs)) {
const config: LiquidationConfig = {};
for (const [chain, { comptroller, start }] of Object.entries(chains)) {
config[chain] = { comptroller, start };
}
if (Object.keys(config).length > 0) {
liquidationConfigs[name] = config;
}
}

const liquidationProtocols: Record<string, any> = {};
for (const [name, config] of Object.entries(liquidationConfigs)) {
liquidationProtocols[name] = compoundV2LiquidationsExport(config);
}

export const liquidations = createFactoryExports(liquidationProtocols);
13 changes: 10 additions & 3 deletions factory/gmxV1.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { gmxV1Exports } from "../helpers/gmx";
import { gmxV1Exports, gmxV1LiquidationsExports } from "../helpers/gmx";
import { CHAIN } from "../helpers/chains";
import { createFactoryExports } from "./registry";

Expand All @@ -11,7 +11,7 @@ const ktxMethodology = {
ProtocolRevenue: "Treasury has no revenue",
};

const feesConfigs: Record<string, any> = {
export const gmxV1Configs: Record<string, any> = {
"alpacafinance-gmx": {
[CHAIN.BSC]: { vault: "0x18A15bF2Aa1E514dc660Cc4B08d05f9f6f0FdC4e", start: "2023-03-03" },
},
Expand Down Expand Up @@ -42,9 +42,16 @@ const feesConfigs: Record<string, any> = {


const feesProtocols: Record<string, any> = {};
for (const [name, config] of Object.entries(feesConfigs)) {
for (const [name, config] of Object.entries(gmxV1Configs)) {
feesProtocols[name] = gmxV1Exports(config);
}


export const { protocolList, getAdapter } = createFactoryExports(feesProtocols);

const liquidationProtocols: Record<string, any> = {};
for (const [name, config] of Object.entries(gmxV1Configs)) {
liquidationProtocols[name] = gmxV1LiquidationsExports(config);
}

export const liquidations = createFactoryExports(liquidationProtocols);
7 changes: 6 additions & 1 deletion factory/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,12 @@ const factoriesByAdapterType: { [adapterType: string]: string[] } = {
],
'new-users': [
'users/list:newUsers',
]
],
'liquidations': [
'aaveLiquidations',
'compoundV2:liquidations',
'gmxV1:liquidations',
],
};

/**
Expand Down
4 changes: 2 additions & 2 deletions fees/aave-v3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import ADDRESSES from '../helpers/coreAssets.json'
import { addTokensReceived } from '../helpers/token'
import { METRIC } from '../helpers/metrics'

const AaveMarkets: {[key: string]: Array<AaveLendingPoolConfig>} = {
export const AaveMarkets: {[key: string]: Array<AaveLendingPoolConfig>} = {
[CHAIN.ETHEREUM]: [
// core market
{
Expand Down Expand Up @@ -223,7 +223,7 @@ const breakdownMethodology = {

const AaveBuyBackTreasury = '0x22740deBa78d5a0c24C58C740e3715ec29de1bFa';
const VeloraAugustusV6 = '0x6a000f20005980200259b80c5102003040001068';
const chainConfig: Record<string, any> = {
export const chainConfig: Record<string, any> = {
[CHAIN.ETHEREUM]: {
pools: AaveMarkets[CHAIN.ETHEREUM],
treasuryCollector: '0x464C71f6c2F760DdA6093dCB91C24c39e5d6e18c',
Expand Down
2 changes: 1 addition & 1 deletion fees/compound-v3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const CometAbis: any = {
getBorrowRate: 'function getBorrowRate(uint256 utilization) view returns (uint256 borrowRate)',
}

const CometAddresses: {[key: string]: Array<string>} = {
export const CometAddresses: {[key: string]: Array<string>} = {
[CHAIN.ETHEREUM]: [
'0xc3d688b66703497daa19211eedff47f25384cdc3',
'0xA17581A9E3356d9A858b789D68B4d866e593aE94',
Expand Down
8 changes: 7 additions & 1 deletion fees/morpho/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,40 @@ interface MorphoBlueConfig {
fromBlock?: number;
}

const MorphoBlues: Record<string, MorphoBlueConfig> = {
export const MorphoBlues: Record<string, MorphoBlueConfig> = {
[CHAIN.ETHEREUM]: {
chainId: 1,
fromBlock: 18883124,
blue: "0xbbbbbbbbbb9cc5e90e3b3af64bdaf62c37eeffcb",
start: "2024-01-02",
},
[CHAIN.BASE]: {
chainId: 8453,
fromBlock: 13977148,
blue: "0xbbbbbbbbbb9cc5e90e3b3af64bdaf62c37eeffcb",
start: "2024-05-03",
},
[CHAIN.POLYGON]: {
chainId: 137,
fromBlock: 66931042,
blue: "0x1bF0c2541F820E775182832f06c0B7Fc27A25f67",
start: "2025-01-20",
},
[CHAIN.UNICHAIN]: {
chainId: 130,
fromBlock: 9139027,
blue: "0x8f5ae9cddb9f68de460c77730b018ae7e04a140a",
start: "2025-02-18",
},
[CHAIN.KATANA]: {
chainId: 747474,
fromBlock: 2741069,
blue: "0xD50F2DffFd62f94Ee4AEd9ca05C61d0753268aBc",
start: "2025-07-01",
},
[CHAIN.ARBITRUM]: {
chainId: 42161,
fromBlock: 296446593,
blue: "0x6c247b1F6182318877311737BaC0844bAa518F5e",
start: "2025-01-18",
},
Expand Down
Loading