@sonarwatch/portfolio-plugins 0.14.31 → 0.14.32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. package/CHANGELOG.md +1716 -1712
  2. package/README.md +3 -3
  3. package/package.json +1 -1
  4. package/src/plugins/balancer/helpers/pools.js +21 -21
  5. package/src/plugins/banx/loansFetcher.js +2 -1
  6. package/src/plugins/banx/loansFetcher.js.map +1 -1
  7. package/src/plugins/cetus/clmmsFetcher.js +5 -7
  8. package/src/plugins/cetus/clmmsFetcher.js.map +1 -1
  9. package/src/plugins/cetus/constants.d.ts +1 -0
  10. package/src/plugins/cetus/constants.js +17 -1
  11. package/src/plugins/cetus/constants.js.map +1 -1
  12. package/src/plugins/cetus/farmsFetcher.js +3 -7
  13. package/src/plugins/cetus/farmsFetcher.js.map +1 -1
  14. package/src/plugins/cetus/getPools.d.ts +3 -0
  15. package/src/plugins/cetus/getPools.js +50 -0
  16. package/src/plugins/cetus/getPools.js.map +1 -0
  17. package/src/plugins/cetus/poolsJob.js +4 -3
  18. package/src/plugins/cetus/poolsJob.js.map +1 -1
  19. package/src/plugins/cetus/types.d.ts +32 -31
  20. package/src/plugins/kai/constants.d.ts +9 -0
  21. package/src/plugins/kai/constants.js +37 -2
  22. package/src/plugins/kai/constants.js.map +1 -1
  23. package/src/plugins/kai/helpers.d.ts +8 -0
  24. package/src/plugins/kai/helpers.js +49 -0
  25. package/src/plugins/kai/helpers.js.map +1 -0
  26. package/src/plugins/kai/index.js +4 -2
  27. package/src/plugins/kai/index.js.map +1 -1
  28. package/src/plugins/kai/lpVaultsFetcher.js +112 -0
  29. package/src/plugins/kai/lpVaultsFetcher.js.map +1 -0
  30. package/src/plugins/kai/supplyPoolsJob.d.ts +3 -0
  31. package/src/plugins/kai/supplyPoolsJob.js +35 -0
  32. package/src/plugins/kai/supplyPoolsJob.js.map +1 -0
  33. package/src/plugins/kai/types.d.ts +107 -0
  34. package/src/plugins/kai/vaultsJob.js +19 -12
  35. package/src/plugins/kai/vaultsJob.js.map +1 -1
  36. package/src/plugins/metaplex/index.js +2 -2
  37. package/src/plugins/metaplex/index.js.map +1 -1
  38. package/src/plugins/metaplex/resizableNftFetcher.d.ts +3 -0
  39. package/src/plugins/metaplex/{positionsSolanaFetcher.js → resizableNftFetcher.js} +1 -1
  40. package/src/plugins/metaplex/resizableNftFetcher.js.map +1 -0
  41. package/src/plugins/sushiswap/helpers.js +24 -24
  42. package/src/plugins/uniswap-v2/helpers.js +22 -22
  43. package/src/plugins/zeta/airdropFetcher.js +14 -14
  44. package/src/utils/sei/constants.js +8 -8
  45. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
  46. package/src/plugins/metaplex/positionsSolanaFetcher.js.map +0 -1
  47. /package/src/plugins/{metaplex/positionsSolanaFetcher.d.ts → kai/lpVaultsFetcher.d.ts} +0 -0
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.14.31",
3
+ "version": "0.14.32",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "peerDependencies": {
@@ -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;
@@ -43,7 +43,8 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
43
43
  acc.bondTradeTransactionState.perpetualRefinancedActive ||
44
44
  acc.bondTradeTransactionState.perpetualManualTerminating ||
45
45
  acc.bondTradeTransactionState.active) &&
46
- acc.redeemedAt === '0');
46
+ acc.redeemedAt === '0' &&
47
+ !acc.redeemResult.instantRefinanced);
47
48
  if (accounts.length === 0)
48
49
  return [];
49
50
  const [tokenPrices, fbondTokenMints, bondOffers, collections] = yield Promise.all([
@@ -1 +1 @@
1
- {"version":3,"file":"loansFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/banx/loansFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,6CAA4C;AAC5C,gEAAqC;AAGrC,iDAAsD;AACtD,oGAA4E;AAC5E,+CAK4B;AAC5B,8EAAgF;AAChF,wGAAqG;AACrG,qGAA6E;AAC7E,2CAKqB;AAOrB,uCAAwE;AACxE,uCAAuD;AACvD,kEAA+D;AAC/D,4DAAyD;AAEzD,MAAM,eAAe,GAAG,IAAI,6BAAa,CAIvC,+BAAmB,EACnB;IACE,MAAM,EAAE,uBAAW;IACnB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,EACD,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,uBAAU,EAAC,GAAG,IAAI,EAAE,EAAE,cAAc,CAAC,CAC/C,CAAC;AAEF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UA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E,EAAE;oBAClB,cAAc;oBACd,aAAa;oBACb,cAAc,EAAE,EAAE;oBAClB,YAAY,EAAE,EAAE;oBAChB,WAAW;oBACX,WAAW,EAAE,IAAI;oBACjB,KAAK;iBACN;aACF,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"loansFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/banx/loansFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,6CAA4C;AAC5C,gEAAqC;AAGrC,iDAAsD;AACtD,oGAA4E;AAC5E,+CAK4B;AAC5B,8EAAgF;AAChF,wGAAqG;AACrG,qGAA6E;AAC7E,2CAKqB;AAOrB,uCAAwE;AACxE,uCAAuD;AACvD,kEAA+D;AAC/D,4DAAyD;AAEzD,MAAM,eAAe,GAAG,IAAI,6BAAa,CAIvC,+BAAmB,EACnB;IACE,MAAM,EAAE,uBAAW;IACnB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,EACD,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,uBAAU,EAAC,GAAG,IAAI,EAAE,EAAE,cAAc,CAAC,CAC/C,CAAC;AAEF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IACrC,MAAM,MAAM,GAAG,IAAA,8BAAoB,GAAE,CAAC;IAEtC,MAAM,QAAQ,GAAG,CACf,MAAM,OAAO,CAAC,GAAG,CAAC;QAChB,IAAA,qCAA4B,EAC1B,UAAU,EACV,uBAAW,EACX,IAAA,sBAAY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C;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -19,8 +19,8 @@ const clients_1 = require("../../utils/clients");
19
19
  const helpers_1 = require("./helpers");
20
20
  const tokenAmountFromLiquidity_1 = require("../../utils/clmm/tokenAmountFromLiquidity");
21
21
  const getOwnedObjects_1 = require("../../utils/sui/getOwnedObjects");
22
- const multiGetObjects_1 = require("../../utils/sui/multiGetObjects");
23
22
  const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
23
+ const getPools_1 = require("./getPools");
24
24
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
25
25
  const client = (0, clients_1.getClientSui)();
26
26
  const ownerRes = yield (0, getOwnedObjects_1.getOwnedObjects)(client, owner, {
@@ -49,12 +49,10 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
49
49
  return [];
50
50
  const poolsIds = clmmPositions.map((position) => position.pool);
51
51
  const poolsById = new Map();
52
- const poolsObjects = yield (0, multiGetObjects_1.multiGetObjects)(client, [...new Set(poolsIds)]);
53
- poolsObjects.forEach((poolObj) => {
54
- var _a, _b;
55
- if ((_b = (_a = poolObj.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields) {
56
- const pool = (0, helpers_1.getPoolFromObject)(poolObj);
57
- poolsById.set(poolObj.data.objectId, pool);
52
+ const poolsObjects = yield (0, getPools_1.getPools)([...new Set(poolsIds)], cache);
53
+ poolsObjects.forEach((pool) => {
54
+ if (pool) {
55
+ poolsById.set(pool.poolAddress, pool);
58
56
  }
59
57
  });
60
58
  const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.sui, constants_1.platformId);
@@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AAC,CAAC;QAEH,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,kBAAkB,EAAE,EAAE;YACxD,SAAS,CAAC,cAAc,CAAC;gBACvB,OAAO,EAAE,kBAAkB,CAAC,YAAY;gBACxC,MAAM,EAAE,kBAAkB,CAAC,WAAW;aACvC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,IAAI,YAAY,CAAC,MAAM,EAAE,IAAI,YAAY,CAAC,MAAM,EAAE;YAChD,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -7,6 +7,7 @@ export declare const clmmType = "0x1eabed72c53feb3805120a081dc15963c204dc8d09154
7
7
  export declare const createPoolEvent = "0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb::factory::CreatePoolEvent";
8
8
  export declare const poolParentId = "0x4c9ab808d50ca1358cc699bb53b6334b9471d4718fb19bb621ff41c2e93bbce4";
9
9
  export declare const firstPool = "0x58ec75646f31c384f485bd92a5f1d19aa60713eabe2447cbc1354c8c229b10b7";
10
+ export declare const hardCodedPools: string[];
10
11
  export declare const vaultManagerMap = "0x9036bcc5aa7fd2cceec1659a6a1082871f45bc400c743f50063363457d1738bd";
11
12
  export declare const farmNftType = "0x11ea791d82b5742cc8cab0bf7946035c97d9001d7c3803a93f119753da66f526::pool::WrappedPositionNFT";
12
13
  export declare const limitPackageId = "0x533fab9a116080e2cb1c87f1832c1bf4231ab4c32318ced041e75cc28604bba9";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dcaUserIndexerId = exports.devInspectTxSender = exports.limitUserIndexId = exports.limitPackageId = exports.farmNftType = exports.vaultManagerMap = exports.firstPool = exports.poolParentId = exports.createPoolEvent = exports.clmmType = exports.clmmPoolPackageId = exports.clmmPoolsPrefix = exports.platform = exports.platformId = void 0;
3
+ exports.dcaUserIndexerId = exports.devInspectTxSender = exports.limitUserIndexId = exports.limitPackageId = exports.farmNftType = exports.vaultManagerMap = exports.hardCodedPools = exports.firstPool = exports.poolParentId = exports.createPoolEvent = exports.clmmType = exports.clmmPoolPackageId = exports.clmmPoolsPrefix = exports.platform = exports.platformId = void 0;
4
4
  exports.platformId = 'cetus';
5
5
  exports.platform = {
6
6
  id: exports.platformId,
@@ -15,6 +15,22 @@ exports.clmmType = `${exports.clmmPoolPackageId}::position::Position`;
15
15
  exports.createPoolEvent = `${exports.clmmPoolPackageId}::factory::CreatePoolEvent`;
16
16
  exports.poolParentId = '0x4c9ab808d50ca1358cc699bb53b6334b9471d4718fb19bb621ff41c2e93bbce4';
17
17
  exports.firstPool = '0x58ec75646f31c384f485bd92a5f1d19aa60713eabe2447cbc1354c8c229b10b7';
18
+ // add cetus poolIds here to be sure they're included in the job
19
+ // pools with most volume from https://app.cetus.zone/pool/list
20
+ exports.hardCodedPools = [
21
+ '0xb8d7d9e66a60c239e7a60110efcf8de6c705580ed924d0dde141f4a0e2c90105',
22
+ '0xcf994611fd4c48e277ce3ffd4d4364c914af2c3cbb05f7bf6facd371de688630',
23
+ '0x1efc96c99c9d91ac0f54f0ca78d2d9a6ba11377d29354c0a192c86f0495ddec7',
24
+ '0xb785e6eed355c1f8367c06d2b0cb9303ab167f8359a129bb003891ee54c6fce0',
25
+ '0x4c50ba9d1e60d229800293a4222851c9c3f797aa5ba8a8d32cc67ec7e79fec60',
26
+ '0x59cf0d333464ad29443d92bfd2ddfd1f794c5830141a5ee4a815d1ef3395bf6c',
27
+ '0x2e041f3fd93646dcc877f783c1f2b7fa62d30271bdef1f21ef002cebf857bded',
28
+ '0xe01243f37f712ef87e556afb9b1d03d0fae13f96d324ec912daffc339dfdcbd2',
29
+ '0x6bd72983b0b5a77774af8c77567bb593b418ae3cd750a5926814fcd236409aaa',
30
+ '0xc8d7a1503dc2f9f5b05449a87d8733593e2f0f3e7bffd90541252782e4d2ca20',
31
+ '0x871d8a227114f375170f149f7e9d45be822dd003eba225e83c05ac80828596bc',
32
+ '0x0254747f5ca059a1972cd7f6016485d51392a3fde608107b93bbaebea550f703',
33
+ ];
18
34
  // VaultsManager : 0x25b82dd2f5ee486ed1c8af144b89a8931cd9c29dee3a86a1bfe194fdea9d04a6
19
35
  // Vaults https://api-sui.cetus.zone/v2/sui/auto_pools
20
36
  exports.vaultManagerMap = '0x9036bcc5aa7fd2cceec1659a6a1082871f45bc400c743f50063363457d1738bd';
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cetus/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,8CAA8C;IACrD,WAAW,EAAE,cAAc;IAC3B,OAAO,EAAE,yBAAyB;CACnC,CAAC;AACW,QAAA,eAAe,GAAG,GAAG,kBAAU,YAAY,CAAC;AAE5C,QAAA,iBAAiB,GAC5B,oEAAoE,CAAC;AAE1D,QAAA,QAAQ,GAAG,GAAG,yBAAiB,sBAAsB,CAAC;AAEtD,QAAA,eAAe,GAAG,GAAG,yBAAiB,4BAA4B,CAAC;AACnE,QAAA,YAAY,GACvB,oEAAoE,CAAC;AAC1D,QAAA,SAAS,GACpB,oEAAoE,CAAC;AAEvE,qFAAqF;AACrF,sDAAsD;AACzC,QAAA,eAAe,GAC1B,oEAAoE,CAAC;AAE1D,QAAA,WAAW,GACtB,8FAA8F,CAAC;AAEpF,QAAA,cAAc,GACzB,oEAAoE,CAAC;AAC1D,QAAA,gBAAgB,GAC3B,oEAAoE,CAAC;AAC1D,QAAA,kBAAkB,GAC7B,oEAAoE,CAAC;AAC1D,QAAA,gBAAgB,GAC3B,oEAAoE,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cetus/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,8CAA8C;IACrD,WAAW,EAAE,cAAc;IAC3B,OAAO,EAAE,yBAAyB;CACnC,CAAC;AACW,QAAA,eAAe,GAAG,GAAG,kBAAU,YAAY,CAAC;AAE5C,QAAA,iBAAiB,GAC5B,oEAAoE,CAAC;AAE1D,QAAA,QAAQ,GAAG,GAAG,yBAAiB,sBAAsB,CAAC;AAEtD,QAAA,eAAe,GAAG,GAAG,yBAAiB,4BAA4B,CAAC;AACnE,QAAA,YAAY,GACvB,oEAAoE,CAAC;AAC1D,QAAA,SAAS,GACpB,oEAAoE,CAAC;AAEvE,gEAAgE;AAChE,+DAA+D;AAClD,QAAA,cAAc,GAAG;IAC5B,oEAAoE;IACpE,oEAAoE;IACpE,oEAAoE;IACpE,oEAAoE;IACpE,oEAAoE;IACpE,oEAAoE;IACpE,oEAAoE;IACpE,oEAAoE;IACpE,oEAAoE;IACpE,oEAAoE;IACpE,oEAAoE;IACpE,oEAAoE;CACrE,CAAC;AAEF,qFAAqF;AACrF,sDAAsD;AACzC,QAAA,eAAe,GAC1B,oEAAoE,CAAC;AAE1D,QAAA,WAAW,GACtB,8FAA8F,CAAC;AAEpF,QAAA,cAAc,GACzB,oEAAoE,CAAC;AAC1D,QAAA,gBAAgB,GAC3B,oEAAoE,CAAC;AAC1D,QAAA,kBAAkB,GAC7B,oEAAoE,CAAC;AAC1D,QAAA,gBAAgB,GAC3B,oEAAoE,CAAC"}
@@ -22,6 +22,7 @@ const bitsToNumber_1 = require("../../utils/sui/bitsToNumber");
22
22
  const tokenAmountFromLiquidity_1 = require("../../utils/clmm/tokenAmountFromLiquidity");
23
23
  const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
24
24
  const helpers_1 = require("./helpers");
25
+ const getPools_1 = require("./getPools");
25
26
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
26
27
  const client = (0, clients_1.getClientSui)();
27
28
  const positions = yield (0, getOwnedObjects_1.getOwnedObjects)(client, owner, {
@@ -38,14 +39,9 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
38
39
  (0, multiGetObjects_1.multiGetObjects)(client, positions
39
40
  .map((position) => { var _a, _b; return (_b = (_a = position.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields.pool_id; })
40
41
  .filter((s) => s !== null)),
41
- cache
42
- .getItems(positions
42
+ (0, getPools_1.getPools)(positions
43
43
  .map((position) => { var _a, _b; return (_b = (_a = position.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields.clmm_postion.fields.pool; })
44
- .filter((s) => s !== null), {
45
- prefix: constants_1.clmmPoolsPrefix,
46
- networkId: portfolio_core_1.NetworkId.sui,
47
- })
48
- .then((res) => res.filter((p) => p !== null)),
44
+ .filter((s) => s !== null), cache).then((res) => res.filter((p) => p !== null)),
49
45
  (0, helpers_1.fetchPosFeeAmount)(positions
50
46
  .map((position) => {
51
47
  var _a, _b;
@@ -1 +1 @@
1
- {"version":3,"file":"farmsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cetus/farmsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,gEAAqC;AAGrC,2CAAuE;AACvE,iDAAmD;AAQnD,qEAAkE;AAClE,qEAAkE;AAClE,+DAA4D;AAC5D,wFAAyF;AACzF,gFAA6E;AAC7E,uCAAuE;AAEvE,MAAM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ACjB,OAAO,EAAE,IAAI,CAAC,SAAS;YACvB,MAAM,EAAE,YAAY;SACrB,CAAC,CAAC;QAEH,SAAS,CAAC,cAAc,CAAC;YACvB,OAAO,EAAE,IAAI,CAAC,SAAS;YACvB,MAAM,EAAE,IAAI,CAAC,QAAQ;SACtB,CAAC,CAAC;QAEH,SAAS,CAAC,cAAc,CAAC;YACvB,OAAO,EAAE,IAAI,CAAC,SAAS;YACvB,MAAM,EAAE,IAAI,CAAC,QAAQ;SACtB,CAAC,CAAC;QAEH,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,kBAAkB,EAAE,EAAE;YACxD,SAAS,CAAC,cAAc,CAAC;gBACvB,OAAO,EAAE,kBAAkB,CAAC,YAAY;gBACxC,MAAM,EAAE,kBAAkB,CAAC,WAAW;aACvC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,IAAI,YAAY,CAAC,MAAM,EAAE,IAAI,YAAY,CAAC,MAAM,EAAE;YAChD,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"farmsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cetus/farmsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,gEAAqC;AAGrC,2CAAsD;AACtD,iDAAmD;AAQnD,qEAAkE;AAClE,qEAAkE;AAClE,+DAA4D;AAC5D,wFAAyF;AACzF,gFAA6E;AAC7E,uCAAuE;AACvE,yCAAsC;AAEtC,MAAM,QAAQ,GAAoB,CAAO,KAAa,EA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,cAAc,CAAC;YACvB,OAAO,EAAE,IAAI,CAAC,SAAS;YACvB,MAAM,EAAE,IAAI,CAAC,QAAQ;SACtB,CAAC,CAAC;QAEH,SAAS,CAAC,cAAc,CAAC;YACvB,OAAO,EAAE,IAAI,CAAC,SAAS;YACvB,MAAM,EAAE,IAAI,CAAC,QAAQ;SACtB,CAAC,CAAC;QAEH,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,kBAAkB,EAAE,EAAE;YACxD,SAAS,CAAC,cAAc,CAAC;gBACvB,OAAO,EAAE,kBAAkB,CAAC,YAAY;gBACxC,MAAM,EAAE,kBAAkB,CAAC,WAAW;aACvC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,IAAI,YAAY,CAAC,MAAM,EAAE,IAAI,YAAY,CAAC,MAAM,EAAE;YAChD,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Pool } from './types';
2
+ import { Cache } from '../../Cache';
3
+ export declare const getPools: (poolIds: string[], cache: Cache) => Promise<(Pool | null)[]>;
@@ -0,0 +1,50 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.getPools = void 0;
13
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
14
+ const constants_1 = require("./constants");
15
+ const clients_1 = require("../../utils/clients");
16
+ const getObject_1 = require("../../utils/sui/getObject");
17
+ const helpers_1 = require("./helpers");
18
+ // always use this helper to get Cetus Pools
19
+ // use cache is available, get on-chain data otherwise
20
+ const getPools = (poolIds, cache) => __awaiter(void 0, void 0, void 0, function* () {
21
+ var _a;
22
+ const pools = [];
23
+ const cachedPools = yield cache.getItems(poolIds, {
24
+ prefix: constants_1.clmmPoolsPrefix,
25
+ networkId: portfolio_core_1.NetworkId.sui,
26
+ });
27
+ const client = (0, clients_1.getClientSui)();
28
+ for (const poolId of poolIds) {
29
+ const i = poolIds.indexOf(poolId);
30
+ const cachedPool = cachedPools[i];
31
+ if (cachedPool) {
32
+ pools.push(cachedPool);
33
+ }
34
+ else {
35
+ const poolObject = yield (0, getObject_1.getObject)(client, poolId);
36
+ const pool = (0, helpers_1.getPoolFromObject)(poolObject);
37
+ if (((_a = poolObject.data) === null || _a === void 0 ? void 0 : _a.objectId) !== poolId || !pool) {
38
+ pools.push(null);
39
+ }
40
+ yield cache.setItem(poolId, pool, {
41
+ prefix: constants_1.clmmPoolsPrefix,
42
+ networkId: portfolio_core_1.NetworkId.sui,
43
+ });
44
+ pools.push(pool);
45
+ }
46
+ }
47
+ return pools;
48
+ });
49
+ exports.getPools = getPools;
50
+ //# sourceMappingURL=getPools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPools.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cetus/getPools.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAAuD;AAEvD,2CAA8C;AAE9C,iDAAmD;AACnD,yDAAsD;AACtD,uCAA8C;AAE9C,4CAA4C;AAC5C,sDAAsD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0, clients_1.getClientSui)();
26
26
  const promises = [];
27
27
  const cacheItems = [];
28
- const poolsAddresses = [];
28
+ const poolsAddresses = new Set(constants_1.hardCodedPools);
29
29
  let poolInfo;
30
30
  let value;
31
31
  do {
@@ -43,9 +43,9 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
43
43
  },
44
44
  });
45
45
  if ((_c = poolInfo.data) === null || _c === void 0 ? void 0 : _c.content)
46
- poolsAddresses.push(poolInfo.data.content.fields.value.fields.value.fields.pool_id);
46
+ poolsAddresses.add(poolInfo.data.content.fields.value.fields.value.fields.pool_id);
47
47
  } while (poolInfo && ((_e = (_d = poolInfo.data) === null || _d === void 0 ? void 0 : _d.content) === null || _e === void 0 ? void 0 : _e.fields.value.fields.next));
48
- const poolsObjects = yield (0, multiGetObjects_1.multiGetObjects)(client, poolsAddresses);
48
+ const poolsObjects = yield (0, multiGetObjects_1.multiGetObjects)(client, [...poolsAddresses]);
49
49
  let poolId;
50
50
  let pool;
51
51
  for (let i = 0; i < poolsObjects.length; i++) {
@@ -61,6 +61,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
61
61
  value: pool,
62
62
  });
63
63
  }
64
+ // always use getPools helper to retrieve cetus pools
64
65
  yield cache.setItems(cacheItems, {
65
66
  prefix: constants_1.clmmPoolsPrefix,
66
67
  networkId: portfolio_core_1.NetworkId.sui,
@@ -1 +1 @@
1
- {"version":3,"file":"poolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cetus/poolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,gEAAqC;AAGrC,iDAAmD;AACnD,2CAKqB;AACrB,uCAA8C;AAC9C,+FAA4E;AAE5E,qEAAkE;AAClE,iFAA8E;AAE9E,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;;IACnD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC9B,MAAM,QAAQ,GAAG,EAAE,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CAAC,MAAM;YAAE,SAAS;QAEtB,IAAI,GAAG,IAAA,2BAAiB,EAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1C,IAAI,CAAC,IAAI;YAAE,SAAS;QAEpB,QAAQ,CAAC,IAAI,CACX,IAAA,6BAAwB,EACtB,KAAK,EACL,0BAAS,CAAC,GAAG,EACb,IAAI,CAAC,WAAW,EAChB,IAAI,sBAAS,CAAC,IAAI,CAAC,WAAW,CAAC,EAC/B,IAAI,sBAAS,CAAC,IAAI,CAAC,WAAW,CAAC,EAC/B,IAAI,sBAAS,CAAC,IAAI,CAAC,kBAAkB,CAAC,EACtC,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,SAAS,CACf,CACF,CAAC;QACF,UAAU,CAAC,IAAI,CAAC;YACd,GAAG,EAAE,MAAM;YACX,KAAK,EAAE,IAAI;SACZ,CAAC,CAAC;IACL,CAAC;IAED,qDAAqD;IACrD,MAAM,KAAK,CAAC,QAAQ,CAAC,UAAU,EAAE;QAC/B,MAAM,EAAE,2BAAe;QACvB,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CAAC,CAAC;IAEH,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -149,43 +149,44 @@ export type Vault = {
149
149
  type: string;
150
150
  }[];
151
151
  };
152
- export type WrappedPositionNFT = {
153
- clmm_postion: {
154
- fields: {
155
- coin_type_a: {
156
- fields: {
157
- name: string;
158
- };
159
- type: string;
152
+ export type LpPosition = {
153
+ fields: {
154
+ coin_type_a: {
155
+ fields: {
156
+ name: string;
160
157
  };
161
- coin_type_b: {
162
- fields: {
163
- name: string;
164
- };
165
- type: string;
158
+ type: string;
159
+ };
160
+ coin_type_b: {
161
+ fields: {
162
+ name: string;
166
163
  };
167
- description: string;
168
- id: ID;
169
- index: number;
170
- liquidity: string;
171
- name: string;
172
- pool: SuiObjectIdType;
173
- tick_lower_index: {
174
- fields: {
175
- bits: number;
176
- };
177
- type: string;
164
+ type: string;
165
+ };
166
+ description: string;
167
+ id: ID;
168
+ index: number;
169
+ liquidity: string;
170
+ name: string;
171
+ pool: SuiObjectIdType;
172
+ tick_lower_index: {
173
+ fields: {
174
+ bits: number;
178
175
  };
179
- tick_upper_index: {
180
- fields: {
181
- bits: number;
182
- };
183
- type: string;
176
+ type: string;
177
+ };
178
+ tick_upper_index: {
179
+ fields: {
180
+ bits: number;
184
181
  };
185
- url: string;
182
+ type: string;
186
183
  };
187
- type: string;
184
+ url: string;
188
185
  };
186
+ type: string;
187
+ };
188
+ export type WrappedPositionNFT = {
189
+ clmm_postion: LpPosition;
189
190
  id: ID;
190
191
  pool_id: string;
191
192
  url: string;
@@ -7,3 +7,12 @@ export declare const vaultsInfo: {
7
7
  lpType: string;
8
8
  decimals: number;
9
9
  }[];
10
+ export declare const supplyPoolsCacheKey = "supply-pools";
11
+ export declare const vaults: {
12
+ name: string;
13
+ configId: string;
14
+ poolObjectId: string;
15
+ lendFacilCap: string;
16
+ supplyPoolXInfo: string;
17
+ supplyPoolYInfo: string;
18
+ }[];
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.vaultsInfo = exports.platform = exports.platformId = void 0;
3
+ exports.vaults = exports.supplyPoolsCacheKey = exports.vaultsInfo = exports.platform = exports.platformId = void 0;
4
4
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
5
+ const constants_1 = require("../../utils/sui/constants");
5
6
  exports.platformId = 'kai';
6
7
  exports.platform = {
7
8
  id: exports.platformId,
@@ -13,7 +14,7 @@ exports.platform = {
13
14
  };
14
15
  exports.vaultsInfo = [
15
16
  {
16
- // USDC
17
+ // wUSDC
17
18
  id: '0x7a2f75a3e50fd5f72dfc2f8c9910da5eaa3a1486e4eb1e54a825c09d82214526',
18
19
  tType: '0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN',
19
20
  lpType: '0x1c389a85310b47e7630a9361d4e71025bc35e4999d3a645949b1b68b26f2273::ywhusdce::YWHUSDCE',
@@ -33,5 +34,39 @@ exports.vaultsInfo = [
33
34
  lpType: '0xb8dc843a816b51992ee10d2ddc6d28aab4f0a1d651cd7289a7897902eb631613::ysui::YSUI',
34
35
  decimals: 9,
35
36
  },
37
+ {
38
+ // USDC
39
+ id: '0x5663035df5f403ad5a015cc2a3264de30370650bc043c4dab4d0012ea5cb7671',
40
+ tType: constants_1.usdcSuiType,
41
+ lpType: '0xa4184b1a5829e7cced8e51e8e385b16d02642634cd3e72a50d31cdf4a78bfd5c::yusdc::YUSDC',
42
+ decimals: 6,
43
+ },
44
+ ];
45
+ exports.supplyPoolsCacheKey = 'supply-pools';
46
+ exports.vaults = [
47
+ {
48
+ name: 'Cetus wUSDT/wUSDC',
49
+ configId: '0x2d52e5fe8af24f2c750250fca6ce5d595d22287f12d29c6ffbae490f5650478d',
50
+ poolObjectId: '0xc8d7a1503dc2f9f5b05449a87d8733593e2f0f3e7bffd90541252782e4d2ca20',
51
+ lendFacilCap: '0xf61382ca5e79c6bdccba39fc375c7b34daa02c7076369a8a34741f22980607ff',
52
+ supplyPoolXInfo: '0x372b6948ae06dacce75fdc3546865b2e777d4050114d93db0717b40cf677634c',
53
+ supplyPoolYInfo: '0x86c5ca41be63b5b9a8da0b4ca0f8268d6e87f8cdda8c9e88b25c43efcd5f3074',
54
+ },
55
+ {
56
+ name: 'Cetus USDC/wUSDT',
57
+ configId: '0xc64d5b0102b85b823d8f8ae5685ea1c153d1c18dcf13a4719798fdf591a9a1b9',
58
+ poolObjectId: '0x6bd72983b0b5a77774af8c77567bb593b418ae3cd750a5926814fcd236409aaa',
59
+ lendFacilCap: '0x085807ffff95935d311a714cdffa0d10ec7dc80e6bd393cee2b644f6aece5b01',
60
+ supplyPoolXInfo: '0x3bcadd850b776542b49be5d68d2e62b63f3c7543695c55a973d3364501b5c26c',
61
+ supplyPoolYInfo: '0x372b6948ae06dacce75fdc3546865b2e777d4050114d93db0717b40cf677634c',
62
+ },
63
+ {
64
+ name: 'Cetus USDC/SUI',
65
+ configId: '0xd6a055c8143f2bb97fdcb34f91ac723708d71473e7dff670a9a2218cc91eab16',
66
+ poolObjectId: '0xb8d7d9e66a60c239e7a60110efcf8de6c705580ed924d0dde141f4a0e2c90105',
67
+ lendFacilCap: '0x590468991d9ed6993953e46dad98b9ec5b003ce99d213346b4349c12880547b2',
68
+ supplyPoolXInfo: '0x3bcadd850b776542b49be5d68d2e62b63f3c7543695c55a973d3364501b5c26c',
69
+ supplyPoolYInfo: '0x1b4c4e0869ab3771a0901a538c0dbf536ca72e1525fd66e6c5a197623cd55cc8',
70
+ },
36
71
  ];
37
72
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kai/constants.ts"],"names":[],"mappings":";;;AAAA,+DAAkE;AAErD,QAAA,UAAU,GAAG,KAAK,CAAC;AACnB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,4CAA4C;IACnD,OAAO,EAAE,qBAAqB;IAC9B,OAAO,EAAE,qCAAqC;IAC9C,WAAW,EAAE,aAAa,EAAE,sCAAsC;CACnE,CAAC;AAEW,QAAA,UAAU,GAAG;IACxB;QACE,OAAO;QACP,EAAE,EAAE,oEAAoE;QACxE,KAAK,EACH,gFAAgF;QAClF,MAAM,EACJ,uFAAuF;QACzF,QAAQ,EAAE,CAAC;KACZ;IACD;QACE,OAAO;QACP,EAAE,EAAE,oEAAoE;QACxE,KAAK,EACH,gFAAgF;QAClF,MAAM,EACJ,wFAAwF;QAC1F,QAAQ,EAAE,CAAC;KACZ;IACD;QACE,MAAM;QACN,EAAE,EAAE,oEAAoE;QACxE,KAAK,EAAE,2BAAU,CAAC,MAAM,CAAC,OAAO;QAChC,MAAM,EACJ,gFAAgF;QAClF,QAAQ,EAAE,CAAC;KACZ;CACF,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kai/constants.ts"],"names":[],"mappings":";;;AAAA,+DAAkE;AAClE,yDAAwD;AAE3C,QAAA,UAAU,GAAG,KAAK,CAAC;AACnB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,4CAA4C;IACnD,OAAO,EAAE,qBAAqB;IAC9B,OAAO,EAAE,qCAAqC;IAC9C,WAAW,EAAE,aAAa,EAAE,sCAAsC;CACnE,CAAC;AAEW,QAAA,UAAU,GAAG;IACxB;QACE,QAAQ;QACR,EAAE,EAAE,oEAAoE;QACxE,KAAK,EACH,gFAAgF;QAClF,MAAM,EACJ,uFAAuF;QACzF,QAAQ,EAAE,CAAC;KACZ;IACD;QACE,OAAO;QACP,EAAE,EAAE,oEAAoE;QACxE,KAAK,EACH,gFAAgF;QAClF,MAAM,EACJ,wFAAwF;QAC1F,QAAQ,EAAE,CAAC;KACZ;IACD;QACE,MAAM;QACN,EAAE,EAAE,oEAAoE;QACxE,KAAK,EAAE,2BAAU,CAAC,MAAM,CAAC,OAAO;QAChC,MAAM,EACJ,gFAAgF;QAClF,QAAQ,EAAE,CAAC;KACZ;IACD;QACE,OAAO;QACP,EAAE,EAAE,oEAAoE;QACxE,KAAK,EAAE,uBAAW;QAClB,MAAM,EACJ,kFAAkF;QACpF,QAAQ,EAAE,CAAC;KACZ;CACF,CAAC;AAEW,QAAA,mBAAmB,GAAG,cAAc,CAAC;AACrC,QAAA,MAAM,GAAG;IACpB;QACE,IAAI,EAAE,mBAAmB;QACzB,QAAQ,EACN,oEAAoE;QACtE,YAAY,EACV,oEAAoE;QACtE,YAAY,EACV,oEAAoE;QACtE,eAAe,EACb,oEAAoE;QACtE,eAAe,EACb,oEAAoE;KACvE;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,QAAQ,EACN,oEAAoE;QACtE,YAAY,EACV,oEAAoE;QACtE,YAAY,EACV,oEAAoE;QACtE,eAAe,EACb,oEAAoE;QACtE,eAAe,EACb,oEAAoE;KACvE;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,QAAQ,EACN,oEAAoE;QACtE,YAAY,EACV,oEAAoE;QACtE,YAAY,EACV,oEAAoE;QACtE,eAAe,EACb,oEAAoE;QACtE,eAAe,EACb,oEAAoE;KACvE;CACF,CAAC"}
@@ -0,0 +1,8 @@
1
+ import BigNumber from 'bignumber.js';
2
+ import { SupplyPool } from './types';
3
+ import { ObjectResponse } from '../../utils/sui/types';
4
+ export declare const calcDebtByShares: (lendFacilCap: string, supplyPool: ObjectResponse<SupplyPool>, debtShares: number) => 0 | BigNumber;
5
+ export declare const calcEquityValues: (debtX: BigNumber, debtY: BigNumber, s: BigNumber, a: BigNumber, poolPrice: BigNumber) => {
6
+ x: BigNumber;
7
+ y: BigNumber;
8
+ };
@@ -0,0 +1,49 @@
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.calcEquityValues = exports.calcDebtByShares = void 0;
7
+ const bignumber_js_1 = __importDefault(require("bignumber.js"));
8
+ const calcDebtByShares = (lendFacilCap, supplyPool, debtShares) => {
9
+ var _a, _b;
10
+ const lendFacilInfo = (_b = (_a = supplyPool.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields.debt_info.fields.contents.find((di) => di.fields.key === lendFacilCap);
11
+ if (!lendFacilInfo)
12
+ return 0;
13
+ const debtRegistry = lendFacilInfo.fields.value.fields.debt_registry;
14
+ if (!debtRegistry || debtRegistry.fields.supply_x64 === '0')
15
+ return 0;
16
+ const updatedLiabilityX64 = BigInt(lendFacilInfo.fields.value.fields.debt_registry.fields.liability_value_x64);
17
+ return new bignumber_js_1.default(updatedLiabilityX64.toString())
18
+ .multipliedBy(debtShares.toString())
19
+ .div(debtRegistry.fields.supply_x64)
20
+ .dividedBy(Math.pow(2, 64));
21
+ };
22
+ exports.calcDebtByShares = calcDebtByShares;
23
+ const calcEquityValues = (debtX, debtY, s, a, poolPrice) => {
24
+ if (s.lt(debtX) && a.lt(debtY))
25
+ return {
26
+ x: new bignumber_js_1.default(0),
27
+ y: new bignumber_js_1.default(0),
28
+ };
29
+ if (s.gte(debtX) && a.gte(debtY))
30
+ return {
31
+ x: s.minus(debtX),
32
+ y: a.minus(debtY),
33
+ };
34
+ if (a.lt(debtY)) {
35
+ const l = debtY.minus(a).div(poolPrice);
36
+ return {
37
+ x: s.minus(debtX).minus(l),
38
+ y: new bignumber_js_1.default(0),
39
+ };
40
+ }
41
+ const l = debtX.minus(s).multipliedBy(poolPrice);
42
+ const d = a.minus(debtY).minus(l);
43
+ return {
44
+ x: new bignumber_js_1.default(0),
45
+ y: d,
46
+ };
47
+ };
48
+ exports.calcEquityValues = calcEquityValues;
49
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kai/helpers.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAqC;AAI9B,MAAM,gBAAgB,GAAG,CAC9B,YAAoB,EACpB,UAAsC,EACtC,UAAkB,EAClB,EAAE;;IACF,MAAM,aAAa,GACjB,MAAA,MAAA,UAAU,CAAC,IAAI,0CAAE,OAAO,0CAAE,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAC7D,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,KAAK,YAAY,CACvC,CAAC;IACJ,IAAI,CAAC,aAAa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C,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACxC,OAAO;YACL,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;YAC1B,CAAC,EAAE,IAAI,sBAAS,CAAC,CAAC,CAAC;SACpB,CAAC;IACJ,CAAC;IACD,MAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IACjD,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAClC,OAAO;QACL,CAAC,EAAE,IAAI,sBAAS,CAAC,CAAC,CAAC;QACnB,CAAC,EAAE,CAAC;KACL,CAAC;AACJ,CAAC,CAAC;AAjCW,QAAA,gBAAgB,oBAiC3B"}
@@ -6,7 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.fetchers = exports.jobs = exports.platforms = void 0;
7
7
  const constants_1 = require("./constants");
8
8
  const vaultsJob_1 = __importDefault(require("./vaultsJob"));
9
+ const lpVaultsFetcher_1 = __importDefault(require("./lpVaultsFetcher"));
10
+ const supplyPoolsJob_1 = __importDefault(require("./supplyPoolsJob"));
9
11
  exports.platforms = [constants_1.platform];
10
- exports.jobs = [vaultsJob_1.default];
11
- exports.fetchers = [];
12
+ exports.jobs = [vaultsJob_1.default, supplyPoolsJob_1.default];
13
+ exports.fetchers = [lpVaultsFetcher_1.default];
12
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kai/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,4DAAoC;AAEvB,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,mBAAS,CAAC,CAAC;AAC1B,QAAA,QAAQ,GAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kai/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,4DAAoC;AACpC,wEAAgD;AAChD,sEAA8C;AAEjC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,mBAAS,EAAE,wBAAc,CAAC,CAAC;AAC1C,QAAA,QAAQ,GAAc,CAAC,yBAAe,CAAC,CAAC"}