Skip to content
Draft
Show file tree
Hide file tree
Changes from 4 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 & {
dailyLiquidations?: FetchResponseValue
dailyLiquidatedDebt?: FetchResponseValue
Copy link
Contributor

Choose a reason for hiding this comment

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

personally, I would prefer dailyLiquidationRepaidDebt, because debt is repaid, not liquidated

};

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', 'dailyLiquidations', 'dailyLiquidatedDebt',
])
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)
Loading
Loading