@sonarwatch/portfolio-plugins 0.12.156 → 0.12.158

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. package/CHANGELOG.md +1426 -1418
  2. package/README.md +3 -3
  3. package/package.json +1 -1
  4. package/src/index.js +4 -0
  5. package/src/index.js.map +1 -1
  6. package/src/plugins/balancer/helpers/pools.js +21 -21
  7. package/src/plugins/kamino/constants.d.ts +1 -0
  8. package/src/plugins/kamino/constants.js +2 -1
  9. package/src/plugins/kamino/constants.js.map +1 -1
  10. package/src/plugins/kamino/lendsFetcher.js +20 -5
  11. package/src/plugins/kamino/lendsFetcher.js.map +1 -1
  12. package/src/plugins/kamino/marketsJob.js +7 -0
  13. package/src/plugins/kamino/marketsJob.js.map +1 -1
  14. package/src/plugins/meteora/dlmmPositionsFetcher.js +4 -5
  15. package/src/plugins/meteora/dlmmPositionsFetcher.js.map +1 -1
  16. package/src/plugins/raydium/getRaydiumCLMMPositions.js +66 -19
  17. package/src/plugins/raydium/getRaydiumCLMMPositions.js.map +1 -1
  18. package/src/plugins/raydium/helpers.d.ts +4 -0
  19. package/src/plugins/raydium/helpers.js +142 -1
  20. package/src/plugins/raydium/helpers.js.map +1 -1
  21. package/src/plugins/raydium/structs/clmms.d.ts +23 -2
  22. package/src/plugins/raydium/structs/clmms.js +21 -2
  23. package/src/plugins/raydium/structs/clmms.js.map +1 -1
  24. package/src/plugins/raydium/types.d.ts +125 -0
  25. package/src/plugins/raydium/types.js.map +1 -1
  26. package/src/plugins/sushiswap/helpers.js +24 -24
  27. package/src/plugins/tradeport/constants.d.ts +5 -0
  28. package/src/plugins/tradeport/constants.js +15 -0
  29. package/src/plugins/tradeport/constants.js.map +1 -0
  30. package/src/plugins/tradeport/helpers.d.ts +2 -0
  31. package/src/plugins/tradeport/helpers.js +24 -0
  32. package/src/plugins/tradeport/helpers.js.map +1 -0
  33. package/src/plugins/tradeport/index.d.ts +6 -0
  34. package/src/plugins/tradeport/index.js +13 -0
  35. package/src/plugins/tradeport/index.js.map +1 -0
  36. package/src/plugins/tradeport/locksJob.d.ts +3 -0
  37. package/src/plugins/tradeport/locksJob.js +32 -0
  38. package/src/plugins/tradeport/locksJob.js.map +1 -0
  39. package/src/plugins/tradeport/positionsFetcher.d.ts +3 -0
  40. package/src/plugins/tradeport/positionsFetcher.js +76 -0
  41. package/src/plugins/tradeport/positionsFetcher.js.map +1 -0
  42. package/src/plugins/tradeport/types.d.ts +28 -0
  43. package/src/plugins/tradeport/types.js +3 -0
  44. package/src/plugins/tradeport/types.js.map +1 -0
  45. package/src/plugins/uniswap-v2/helpers.js +22 -22
  46. package/src/plugins/zeta/airdropFetcher.js +14 -14
  47. package/src/utils/misc/toBN.d.ts +1 -1
  48. package/src/utils/misc/toBN.js +4 -1
  49. package/src/utils/misc/toBN.js.map +1 -1
  50. package/src/utils/sei/constants.js +8 -8
  51. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # @sonarwatch/portfolio-plugins
2
-
3
- This library is @sonarwatch/portfolio-plugins
1
+ # @sonarwatch/portfolio-plugins
2
+
3
+ This library is @sonarwatch/portfolio-plugins
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-plugins",
3
- "version": "0.12.156",
3
+ "version": "0.12.158",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "peerDependencies": {
package/src/index.js CHANGED
@@ -137,6 +137,7 @@ const suins_1 = require("./plugins/suins");
137
137
  const debridge_1 = require("./plugins/debridge");
138
138
  const alphafi_1 = require("./plugins/alphafi");
139
139
  const jewel_1 = require("./plugins/jewel");
140
+ const tradeport_1 = require("./plugins/tradeport");
140
141
  var constants_1 = require("./plugins/tokens/constants");
141
142
  Object.defineProperty(exports, "walletTokensPlatform", { enumerable: true, get: function () { return constants_1.walletTokensPlatform; } });
142
143
  Object.defineProperty(exports, "walletNftsPlatform", { enumerable: true, get: function () { return constants_1.walletNftsPlatform; } });
@@ -267,6 +268,7 @@ exports.platforms = [
267
268
  ...debridge_1.platforms,
268
269
  ...alphafi_1.platforms,
269
270
  ...jewel_1.platforms,
271
+ ...tradeport_1.platforms,
270
272
  ];
271
273
  // JOBS //
272
274
  exports.jobs = [
@@ -380,6 +382,7 @@ exports.jobs = [
380
382
  ...debridge_1.jobs,
381
383
  ...alphafi_1.jobs,
382
384
  ...jewel_1.jobs,
385
+ ...tradeport_1.jobs,
383
386
  ];
384
387
  // FETCHERS //
385
388
  exports.fetchers = [
@@ -495,6 +498,7 @@ exports.fetchers = [
495
498
  ...debridge_1.fetchers,
496
499
  ...alphafi_1.fetchers,
497
500
  ...jewel_1.fetchers,
501
+ ...tradeport_1.fetchers,
498
502
  ];
499
503
  exports.fetchersByAddressSystem = (0, getFetchersByAddressSystem_1.getFetchersByAddressSystem)(exports.fetchers);
500
504
  exports.airdropFetchers = [
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,wFAAqF;AACrF,wEAAgD;AAChD,6CAI0B;AAC1B,yDAIgC;AAChC,uDAAgE;AAChE,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,yCAIwB;AACxB,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,6CAG0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,2DAGiC;AACjC,6CAI0B;AAC1B,2CAKyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D,qEAIsC;AACtC,uDAI+B;AAC/B,mDAI6B;AAC7B,qDAG8B;AAC9B,uDAG+B;AAC/B,2CAIyB;AACzB,6CAK0B;AAC1B,6CAG0B;AAC1B,yCAIwB;AACxB,+CAI2B;AAC3B,uDAG+B;AAC/B,yCAGwB;AACxB,2CAIyB;AACzB,iDA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IACjB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,iBAAc;IACjB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,uBAAoB;IACvB,GAAG,mBAAgB;IACnB,GAAG,iBAAc;IACjB,GAAG,mBAAgB;IACnB,GAAG,kBAAe;IAClB,GAAG,iBAAc;IACjB,GAAG,iBAAc;IACjB,GAAG,kBAAe;IAClB,GAAG,oBAAiB;IACpB,GAAG,8BAA2B;IAC9B,GAAG,oBAAiB;IACpB,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,iBAAc;IACjB,GAAG,mBAAgB;IACnB,GAAG,mBAAgB;IACnB,GAAG,gBAAa;IAChB,GAAG,mBAAgB;IACnB,GAAG,kBAAe;IAClB,GAAG,gBAAa;CACjB,CAAC;AACW,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,CAAC,CAAC;AAE/D,QAAA,eAAe,GAAqB;IAC/C,GAAG,yBAAsB;IACzB,GAAG,wBAAqB;IACxB,GAAG,yBAAsB;IACzB,sBAAmB;IACnB,sBAAmB;IACnB,yBAAsB;IACtB,sBAAmB;IACnB,GAAG,0BAAuB;CAC3B,CAAC;AACW,QAAA,8BAA8B,GACzC,IAAA,uDAA0B,EAAC,uBAAe,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,wFAAqF;AACrF,wEAAgD;AAChD,6CAI0B;AAC1B,yDAIgC;AAChC,uDAAgE;AAChE,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,yCAIwB;AACxB,+CAI2B;AAC3B,yCAIwB;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sB;IACzB,GAAG,wBAAqB;IACxB,GAAG,yBAAsB;IACzB,sBAAmB;IACnB,sBAAmB;IACnB,yBAAsB;IACtB,sBAAmB;IACnB,GAAG,0BAAuB;CAC3B,CAAC;AACW,QAAA,8BAA8B,GACzC,IAAA,uDAA0B,EAAC,uBAAe,CAAC,CAAC"}
@@ -36,27 +36,27 @@ exports.getBalancerPoolsV2 = void 0;
36
36
  const graphql_request_1 = __importStar(require("graphql-request"));
37
37
  function getBalancerPoolsV2(url) {
38
38
  return __awaiter(this, void 0, void 0, function* () {
39
- const query = (0, graphql_request_1.gql) `
40
- query pools {
41
- pools(
42
- first: 1000
43
- orderBy: totalLiquidity
44
- orderDirection: desc
45
- where: { totalLiquidity_gt: "500" }
46
- ) {
47
- id
48
- address
49
- symbol
50
- totalLiquidity
51
- totalShares
52
- tokens {
53
- balance
54
- decimals
55
- symbol
56
- address
57
- }
58
- }
59
- }
39
+ const query = (0, graphql_request_1.gql) `
40
+ query pools {
41
+ pools(
42
+ first: 1000
43
+ orderBy: totalLiquidity
44
+ orderDirection: desc
45
+ where: { totalLiquidity_gt: "500" }
46
+ ) {
47
+ id
48
+ address
49
+ symbol
50
+ totalLiquidity
51
+ totalShares
52
+ tokens {
53
+ balance
54
+ decimals
55
+ symbol
56
+ address
57
+ }
58
+ }
59
+ }
60
60
  `;
61
61
  const res = yield (0, graphql_request_1.default)(url, query);
62
62
  const pools = res.pools;
@@ -11,6 +11,7 @@ export declare const allocationApiUrl = "https://api.hubbleprotocol.io/v2/airdro
11
11
  export declare const klendProgramId: PublicKey;
12
12
  export declare const farmProgramId: PublicKey;
13
13
  export declare const farmsKey = "farms";
14
+ export declare const elevationGroupsKey = "elevatorGroups";
14
15
  export declare const mainMarket = "7u3HeHxYDLhnCoErrtycNokbQYbWGzLs6JSDqGAv5PfF";
15
16
  export declare const lendingConfigs: Map<string, LendingMarketConfig>;
16
17
  export declare const marketsKey = "markets";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.airdropStaticsS2 = exports.airdropStaticsS1 = exports.reservesKey = exports.marketsKey = exports.lendingConfigs = exports.mainMarket = exports.farmsKey = exports.farmProgramId = exports.klendProgramId = exports.allocationApiUrl = exports.programId = exports.kmnoDecimals = exports.kmnoMint = exports.platform = exports.platformId = void 0;
3
+ exports.airdropStaticsS2 = exports.airdropStaticsS1 = exports.reservesKey = exports.marketsKey = exports.lendingConfigs = exports.mainMarket = exports.elevationGroupsKey = exports.farmsKey = exports.farmProgramId = exports.klendProgramId = exports.allocationApiUrl = exports.programId = exports.kmnoDecimals = exports.kmnoMint = exports.platform = exports.platformId = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
5
  exports.platformId = 'kamino';
6
6
  exports.platform = {
@@ -17,6 +17,7 @@ exports.allocationApiUrl = 'https://api.hubbleprotocol.io/v2/airdrop/users/';
17
17
  exports.klendProgramId = new web3_js_1.PublicKey('KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD');
18
18
  exports.farmProgramId = new web3_js_1.PublicKey('FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr');
19
19
  exports.farmsKey = 'farms';
20
+ exports.elevationGroupsKey = 'elevatorGroups';
20
21
  exports.mainMarket = '7u3HeHxYDLhnCoErrtycNokbQYbWGzLs6JSDqGAv5PfF';
21
22
  exports.lendingConfigs = new Map([
22
23
  [
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAK/B,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,qCAAqC,kBAAU,OAAO;IAC7D,OAAO,EAAE,yBAAyB;IAClC,WAAW,EAAE,uBAAuB;CACrC,CAAC;AAEW,Q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C;aACF;SACF;KACF;IACD,CAAC,8CAA8C,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;IAC7E,CAAC,8CAA8C,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;CAC5E,CAAC,CAAC;AAEU,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,WAAW,GAAG,UAAU,CAAC;AACzB,QAAA,gBAAgB,GAAmB;IAC9C,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,aAAa;IACvB,EAAE,EAAE,WAAW;IACf,WAAW,EAAE,QAAQ;IACrB,WAAW,EAAE,6BAA6B;IAC1C,SAAS,EAAE,oCAAoC;IAC/C,KAAK,EAAE,+CAA+C;IACtD,IAAI,EAAE,IAAI;CACX,CAAC;AACW,QAAA,gBAAgB,GAAmB;IAC9C,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,SAAS;IACnB,EAAE,EAAE,WAAW;IACf,WAAW,EAAE,QAAQ;IACrB,WAAW,EAAE,6BAA6B;IAC1C,SAAS,EAAE,6CAA6C;IACxD,KAAK,EAAE,+CAA+C;IACtD,IAAI,EAAE,IAAI;CACX,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAK/B,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,qCAAqC,kBAAU,OAAO;IAC7D,OAAO,EAAE,yBAAyB;IAClC,WAAW,EAAE,uBAAuB;CACrC,CAAC;AAEW,QAAA,QAAQ,GAAG,6CAA6C,CAAC;AACzD,QAAA,YAAY,GAAG,CAAC,CAAC;AACjB,QAAA,SAAS,GAAG,IAAI,mBAAS,CACpC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,gBAAgB,GAC3B,iDAAiD,CAAC;AAEv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AAC;CAC5E,CAAC,CAAC;AAEU,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,WAAW,GAAG,UAAU,CAAC;AACzB,QAAA,gBAAgB,GAAmB;IAC9C,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,aAAa;IACvB,EAAE,EAAE,WAAW;IACf,WAAW,EAAE,QAAQ;IACrB,WAAW,EAAE,6BAA6B;IAC1C,SAAS,EAAE,oCAAoC;IAC/C,KAAK,EAAE,+CAA+C;IACtD,IAAI,EAAE,IAAI;CACX,CAAC;AACW,QAAA,gBAAgB,GAAmB;IAC9C,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,SAAS;IACnB,EAAE,EAAE,WAAW;IACf,WAAW,EAAE,QAAQ;IACrB,WAAW,EAAE,6BAA6B;IAC1C,SAAS,EAAE,6CAA6C;IACxD,KAAK,EAAE,+CAA+C;IACtD,IAAI,EAAE,IAAI;CACX,CAAC"}
@@ -25,10 +25,20 @@ const zeroAdressValue = '11111111111111111111111111111111';
25
25
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
26
26
  const client = (0, clients_1.getClientSolana)();
27
27
  const networkId = portfolio_core_1.NetworkId.solana;
28
- const markets = yield cache.getItem(constants_1.marketsKey, {
29
- prefix: constants_1.platformId,
30
- networkId: portfolio_core_1.NetworkId.solana,
31
- });
28
+ const [markets, elevationGroupsAccounts] = yield Promise.all([
29
+ cache.getItem(constants_1.marketsKey, {
30
+ prefix: constants_1.platformId,
31
+ networkId: portfolio_core_1.NetworkId.solana,
32
+ }),
33
+ cache.getItem(constants_1.elevationGroupsKey, {
34
+ prefix: constants_1.platformId,
35
+ networkId: portfolio_core_1.NetworkId.solana,
36
+ }),
37
+ ]);
38
+ if (!markets)
39
+ return [];
40
+ const elevationGroups = new Map();
41
+ elevationGroupsAccounts === null || elevationGroupsAccounts === void 0 ? void 0 : elevationGroupsAccounts.forEach((group) => elevationGroups.set(group.id, group));
32
42
  const [lendingPdas, multiplyPdas] = markets
33
43
  ? [(0, pdas_1.getLendingPda)(owner, markets), (0, pdas_1.getMultiplyPdas)(owner, markets)]
34
44
  : [[], []];
@@ -152,6 +162,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
152
162
  const name = lendingConfig
153
163
  ? `Multiply ${lendingConfig.name}`
154
164
  : 'Multiply';
165
+ const elevationGroup = elevationGroups.get(multiplyAccount.elevationGroup);
155
166
  const borrowedAssets = [];
156
167
  const borrowedYields = [];
157
168
  const suppliedAssets = [];
@@ -174,7 +185,11 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
174
185
  .dividedBy(reserve.exchangeRate)
175
186
  .toNumber();
176
187
  suppliedAssets.push((0, tokenPriceToAssetToken_1.default)(mint, amount, networkId, tokenPrice));
177
- suppliedLtvs.push(reserve.config.liquidationThresholdPct / 100);
188
+ if (elevationGroup)
189
+ suppliedLtvs.push(elevationGroup.liquidationThresholdPct / 100);
190
+ else {
191
+ suppliedLtvs.push(0);
192
+ }
178
193
  suppliedYields.push([
179
194
  { apr: reserve.supplyApr, apy: (0, portfolio_core_1.aprToApy)(reserve.supplyApr) },
180
195
  ]);
@@ -1 +1 @@
1
- {"version":3,"file":"lendsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/lendsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gEAAqC;AACrC,2CAKqB;AAGrB,iDAAsD;AACtD,2CAAmD;AACnD,qGAA6E;AAE7E,+CAAmE;AACnE,yCAIwB;AACxB,6CAAsE;AAEtE,MAAM,eAAe,GAAG,kCAAkC,CAAC;AAE3D,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,SAAS,GAAG,0BAAS,CAAC,MAAM,CAAC;IAEnC,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,OAAO,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,CAAC,CAC5D,CAAC;YACF,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,GAAG,GAAG,CAAC,CAAC;YACnE,cAAc,CAAC,IAAI,CAAC;gBAClB,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,yBAAQ,EAAC,OAAO,CAAC,SAAS,CAAC,EAAE;aAC/D,CAAC,CAAC;QACL,CAAC;QAED,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/D,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,GACxD,IAAA,wCAAuB,EAAC;gBACtB,cAAc;gBACd,cAAc;gBACd,YAAY;gBACZ,YAAY;gBACZ,eAAe;aAChB,CAAC,CAAC;YAEL,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,qCAAoB,CAAC,UAAU;gBACrC,SAAS;gBACT,UAAU,EAAV,sBAAU;gBACV,KAAK,EAAE,SAAS;gBAChB,IAAI,EAAE,UAAU;gBAChB,KAAK;gBACL,IAAI,EAAE;oBACJ,cAAc;oBACd,aAAa;oBACb,cAAc;oBACd,cAAc;oBACd,aAAa;oBACb,cAAc;oBACd,WAAW,EAAE,IAAI;oBACjB,YAAY;oBACZ,WAAW;oBACX,KAAK;iBACN;aACF,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -18,7 +18,14 @@ const klend_1 = require("./structs/klend");
18
18
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
19
19
  const client = (0, clients_1.getClientSolana)();
20
20
  const lendingMarketAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, klend_1.lendingMarketStruct, constants_1.klendProgramId, (0, filters_1.dataSizeFilter)(klend_1.lendingMarketStruct.byteSize));
21
+ const elevationGroups = lendingMarketAccounts
22
+ .map((market) => market.elevationGroups)
23
+ .flat();
21
24
  yield cache.setItem(constants_1.marketsKey, lendingMarketAccounts.map((acc) => acc.pubkey.toString()), { prefix: constants_1.platformId, networkId: portfolio_core_1.NetworkId.solana });
25
+ yield cache.setItem(constants_1.elevationGroupsKey, elevationGroups, {
26
+ prefix: constants_1.platformId,
27
+ networkId: portfolio_core_1.NetworkId.solana,
28
+ });
22
29
  });
23
30
  const job = {
24
31
  id: `${constants_1.platformId}-markets`,
@@ -1 +1 @@
1
- {"version":3,"file":"marketsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/marketsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,iDAAsD;AACtD,+CAA8D;AAC9D,wDAA4D;AAC5D,2CAAqE;AACrE,2CAAsD;AAEtD,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,qBAAqB,GAAG,MAAM,IAAA,iCAAwB,EAC1D,MAAM,EACN,2BAAmB,EACnB,0BAAc,EACd,IAAA,wBAAc,EAAC,2BAAmB,CAAC,QAAQ,CAAC,CAC7C,CAAC;IAEF,MAAM,KAAK,CAAC,OAAO,CACjB,sBAAU,EACV,qBAAqB,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,EACzD,EAAE,MAAM,EAAE,sBAAU,EAAE,SAAS,EAAE,0BAAS,CAAC,MAAM,EAAE,CACpD,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IAC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@@ -120,7 +120,6 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
120
120
  const positionData = (0, dlmmHelper_1.processPosition)(constants_1.dlmmProgramId, positionVersion, lbPairAcc, account, baseTokenDecimal, quoteTokenDecimal, lowerBinArray, upperBinArray);
121
121
  const assets = [];
122
122
  const rewardAssets = [];
123
- const tags = [];
124
123
  if (positionData &&
125
124
  (!positionData.totalXAmount.isZero() ||
126
125
  !positionData.totalYAmount.isZero())) {
@@ -142,6 +141,10 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
142
141
  rewardAssets.push((0, tokenPriceToAssetToken_1.default)(tokenPriceRewardY.address, positionData.rewardTwo
143
142
  .dividedBy(Math.pow(10, tokenPriceRewardY.decimals))
144
143
  .toNumber(), portfolio_core_1.NetworkId.solana, tokenPriceRewardY));
144
+ if (positionData.totalXAmount.isZero())
145
+ assets[0].attributes.tags = ['Out Of Range'];
146
+ if (positionData.totalYAmount.isZero())
147
+ assets[1].attributes.tags = ['Out Of Range'];
145
148
  const liquidities = [
146
149
  {
147
150
  assets,
@@ -152,9 +155,6 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
152
155
  yields: [],
153
156
  },
154
157
  ];
155
- const activeBinInPosition = positionData.positionBinData.find((bin) => bin.binXAmount !== '0' && bin.binYAmount !== '0');
156
- if (!activeBinInPosition)
157
- tags.push('Out Of Range');
158
158
  elements.push({
159
159
  type: portfolio_core_1.PortfolioElementType.liquidity,
160
160
  label: 'LiquidityPool',
@@ -162,7 +162,6 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
162
162
  platformId: constants_1.platformId,
163
163
  value: (0, portfolio_core_1.getUsdValueSum)(liquidities.map((a) => a.value)),
164
164
  name: 'DLMM',
165
- tags,
166
165
  data: {
167
166
  liquidities,
168
167
  },
@@ -1 +1 @@
1
- {"version":3,"file":"dlmmPositionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/d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AO,CAAC"}
@@ -21,6 +21,7 @@ const solana_1 = require("../../utils/solana");
21
21
  const clients_1 = require("../../utils/clients");
22
22
  const clmms_1 = require("./structs/clmms");
23
23
  const tokenAmountFromLiquidity_1 = require("../../utils/clmm/tokenAmountFromLiquidity");
24
+ const helpers_1 = require("./helpers");
24
25
  function getRaydiumCLMMPositions(cache, nfts) {
25
26
  return __awaiter(this, void 0, void 0, function* () {
26
27
  const client = (0, clients_1.getClientSolana)();
@@ -41,8 +42,36 @@ function getRaydiumCLMMPositions(cache, nfts) {
41
42
  prefix: constants_1.poolStatesPrefix,
42
43
  networkId: portfolio_core_1.NetworkId.solana,
43
44
  });
44
- const assets = [];
45
- let totalLiquidityValue = 0;
45
+ const mints = new Set();
46
+ personalPositionsInfo.forEach((personalPositionInfo, index) => {
47
+ if (!personalPositionInfo)
48
+ return;
49
+ const poolStateInfo = poolStatesInfo[index];
50
+ if (!poolStateInfo)
51
+ return;
52
+ mints.add(poolStateInfo.tokenMint0.toString());
53
+ mints.add(poolStateInfo.tokenMint1.toString());
54
+ poolStateInfo.rewardInfos.forEach((ri) => {
55
+ if (ri.tokenMint.toString() !== '11111111111111111111111111111111') {
56
+ mints.add(ri.tokenMint.toString());
57
+ }
58
+ });
59
+ });
60
+ const [tickArrays, tokenPrices] = yield Promise.all([
61
+ Promise.all(personalPositionsInfo.map((personalPositionInfo, index) => {
62
+ if (!personalPositionInfo)
63
+ return [];
64
+ const poolStateInfo = poolStatesInfo[index];
65
+ if (!poolStateInfo)
66
+ return [];
67
+ return (0, solana_1.getParsedMultipleAccountsInfo)(client, clmms_1.tickArrayStatetruct, [
68
+ (0, helpers_1.getTickArrayAddress)(constants_1.raydiumProgram.toString(), poolStateInfo.pubkey.toString(), personalPositionInfo.tickLowerIndex, poolStateInfo.tickSpacing),
69
+ (0, helpers_1.getTickArrayAddress)(constants_1.raydiumProgram.toString(), poolStateInfo.pubkey.toString(), personalPositionInfo.tickUpperIndex, poolStateInfo.tickSpacing),
70
+ ]);
71
+ })),
72
+ cache.getTokenPricesAsMap([...Array.from(mints)], portfolio_core_1.NetworkId.solana),
73
+ ]);
74
+ const liquidities = [];
46
75
  for (let index = 0; index < personalPositionsInfo.length; index++) {
47
76
  const poolStateInfo = poolStatesInfo[index];
48
77
  if (!poolStateInfo)
@@ -57,31 +86,49 @@ function getRaydiumCLMMPositions(cache, nfts) {
57
86
  const { tokenAmountA, tokenAmountB } = (0, tokenAmountFromLiquidity_1.getTokenAmountsFromLiquidity)(personalPositionInfo.liquidity, poolStateInfo.tickCurrent, personalPositionInfo.tickLowerIndex, personalPositionInfo.tickUpperIndex, false);
58
87
  if (!tokenAmountA || !tokenAmountB)
59
88
  continue;
60
- const tokenPriceA = yield cache.getTokenPrice(poolStateInfo.tokenMint0.toString(), portfolio_core_1.NetworkId.solana);
61
- if (!tokenPriceA)
62
- continue;
63
- const assetTokenA = (0, tokenPriceToAssetToken_1.default)(poolStateInfo.tokenMint0.toString(), tokenAmountA.dividedBy(Math.pow(10, tokenPriceA.decimals)).toNumber(), portfolio_core_1.NetworkId.solana, tokenPriceA);
64
- const tokenPriceB = yield cache.getTokenPrice(poolStateInfo.tokenMint1.toString(), portfolio_core_1.NetworkId.solana);
65
- if (!tokenPriceB)
89
+ const tokenPriceA = tokenPrices.get(poolStateInfo.tokenMint0.toString());
90
+ const tokenPriceB = tokenPrices.get(poolStateInfo.tokenMint1.toString());
91
+ if (!tokenPriceA || !tokenPriceB)
66
92
  continue;
67
- const assetTokenB = (0, tokenPriceToAssetToken_1.default)(poolStateInfo.tokenMint1.toString(), tokenAmountB.dividedBy(Math.pow(10, tokenPriceB.decimals)).toNumber(), portfolio_core_1.NetworkId.solana, tokenPriceB);
93
+ const assetTokenA = (0, tokenPriceToAssetToken_1.default)(tokenPriceA.address, tokenAmountA.dividedBy(Math.pow(10, tokenPriceA.decimals)).toNumber(), portfolio_core_1.NetworkId.solana, tokenPriceA);
94
+ const assetTokenB = (0, tokenPriceToAssetToken_1.default)(tokenPriceB.address, tokenAmountB.dividedBy(Math.pow(10, tokenPriceB.decimals)).toNumber(), portfolio_core_1.NetworkId.solana, tokenPriceB);
68
95
  if (!assetTokenB ||
69
96
  !assetTokenA ||
70
97
  assetTokenB.value === null ||
71
98
  assetTokenA.value === null)
72
99
  continue;
73
- const value = assetTokenB.value + assetTokenA.value;
74
- assets.push({
75
- assets: [assetTokenA, assetTokenB],
76
- assetsValue: value,
77
- rewardAssets: [],
78
- rewardAssetsValue: 0,
100
+ if (tokenAmountA.isZero())
101
+ assetTokenA.attributes.tags = ['Out Of Range'];
102
+ if (tokenAmountB.isZero())
103
+ assetTokenB.attributes.tags = ['Out Of Range'];
104
+ const rewardAssets = [];
105
+ const rewardBalances = (0, helpers_1.getRewardBalance)(personalPositionInfo, poolStateInfo, tickArrays[index]);
106
+ rewardBalances.forEach((rewardBalance, i) => {
107
+ if (rewardBalance.isZero() ||
108
+ poolStateInfo.rewardInfos[i].tokenMint.toString() ===
109
+ '11111111111111111111111111111111')
110
+ return;
111
+ const rewardTokenPrice = tokenPrices.get(poolStateInfo.rewardInfos[i].tokenMint.toString());
112
+ if (!rewardTokenPrice)
113
+ return;
114
+ rewardAssets.push((0, tokenPriceToAssetToken_1.default)(poolStateInfo.rewardInfos[i].tokenMint.toString(), rewardBalance.dividedBy(Math.pow(10, rewardTokenPrice.decimals)).toNumber(), portfolio_core_1.NetworkId.solana, rewardTokenPrice));
115
+ });
116
+ const assets = [assetTokenA, assetTokenB];
117
+ const assetsValue = (0, portfolio_core_1.getUsdValueSum)(assets.map((a) => a.value));
118
+ const rewardAssetsValue = (0, portfolio_core_1.getUsdValueSum)(rewardAssets.map((a) => a.value));
119
+ const value = (0, portfolio_core_1.getUsdValueSum)([...assets, ...rewardAssets].map((a) => a.value));
120
+ if (!value)
121
+ continue;
122
+ liquidities.push({
123
+ assets,
124
+ assetsValue,
125
+ rewardAssets,
126
+ rewardAssetsValue,
79
127
  value,
80
128
  yields: [],
81
129
  });
82
- totalLiquidityValue += value;
83
130
  }
84
- if (assets.length === 0)
131
+ if (liquidities.length === 0)
85
132
  return [];
86
133
  const elements = [];
87
134
  elements.push({
@@ -90,9 +137,9 @@ function getRaydiumCLMMPositions(cache, nfts) {
90
137
  platformId: constants_1.platformId,
91
138
  label: 'LiquidityPool',
92
139
  name: 'Concentrated',
93
- value: totalLiquidityValue,
140
+ value: (0, portfolio_core_1.getUsdValueSum)(liquidities.map((a) => a.value)),
94
141
  data: {
95
- liquidities: assets,
142
+ liquidities,
96
143
  },
97
144
  });
98
145
  return elements;
@@ -1 +1 @@
1
- {"version":3,"file":"getRaydiumCLMMPositions.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/raydium/getRaydiumCLMMPositions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,6CAA4C;AAC5C,2CAA2E;AAC3E,qGAA6E;AAC7E,+CAAmE;AACnE,iDAAsD;AACtD,2CAAyE;AAEzE,wFAAyF;AAEzF,SAAsB,uBAAuB,CAC3C,KAAY,EACZ,IAAiC;;QAEjC,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;QAEjC,MAAM,uBAAuB,GAAgB,EAAE,CAAC;QAChD,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACnB,MAAM,OAAO,GAAG,IAAI,mBAAS,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAEhD,MAAM,YAAY,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;YAEnE,MAAM,CAAC,cAAc,CAAC,GAAG,mBAAS,CAAC,sBAAsB,CACvD,YAAY,EACZ,0BAAc,CACf,CAAC;YACF,uBAAuB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;QACH,IAAI,uBAAuB,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;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AAC;YACH,mBAAmB,IAAI,KAAK,CAAC;QAC/B,CAAC;QAED,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAEnC,MAAM,QAAQ,GAAgC,EAAE,CAAC;QACjD,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,qCAAoB,CAAC,SAAS;YACpC,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE,cAAc;YACpB,KAAK,EAAE,mBAAmB;YAC1B,IAAI,EAAE;gBACJ,WAAW,EAAE,MAAM;aACpB;SACF,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC;IAClB,CAAC;CAAA;AArHD,0DAqHC"}
1
+ {"version":3,"file":"getRaydiumCLMMPositions.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/raydium/getRaydiumCLMMPositions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DASoC;AACpC,6CAA4C;AAC5C,2CAA2E;AAC3E,qGAA6E;AAC7E,+CAG4B;AAC5B,iDAAsD;AACtD,2CAIyB;AAEzB,wFAAyF;AACzF,uCAAkE;AAElE,SAAsB,uBAAuB,CAC3C,KAAY,EACZ,IAAiC;;QAEjC,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;QAEjC,MAAM,uBAAuB,GAAgB,EAAE,CAAC;QAChD,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACnB,MAAM,OAAO,GAAG,IAAI,mBAAS,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAEhD,MAAM,YAAY,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;YAEnE,MAAM,CAAC,cAAc,CAAC,GAAG,mBAAS,CAAC,sBAAsB,CACvD,YAAY,EACZ,0BAAc,CAC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EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;YAC/D,MAAM,iBAAiB,GAAG,IAAA,+BAAc,EAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;YAC3E,MAAM,KAAK,GAAG,IAAA,+BAAc,EAC1B,CAAC,GAAG,MAAM,EAAE,GAAG,YAAY,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CACjD,CAAC;YAEF,IAAI,CAAC,KAAK;gBAAE,SAAS;YAErB,WAAW,CAAC,IAAI,CAAC;gBACf,MAAM;gBACN,WAAW;gBACX,YAAY;gBACZ,iBAAiB;gBACjB,KAAK;gBACL,MAAM,EAAE,EAAE;aACX,CAAC,CAAC;QACL,CAAC;QAED,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAExC,MAAM,QAAQ,GAAgC,EAAE,CAAC;QACjD,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,qCAAoB,CAAC,SAAS;YACpC,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE,cAAc;YACpB,KAAK,EAAE,IAAA,+BAAc,EAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACtD,IAAI,EAAE;gBACJ,WAAW;aACZ;SACF,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC;IAClB,CAAC;CAAA;AAtMD,0DAsMC"}
@@ -2,6 +2,8 @@ import BigNumber from 'bignumber.js';
2
2
  import BN from 'bn.js';
3
3
  import { PortfolioAssetCollectible, PortfolioAssetToken, TokenPrice, Yield } from '@sonarwatch/portfolio-core';
4
4
  import { PublicKey } from '@solana/web3.js';
5
+ import { PersonalPositionState, PoolState, TickArrayState } from './structs/clmms';
6
+ import { ParsedAccount } from '../../utils/solana';
5
7
  export declare function isARaydiumPosition(nft: PortfolioAssetCollectible): boolean;
6
8
  export declare function raydiumTickToPriceX64(tick: number): BN;
7
9
  export declare function getRaydiumTokenAmountsFromLiquidity(sqrtPriceCurrentX64: BigNumber, sqrtPriceX64A: BigNumber, sqrtPriceX64B: BigNumber, liquidity: BigNumber, roundUp: boolean): {
@@ -11,3 +13,5 @@ export declare function getRaydiumTokenAmountsFromLiquidity(sqrtPriceCurrentX64:
11
13
  export declare function getStakePubKey(owner: string): PublicKey;
12
14
  export declare function getFarmYield(rewardToken: TokenPrice, rewardPerBlock: BigNumber, tvl: number, slotsPerSec?: number): Yield;
13
15
  export declare function getPendingAssetToken(depositBalance: BigNumber, rewardDebt: BigNumber, perShare: BigNumber, rewardToken: TokenPrice, multiplier: number | BigNumber): PortfolioAssetToken;
16
+ export declare const getTickArrayAddress: (programId: string, poolId: string, tickNumber: number, tickSpacing: number) => PublicKey;
17
+ export declare const getRewardBalance: (personalPositionInfo: ParsedAccount<PersonalPositionState>, poolStateInfo: ParsedAccount<PoolState>, tickArrays: (ParsedAccount<TickArrayState> | null)[]) => BigNumber[];