@sonarwatch/portfolio-plugins 0.11.154 → 0.11.155

Sign up to get free protection for your applications and to get access to all the features.
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.11.154",
3
+ "version": "0.11.155",
4
4
  "type": "commonjs",
5
5
  "generators": "./generators.json",
6
6
  "dependencies": {
@@ -41,7 +41,7 @@
41
41
  "web3-v1": "npm:web3@^1.5.0"
42
42
  },
43
43
  "peerDependencies": {
44
- "@sonarwatch/portfolio-core": "0.11.154"
44
+ "@sonarwatch/portfolio-core": "0.11.155"
45
45
  },
46
46
  "main": "./src/index.js",
47
47
  "types": "./src/index.d.ts"
package/src/index.js CHANGED
@@ -96,6 +96,7 @@ const kai_1 = require("./plugins/kai");
96
96
  const suilend_1 = require("./plugins/suilend");
97
97
  const symmetry_1 = require("./plugins/symmetry");
98
98
  const staratlas_1 = require("./plugins/staratlas");
99
+ const tulip_1 = require("./plugins/tulip");
99
100
  const phoenix_1 = require("./plugins/phoenix");
100
101
  var constants_1 = require("./plugins/tokens/constants");
101
102
  Object.defineProperty(exports, "walletTokensPlatform", { enumerable: true, get: function () { return constants_1.walletTokensPlatform; } });
@@ -186,6 +187,7 @@ exports.platforms = [
186
187
  ...suilend_1.platforms,
187
188
  ...symmetry_1.platforms,
188
189
  ...staratlas_1.platforms,
190
+ ...tulip_1.platforms,
189
191
  ...phoenix_1.platforms,
190
192
  ];
191
193
  // JOBS //
@@ -259,6 +261,7 @@ exports.jobs = [
259
261
  ...suilend_1.jobs,
260
262
  ...symmetry_1.jobs,
261
263
  ...staratlas_1.jobs,
264
+ ...tulip_1.jobs,
262
265
  ...phoenix_1.jobs,
263
266
  ];
264
267
  // FETCHERS //
@@ -334,6 +337,7 @@ exports.fetchers = [
334
337
  ...suilend_1.fetchers,
335
338
  ...symmetry_1.fetchers,
336
339
  ...staratlas_1.fetchers,
340
+ ...tulip_1.fetchers,
337
341
  ...phoenix_1.fetchers,
338
342
  ];
339
343
  exports.fetchersByAddressSystem = (0, getFetchersByAddressSystem_1.getFetchersByAddressSystem)(exports.fetchers);
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAGA,wFAAqF;AACrF,sEAA8C;AAC9C,6CAI0B;AAC1B,yDAIgC;AAChC,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,6CAI0B;AAC1B,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,6CAG0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,2DAGiC;AACjC,6CAI0B;AAC1B,2CAIyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D,qEAIsC;AACtC,uDAI+B;AAC/B,mDAG6B;AAC7B,qDAG8B;AAC9B,uDAG+B;AAC/B,2CAIyB;AACzB,6CAI0B;AAC1B,6CAG0B;AAC1B,yCAIwB;AACxB,+CAI2B;AAC3B,uDAG+B;AAC/B,yCAGwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,6CAI0B;AAC1B,+CAI2B;AAC3B,qDAG8B;AAC9B,iDAI4B;AAC5B,iDAI4B;AAC5B,mDAG6B;AAC7B,yCAIwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,+CAI2B;AAC3B,yCAIwB;AACxB,2CAIyB;AACzB,mDAI6B;AAC7B,2CAIyB;AACzB,2CAIyB;AACzB,sCAIsB;AACtB,+CAI2B;AAC3B,iDAI4B;AAC5B,yCAIwB;AACxB,mDAI6B;AA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,gBAAa;IAChB,GAAG,mBAAgB;IACnB,GAAG,gBAAa;IAChB,GAAG,mBAAgB;IACnB,GAAG,eAAY;IACf,GAAG,iBAAc;IACjB,GAAG,qBAAiB;IACpB,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,mBAAgB;IACnB,GAAG,oBAAiB;IACpB,GAAG,eAAc;IACjB,GAAG,gBAAa;IAChB,GAAG,mBAAgB;IACnB,GAAG,mBAAgB;IACnB,GAAG,kBAAe;IAClB,GAAG,eAAY;IACf,GAAG,gBAAa;IAChB,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,cAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,kBAAe;IAClB,GAAG,qBAAkB;IACrB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,kBAAe;IAClB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,sBAAmB;IACtB,GAAG,yBAAsB;IACzB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,iBAAc;IACjB,GAAG,2BAAsB;IACzB,GAAG,yBAAkB;IACrB,GAAG,eAAY;IACf,GAAG,cAAW;IACd,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,kBAAe;CACnB,CAAC;AACW,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,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;
@@ -54,30 +54,30 @@ function sushiV3PairToUniV2(pair) {
54
54
  }
55
55
  function getV3PairsAddresses(url, length = 300) {
56
56
  return __awaiter(this, void 0, void 0, function* () {
57
- const query = (0, graphql_request_1.gql) `
58
- {
59
- pools(
60
- orderBy: totalValueLockedUSD
61
- first: ${length}
62
- orderDirection: desc
63
- where: { volumeUSD_not: "0", liquidity_not: "0" }
64
- ) {
65
- id
66
- token0Price
67
- token1Price
68
- liquidity
69
- token0 {
70
- id
71
- totalSupply
72
- decimals
73
- }
74
- token1 {
75
- id
76
- totalSupply
77
- decimals
78
- }
79
- }
80
- }
57
+ const query = (0, graphql_request_1.gql) `
58
+ {
59
+ pools(
60
+ orderBy: totalValueLockedUSD
61
+ first: ${length}
62
+ orderDirection: desc
63
+ where: { volumeUSD_not: "0", liquidity_not: "0" }
64
+ ) {
65
+ id
66
+ token0Price
67
+ token1Price
68
+ liquidity
69
+ token0 {
70
+ id
71
+ totalSupply
72
+ decimals
73
+ }
74
+ token1 {
75
+ id
76
+ totalSupply
77
+ decimals
78
+ }
79
+ }
80
+ }
81
81
  `;
82
82
  const res = yield (0, graphql_request_1.default)(url, query);
83
83
  const pools = res.pools;
@@ -0,0 +1,10 @@
1
+ import { PublicKey } from '@solana/web3.js';
2
+ import { Platform } from '@sonarwatch/portfolio-core';
3
+ export declare const platformId = "tulip";
4
+ export declare const platform: Platform;
5
+ export declare const tulipV2ProgramId: PublicKey;
6
+ export declare const tulipLendingProgramId: PublicKey;
7
+ export declare const leverageProgramId: PublicKey;
8
+ export declare const tulipMint = "TuLipcqtGVXP9XR62wM8WWCm6a9vhLs7T1uoWBk6FDs";
9
+ export declare const tulipDecimals = 6;
10
+ export declare const vaultsKey = "vaults";
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.vaultsKey = exports.tulipDecimals = exports.tulipMint = exports.leverageProgramId = exports.tulipLendingProgramId = exports.tulipV2ProgramId = exports.platform = exports.platformId = void 0;
4
+ const web3_js_1 = require("@solana/web3.js");
5
+ exports.platformId = 'tulip';
6
+ exports.platform = {
7
+ id: exports.platformId,
8
+ name: 'Tulip',
9
+ image: 'https://sonar.watch/img/platforms/tulip.webp',
10
+ defiLlamaId: 'tulip-protocol',
11
+ website: 'https://tulip.garden/',
12
+ twitter: 'https://twitter.com/TulipProtocol',
13
+ };
14
+ exports.tulipV2ProgramId = new web3_js_1.PublicKey('TLPv2tuSVvn3fSk8RgW3yPddkp5oFivzZV3rA9hQxtX');
15
+ exports.tulipLendingProgramId = new web3_js_1.PublicKey('4bcFeLv4nydFrsZqV5CgwCVrPhkQKsXtzfy2KyMz7ozM');
16
+ exports.leverageProgramId = new web3_js_1.PublicKey('Bt2WPMmbwHPk36i4CRucNDyLcmoGdC7xEdrVuxgJaNE6');
17
+ exports.tulipMint = 'TuLipcqtGVXP9XR62wM8WWCm6a9vhLs7T1uoWBk6FDs';
18
+ exports.tulipDecimals = 6;
19
+ exports.vaultsKey = 'vaults';
20
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tulip/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,8CAA8C;IACrD,WAAW,EAAE,gBAAgB;IAC7B,OAAO,EAAE,uBAAuB;IAChC,OAAO,EAAE,mCAAmC;CAC7C,CAAC;AAEW,QAAA,gBAAgB,GAAG,IAAI,mBAAS,CAC3C,6CAA6C,CAC9C,CAAC;AACW,QAAA,qBAAqB,GAAG,IAAI,mBAAS,CAChD,8CAA8C,CAC/C,CAAC;AAEW,QAAA,iBAAiB,GAAG,IAAI,mBAAS,CAC5C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,SAAS,GAAG,6CAA6C,CAAC;AAC1D,QAAA,aAAa,GAAG,CAAC,CAAC;AAClB,QAAA,SAAS,GAAG,QAAQ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Fetcher } from '../../Fetcher';
2
+ declare const fetcher: Fetcher;
3
+ export default fetcher;
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
16
+ const constants_1 = require("./constants");
17
+ const clients_1 = require("../../utils/clients");
18
+ const solana_1 = require("../../utils/solana");
19
+ const structs_1 = require("./structs");
20
+ const filters_1 = require("./filters");
21
+ const tokenPriceToAssetTokens_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetTokens"));
22
+ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
23
+ const client = (0, clients_1.getClientSolana)();
24
+ const userVaultsAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.depositTrackingV1Struct, constants_1.tulipV2ProgramId, (0, filters_1.userStrategyVaultsFilters)(owner));
25
+ if (!userVaultsAccounts)
26
+ return [];
27
+ const vaults = yield cache.getItem(constants_1.vaultsKey, {
28
+ prefix: constants_1.platformId,
29
+ networkId: portfolio_core_1.NetworkId.solana,
30
+ });
31
+ if (!vaults)
32
+ return [];
33
+ const tokenPriceById = yield cache.getTokenPricesAsMap(vaults.map((vault) => vault.base.sharesMint.toString()), portfolio_core_1.NetworkId.solana);
34
+ const vaultById = new Map();
35
+ vaults.forEach((vault) => vaultById.set(vault.pubkey.toString(), vault));
36
+ const assets = [];
37
+ for (let i = 0; i < userVaultsAccounts.length; i += 1) {
38
+ const userVaultsAccount = userVaultsAccounts[i];
39
+ if (userVaultsAccount.depositedBalance.isZero())
40
+ continue;
41
+ const vault = vaultById.get(userVaultsAccount.vault.toString());
42
+ if (!vault)
43
+ continue;
44
+ const lpTokenPrice = tokenPriceById.get(vault.base.sharesMint.toString());
45
+ if (!lpTokenPrice)
46
+ continue;
47
+ const amount = userVaultsAccount.depositedBalance
48
+ .div(Math.pow(10, lpTokenPrice.decimals))
49
+ .toNumber();
50
+ assets.push(...(0, tokenPriceToAssetTokens_1.default)(lpTokenPrice.address, amount, portfolio_core_1.NetworkId.solana, lpTokenPrice));
51
+ }
52
+ if (assets.length === 0)
53
+ return [];
54
+ return [
55
+ {
56
+ platformId: constants_1.platformId,
57
+ networkId: portfolio_core_1.NetworkId.solana,
58
+ type: portfolio_core_1.PortfolioElementType.multiple,
59
+ value: (0, portfolio_core_1.getUsdValueSum)(assets.map((asset) => asset.value)),
60
+ label: 'Deposit',
61
+ data: {
62
+ assets,
63
+ },
64
+ },
65
+ ];
66
+ });
67
+ const fetcher = {
68
+ id: `${constants_1.platformId}-deposits`,
69
+ networkId: portfolio_core_1.NetworkId.solana,
70
+ executor,
71
+ };
72
+ exports.default = fetcher;
73
+ //# sourceMappingURL=depositsFetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tulip/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AAGpC,2CAAsE;AACtE,iDAAsD;AACtD,+CAA6E;AAC7E,uCAA6E;AAC7E,uCAAsD;AACtD,uGAA+E;AAE/E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,kBAAkB,GAAG,MAAM,IAAA,iCAAwB,EACvD,MAAM,EACN,iCAAuB,EACvB,4BAAgB,EAChB,IAAA,mCAAyB,EAAC,KAAK,CAAC,CACjC,CAAC;IACF,IAAI,CAAC,kBAAkB;QAAE,OAAO,EAAE,CAAC;IAEnC,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,OAAO,CAChC,qBAAS,EACT;QACE,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CACF,CAAC;IACF,IAAI,CAAC,MAAM;QAAE,OAAO,EAAE,CAAC;IAEvB,MAAM,cAAc,GAAG,MAAM,KAAK,CAAC,mBAAmB,CACpD,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,EACvD,0BAAS,CAAC,MAAM,CACjB,CAAC;IAEF,MAAM,SAAS,GAAyC,IAAI,GAAG,EAAE,CAAC;IAClE,MAAM,CAAC,OAAO,CAAC,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EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACzD,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE;gBACJ,MAAM;aACP;SACF;KACF,CAAC;AACJ,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"}
@@ -0,0 +1,13 @@
1
+ export declare const userStrategyVaultsFilters: (address: string) => ({
2
+ memcmp: {
3
+ offset: number;
4
+ bytes: string;
5
+ };
6
+ dataSize?: undefined;
7
+ } | {
8
+ dataSize: number;
9
+ memcmp?: undefined;
10
+ })[];
11
+ export declare const strategyVaultsFilters: {
12
+ dataSize: number;
13
+ }[];
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.strategyVaultsFilters = exports.userStrategyVaultsFilters = void 0;
4
+ const structs_1 = require("./structs");
5
+ const userStrategyVaultsFilters = (address) => [
6
+ {
7
+ memcmp: {
8
+ offset: 8,
9
+ bytes: address,
10
+ },
11
+ },
12
+ { dataSize: structs_1.depositTrackingV1Struct.byteSize },
13
+ ];
14
+ exports.userStrategyVaultsFilters = userStrategyVaultsFilters;
15
+ exports.strategyVaultsFilters = [
16
+ { dataSize: structs_1.multiDepositOptimizerV1Struct.byteSize },
17
+ ];
18
+ //# sourceMappingURL=filters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tulip/filters.ts"],"names":[],"mappings":";;;AAAA,uCAGmB;AAEZ,MAAM,yBAAyB,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC;IAC5D;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,OAAO;SACf;KACF;IACD,EAAE,QAAQ,EAAE,iCAAuB,CAAC,QAAQ,EAAE;CAC/C,CAAC;AARW,QAAA,yBAAyB,6BAQpC;AAEW,QAAA,qBAAqB,GAAG;IACnC,EAAE,QAAQ,EAAE,uCAA6B,CAAC,QAAQ,EAAE;CACrD,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Platform } from '@sonarwatch/portfolio-core';
2
+ import { Fetcher } from '../../Fetcher';
3
+ import { Job } from '../../Job';
4
+ export declare const platforms: Platform[];
5
+ export declare const jobs: Job[];
6
+ export declare const fetchers: Fetcher[];
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.fetchers = exports.jobs = exports.platforms = void 0;
7
+ const constants_1 = require("./constants");
8
+ const strategyTokensJob_1 = __importDefault(require("./strategyTokensJob"));
9
+ const lendingTokensJob_1 = __importDefault(require("./lendingTokensJob"));
10
+ const depositsFetcher_1 = __importDefault(require("./depositsFetcher"));
11
+ exports.platforms = [constants_1.platform];
12
+ exports.jobs = [strategyTokensJob_1.default, lendingTokensJob_1.default];
13
+ exports.fetchers = [depositsFetcher_1.default];
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tulip/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,4EAAoD;AACpD,0EAAkD;AAClD,wEAAgD;AAEnC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,2BAAiB,EAAE,0BAAgB,CAAC,CAAC;AACpD,QAAA,QAAQ,GAAc,CAAC,yBAAe,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Job } from '../../Job';
2
+ declare const job: Job;
3
+ export default job;
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
16
+ const clients_1 = require("../../utils/clients");
17
+ const solana_1 = require("../../utils/solana");
18
+ const constants_1 = require("./constants");
19
+ const structs_1 = require("./structs");
20
+ const constants_2 = require("../solend/constants");
21
+ const constants_3 = require("../tokens/constants");
22
+ const getLpTokenSource_1 = __importDefault(require("../../utils/misc/getLpTokenSource"));
23
+ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
24
+ const client = (0, clients_1.getClientSolana)();
25
+ const lendingReserves = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.lendingReserveStruct, constants_1.tulipLendingProgramId, [
26
+ {
27
+ dataSize: 622,
28
+ },
29
+ ]);
30
+ const mints = new Set();
31
+ const collatMint = [];
32
+ lendingReserves.forEach((reserve) => {
33
+ if (reserve.liquidity.mintPubKey.toString() !==
34
+ '11111111111111111111111111111111') {
35
+ mints.add(reserve.liquidity.mintPubKey.toString());
36
+ }
37
+ if (reserve.liquidity.collateralMint.toString() !==
38
+ '11111111111111111111111111111111') {
39
+ collatMint.push(reserve.liquidity.collateralMint);
40
+ }
41
+ });
42
+ const tokenPriceById = yield cache.getTokenPricesAsMap(Array.from(mints), portfolio_core_1.NetworkId.solana);
43
+ const mintAccounts = yield (0, solana_1.getParsedMultipleAccountsInfo)(client, solana_1.mintAccountStruct, collatMint);
44
+ const mintAccountById = new Map();
45
+ mintAccounts.forEach((mA) => mA ? mintAccountById.set(mA.pubkey.toString(), mA) : undefined);
46
+ const tokensDetails = yield cache.getItems(Array.from(mints), {
47
+ prefix: constants_3.tokenListsDetailsPrefix,
48
+ networkId: portfolio_core_1.NetworkId.solana,
49
+ });
50
+ const tokensDetailsById = new Map();
51
+ tokensDetails.forEach((tD) => tD ? tokensDetailsById.set(tD.address, tD) : undefined);
52
+ const promises = [];
53
+ for (let i = 0; i < lendingReserves.length; i += 1) {
54
+ const reserve = lendingReserves[i];
55
+ if (reserve.lendingMarket.toString() === '11111111111111111111111111111111')
56
+ continue;
57
+ const mint = reserve.liquidity.mintPubKey.toString();
58
+ const lpMint = reserve.liquidity.collateralMint.toString();
59
+ const tokenPrice = tokenPriceById.get(mint);
60
+ if (!tokenPrice)
61
+ continue;
62
+ // Assets amounts
63
+ const borrowedAmount = reserve.liquidity.borrowedAmountWads
64
+ .dividedBy(Math.pow(10, constants_2.wadsDecimal))
65
+ .dividedBy(Math.pow(10, tokenPrice.decimals));
66
+ const platformAmount = reserve.liquidity.platformAmountWads
67
+ .dividedBy(Math.pow(10, constants_2.wadsDecimal))
68
+ .dividedBy(Math.pow(10, tokenPrice.decimals));
69
+ const availableAmount = reserve.liquidity.availableAmount.dividedBy(Math.pow(10, tokenPrice.decimals));
70
+ const totalSupply = availableAmount
71
+ .plus(borrowedAmount)
72
+ .minus(platformAmount)
73
+ .toNumber();
74
+ const mintAccount = mintAccountById.get(lpMint);
75
+ if (!mintAccount)
76
+ continue;
77
+ const { supply, decimals } = mintAccount;
78
+ if (supply.isZero())
79
+ continue;
80
+ const tokenDetails = tokensDetailsById.get(mint);
81
+ const lpTokenSource = (0, getLpTokenSource_1.default)(portfolio_core_1.NetworkId.solana, lpMint, constants_1.platformId, {
82
+ address: lpMint.toString(),
83
+ decimals,
84
+ supply: supply.dividedBy(Math.pow(10, decimals)).toNumber(),
85
+ }, [
86
+ Object.assign(Object.assign({}, tokenPrice), { reserveAmount: totalSupply }),
87
+ ], tokenDetails ? `tu${tokenDetails.symbol}` : undefined);
88
+ promises.push(cache.setTokenPriceSource(lpTokenSource));
89
+ }
90
+ yield Promise.all(promises);
91
+ });
92
+ const job = {
93
+ id: `${constants_1.platformId}-lending-tokens`,
94
+ executor,
95
+ label: 'normal',
96
+ };
97
+ exports.default = job;
98
+ //# sourceMappingURL=lendingTokensJob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lendingTokensJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tulip/lendingTokensJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAqE;AAIrE,iDAAsD;AACtD,+CAK4B;AAC5B,2CAAgE;AAChE,uCAAiD;AACjD,mDAAkD;AAClD,mDAA8D;AAC9D,yFAAiE;AAEjE,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,eAAe,GAAG,MAAM,IAAA,iCAAwB,EACpD,MAAM,EACN,8BAAoB,EACpB,iCAAqB,EACrB;QACE;YACE,QAAQ,EAAE,GAAG;SACd;KACF,CACF,CAAC;IAEF,MAAM,KAAK,GAAgB,IAAI,GAAG,EAAE,CAAC;IACrC,MAAM,UAAU,GAAgB,EAAE,CAAC;IACnC,eAAe,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAClC,IACE,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,QAAQ,EAAE;YACvC,kCAAkC,EAClC,CAAC;YACD,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;QACrD,CAAC;QACD,IACE,OAAO,CAAC,SAAS,CAAC,cAAc,CAAC,QAAQ,EAAE;YAC3C,kCAAkC,EAClC,CAAC;YACD,UAAU,CAAC,IAAI,C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AAgB,EACpC,0BAAS,CAAC,MAAM,EAChB,MAAM,EACN,sBAAU,EACV;YACE,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE;YAC1B,QAAQ;YACR,MAAM,EAAE,MAAM,CAAC,SAAS,CAAC,SAAA,EAAE,EAAI,QAAQ,CAAA,CAAC,CAAC,QAAQ,EAAE;SACpD,EACD;4CAEO,UAAU,KACb,aAAa,EAAE,WAAW;SAE7B,EACD,YAAY,CAAC,CAAC,CAAC,KAAK,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,SAAS,CACtD,CAAC;QAEF,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,aAAa,CAAC,CAAC,CAAC;IAC1D,CAAC;IAED,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,iBAAiB;IAClC,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Job } from '../../Job';
2
+ declare const job: Job;
3
+ export default job;
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
16
+ const clients_1 = require("../../utils/clients");
17
+ const solana_1 = require("../../utils/solana");
18
+ const constants_1 = require("./constants");
19
+ const structs_1 = require("./structs");
20
+ const constants_2 = require("../tokens/constants");
21
+ const getLpTokenSource_1 = __importDefault(require("../../utils/misc/getLpTokenSource"));
22
+ const filters_1 = require("./filters");
23
+ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
24
+ const client = (0, clients_1.getClientSolana)();
25
+ const strategyVaults = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.multiDepositOptimizerV1Struct, constants_1.tulipV2ProgramId, filters_1.strategyVaultsFilters);
26
+ const promises = [];
27
+ promises.push(cache.setItem(constants_1.vaultsKey, strategyVaults, {
28
+ prefix: constants_1.platformId,
29
+ networkId: portfolio_core_1.NetworkId.solana,
30
+ }));
31
+ const mints = new Set();
32
+ const collatMint = [];
33
+ strategyVaults.forEach((sV) => {
34
+ if (sV.base.underlyingMint.toString() !== '11111111111111111111111111111111') {
35
+ mints.add(sV.base.underlyingMint.toString());
36
+ }
37
+ if (sV.base.sharesMint.toString() !== '11111111111111111111111111111111') {
38
+ collatMint.push(sV.base.sharesMint);
39
+ }
40
+ });
41
+ const tokenPriceById = yield cache.getTokenPricesAsMap(Array.from(mints), portfolio_core_1.NetworkId.solana);
42
+ const mintAccounts = yield (0, solana_1.getParsedMultipleAccountsInfo)(client, solana_1.mintAccountStruct, collatMint);
43
+ const mintAccountById = new Map();
44
+ mintAccounts.forEach((mA) => mA ? mintAccountById.set(mA.pubkey.toString(), mA) : undefined);
45
+ const tokensDetails = yield cache.getItems(Array.from(mints), {
46
+ prefix: constants_2.tokenListsDetailsPrefix,
47
+ networkId: portfolio_core_1.NetworkId.solana,
48
+ });
49
+ const tokensDetailsById = new Map();
50
+ tokensDetails.forEach((tD) => tD ? tokensDetailsById.set(tD.address, tD) : undefined);
51
+ for (let i = 0; i < strategyVaults.length; i += 1) {
52
+ const strategyVault = strategyVaults[i];
53
+ const mint = strategyVault.base.underlyingMint.toString();
54
+ const lpMint = strategyVault.base.sharesMint.toString();
55
+ const tokenPrice = tokenPriceById.get(mint);
56
+ if (!tokenPrice)
57
+ continue;
58
+ const stakedAmount = strategyVault.base.totalDepositedBalance.dividedBy(Math.pow(10, tokenPrice.decimals));
59
+ const mintAccount = mintAccountById.get(lpMint);
60
+ if (!mintAccount)
61
+ continue;
62
+ const { supply, decimals } = mintAccount;
63
+ if (supply.isZero())
64
+ continue;
65
+ const tokenDetails = tokensDetailsById.get(mint);
66
+ const lpTokenSource = (0, getLpTokenSource_1.default)(portfolio_core_1.NetworkId.solana, lpMint, constants_1.platformId, {
67
+ address: lpMint.toString(),
68
+ decimals,
69
+ supply: supply.dividedBy(Math.pow(10, decimals)).toNumber(),
70
+ }, [
71
+ Object.assign(Object.assign({}, tokenPrice), { reserveAmount: stakedAmount.toNumber() }),
72
+ ], tokenDetails ? `ts${tokenDetails.symbol}` : undefined);
73
+ promises.push(cache.setTokenPriceSource(lpTokenSource));
74
+ }
75
+ yield Promise.all(promises);
76
+ });
77
+ const job = {
78
+ id: `${constants_1.platformId}-strategy-tokens`,
79
+ executor,
80
+ label: 'normal',
81
+ };
82
+ exports.default = job;
83
+ //# sourceMappingURL=strategyTokensJob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"strategyTokensJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tulip/strategyTokensJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAqE;AAIrE,iDAAsD;AACtD,+CAK4B;AAC5B,2CAAsE;AACtE,uCAA0D;AAC1D,mDAA8D;AAC9D,yFAAiE;AACjE,uCAAkD;AAElD,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,cAAc,GAAG,MAAM,IAAA,iCAAwB,EACnD,MAAM,EACN,uCAA6B,EAC7B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