@sonarwatch/portfolio-plugins 0.12.118 → 0.12.120
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +2197 -2189
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/banx/constants.d.ts +1 -1
- package/src/plugins/banx/constants.js +1 -1
- package/src/plugins/banx/constants.js.map +1 -1
- package/src/plugins/banx/stakingFetcher.js +16 -23
- package/src/plugins/banx/stakingFetcher.js.map +1 -1
- package/src/plugins/drift/depositsFetcher.js +26 -9
- package/src/plugins/drift/depositsFetcher.js.map +1 -1
- package/src/plugins/kamino/lendsFetcher.js +1 -1
- package/src/plugins/kamino/lendsFetcher.js.map +1 -1
- package/src/plugins/mango/banksJob.js +3 -8
- package/src/plugins/mango/banksJob.js.map +1 -1
- package/src/plugins/mango/boostFetcher.js +13 -3
- package/src/plugins/mango/boostFetcher.js.map +1 -1
- package/src/plugins/mango/collateralFetcher.js +21 -4
- package/src/plugins/mango/collateralFetcher.js.map +1 -1
- package/src/plugins/mango/constants.d.ts +2 -0
- package/src/plugins/mango/constants.js +8 -1
- package/src/plugins/mango/constants.js.map +1 -1
- package/src/plugins/nxfinance/constants.js +1 -0
- package/src/plugins/nxfinance/constants.js.map +1 -1
- package/src/plugins/picasso/helpers.js +0 -1
- package/src/plugins/picasso/helpers.js.map +1 -1
- package/src/plugins/picasso/unstakingPositionsFetcher.js +0 -1
- package/src/plugins/picasso/unstakingPositionsFetcher.js.map +1 -1
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/tensor/helpers.d.ts +2 -0
- package/src/plugins/tensor/helpers.js +12 -1
- package/src/plugins/tensor/helpers.js.map +1 -1
- package/src/plugins/tensor/index.js +2 -0
- package/src/plugins/tensor/index.js.map +1 -1
- package/src/plugins/tensor/sharedEscrowFetcher.d.ts +3 -0
- package/src/plugins/tensor/sharedEscrowFetcher.js +52 -0
- package/src/plugins/tensor/sharedEscrowFetcher.js.map +1 -0
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/plugins/x-staking-solana/constants.d.ts +2 -0
- package/src/plugins/x-staking-solana/constants.js +17 -1
- package/src/plugins/x-staking-solana/constants.js.map +1 -1
- package/src/plugins/x-staking-solana/index.js +5 -1
- package/src/plugins/x-staking-solana/index.js.map +1 -1
- package/src/utils/sei/constants.js +8 -8
- 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
@@ -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;
|
@@ -6,7 +6,7 @@ export declare const platform: Platform;
|
|
6
6
|
export declare const banxPid: PublicKey;
|
7
7
|
export declare const banxMint = "BANXbTpN8U2cU41FjPxe2Ti37PiT5cCxLUKDQZuJeMMR";
|
8
8
|
export declare const banxDecimals = 9;
|
9
|
-
export declare const banxApiUrl = "https://api.banx.gg/
|
9
|
+
export declare const banxApiUrl = "https://api.banx.gg/staking/v2/info?walletPubkey=";
|
10
10
|
export declare const banxApiCollectionsUrl = "https://api.banx.gg/bonds/preview?isPrivate=false&getAll=true";
|
11
11
|
export declare const collectionsCacheKey = "banx-collections";
|
12
12
|
export declare const cachePrefix = "banx";
|
@@ -15,7 +15,7 @@ exports.platform = {
|
|
15
15
|
exports.banxPid = new web3_js_1.PublicKey('4tdmkuY6EStxbS6Y8s5ueznL3VPMSugrvQuDeAHGZhSt');
|
16
16
|
exports.banxMint = 'BANXbTpN8U2cU41FjPxe2Ti37PiT5cCxLUKDQZuJeMMR';
|
17
17
|
exports.banxDecimals = 9;
|
18
|
-
exports.banxApiUrl = 'https://api.banx.gg/
|
18
|
+
exports.banxApiUrl = 'https://api.banx.gg/staking/v2/info?walletPubkey=';
|
19
19
|
exports.banxApiCollectionsUrl = 'https://api.banx.gg/bonds/preview?isPrivate=false&getAll=true';
|
20
20
|
exports.collectionsCacheKey = `${exports.platformId}-collections`;
|
21
21
|
exports.cachePrefix = `${exports.platformId}`;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/banx/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG5C,+BAAgC;AAEnB,QAAA,UAAU,GAAG,MAAM,CAAC;AACpB,QAAA,QAAQ,GAAa;IACh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,CAAC"}
|
@@ -14,34 +14,27 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
15
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
16
16
|
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
17
|
-
const axios_1 = __importDefault(require("axios"));
|
18
17
|
const constants_1 = require("./constants");
|
19
18
|
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
19
|
+
const solana_1 = require("../../utils/solana");
|
20
|
+
const structs_1 = require("./structs");
|
21
|
+
const filters_1 = require("./filters");
|
22
|
+
const clients_1 = require("../../utils/clients");
|
20
23
|
const banxFactor = new bignumber_js_1.default(Math.pow(10, constants_1.banxDecimals));
|
21
24
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
// if (account.tokensStaked.isZero()) continue;
|
34
|
-
// amounts.push(account.tokensStaked.dividedBy(banxFactor));
|
35
|
-
// }
|
36
|
-
// if (amounts.length === 0) return [];
|
37
|
-
const banxRes = yield axios_1.default
|
38
|
-
.get(constants_1.banxApiUrl + owner, { timeout: 1000 })
|
39
|
-
.catch(() => null);
|
40
|
-
if (!banxRes)
|
41
|
-
return [];
|
42
|
-
const amount = new bignumber_js_1.default(banxRes.data.data.banxTokenStake.tokensStaked).dividedBy(banxFactor);
|
43
|
-
if (amount.isZero())
|
25
|
+
const client = (0, clients_1.getClientSolana)();
|
26
|
+
const accounts = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.banxTokenStakeStruct, constants_1.banxPid, (0, filters_1.stakeFilters)(owner));
|
27
|
+
const amounts = [];
|
28
|
+
for (const account of accounts) {
|
29
|
+
if (account.banxStakeState === structs_1.BanxTokenStakeState.Unstaked)
|
30
|
+
continue;
|
31
|
+
if (account.tokensStaked.isZero())
|
32
|
+
continue;
|
33
|
+
amounts.push(account.tokensStaked.dividedBy(banxFactor));
|
34
|
+
}
|
35
|
+
if (amounts.length === 0)
|
44
36
|
return [];
|
37
|
+
const amount = amounts.reduce((curr, sum) => curr.plus(sum), (0, bignumber_js_1.default)(0));
|
45
38
|
const tokenPrice = yield cache.getTokenPrice(constants_1.banxMint, portfolio_core_1.NetworkId.solana);
|
46
39
|
const assets = [
|
47
40
|
(0, tokenPriceToAssetToken_1.default)(constants_1.banxMint, amount.toNumber(), portfolio_core_1.NetworkId.solana, tokenPrice),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/banx/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,gEAAqC;
|
1
|
+
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/banx/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,gEAAqC;AAGrC,2CAA0E;AAC1E,qGAA6E;AAC7E,+CAA8D;AAC9D,uCAAsE;AACtE,uCAAyC;AACzC,iDAAsD;AAEtD,MAAM,UAAU,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,wBAAY,CAAA,CAAC,CAAC;AAErD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,MAAM,EACN,8BAAoB,EACpB,mBAAO,EACP,IAAA,sBAAY,EAAC,KAAK,CAAC,CACpB,CAAC;IAEF,MAAM,OAAO,GAAgB,EAAE,CAAC;IAChC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,IAAI,OAAO,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 = require("./perpHelpers/getPerpMarket");
|
|
29
29
|
const getMintFromOracle_1 = require("./perpHelpers/getMintFromOracle");
|
30
30
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
31
31
|
const client = (0, clients_1.getClientSolana)();
|
32
|
-
// Insurance
|
33
32
|
const spotMarketsItems = yield cache.getItem(constants_1.keySpotMarkets, {
|
34
33
|
prefix: constants_1.platformId,
|
35
34
|
networkId: portfolio_core_1.NetworkId.solana,
|
@@ -37,29 +36,47 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
37
36
|
const spotMarketByIndex = new Map();
|
38
37
|
const tokensMints = [];
|
39
38
|
const insuranceFundStakeAccountsAddresses = [];
|
39
|
+
const insuranceVaultsPkeys = [];
|
40
40
|
for (const spotMarketItem of spotMarketsItems || []) {
|
41
41
|
insuranceFundStakeAccountsAddresses[spotMarketItem.marketIndex] =
|
42
42
|
(0, helpers_1.getUserInsuranceFundStakeAccountPublicKey)(constants_1.driftProgram, new web3_js_1.PublicKey(owner), spotMarketItem.marketIndex);
|
43
|
+
insuranceVaultsPkeys.push(new web3_js_1.PublicKey(spotMarketItem.insuranceFund.vault));
|
43
44
|
spotMarketByIndex.set(spotMarketItem.marketIndex, spotMarketItem);
|
44
45
|
tokensMints.push(spotMarketItem.mint.toString());
|
45
46
|
}
|
46
|
-
const tokensPrices = yield
|
47
|
+
const [insuranceAccounts, insuranceTokenAccounts, tokensPrices] = yield Promise.all([
|
48
|
+
(0, solana_1.getParsedMultipleAccountsInfo)(client, struct_1.insuranceFundStakeStruct, insuranceFundStakeAccountsAddresses),
|
49
|
+
(0, solana_1.getParsedMultipleAccountsInfo)(client, solana_1.tokenAccountStruct, insuranceVaultsPkeys),
|
50
|
+
cache.getTokenPrices(tokensMints, portfolio_core_1.NetworkId.solana),
|
51
|
+
]);
|
47
52
|
const tokenPriceById = new Map();
|
48
53
|
tokensPrices.forEach((tP) => (tP ? tokenPriceById.set(tP.address, tP) : []));
|
49
|
-
const
|
54
|
+
const insuranceTokenAccountsById = new Map();
|
55
|
+
insuranceTokenAccounts.forEach((acc) => {
|
56
|
+
if (acc)
|
57
|
+
insuranceTokenAccountsById.set(acc.pubkey.toString(), acc);
|
58
|
+
});
|
59
|
+
// Insurance
|
50
60
|
const elements = [];
|
51
61
|
const insuranceAssets = [];
|
52
62
|
insuranceAccounts.forEach((account, i) => {
|
53
|
-
|
54
|
-
|
63
|
+
if (!account || account.ifShares.isZero())
|
64
|
+
return;
|
65
|
+
const spotMarket = spotMarketByIndex.get(i);
|
66
|
+
if (!spotMarket)
|
55
67
|
return;
|
56
|
-
const mint
|
57
|
-
|
68
|
+
const { insuranceFund, mint } = spotMarket;
|
69
|
+
const vault = insuranceTokenAccountsById.get(insuranceFund.vault.toString());
|
70
|
+
if (!vault)
|
58
71
|
return;
|
59
|
-
const tokenPrice = tokenPriceById.get(mint);
|
72
|
+
const tokenPrice = tokenPriceById.get(mint.toString());
|
60
73
|
if (!tokenPrice)
|
61
74
|
return;
|
62
|
-
|
75
|
+
const sharesAmount = account.ifShares
|
76
|
+
.dividedBy(insuranceFund.totalShares)
|
77
|
+
.times(vault.amount.dividedBy(Math.pow(10, tokenPrice.decimals)))
|
78
|
+
.toNumber();
|
79
|
+
insuranceAssets.push((0, tokenPriceToAssetToken_1.default)(mint.toString(), sharesAmount, portfolio_core_1.NetworkId.solana, tokenPrice));
|
63
80
|
});
|
64
81
|
if (insuranceAssets.length > 0) {
|
65
82
|
elements.push({
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAaoC;AACpC,gEAAqC;AACrC,6CAA4C;AAG5C,2CAKqB;AACrB,qCAKkB;AAClB,uCAMmB;AAEnB,+
|
1
|
+
{"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plug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ChB,CAAC,CAAC;QAEH,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,qCAAoB,CAAC,UAAU;YACrC,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,SAAS;YAChB,KAAK;YACL,IAAI,EAAE;gBACJ,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,YAAY;gBACZ,WAAW;gBACX,WAAW;gBACX,SAAS,EAAE;oBACT,MAAM,EAAE,eAAe;oBACvB,KAAK,EAAE,cAAc;iBACtB;gBACD,KAAK;aACN;YACD,IAAI,EAAE,IAAA,wBAAe,EAAC,WAAW,CAAC,IAAI,CAAC;SACxC,CAAC,CAAC;IACL,CAAC;IAED,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"}
|
@@ -215,7 +215,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
215
215
|
suppliedAssets,
|
216
216
|
suppliedValue,
|
217
217
|
suppliedYields,
|
218
|
-
healthRatio
|
218
|
+
healthRatio,
|
219
219
|
rewardAssets,
|
220
220
|
rewardValue,
|
221
221
|
value,
|
@@ -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;AAExB,MAAM,eAAe,GAAG,kCAAkC,CAAC;AAE3D,MAAM,QAAQ,GAAoB,CAAO,K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AAU;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"}
|
@@ -16,7 +16,6 @@ const struct_1 = require("./struct");
|
|
16
16
|
const filters_1 = require("./filters");
|
17
17
|
const helpers_1 = require("./helpers");
|
18
18
|
const clients_1 = require("../../utils/clients");
|
19
|
-
const fetchTokenSupplyAndDecimals_1 = require("../../utils/solana/fetchTokenSupplyAndDecimals");
|
20
19
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
21
20
|
const client = (0, clients_1.getClientSolana)();
|
22
21
|
const banksAccount = yield (0, solana_1.getParsedProgramAccounts)(client, struct_1.bankStruct, constants_1.mangoV4Pid, filters_1.banksFilter);
|
@@ -32,11 +31,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
32
31
|
const borrowApr = (0, helpers_1.getBorrowRate)(bank);
|
33
32
|
banks.push(Object.assign(Object.assign({}, bank), { depositApr,
|
34
33
|
borrowApr }));
|
35
|
-
const
|
36
|
-
const res = yield (0, fetchTokenSupplyAndDecimals_1.fetchTokenSupplyAndDecimals)(bank.mint, client);
|
37
|
-
if (!res)
|
38
|
-
continue;
|
39
|
-
const { decimals } = res;
|
34
|
+
const decimals = bank.mintDecimals;
|
40
35
|
const borrowedAmount = bank.depositIndex
|
41
36
|
.multipliedBy(bank.indexedDeposits)
|
42
37
|
.dividedBy(Math.pow(10, decimals))
|
@@ -48,7 +43,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
48
43
|
if (borrowedAmount <= 10 && depositedAmount <= 10)
|
49
44
|
continue;
|
50
45
|
const rate = {
|
51
|
-
tokenAddress,
|
46
|
+
tokenAddress: bank.mint.toString(),
|
52
47
|
borrowYield: {
|
53
48
|
apy: (0, portfolio_core_1.aprToApy)(borrowApr),
|
54
49
|
apr: borrowApr,
|
@@ -63,7 +58,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
63
58
|
poolName: 'Main',
|
64
59
|
};
|
65
60
|
rateItems.push({
|
66
|
-
key: `${bank.vault.toString()}-${
|
61
|
+
key: `${bank.vault.toString()}-${bank.mint.toString()}`,
|
67
62
|
value: rate,
|
68
63
|
});
|
69
64
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"banksJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/banksJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAKoC;AAIpC,2CAA+D;AAC/D,+CAA8D;AAC9D,qCAAsC;AACtC,uCAAwC;AACxC,uCAA0D;AAC1D,iDAAsD;
|
1
|
+
{"version":3,"file":"banksJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/banksJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAKoC;AAIpC,2CAA+D;AAC/D,+CAA8D;AAC9D,qCAAsC;AACtC,uCAAwC;AACxC,uCAA0D;AAC1D,iDAAsD;AAEtD,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,YAAY,GAAG,MAAM,IAAA,iCAAwB,EACjD,MAAM,EACN,mBAAU,EACV,sBAAU,EACV,qBAAW,CACZ,CAAC;IACF,IAAI,CAAC,YAAY;QAAE,OAAO;IAE1B,MAAM,KAAK,GAAmB,EAAE,CAAC;IACjC,M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AAC,IAAI,CAAC;YACb,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE;YACvD,KAAK,EAAE,IAAI;SACZ,CAAC,CAAC;IACL,CAAC;IACD,MAAM,KAAK,CAAC,OAAO,CAAC,oBAAQ,EAAE,KAAK,EAAE;QACnC,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;IACH,MAAM,KAAK,CAAC,QAAQ,CAAC,SAAS,EAAE;QAC9B,MAAM,EAAE,sCAAqB;QAC7B,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;AACL,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"}
|
@@ -80,12 +80,22 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
80
80
|
}
|
81
81
|
}
|
82
82
|
const { borrowedValue, healthRatio, suppliedValue, value, rewardValue } = (0, portfolio_core_1.getElementLendingValues)({ suppliedAssets, borrowedAssets, rewardAssets });
|
83
|
+
let leverage;
|
84
|
+
if (suppliedAssets[0].data.price &&
|
85
|
+
suppliedAssets[0].data.amount &&
|
86
|
+
value) {
|
87
|
+
const depositAmount = new bignumber_js_1.default(value).dividedBy(suppliedAssets[0].data.price);
|
88
|
+
leverage = `${new bignumber_js_1.default(suppliedAssets[0].data.amount)
|
89
|
+
.dividedBy(depositAmount)
|
90
|
+
.decimalPlaces(2)
|
91
|
+
.toString()}x`;
|
92
|
+
}
|
83
93
|
const element = {
|
84
94
|
type: portfolio_core_1.PortfolioElementType.borrowlend,
|
85
95
|
networkId: portfolio_core_1.NetworkId.solana,
|
86
|
-
platformId: constants_1.
|
96
|
+
platformId: constants_1.yieldFanPlatformId,
|
87
97
|
label: 'Leverage',
|
88
|
-
name:
|
98
|
+
name: leverage,
|
89
99
|
value,
|
90
100
|
data: {
|
91
101
|
borrowedAssets,
|
@@ -105,7 +115,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
105
115
|
return elements;
|
106
116
|
});
|
107
117
|
const fetcher = {
|
108
|
-
id: `${constants_1.
|
118
|
+
id: `${constants_1.yieldFanPlatformId}-boost`,
|
109
119
|
networkId: portfolio_core_1.NetworkId.solana,
|
110
120
|
executor,
|
111
121
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"boostFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/boostFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,gEAAqC;AAGrC,
|
1
|
+
{"version":3,"file":"boostFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/boostFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,gEAAqC;AAGrC,2CAKqB;AACrB,iDAAsD;AACtD,qCAA8C;AAC9C,uCAAgD;AAChD,+CAA8D;AAE9D,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,MAAM,EACN,2BAAkB,EAClB,0BAAc,EACd,IAAA,6BAAmB,EAAC,KAAK,CAAC,CAC3B,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,YAAY,GAAG,MAAM,KAAK,CAAC,OAAO,CAAgB,yBAAa,EAAE;QACrE,MAAM,EAAE,sBAAe;QACvB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;IAC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117,12 +117,29 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
117
117
|
}
|
118
118
|
if (suppliedAssets.length === 0 && borrowedAssets.length === 0)
|
119
119
|
continue;
|
120
|
-
const { borrowedValue, suppliedValue, value, healthRatio, rewardValue } = (0, portfolio_core_1.getElementLendingValues)({
|
120
|
+
const { borrowedValue, suppliedValue, value, healthRatio, rewardValue } = (0, portfolio_core_1.getElementLendingValues)({
|
121
|
+
suppliedAssets,
|
122
|
+
borrowedAssets,
|
123
|
+
rewardAssets,
|
124
|
+
});
|
125
|
+
const name = (0, solana_1.u8ArrayToString)(userAccount.name);
|
126
|
+
const isYieldFan = name.includes('Leverage Stake');
|
127
|
+
let leverage;
|
128
|
+
if (isYieldFan &&
|
129
|
+
suppliedAssets[0].data.price &&
|
130
|
+
suppliedAssets[0].data.amount &&
|
131
|
+
value) {
|
132
|
+
const depositAmount = new bignumber_js_1.default(value).dividedBy(suppliedAssets[0].data.price);
|
133
|
+
leverage = `${new bignumber_js_1.default(suppliedAssets[0].data.amount)
|
134
|
+
.dividedBy(depositAmount)
|
135
|
+
.decimalPlaces(2)
|
136
|
+
.toString()}x`;
|
137
|
+
}
|
121
138
|
elements.push({
|
122
139
|
type: portfolio_core_1.PortfolioElementType.borrowlend,
|
123
140
|
networkId: portfolio_core_1.NetworkId.solana,
|
124
|
-
platformId: constants_1.platformId,
|
125
|
-
label: 'Lending',
|
141
|
+
platformId: isYieldFan ? constants_1.yieldFanPlatformId : constants_1.platformId,
|
142
|
+
label: isYieldFan ? 'Leverage' : 'Lending',
|
126
143
|
value,
|
127
144
|
data: {
|
128
145
|
borrowedAssets,
|
@@ -136,7 +153,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
136
153
|
rewardValue,
|
137
154
|
value,
|
138
155
|
},
|
139
|
-
name:
|
156
|
+
name: isYieldFan ? leverage : name,
|
140
157
|
});
|
141
158
|
}
|
142
159
|
return elements;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"collateralFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/collateralFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gEAAqC;AAGrC,
|
1
|
+
{"version":3,"file":"collateralFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/collateralFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gEAAqC;AAGrC,2CAKqB;AACrB,iDAAsD;AACtD,qCAA8C;AAC9C,uCAA2C;AAC3C,+CAA+E;AAC/E,qGAA6E;AAC7E,6EAAqD;AAGrD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,YAAY,GAAG,MAAM,IAAA,iCAAwB,EACjD,MAAM,EACN,2BAAkB,EAClB,sBAAU,EACV,IAAA,wBAAc,EAAC,KAAK,CAAC,CACtB,CAAC;IACF,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEzC,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,OAAO,CAAiB,oBAAQ,EAAE;QAC1D,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;IACH,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IAEtB,MAAM,WAAW,GAAgB,IAAI,GAAG,EAAE,CAAC;IAC3C,MAAM,WAAW,GAA8B,IAAI,GAAG,EAAE,CAAC;IACzD,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACrB,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QACvC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC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@ -2,6 +2,8 @@ import { PublicKey } from '@solana/web3.js';
|
|
2
2
|
import { Platform } from '@sonarwatch/portfolio-core';
|
3
3
|
export declare const platformId = "mango";
|
4
4
|
export declare const platform: Platform;
|
5
|
+
export declare const yieldFanPlatformId = "yieldfan";
|
6
|
+
export declare const yieldFanPlatform: Platform;
|
5
7
|
export declare const banksKey = "banks";
|
6
8
|
export declare const rootBankPrefix = "mango-rootBank";
|
7
9
|
export declare const groupPrefix = "mango-group";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.boostProgramId = exports.redeemProgramId = exports.mangoV4Pid = exports.boostBanksKey = exports.groupPrefix = exports.rootBankPrefix = exports.banksKey = exports.platform = exports.platformId = void 0;
|
3
|
+
exports.boostProgramId = exports.redeemProgramId = exports.mangoV4Pid = exports.boostBanksKey = exports.groupPrefix = exports.rootBankPrefix = exports.banksKey = exports.yieldFanPlatform = exports.yieldFanPlatformId = exports.platform = exports.platformId = void 0;
|
4
4
|
const web3_js_1 = require("@solana/web3.js");
|
5
5
|
exports.platformId = 'mango';
|
6
6
|
exports.platform = {
|
@@ -10,6 +10,13 @@ exports.platform = {
|
|
10
10
|
defiLlamaId: 'parent#mango-markets',
|
11
11
|
website: 'https://mango.markets/',
|
12
12
|
};
|
13
|
+
exports.yieldFanPlatformId = 'yieldfan';
|
14
|
+
exports.yieldFanPlatform = {
|
15
|
+
id: exports.yieldFanPlatformId,
|
16
|
+
name: 'Yieldfan',
|
17
|
+
image: 'https://sonar.watch/img/platforms/yieldfan.webp',
|
18
|
+
website: 'https://yield.fan/',
|
19
|
+
};
|
13
20
|
exports.banksKey = `banks`;
|
14
21
|
exports.rootBankPrefix = `${exports.platformId}-rootBank`;
|
15
22
|
exports.groupPrefix = `${exports.platformId}-group`;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/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,sBAAsB;IACnC,OAAO,EAAE,wBAAwB;CAClC,CAAC;AACW,QAAA,QAAQ,GAAG,OAAO,CAAC;AACnB,QAAA,cAAc,GAAG,GAAG,kBAAU,WAAW,CAAC;AAC1C,QAAA,WAAW,GAAG,GAAG,kBAAU,QAAQ,CAAC;AACpC,QAAA,aAAa,GAAG,aAAa,CAAC;AAE9B,QAAA,UAAU,GAAG,IAAI,mBAAS,CACrC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,eAAe,GAAG,IAAI,mBAAS,CAC1C,6CAA6C,CAC9C,CAAC;AAEW,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,6CAA6C,CAC9C,CAAC"}
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/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,sBAAsB;IACnC,OAAO,EAAE,wBAAwB;CAClC,CAAC;AAEW,QAAA,kBAAkB,GAAG,UAAU,CAAC;AAChC,QAAA,gBAAgB,GAAa;IACxC,EAAE,EAAE,0BAAkB;IACtB,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,iDAAiD;IACxD,OAAO,EAAE,oBAAoB;CAC9B,CAAC;AACW,QAAA,QAAQ,GAAG,OAAO,CAAC;AACnB,QAAA,cAAc,GAAG,GAAG,kBAAU,WAAW,CAAC;AAC1C,QAAA,WAAW,GAAG,GAAG,kBAAU,QAAQ,CAAC;AACpC,QAAA,aAAa,GAAG,aAAa,CAAC;AAE9B,QAAA,UAAU,GAAG,IAAI,mBAAS,CACrC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,eAAe,GAAG,IAAI,mBAAS,CAC1C,6CAA6C,CAC9C,CAAC;AAEW,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,6CAA6C,CAC9C,CAAC"}
|
@@ -16,6 +16,7 @@ exports.ID = new web3_js_1.PublicKey('RaXcyfW8jK295UAU1XN2uLMTHnTWEaeCcNWLeDB4iD
|
|
16
16
|
exports.leverageFiProgramID = new web3_js_1.PublicKey('EHBN9YKtMmrZhj8JZqyBQRGqyyeHw5xUB1Q5eAHszuMt');
|
17
17
|
exports.leverageVaultsMints = [
|
18
18
|
'27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4', // JLP
|
19
|
+
'jupSoLaHXQiZZTSfEWMTRRgpnyFm8f6sZdosWBjx93v', // JupSOL
|
19
20
|
'vSoLxydx6akxyMD9XEcPvGYNGq6Nn66oqVb3UkGkei7', // vSOL
|
20
21
|
];
|
21
22
|
exports.nxfinanceLeverageIdlItem = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nxfinance/constants.ts"],"names":[],"mappings":";;;AAEA,6CAA4C;AAC5C,+BAA6C;AAEhC,QAAA,UAAU,GAAG,WAAW,CAAC;AACzB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,kDAAkD;IACzD,OAAO,EAAE,uBAAuB;IAChC,OAAO,EAAE,gCAAgC;IACzC,WAAW,EAAE,YAAY,EAAE,sCAAsC;CAClE,CAAC;AAEW,QAAA,EAAE,GAAG,IAAI,mBAAS,CAAC,6CAA6C,CAAC,CAAC;AAElE,QAAA,mBAAmB,GAAG,IAAI,mBAAS,CAC9C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,mBAAmB,GAAG;IACjC,8CAA8C,EAAE,MAAM;IACtD,6CAA6C,EAAE,OAAO;CACvD,CAAC;AAEW,QAAA,wBAAwB,GAAG;IACtC,SAAS,EAAE,2BAAmB,CAAC,QAAQ,EAAE;IACzC,GAAG,EAAE,0BAAoB;IACzB,OAAO,EAAE,QAAQ;CACP,CAAC"}
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nxfinance/constants.ts"],"names":[],"mappings":";;;AAEA,6CAA4C;AAC5C,+BAA6C;AAEhC,QAAA,UAAU,GAAG,WAAW,CAAC;AACzB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,kDAAkD;IACzD,OAAO,EAAE,uBAAuB;IAChC,OAAO,EAAE,gCAAgC;IACzC,WAAW,EAAE,YAAY,EAAE,sCAAsC;CAClE,CAAC;AAEW,QAAA,EAAE,GAAG,IAAI,mBAAS,CAAC,6CAA6C,CAAC,CAAC;AAElE,QAAA,mBAAmB,GAAG,IAAI,mBAAS,CAC9C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,mBAAmB,GAAG;IACjC,8CAA8C,EAAE,MAAM;IACtD,6CAA6C,EAAE,SAAS;IACxD,6CAA6C,EAAE,OAAO;CACvD,CAAC;AAEW,QAAA,wBAAwB,GAAG;IACtC,SAAS,EAAE,2BAAmB,CAAC,QAAQ,EAAE;IACzC,GAAG,EAAE,0BAAoB;IACzB,OAAO,EAAE,QAAQ;CACP,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/picasso/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAA4C;AAC5C,+DAQoC;AACpC,gEAAqC;AAErC,2CAA+E;AAC/E,qGAA6E;AAC7E,+CAAuE;AAEvE,iDAAsD;AAE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AO,CAAC,CAAC;IACnB,CAAC;CAAA;AA5DD,gEA4DC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"unstakingPositionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/picasso/unstakingPositionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,gEAAqC;AAErC,2CAIqB;AAErB,qGAA6E;AAE7E,kEAA+D;AAE/D,MAAM,aAAa,GAAG,IAAI,6BAAa,CAAU,iCAAqB,EAAE;IACtE,MAAM,EAAE,oCAAwB;IAChC,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,0CAA0C;IAC1C,8DAA8D;IAE9D,MAAM,SAAS,GAAG,MAAM,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAErD,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEpD,MAAM,QAAQ,GAAG,SAAS,CAAC,MAAM,CAC/B,CAAC,CAAC,EAAE,EAAE,WAAC,OAAA,CAAA,MAAA,CAAC,CAAC,iBAAiB,0CAAE,KAAK,MAAK,KAAK,CAAA,EAAA,CAC5C,CAAC;IAEF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,UAAU,GAAG;QACjB,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,CAAC;KAC5D,CAAC;IAEF,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,mBAAmB,CACjD,UAAU,EACV,0BAAS,CAAC,MAAM,CACjB,CAAC;IAEF,MAAM,MAAM,GAA0B,EAAE,CAAC;IAEzC,QAAQ,CAA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