@defisaver/positions-sdk 2.1.115 → 2.1.117

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,7 +20,7 @@ export interface AaveV4TokenizationSpokeData {
20
20
  }
21
21
  export declare const AAVE_V4_TOKENIZED_SPOKES: Record<string, EthAddress>;
22
22
  export declare const AAVE_V4_TOKENIZED_SPOKE_ADDRESSES: Partial<Record<NetworkNumber, EthAddress[]>>;
23
- export type AaveV4TokenizedHubKey = 'CORE' | 'PLUS' | 'PRIME';
23
+ export type AaveV4TokenizedHubKey = 'CORE' | 'PLUS' | 'PRIME' | 'PAXOS';
24
24
  export declare const aaveV4GetTokenizedHubKey: (hubNameOrKey?: string | null) => AaveV4TokenizedHubKey | null;
25
25
  export declare const aaveV4GetTokenizedVaultKey: (symbol: string, hubNameOrKey?: string | null) => string | null;
26
26
  export declare const aaveV4GetTokenizedVaultAddress: (network: NetworkNumber, symbol: string, hubNameOrKey?: string | null) => EthAddress | undefined;
@@ -34,6 +34,8 @@ exports.AAVE_V4_TOKENIZED_SPOKES = {
34
34
  GHO_PRIME: '0x900fD46d565d1ac8995928c0179052ec02a6D0E1',
35
35
  USDC_PRIME: '0x486415fb1F8b062c89ED548f871cf64304AACb31',
36
36
  USDT_PRIME: '0x46c588DD8453aC259c1f6a54b4C9A93C2aC3762D',
37
+ // USDC_PAXOS: '0x0',
38
+ // USDT_PAXOS: '0x0',
37
39
  };
38
40
  exports.AAVE_V4_TOKENIZED_SPOKE_ADDRESSES = {
39
41
  [common_1.NetworkNumber.Eth]: Object.values(exports.AAVE_V4_TOKENIZED_SPOKES),
@@ -48,12 +50,16 @@ const aaveV4GetTokenizedHubKey = (hubNameOrKey) => {
48
50
  return 'PLUS';
49
51
  if (normalized === 'PRIME' || normalized === 'PRIME HUB')
50
52
  return 'PRIME';
53
+ if (normalized === 'PAXOS' || normalized === 'PAXOS HUB')
54
+ return 'PAXOS';
51
55
  if (normalized.includes('CORE'))
52
56
  return 'CORE';
53
57
  if (normalized.includes('PLUS'))
54
58
  return 'PLUS';
55
59
  if (normalized.includes('PRIME'))
56
60
  return 'PRIME';
61
+ if (normalized.includes('PAXOS'))
62
+ return 'PAXOS';
57
63
  return null;
58
64
  };
59
65
  exports.aaveV4GetTokenizedHubKey = aaveV4GetTokenizedHubKey;
@@ -196,9 +196,7 @@ const REWARDS_QUERY = `
196
196
  marketId
197
197
  state {
198
198
  rewards {
199
- amountPerSuppliedToken
200
199
  supplyApr
201
- amountPerBorrowedToken
202
200
  borrowApr
203
201
  asset {
204
202
  address
@@ -2,10 +2,12 @@ import { AaveV4HubInfo, AaveV4HubsType, AaveV4SpokeInfo, AaveV4SpokesType, Netwo
2
2
  export declare const AAVE_V4_CORE_HUB: (networkId: NetworkNumber) => AaveV4HubInfo;
3
3
  export declare const AAVE_V4_PLUS_HUB: (networkId: NetworkNumber) => AaveV4HubInfo;
4
4
  export declare const AAVE_V4_PRIME_HUB: (networkId: NetworkNumber) => AaveV4HubInfo;
5
+ export declare const AAVE_V4_PAXOS_HUB: (networkId: NetworkNumber) => AaveV4HubInfo;
5
6
  export declare const AaveV4Hubs: (networkId: NetworkNumber) => {
6
7
  readonly aave_v4_core_hub: AaveV4HubInfo;
7
8
  readonly aave_v4_plus_hub: AaveV4HubInfo;
8
9
  readonly aave_v4_prime_hub: AaveV4HubInfo;
10
+ readonly aave_v4_paxos_hub: AaveV4HubInfo;
9
11
  };
10
12
  export declare const getAaveV4HubTypeInfo: (type: AaveV4HubsType, network?: NetworkNumber) => AaveV4HubInfo;
11
13
  export declare const getAaveV4HubByAddress: (networkId: NetworkNumber, address: string) => AaveV4HubInfo | undefined;
@@ -19,6 +21,7 @@ export declare const AAVE_V4_KELP_SPOKE: (networkId: NetworkNumber) => AaveV4Spo
19
21
  export declare const AAVE_V4_LIDO_SPOKE: (networkId: NetworkNumber) => AaveV4SpokeInfo;
20
22
  export declare const AAVE_V4_LOMBARD_BTC_SPOKE: (networkId: NetworkNumber) => AaveV4SpokeInfo;
21
23
  export declare const AAVE_V4_MAIN_SPOKE: (networkId: NetworkNumber) => AaveV4SpokeInfo;
24
+ export declare const AAVE_V4_USDG_PENDLE_SPOKE: (networkId: NetworkNumber) => AaveV4SpokeInfo;
22
25
  export declare const AaveV4Spokes: (networkId: NetworkNumber) => {
23
26
  readonly aave_v4_bluechip_spoke: AaveV4SpokeInfo;
24
27
  readonly aave_v4_ethena_correlated_spoke: AaveV4SpokeInfo;
@@ -30,6 +33,7 @@ export declare const AaveV4Spokes: (networkId: NetworkNumber) => {
30
33
  readonly aave_v4_lido_spoke: AaveV4SpokeInfo;
31
34
  readonly aave_v4_lombard_btc_spoke: AaveV4SpokeInfo;
32
35
  readonly aave_v4_main_spoke: AaveV4SpokeInfo;
36
+ readonly aave_v4_usdg_pendle_spoke: AaveV4SpokeInfo;
33
37
  };
34
38
  export declare const getAaveV4SpokeTypeInfo: (type: AaveV4SpokesType, network?: NetworkNumber) => AaveV4SpokeInfo;
35
39
  export declare const findAaveV4SpokeByAddress: (networkId: NetworkNumber, address: string) => AaveV4SpokeInfo | undefined;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.findAaveV4SpokeByAddress = exports.getAaveV4SpokeTypeInfo = exports.AaveV4Spokes = exports.AAVE_V4_MAIN_SPOKE = exports.AAVE_V4_LOMBARD_BTC_SPOKE = exports.AAVE_V4_LIDO_SPOKE = exports.AAVE_V4_KELP_SPOKE = exports.AAVE_V4_GOLD_SPOKE = exports.AAVE_V4_FOREX_SPOKE = exports.AAVE_V4_ETHERFI_SPOKE = exports.AAVE_V4_ETHENA_ECOSYSTEM_SPOKE = exports.AAVE_V4_ETHENA_CORRELATED_SPOKE = exports.AAVE_V4_BLUECHIP_SPOKE = exports.getAaveV4HubByAddress = exports.getAaveV4HubTypeInfo = exports.AaveV4Hubs = exports.AAVE_V4_PRIME_HUB = exports.AAVE_V4_PLUS_HUB = exports.AAVE_V4_CORE_HUB = void 0;
3
+ exports.findAaveV4SpokeByAddress = exports.getAaveV4SpokeTypeInfo = exports.AaveV4Spokes = exports.AAVE_V4_USDG_PENDLE_SPOKE = exports.AAVE_V4_MAIN_SPOKE = exports.AAVE_V4_LOMBARD_BTC_SPOKE = exports.AAVE_V4_LIDO_SPOKE = exports.AAVE_V4_KELP_SPOKE = exports.AAVE_V4_GOLD_SPOKE = exports.AAVE_V4_FOREX_SPOKE = exports.AAVE_V4_ETHERFI_SPOKE = exports.AAVE_V4_ETHENA_ECOSYSTEM_SPOKE = exports.AAVE_V4_ETHENA_CORRELATED_SPOKE = exports.AAVE_V4_BLUECHIP_SPOKE = exports.getAaveV4HubByAddress = exports.getAaveV4HubTypeInfo = exports.AaveV4Hubs = exports.AAVE_V4_PAXOS_HUB = exports.AAVE_V4_PRIME_HUB = exports.AAVE_V4_PLUS_HUB = exports.AAVE_V4_CORE_HUB = void 0;
4
4
  const types_1 = require("../../types");
5
5
  // HUBS
6
6
  const AAVE_V4_CORE_HUB = (networkId) => ({
@@ -24,10 +24,18 @@ const AAVE_V4_PRIME_HUB = (networkId) => ({
24
24
  address: '0x943827DCA022D0F354a8a8c332dA1e5Eb9f9F931',
25
25
  });
26
26
  exports.AAVE_V4_PRIME_HUB = AAVE_V4_PRIME_HUB;
27
+ const AAVE_V4_PAXOS_HUB = (networkId) => ({
28
+ chainIds: [types_1.NetworkNumber.Eth],
29
+ label: 'Paxos Hub',
30
+ value: types_1.AaveV4HubsType.AaveV4PaxosHub,
31
+ address: '0x62d63197660c080236193CA60b70E49A08E90368',
32
+ });
33
+ exports.AAVE_V4_PAXOS_HUB = AAVE_V4_PAXOS_HUB;
27
34
  const AaveV4Hubs = (networkId) => ({
28
35
  [types_1.AaveV4HubsType.AaveV4CoreHub]: (0, exports.AAVE_V4_CORE_HUB)(networkId),
29
36
  [types_1.AaveV4HubsType.AaveV4PlusHub]: (0, exports.AAVE_V4_PLUS_HUB)(networkId),
30
37
  [types_1.AaveV4HubsType.AaveV4PrimeHub]: (0, exports.AAVE_V4_PRIME_HUB)(networkId),
38
+ [types_1.AaveV4HubsType.AaveV4PaxosHub]: (0, exports.AAVE_V4_PAXOS_HUB)(networkId),
31
39
  });
32
40
  exports.AaveV4Hubs = AaveV4Hubs;
33
41
  const getAaveV4HubTypeInfo = (type, network) => (Object.assign({}, (0, exports.AaveV4Hubs)(network !== null && network !== void 0 ? network : types_1.NetworkNumber.Eth))[type]);
@@ -165,6 +173,18 @@ const AAVE_V4_MAIN_SPOKE = (networkId) => ({
165
173
  ],
166
174
  });
167
175
  exports.AAVE_V4_MAIN_SPOKE = AAVE_V4_MAIN_SPOKE;
176
+ const AAVE_V4_USDG_PENDLE_SPOKE = (networkId) => ({
177
+ chainIds: [types_1.NetworkNumber.Eth],
178
+ label: 'USDG Pendle',
179
+ value: types_1.AaveV4SpokesType.AaveV4USDGPendleSpoke,
180
+ url: 'usdg-pendle',
181
+ address: '0x956d8e0A89cfa3744428C4641b5a53B56167a7f9',
182
+ hubs: [
183
+ (0, exports.AAVE_V4_PAXOS_HUB)(types_1.NetworkNumber.Eth).address,
184
+ (0, exports.AAVE_V4_CORE_HUB)(types_1.NetworkNumber.Eth).address,
185
+ ],
186
+ });
187
+ exports.AAVE_V4_USDG_PENDLE_SPOKE = AAVE_V4_USDG_PENDLE_SPOKE;
168
188
  const AaveV4Spokes = (networkId) => ({
169
189
  [types_1.AaveV4SpokesType.AaveV4BluechipSpoke]: (0, exports.AAVE_V4_BLUECHIP_SPOKE)(networkId),
170
190
  [types_1.AaveV4SpokesType.AaveV4EthenaCorrelatedSpoke]: (0, exports.AAVE_V4_ETHENA_CORRELATED_SPOKE)(networkId),
@@ -176,6 +196,7 @@ const AaveV4Spokes = (networkId) => ({
176
196
  [types_1.AaveV4SpokesType.AaveV4LidoSpoke]: (0, exports.AAVE_V4_LIDO_SPOKE)(networkId),
177
197
  [types_1.AaveV4SpokesType.AaveV4LombardBtcSpoke]: (0, exports.AAVE_V4_LOMBARD_BTC_SPOKE)(networkId),
178
198
  [types_1.AaveV4SpokesType.AaveV4MainSpoke]: (0, exports.AAVE_V4_MAIN_SPOKE)(networkId),
199
+ [types_1.AaveV4SpokesType.AaveV4USDGPendleSpoke]: (0, exports.AAVE_V4_USDG_PENDLE_SPOKE)(networkId),
179
200
  });
180
201
  exports.AaveV4Spokes = AaveV4Spokes;
181
202
  const getAaveV4SpokeTypeInfo = (type, network) => (Object.assign({}, (0, exports.AaveV4Spokes)(network !== null && network !== void 0 ? network : types_1.NetworkNumber.Eth))[type]);
@@ -33,7 +33,7 @@ exports.STABLE_ASSETS = [
33
33
  'USDe', 'sUSDe', 'srUSDe', 'USDS', 'sUSDS', 'USR', 'EURC', 'BOLD', 'BOLD Legacy', 'RLUSD', 'PT sUSDe July', 'PT eUSDe May',
34
34
  'USDtb', 'eUSDe', 'PT USDe July', 'PT eUSDe Aug', 'PT sUSDe Sep', 'PT USDe Sep', 'PT sUSDe Nov', 'PT USDe Nov', 'PT sUSDe Jan', 'PT USDe Jan',
35
35
  'PT sUSDe Feb', 'PT USDe Feb', 'PT sUSDe Apr', 'PT USDe Apr', 'PT sUSDe May', 'PT USDe May', 'PT srUSDe Apr', 'frxUSD', 'PT sUSDe June',
36
- 'PT USDe June', 'PT srUSDe Jun', 'PT srUSDe Oct', 'PT USDG May', 'PT sUSDS Nov', 'PT sUSDe Oct',
36
+ 'PT USDe June', 'PT srUSDe Jun', 'PT srUSDe Oct', 'PT USDG May', 'PT sUSDS Nov', 'PT sUSDe Oct', 'PT USDG Sep',
37
37
  ];
38
38
  const isLeveragedPos = (usedAssets, dustLimit = 5) => {
39
39
  let borrowUnstable = 0;
@@ -73,7 +73,7 @@ exports.STAKING_ASSETS = [
73
73
  'ezETH', 'ETHx', 'rsETH', 'pufETH', 'wrsETH', 'wsuperOETHb', 'sUSDS', 'tETH', 'PT sUSDe Sep', 'PT USDe Sep',
74
74
  'PT sUSDe Nov', 'PT USDe Nov', 'PT USDe Jan', 'PT sUSDe Jan', 'wrsETH', 'wstETH', 'syrupUSDT', 'syrupUSDC', 'wstUSR',
75
75
  'PT sUSDe Feb', 'PT USDe Feb', 'PT sUSDe Apr', 'PT USDe Apr', 'PT sUSDe May', 'PT USDe May', 'PT srUSDe Apr', 'GHO',
76
- 'PT sUSDe June', 'PT USDe June', 'PT srUSDe Jun', 'PT srUSDe Oct', 'PT USDG May', 'PT sUSDS Nov', 'PT sUSDe Oct',
76
+ 'PT sUSDe June', 'PT USDe June', 'PT srUSDe Jun', 'PT srUSDe Oct', 'PT USDG May', 'PT sUSDS Nov', 'PT sUSDe Oct', 'PT USDG Sep',
77
77
  ];
78
78
  exports.getStakingApy = (0, memoizee_1.default)((asset_1, ...args_1) => __awaiter(void 0, [asset_1, ...args_1], void 0, function* (asset, network = common_1.NetworkNumber.Eth) {
79
79
  try {
@@ -159,6 +159,8 @@ exports.getStakingApy = (0, memoizee_1.default)((asset_1, ...args_1) => __awaite
159
159
  return yield getApyFromDfsApi('PT USDe June', network);
160
160
  if (asset === 'PT USDG May')
161
161
  return yield getApyFromDfsApi('PT USDG May', network);
162
+ if (asset === 'PT USDG Sep')
163
+ return yield getApyFromDfsApi('PT USDG Sep', network);
162
164
  if (asset === 'PT sUSDS Nov')
163
165
  return yield getApyFromDfsApi('PT sUSDS Nov', network);
164
166
  if (asset === 'GHO')
@@ -2,7 +2,8 @@ import { EthAddress, IncentiveData, LeverageType, NetworkNumber } from './common
2
2
  export declare enum AaveV4HubsType {
3
3
  AaveV4CoreHub = "aave_v4_core_hub",
4
4
  AaveV4PlusHub = "aave_v4_plus_hub",
5
- AaveV4PrimeHub = "aave_v4_prime_hub"
5
+ AaveV4PrimeHub = "aave_v4_prime_hub",
6
+ AaveV4PaxosHub = "aave_v4_paxos_hub"
6
7
  }
7
8
  export declare enum AaveV4SpokesType {
8
9
  AaveV4BluechipSpoke = "aave_v4_bluechip_spoke",
@@ -14,7 +15,8 @@ export declare enum AaveV4SpokesType {
14
15
  AaveV4KelpSpoke = "aave_v4_kelp_spoke",
15
16
  AaveV4LidoSpoke = "aave_v4_lido_spoke",
16
17
  AaveV4LombardBtcSpoke = "aave_v4_lombard_btc_spoke",
17
- AaveV4MainSpoke = "aave_v4_main_spoke"
18
+ AaveV4MainSpoke = "aave_v4_main_spoke",
19
+ AaveV4USDGPendleSpoke = "aave_v4_usdg_pendle_spoke"
18
20
  }
19
21
  export interface AaveV4HubInfo {
20
22
  chainIds: NetworkNumber[];
@@ -6,6 +6,7 @@ var AaveV4HubsType;
6
6
  AaveV4HubsType["AaveV4CoreHub"] = "aave_v4_core_hub";
7
7
  AaveV4HubsType["AaveV4PlusHub"] = "aave_v4_plus_hub";
8
8
  AaveV4HubsType["AaveV4PrimeHub"] = "aave_v4_prime_hub";
9
+ AaveV4HubsType["AaveV4PaxosHub"] = "aave_v4_paxos_hub";
9
10
  })(AaveV4HubsType || (exports.AaveV4HubsType = AaveV4HubsType = {}));
10
11
  var AaveV4SpokesType;
11
12
  (function (AaveV4SpokesType) {
@@ -19,4 +20,5 @@ var AaveV4SpokesType;
19
20
  AaveV4SpokesType["AaveV4LidoSpoke"] = "aave_v4_lido_spoke";
20
21
  AaveV4SpokesType["AaveV4LombardBtcSpoke"] = "aave_v4_lombard_btc_spoke";
21
22
  AaveV4SpokesType["AaveV4MainSpoke"] = "aave_v4_main_spoke";
23
+ AaveV4SpokesType["AaveV4USDGPendleSpoke"] = "aave_v4_usdg_pendle_spoke";
22
24
  })(AaveV4SpokesType || (exports.AaveV4SpokesType = AaveV4SpokesType = {}));
@@ -20,7 +20,7 @@ export interface AaveV4TokenizationSpokeData {
20
20
  }
21
21
  export declare const AAVE_V4_TOKENIZED_SPOKES: Record<string, EthAddress>;
22
22
  export declare const AAVE_V4_TOKENIZED_SPOKE_ADDRESSES: Partial<Record<NetworkNumber, EthAddress[]>>;
23
- export type AaveV4TokenizedHubKey = 'CORE' | 'PLUS' | 'PRIME';
23
+ export type AaveV4TokenizedHubKey = 'CORE' | 'PLUS' | 'PRIME' | 'PAXOS';
24
24
  export declare const aaveV4GetTokenizedHubKey: (hubNameOrKey?: string | null) => AaveV4TokenizedHubKey | null;
25
25
  export declare const aaveV4GetTokenizedVaultKey: (symbol: string, hubNameOrKey?: string | null) => string | null;
26
26
  export declare const aaveV4GetTokenizedVaultAddress: (network: NetworkNumber, symbol: string, hubNameOrKey?: string | null) => EthAddress | undefined;
@@ -30,6 +30,8 @@ export const AAVE_V4_TOKENIZED_SPOKES = {
30
30
  GHO_PRIME: '0x900fD46d565d1ac8995928c0179052ec02a6D0E1',
31
31
  USDC_PRIME: '0x486415fb1F8b062c89ED548f871cf64304AACb31',
32
32
  USDT_PRIME: '0x46c588DD8453aC259c1f6a54b4C9A93C2aC3762D',
33
+ // USDC_PAXOS: '0x0',
34
+ // USDT_PAXOS: '0x0',
33
35
  };
34
36
  export const AAVE_V4_TOKENIZED_SPOKE_ADDRESSES = {
35
37
  [NetworkNumber.Eth]: Object.values(AAVE_V4_TOKENIZED_SPOKES),
@@ -44,12 +46,16 @@ export const aaveV4GetTokenizedHubKey = (hubNameOrKey) => {
44
46
  return 'PLUS';
45
47
  if (normalized === 'PRIME' || normalized === 'PRIME HUB')
46
48
  return 'PRIME';
49
+ if (normalized === 'PAXOS' || normalized === 'PAXOS HUB')
50
+ return 'PAXOS';
47
51
  if (normalized.includes('CORE'))
48
52
  return 'CORE';
49
53
  if (normalized.includes('PLUS'))
50
54
  return 'PLUS';
51
55
  if (normalized.includes('PRIME'))
52
56
  return 'PRIME';
57
+ if (normalized.includes('PAXOS'))
58
+ return 'PAXOS';
53
59
  return null;
54
60
  };
55
61
  export const aaveV4GetTokenizedVaultKey = (symbol, hubNameOrKey) => {
@@ -186,9 +186,7 @@ const REWARDS_QUERY = `
186
186
  marketId
187
187
  state {
188
188
  rewards {
189
- amountPerSuppliedToken
190
189
  supplyApr
191
- amountPerBorrowedToken
192
190
  borrowApr
193
191
  asset {
194
192
  address
@@ -2,10 +2,12 @@ import { AaveV4HubInfo, AaveV4HubsType, AaveV4SpokeInfo, AaveV4SpokesType, Netwo
2
2
  export declare const AAVE_V4_CORE_HUB: (networkId: NetworkNumber) => AaveV4HubInfo;
3
3
  export declare const AAVE_V4_PLUS_HUB: (networkId: NetworkNumber) => AaveV4HubInfo;
4
4
  export declare const AAVE_V4_PRIME_HUB: (networkId: NetworkNumber) => AaveV4HubInfo;
5
+ export declare const AAVE_V4_PAXOS_HUB: (networkId: NetworkNumber) => AaveV4HubInfo;
5
6
  export declare const AaveV4Hubs: (networkId: NetworkNumber) => {
6
7
  readonly aave_v4_core_hub: AaveV4HubInfo;
7
8
  readonly aave_v4_plus_hub: AaveV4HubInfo;
8
9
  readonly aave_v4_prime_hub: AaveV4HubInfo;
10
+ readonly aave_v4_paxos_hub: AaveV4HubInfo;
9
11
  };
10
12
  export declare const getAaveV4HubTypeInfo: (type: AaveV4HubsType, network?: NetworkNumber) => AaveV4HubInfo;
11
13
  export declare const getAaveV4HubByAddress: (networkId: NetworkNumber, address: string) => AaveV4HubInfo | undefined;
@@ -19,6 +21,7 @@ export declare const AAVE_V4_KELP_SPOKE: (networkId: NetworkNumber) => AaveV4Spo
19
21
  export declare const AAVE_V4_LIDO_SPOKE: (networkId: NetworkNumber) => AaveV4SpokeInfo;
20
22
  export declare const AAVE_V4_LOMBARD_BTC_SPOKE: (networkId: NetworkNumber) => AaveV4SpokeInfo;
21
23
  export declare const AAVE_V4_MAIN_SPOKE: (networkId: NetworkNumber) => AaveV4SpokeInfo;
24
+ export declare const AAVE_V4_USDG_PENDLE_SPOKE: (networkId: NetworkNumber) => AaveV4SpokeInfo;
22
25
  export declare const AaveV4Spokes: (networkId: NetworkNumber) => {
23
26
  readonly aave_v4_bluechip_spoke: AaveV4SpokeInfo;
24
27
  readonly aave_v4_ethena_correlated_spoke: AaveV4SpokeInfo;
@@ -30,6 +33,7 @@ export declare const AaveV4Spokes: (networkId: NetworkNumber) => {
30
33
  readonly aave_v4_lido_spoke: AaveV4SpokeInfo;
31
34
  readonly aave_v4_lombard_btc_spoke: AaveV4SpokeInfo;
32
35
  readonly aave_v4_main_spoke: AaveV4SpokeInfo;
36
+ readonly aave_v4_usdg_pendle_spoke: AaveV4SpokeInfo;
33
37
  };
34
38
  export declare const getAaveV4SpokeTypeInfo: (type: AaveV4SpokesType, network?: NetworkNumber) => AaveV4SpokeInfo;
35
39
  export declare const findAaveV4SpokeByAddress: (networkId: NetworkNumber, address: string) => AaveV4SpokeInfo | undefined;
@@ -18,10 +18,17 @@ export const AAVE_V4_PRIME_HUB = (networkId) => ({
18
18
  value: AaveV4HubsType.AaveV4PrimeHub,
19
19
  address: '0x943827DCA022D0F354a8a8c332dA1e5Eb9f9F931',
20
20
  });
21
+ export const AAVE_V4_PAXOS_HUB = (networkId) => ({
22
+ chainIds: [NetworkNumber.Eth],
23
+ label: 'Paxos Hub',
24
+ value: AaveV4HubsType.AaveV4PaxosHub,
25
+ address: '0x62d63197660c080236193CA60b70E49A08E90368',
26
+ });
21
27
  export const AaveV4Hubs = (networkId) => ({
22
28
  [AaveV4HubsType.AaveV4CoreHub]: AAVE_V4_CORE_HUB(networkId),
23
29
  [AaveV4HubsType.AaveV4PlusHub]: AAVE_V4_PLUS_HUB(networkId),
24
30
  [AaveV4HubsType.AaveV4PrimeHub]: AAVE_V4_PRIME_HUB(networkId),
31
+ [AaveV4HubsType.AaveV4PaxosHub]: AAVE_V4_PAXOS_HUB(networkId),
25
32
  });
26
33
  export const getAaveV4HubTypeInfo = (type, network) => (Object.assign({}, AaveV4Hubs(network !== null && network !== void 0 ? network : NetworkNumber.Eth))[type]);
27
34
  export const getAaveV4HubByAddress = (networkId, address) => Object.values(AaveV4Hubs(networkId)).find(hub => hub.address.toLowerCase() === address.toLowerCase());
@@ -146,6 +153,17 @@ export const AAVE_V4_MAIN_SPOKE = (networkId) => ({
146
153
  AAVE_V4_PRIME_HUB(NetworkNumber.Eth).address,
147
154
  ],
148
155
  });
156
+ export const AAVE_V4_USDG_PENDLE_SPOKE = (networkId) => ({
157
+ chainIds: [NetworkNumber.Eth],
158
+ label: 'USDG Pendle',
159
+ value: AaveV4SpokesType.AaveV4USDGPendleSpoke,
160
+ url: 'usdg-pendle',
161
+ address: '0x956d8e0A89cfa3744428C4641b5a53B56167a7f9',
162
+ hubs: [
163
+ AAVE_V4_PAXOS_HUB(NetworkNumber.Eth).address,
164
+ AAVE_V4_CORE_HUB(NetworkNumber.Eth).address,
165
+ ],
166
+ });
149
167
  export const AaveV4Spokes = (networkId) => ({
150
168
  [AaveV4SpokesType.AaveV4BluechipSpoke]: AAVE_V4_BLUECHIP_SPOKE(networkId),
151
169
  [AaveV4SpokesType.AaveV4EthenaCorrelatedSpoke]: AAVE_V4_ETHENA_CORRELATED_SPOKE(networkId),
@@ -157,6 +175,7 @@ export const AaveV4Spokes = (networkId) => ({
157
175
  [AaveV4SpokesType.AaveV4LidoSpoke]: AAVE_V4_LIDO_SPOKE(networkId),
158
176
  [AaveV4SpokesType.AaveV4LombardBtcSpoke]: AAVE_V4_LOMBARD_BTC_SPOKE(networkId),
159
177
  [AaveV4SpokesType.AaveV4MainSpoke]: AAVE_V4_MAIN_SPOKE(networkId),
178
+ [AaveV4SpokesType.AaveV4USDGPendleSpoke]: AAVE_V4_USDG_PENDLE_SPOKE(networkId),
160
179
  });
161
180
  export const getAaveV4SpokeTypeInfo = (type, network) => (Object.assign({}, AaveV4Spokes(network !== null && network !== void 0 ? network : NetworkNumber.Eth))[type]);
162
181
  export const findAaveV4SpokeByAddress = (networkId, address) => Object.values(AaveV4Spokes(networkId)).find(spoke => spoke.address.toLowerCase() === address.toLowerCase());
@@ -22,7 +22,7 @@ export const STABLE_ASSETS = [
22
22
  'USDe', 'sUSDe', 'srUSDe', 'USDS', 'sUSDS', 'USR', 'EURC', 'BOLD', 'BOLD Legacy', 'RLUSD', 'PT sUSDe July', 'PT eUSDe May',
23
23
  'USDtb', 'eUSDe', 'PT USDe July', 'PT eUSDe Aug', 'PT sUSDe Sep', 'PT USDe Sep', 'PT sUSDe Nov', 'PT USDe Nov', 'PT sUSDe Jan', 'PT USDe Jan',
24
24
  'PT sUSDe Feb', 'PT USDe Feb', 'PT sUSDe Apr', 'PT USDe Apr', 'PT sUSDe May', 'PT USDe May', 'PT srUSDe Apr', 'frxUSD', 'PT sUSDe June',
25
- 'PT USDe June', 'PT srUSDe Jun', 'PT srUSDe Oct', 'PT USDG May', 'PT sUSDS Nov', 'PT sUSDe Oct',
25
+ 'PT USDe June', 'PT srUSDe Jun', 'PT srUSDe Oct', 'PT USDG May', 'PT sUSDS Nov', 'PT sUSDe Oct', 'PT USDG Sep',
26
26
  ];
27
27
  export const isLeveragedPos = (usedAssets, dustLimit = 5) => {
28
28
  let borrowUnstable = 0;
@@ -67,7 +67,7 @@ export const STAKING_ASSETS = [
67
67
  'ezETH', 'ETHx', 'rsETH', 'pufETH', 'wrsETH', 'wsuperOETHb', 'sUSDS', 'tETH', 'PT sUSDe Sep', 'PT USDe Sep',
68
68
  'PT sUSDe Nov', 'PT USDe Nov', 'PT USDe Jan', 'PT sUSDe Jan', 'wrsETH', 'wstETH', 'syrupUSDT', 'syrupUSDC', 'wstUSR',
69
69
  'PT sUSDe Feb', 'PT USDe Feb', 'PT sUSDe Apr', 'PT USDe Apr', 'PT sUSDe May', 'PT USDe May', 'PT srUSDe Apr', 'GHO',
70
- 'PT sUSDe June', 'PT USDe June', 'PT srUSDe Jun', 'PT srUSDe Oct', 'PT USDG May', 'PT sUSDS Nov', 'PT sUSDe Oct',
70
+ 'PT sUSDe June', 'PT USDe June', 'PT srUSDe Jun', 'PT srUSDe Oct', 'PT USDG May', 'PT sUSDS Nov', 'PT sUSDe Oct', 'PT USDG Sep',
71
71
  ];
72
72
  export const getStakingApy = memoize((asset_1, ...args_1) => __awaiter(void 0, [asset_1, ...args_1], void 0, function* (asset, network = NetworkNumber.Eth) {
73
73
  try {
@@ -153,6 +153,8 @@ export const getStakingApy = memoize((asset_1, ...args_1) => __awaiter(void 0, [
153
153
  return yield getApyFromDfsApi('PT USDe June', network);
154
154
  if (asset === 'PT USDG May')
155
155
  return yield getApyFromDfsApi('PT USDG May', network);
156
+ if (asset === 'PT USDG Sep')
157
+ return yield getApyFromDfsApi('PT USDG Sep', network);
156
158
  if (asset === 'PT sUSDS Nov')
157
159
  return yield getApyFromDfsApi('PT sUSDS Nov', network);
158
160
  if (asset === 'GHO')
@@ -2,7 +2,8 @@ import { EthAddress, IncentiveData, LeverageType, NetworkNumber } from './common
2
2
  export declare enum AaveV4HubsType {
3
3
  AaveV4CoreHub = "aave_v4_core_hub",
4
4
  AaveV4PlusHub = "aave_v4_plus_hub",
5
- AaveV4PrimeHub = "aave_v4_prime_hub"
5
+ AaveV4PrimeHub = "aave_v4_prime_hub",
6
+ AaveV4PaxosHub = "aave_v4_paxos_hub"
6
7
  }
7
8
  export declare enum AaveV4SpokesType {
8
9
  AaveV4BluechipSpoke = "aave_v4_bluechip_spoke",
@@ -14,7 +15,8 @@ export declare enum AaveV4SpokesType {
14
15
  AaveV4KelpSpoke = "aave_v4_kelp_spoke",
15
16
  AaveV4LidoSpoke = "aave_v4_lido_spoke",
16
17
  AaveV4LombardBtcSpoke = "aave_v4_lombard_btc_spoke",
17
- AaveV4MainSpoke = "aave_v4_main_spoke"
18
+ AaveV4MainSpoke = "aave_v4_main_spoke",
19
+ AaveV4USDGPendleSpoke = "aave_v4_usdg_pendle_spoke"
18
20
  }
19
21
  export interface AaveV4HubInfo {
20
22
  chainIds: NetworkNumber[];
@@ -3,6 +3,7 @@ export var AaveV4HubsType;
3
3
  AaveV4HubsType["AaveV4CoreHub"] = "aave_v4_core_hub";
4
4
  AaveV4HubsType["AaveV4PlusHub"] = "aave_v4_plus_hub";
5
5
  AaveV4HubsType["AaveV4PrimeHub"] = "aave_v4_prime_hub";
6
+ AaveV4HubsType["AaveV4PaxosHub"] = "aave_v4_paxos_hub";
6
7
  })(AaveV4HubsType || (AaveV4HubsType = {}));
7
8
  export var AaveV4SpokesType;
8
9
  (function (AaveV4SpokesType) {
@@ -16,4 +17,5 @@ export var AaveV4SpokesType;
16
17
  AaveV4SpokesType["AaveV4LidoSpoke"] = "aave_v4_lido_spoke";
17
18
  AaveV4SpokesType["AaveV4LombardBtcSpoke"] = "aave_v4_lombard_btc_spoke";
18
19
  AaveV4SpokesType["AaveV4MainSpoke"] = "aave_v4_main_spoke";
20
+ AaveV4SpokesType["AaveV4USDGPendleSpoke"] = "aave_v4_usdg_pendle_spoke";
19
21
  })(AaveV4SpokesType || (AaveV4SpokesType = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defisaver/positions-sdk",
3
- "version": "2.1.115",
3
+ "version": "2.1.117",
4
4
  "description": "",
5
5
  "main": "./cjs/index.js",
6
6
  "module": "./esm/index.js",
@@ -21,7 +21,7 @@
21
21
  "author": "",
22
22
  "license": "ISC",
23
23
  "dependencies": {
24
- "@defisaver/tokens": "1.7.38-pt-oct-1-dev",
24
+ "@defisaver/tokens": "^1.7.39",
25
25
  "@types/lodash": "^4.17.15",
26
26
  "@types/memoizee": "^0.4.12",
27
27
  "decimal.js": "^10.6.0",
@@ -48,13 +48,16 @@ export const AAVE_V4_TOKENIZED_SPOKES: Record<string, EthAddress> = {
48
48
  GHO_PRIME: '0x900fD46d565d1ac8995928c0179052ec02a6D0E1',
49
49
  USDC_PRIME: '0x486415fb1F8b062c89ED548f871cf64304AACb31',
50
50
  USDT_PRIME: '0x46c588DD8453aC259c1f6a54b4C9A93C2aC3762D',
51
+
52
+ // USDC_PAXOS: '0x0',
53
+ // USDT_PAXOS: '0x0',
51
54
  };
52
55
 
53
56
  export const AAVE_V4_TOKENIZED_SPOKE_ADDRESSES: Partial<Record<NetworkNumber, EthAddress[]>> = {
54
57
  [NetworkNumber.Eth]: Object.values(AAVE_V4_TOKENIZED_SPOKES),
55
58
  };
56
59
 
57
- export type AaveV4TokenizedHubKey = 'CORE' | 'PLUS' | 'PRIME';
60
+ export type AaveV4TokenizedHubKey = 'CORE' | 'PLUS' | 'PRIME' | 'PAXOS';
58
61
 
59
62
  export const aaveV4GetTokenizedHubKey = (hubNameOrKey?: string | null): AaveV4TokenizedHubKey | null => {
60
63
  if (!hubNameOrKey) return null;
@@ -63,10 +66,12 @@ export const aaveV4GetTokenizedHubKey = (hubNameOrKey?: string | null): AaveV4To
63
66
  if (normalized === 'CORE' || normalized === 'CORE HUB') return 'CORE';
64
67
  if (normalized === 'PLUS' || normalized === 'PLUS HUB') return 'PLUS';
65
68
  if (normalized === 'PRIME' || normalized === 'PRIME HUB') return 'PRIME';
69
+ if (normalized === 'PAXOS' || normalized === 'PAXOS HUB') return 'PAXOS';
66
70
 
67
71
  if (normalized.includes('CORE')) return 'CORE';
68
72
  if (normalized.includes('PLUS')) return 'PLUS';
69
73
  if (normalized.includes('PRIME')) return 'PRIME';
74
+ if (normalized.includes('PAXOS')) return 'PAXOS';
70
75
 
71
76
  return null;
72
77
  };
@@ -206,9 +206,7 @@ const REWARDS_QUERY = `
206
206
  marketId
207
207
  state {
208
208
  rewards {
209
- amountPerSuppliedToken
210
209
  supplyApr
211
- amountPerBorrowedToken
212
210
  borrowApr
213
211
  asset {
214
212
  address
@@ -29,10 +29,18 @@ export const AAVE_V4_PRIME_HUB = (networkId: NetworkNumber): AaveV4HubInfo => ({
29
29
  address: '0x943827DCA022D0F354a8a8c332dA1e5Eb9f9F931',
30
30
  });
31
31
 
32
+ export const AAVE_V4_PAXOS_HUB = (networkId: NetworkNumber): AaveV4HubInfo => ({
33
+ chainIds: [NetworkNumber.Eth],
34
+ label: 'Paxos Hub',
35
+ value: AaveV4HubsType.AaveV4PaxosHub,
36
+ address: '0x62d63197660c080236193CA60b70E49A08E90368',
37
+ });
38
+
32
39
  export const AaveV4Hubs = (networkId: NetworkNumber) => ({
33
40
  [AaveV4HubsType.AaveV4CoreHub]: AAVE_V4_CORE_HUB(networkId),
34
41
  [AaveV4HubsType.AaveV4PlusHub]: AAVE_V4_PLUS_HUB(networkId),
35
42
  [AaveV4HubsType.AaveV4PrimeHub]: AAVE_V4_PRIME_HUB(networkId),
43
+ [AaveV4HubsType.AaveV4PaxosHub]: AAVE_V4_PAXOS_HUB(networkId),
36
44
  }) as const;
37
45
 
38
46
  export const getAaveV4HubTypeInfo = (type: AaveV4HubsType, network?: NetworkNumber) => ({ ...AaveV4Hubs(network ?? NetworkNumber.Eth) }[type]);
@@ -173,6 +181,18 @@ export const AAVE_V4_MAIN_SPOKE = (networkId: NetworkNumber): AaveV4SpokeInfo =>
173
181
  ],
174
182
  });
175
183
 
184
+ export const AAVE_V4_USDG_PENDLE_SPOKE = (networkId: NetworkNumber): AaveV4SpokeInfo => ({
185
+ chainIds: [NetworkNumber.Eth],
186
+ label: 'USDG Pendle',
187
+ value: AaveV4SpokesType.AaveV4USDGPendleSpoke,
188
+ url: 'usdg-pendle',
189
+ address: '0x956d8e0A89cfa3744428C4641b5a53B56167a7f9',
190
+ hubs: [
191
+ AAVE_V4_PAXOS_HUB(NetworkNumber.Eth).address,
192
+ AAVE_V4_CORE_HUB(NetworkNumber.Eth).address,
193
+ ],
194
+ });
195
+
176
196
  export const AaveV4Spokes = (networkId: NetworkNumber) => ({
177
197
  [AaveV4SpokesType.AaveV4BluechipSpoke]: AAVE_V4_BLUECHIP_SPOKE(networkId),
178
198
  [AaveV4SpokesType.AaveV4EthenaCorrelatedSpoke]: AAVE_V4_ETHENA_CORRELATED_SPOKE(networkId),
@@ -184,6 +204,7 @@ export const AaveV4Spokes = (networkId: NetworkNumber) => ({
184
204
  [AaveV4SpokesType.AaveV4LidoSpoke]: AAVE_V4_LIDO_SPOKE(networkId),
185
205
  [AaveV4SpokesType.AaveV4LombardBtcSpoke]: AAVE_V4_LOMBARD_BTC_SPOKE(networkId),
186
206
  [AaveV4SpokesType.AaveV4MainSpoke]: AAVE_V4_MAIN_SPOKE(networkId),
207
+ [AaveV4SpokesType.AaveV4USDGPendleSpoke]: AAVE_V4_USDG_PENDLE_SPOKE(networkId),
187
208
  }) as const;
188
209
 
189
210
  export const getAaveV4SpokeTypeInfo = (type: AaveV4SpokesType, network?: NetworkNumber) => ({ ...AaveV4Spokes(network ?? NetworkNumber.Eth) }[type]);
@@ -25,7 +25,7 @@ export const STABLE_ASSETS = [
25
25
  'USDe', 'sUSDe', 'srUSDe', 'USDS', 'sUSDS', 'USR', 'EURC', 'BOLD', 'BOLD Legacy', 'RLUSD', 'PT sUSDe July', 'PT eUSDe May',
26
26
  'USDtb', 'eUSDe', 'PT USDe July', 'PT eUSDe Aug', 'PT sUSDe Sep', 'PT USDe Sep', 'PT sUSDe Nov', 'PT USDe Nov', 'PT sUSDe Jan', 'PT USDe Jan',
27
27
  'PT sUSDe Feb', 'PT USDe Feb', 'PT sUSDe Apr', 'PT USDe Apr', 'PT sUSDe May', 'PT USDe May', 'PT srUSDe Apr', 'frxUSD', 'PT sUSDe June',
28
- 'PT USDe June', 'PT srUSDe Jun', 'PT srUSDe Oct', 'PT USDG May', 'PT sUSDS Nov', 'PT sUSDe Oct',
28
+ 'PT USDe June', 'PT srUSDe Jun', 'PT srUSDe Oct', 'PT USDG May', 'PT sUSDS Nov', 'PT sUSDe Oct', 'PT USDG Sep',
29
29
  ];
30
30
 
31
31
  export const isLeveragedPos = (usedAssets: MMUsedAssets, dustLimit = 5) => {
@@ -65,7 +65,7 @@ export const STAKING_ASSETS = [
65
65
  'ezETH', 'ETHx', 'rsETH', 'pufETH', 'wrsETH', 'wsuperOETHb', 'sUSDS', 'tETH', 'PT sUSDe Sep', 'PT USDe Sep',
66
66
  'PT sUSDe Nov', 'PT USDe Nov', 'PT USDe Jan', 'PT sUSDe Jan', 'wrsETH', 'wstETH', 'syrupUSDT', 'syrupUSDC', 'wstUSR',
67
67
  'PT sUSDe Feb', 'PT USDe Feb', 'PT sUSDe Apr', 'PT USDe Apr', 'PT sUSDe May', 'PT USDe May', 'PT srUSDe Apr', 'GHO',
68
- 'PT sUSDe June', 'PT USDe June', 'PT srUSDe Jun', 'PT srUSDe Oct', 'PT USDG May', 'PT sUSDS Nov', 'PT sUSDe Oct',
68
+ 'PT sUSDe June', 'PT USDe June', 'PT srUSDe Jun', 'PT srUSDe Oct', 'PT USDG May', 'PT sUSDS Nov', 'PT sUSDe Oct', 'PT USDG Sep',
69
69
  ];
70
70
 
71
71
  export const getStakingApy = memoize(async (asset: string, network: number = NetworkNumber.Eth) => {
@@ -111,6 +111,7 @@ export const getStakingApy = memoize(async (asset: string, network: number = Net
111
111
  if (asset === 'PT sUSDe Oct') return await getApyFromDfsApi('PT sUSDe Oct', network);
112
112
  if (asset === 'PT USDe June') return await getApyFromDfsApi('PT USDe June', network);
113
113
  if (asset === 'PT USDG May') return await getApyFromDfsApi('PT USDG May', network);
114
+ if (asset === 'PT USDG Sep') return await getApyFromDfsApi('PT USDG Sep', network);
114
115
  if (asset === 'PT sUSDS Nov') return await getApyFromDfsApi('PT sUSDS Nov', network);
115
116
  if (asset === 'GHO') return await getApyFromDfsApi('GHO', network);
116
117
  } catch (e) {
@@ -6,6 +6,7 @@ export enum AaveV4HubsType {
6
6
  AaveV4CoreHub = 'aave_v4_core_hub',
7
7
  AaveV4PlusHub = 'aave_v4_plus_hub',
8
8
  AaveV4PrimeHub = 'aave_v4_prime_hub',
9
+ AaveV4PaxosHub = 'aave_v4_paxos_hub',
9
10
  }
10
11
 
11
12
  export enum AaveV4SpokesType {
@@ -19,6 +20,7 @@ export enum AaveV4SpokesType {
19
20
  AaveV4LidoSpoke = 'aave_v4_lido_spoke',
20
21
  AaveV4LombardBtcSpoke = 'aave_v4_lombard_btc_spoke',
21
22
  AaveV4MainSpoke = 'aave_v4_main_spoke',
23
+ AaveV4USDGPendleSpoke = 'aave_v4_usdg_pendle_spoke',
22
24
  }
23
25
 
24
26
  export interface AaveV4HubInfo {