@sonarwatch/portfolio-plugins 0.11.230 → 0.11.232
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +1674 -1666
- package/README.md +3 -3
- package/package.json +2 -2
- package/src/index.js +4 -4
- package/src/index.js.map +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/{metadao → futarchy}/constants.d.ts +3 -3
- package/src/plugins/futarchy/constants.js +19 -0
- package/src/plugins/futarchy/constants.js.map +1 -0
- package/src/plugins/futarchy/daosJob.js +283 -0
- package/src/plugins/futarchy/daosJob.js.map +1 -0
- package/src/plugins/{metadao → futarchy}/index.js +2 -3
- package/src/plugins/futarchy/index.js.map +1 -0
- package/src/plugins/futarchy/structs.d.ts +96 -0
- package/src/plugins/futarchy/structs.js +94 -0
- package/src/plugins/futarchy/structs.js.map +1 -0
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/utils/aptos/getAccountResources.d.ts +1 -1
- package/src/utils/aptos/getCoinStoreResources.d.ts +1 -1
- package/src/utils/aptos/getView.d.ts +1 -1
- package/src/utils/clients/getClientCosmos.d.ts +84 -57
- package/src/utils/clients/getClientIbc.d.ts +144 -103
- package/src/utils/clients/getClientSei.d.ts +97 -97
- package/src/utils/misc/getLpUnderlyingTokenSource.d.ts +2 -0
- package/src/utils/misc/getLpUnderlyingTokenSource.js +3 -1
- package/src/utils/misc/getLpUnderlyingTokenSource.js.map +1 -1
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getAllBalances.d.ts +2 -2
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
- package/src/plugins/metadao/constants.js +0 -16
- package/src/plugins/metadao/constants.js.map +0 -1
- package/src/plugins/metadao/index.js.map +0 -1
- package/src/plugins/metadao/poolsJob.js +0 -98
- package/src/plugins/metadao/poolsJob.js.map +0 -1
- package/src/plugins/metadao/structs.d.ts +0 -44
- package/src/plugins/metadao/structs.js +0 -45
- package/src/plugins/metadao/structs.js.map +0 -1
- package/src/plugins/metadao/vaultsJob.d.ts +0 -3
- package/src/plugins/metadao/vaultsJob.js +0 -113
- package/src/plugins/metadao/vaultsJob.js.map +0 -1
- /package/src/plugins/{metadao/poolsJob.d.ts → futarchy/daosJob.d.ts} +0 -0
- /package/src/plugins/{metadao → futarchy}/index.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.11.
|
3
|
+
"version": "0.11.232",
|
4
4
|
"type": "commonjs",
|
5
5
|
"generators": "./generators.json",
|
6
6
|
"dependencies": {
|
@@ -42,7 +42,7 @@
|
|
42
42
|
"web3-v1": "npm:web3@^1.5.0"
|
43
43
|
},
|
44
44
|
"peerDependencies": {
|
45
|
-
"@sonarwatch/portfolio-core": "0.11.
|
45
|
+
"@sonarwatch/portfolio-core": "0.11.232"
|
46
46
|
},
|
47
47
|
"main": "./src/index.js",
|
48
48
|
"types": "./src/index.d.ts"
|
package/src/index.js
CHANGED
@@ -116,7 +116,7 @@ const bonfida_1 = require("./plugins/bonfida");
|
|
116
116
|
const cropper_1 = require("./plugins/cropper");
|
117
117
|
const hedgehog_1 = require("./plugins/hedgehog");
|
118
118
|
const whalesmarket_1 = require("./plugins/whalesmarket");
|
119
|
-
const
|
119
|
+
const futarchy_1 = require("./plugins/futarchy");
|
120
120
|
const elixir_1 = require("./plugins/elixir");
|
121
121
|
var constants_1 = require("./plugins/tokens/constants");
|
122
122
|
Object.defineProperty(exports, "walletTokensPlatform", { enumerable: true, get: function () { return constants_1.walletTokensPlatform; } });
|
@@ -227,7 +227,7 @@ exports.platforms = [
|
|
227
227
|
...cropper_1.platforms,
|
228
228
|
...hedgehog_1.platforms,
|
229
229
|
...whalesmarket_1.platforms,
|
230
|
-
...
|
230
|
+
...futarchy_1.platforms,
|
231
231
|
...elixir_1.platforms,
|
232
232
|
];
|
233
233
|
// JOBS //
|
@@ -321,7 +321,7 @@ exports.jobs = [
|
|
321
321
|
...cropper_1.jobs,
|
322
322
|
...hedgehog_1.jobs,
|
323
323
|
...whalesmarket_1.jobs,
|
324
|
-
...
|
324
|
+
...futarchy_1.jobs,
|
325
325
|
...elixir_1.jobs,
|
326
326
|
];
|
327
327
|
// FETCHERS //
|
@@ -417,7 +417,7 @@ exports.fetchers = [
|
|
417
417
|
...cropper_1.fetchers,
|
418
418
|
...hedgehog_1.fetchers,
|
419
419
|
...whalesmarket_1.fetchers,
|
420
|
-
...
|
420
|
+
...futarchy_1.fetchers,
|
421
421
|
...elixir_1.fetchers,
|
422
422
|
];
|
423
423
|
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":";;;;;;;;;;;;;;;;;;;;AAIA,wFAAqF;AACrF,sEAA8C;AAC9C,6CAI0B;AAC1B,yDAIgC;AAChC,uDAAgE;AAChE,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,2CAKyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D,qEAIsC;AACtC,uDAI+B;AAC/B,mDAI6B;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,yCAIwB;AACxB,iDAI4B;AAC5B,yCAIwB;AACxB,mDAI6B;AAC7B,qDAI8B;AAC9B,2CAIyB;AACzB,2CAKyB;AACzB,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,2CAIyB;AACzB,uDAI+B;AAC/B,6DAIkC;AAClC,2CAIyB;AACzB,yCAIwB;AACxB,mDAI6B;AAC7B,6CAI0B;AAC1B,iEAIoC;AACpC,6DAIkC;AAClC,yCAIwB;AACxB,uCAIuB;AACvB,+CAI2B;AAC3B,iDAI4B;AAC5B,mDAI6B;AAC7B,2CAIyB;AACzB,+CAI2B;AAC3B,uCAIuB;AACvB,iDAI4B;AAC5B,yCAIwB;AACxB,6CAI0B;AAC1B,yCAIwB;AACxB,mDAI6B;AAC7B,2CAIyB;AACzB,mDAI6B;AAC7B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,yCAIwB;AACxB,+CAI2B;AAC3B,+CAI2B;AAC3B,iDAI4B;AAC5B,yDAIgC;AAChC
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,wFAAqF;AACrF,sEAA8C;AAC9C,6CAI0B;AAC1B,yDAIgC;AAChC,uDAAgE;AAChE,iDAG4B;AAC5B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_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;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { PublicKey } from '@solana/web3.js';
|
2
2
|
import { Platform } from '@sonarwatch/portfolio-core';
|
3
|
-
export declare const platformId = "
|
3
|
+
export declare const platformId = "futarchy";
|
4
4
|
export declare const platform: Platform;
|
5
|
-
export declare const
|
6
|
-
export declare const
|
5
|
+
export declare const daoPid: PublicKey;
|
6
|
+
export declare const daoNameById: Map<string, string>;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.daoNameById = exports.daoPid = exports.platform = exports.platformId = void 0;
|
4
|
+
const web3_js_1 = require("@solana/web3.js");
|
5
|
+
exports.platformId = 'futarchy';
|
6
|
+
exports.platform = {
|
7
|
+
id: exports.platformId,
|
8
|
+
name: 'Futarchy',
|
9
|
+
image: 'https://sonar.watch/img/platforms/metadao.webp',
|
10
|
+
// defiLlamaId: 'foo-finance', // from https://defillama.com/docs/api
|
11
|
+
website: 'https://futarchy.metadao.fi/',
|
12
|
+
twitter: 'https://x.com/MetaDAOProject',
|
13
|
+
};
|
14
|
+
exports.daoPid = new web3_js_1.PublicKey('autoQP9RmUNkzzKRXsMkWicDVZ3h29vvyMDcAYjCxxg');
|
15
|
+
exports.daoNameById = new Map([
|
16
|
+
['CNMZgxYsQpygk8CLN9Su1igwXX2kHtcawaNAGuBPv3G9', 'MetaDAO '],
|
17
|
+
['5vVCYQHPd8o3pGejYWzKZtnUSdLjXzDZcjZQxiFumXXx', 'Drift '],
|
18
|
+
]);
|
19
|
+
//# sourceMappingURL=constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/futarchy/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,UAAU,CAAC;AACxB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,gDAAgD;IACvD,qEAAqE;IACrE,OAAO,EAAE,8BAA8B;IACvC,OAAO,EAAE,8BAA8B;CACxC,CAAC;AAEW,QAAA,MAAM,GAAG,IAAI,mBAAS,CACjC,6CAA6C,CAC9C,CAAC;AAEW,QAAA,WAAW,GAAwB,IAAI,GAAG,CAAC;IACtD,CAAC,8CAA8C,EAAE,UAAU,CAAC;IAC5D,CAAC,8CAA8C,EAAE,QAAQ,CAAC;CAC3D,CAAC,CAAC"}
|
@@ -0,0 +1,283 @@
|
|
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
|
+
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
13
|
+
const clients_1 = require("../../utils/clients");
|
14
|
+
const solana_1 = require("../../utils/solana");
|
15
|
+
const filters_1 = require("../../utils/solana/filters");
|
16
|
+
const constants_1 = require("./constants");
|
17
|
+
const structs_1 = require("./structs");
|
18
|
+
const helpers_1 = require("../scallop/helpers");
|
19
|
+
const getLpTokenSource_1 = require("../../utils/misc/getLpTokenSource");
|
20
|
+
const constants_2 = require("../tokens/constants");
|
21
|
+
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
22
|
+
var _a, _b, _c;
|
23
|
+
const client = (0, clients_1.getClientSolana)();
|
24
|
+
const daos = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.daoStruct, constants_1.daoPid, (0, filters_1.dataSizeFilter)(168));
|
25
|
+
const daoById = new Map();
|
26
|
+
daos.forEach((dao) => daoById.set(dao.pubkey.toString(), dao));
|
27
|
+
const proposals = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.proposalStruct, constants_1.daoPid, (0, filters_1.dataSizeFilter)(2000));
|
28
|
+
const amms = [];
|
29
|
+
const vaults = [];
|
30
|
+
proposals.forEach((prop) => {
|
31
|
+
amms.push(prop.failAmm, prop.passAmm);
|
32
|
+
vaults.push(prop.baseVault, prop.quoteVault);
|
33
|
+
});
|
34
|
+
const [ammsAccounts, vaultsAccounts] = yield Promise.all([
|
35
|
+
(0, solana_1.getParsedMultipleAccountsInfo)(client, structs_1.ammStruct, amms),
|
36
|
+
(0, solana_1.getParsedMultipleAccountsInfo)(client, structs_1.conditionnalVaultStruct, vaults),
|
37
|
+
]);
|
38
|
+
const ammById = new Map();
|
39
|
+
const vaultById = new Map();
|
40
|
+
const tokensPubkeys = [];
|
41
|
+
const mintsPubkeys = [];
|
42
|
+
const underlyingMints = new Set();
|
43
|
+
ammsAccounts.forEach((acc) => {
|
44
|
+
if (acc) {
|
45
|
+
ammById.set(acc.pubkey.toString(), acc);
|
46
|
+
mintsPubkeys.push(acc.lpMint);
|
47
|
+
}
|
48
|
+
});
|
49
|
+
vaultsAccounts.forEach((acc) => {
|
50
|
+
if (acc) {
|
51
|
+
vaultById.set(acc.pubkey.toString(), acc);
|
52
|
+
tokensPubkeys.push(acc.underlyingTokenAccount);
|
53
|
+
mintsPubkeys.push(acc.conditionalOnFinalizeTokenMint, acc.conditionalOnRevertTokenMint);
|
54
|
+
underlyingMints.add(acc.underlyingTokenMint.toString());
|
55
|
+
}
|
56
|
+
});
|
57
|
+
const [tokensAccounts, mintsAccounts, underlyingTokenPriceById, tokenList] = yield Promise.all([
|
58
|
+
(0, solana_1.getParsedMultipleAccountsInfo)(client, solana_1.tokenAccountStruct, tokensPubkeys),
|
59
|
+
(0, solana_1.getParsedMultipleAccountsInfo)(client, solana_1.mintAccountStruct, mintsPubkeys),
|
60
|
+
yield cache.getTokenPricesAsMap(Array.from(underlyingMints), portfolio_core_1.NetworkId.solana),
|
61
|
+
cache.getItems(Array.from(underlyingMints), {
|
62
|
+
prefix: constants_2.tokenListsDetailsPrefix,
|
63
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
64
|
+
}),
|
65
|
+
]);
|
66
|
+
const tokenAccountById = new Map();
|
67
|
+
const mintAccountById = new Map();
|
68
|
+
const tokensDetailsById = new Map();
|
69
|
+
tokensAccounts.forEach((acc) => {
|
70
|
+
if (acc)
|
71
|
+
tokenAccountById.set(acc.pubkey.toString(), acc);
|
72
|
+
});
|
73
|
+
mintsAccounts.forEach((acc) => {
|
74
|
+
if (acc)
|
75
|
+
mintAccountById.set(acc.pubkey.toString(), acc);
|
76
|
+
});
|
77
|
+
tokenList.forEach((tD) => tD ? tokensDetailsById.set(tD.address, tD) : undefined);
|
78
|
+
const tokenPriceSources = [];
|
79
|
+
const usdSourceById = new Map();
|
80
|
+
for (const proposal of proposals) {
|
81
|
+
const [passAmm, failAmm] = [
|
82
|
+
ammById.get(proposal.passAmm.toString()),
|
83
|
+
ammById.get(proposal.failAmm.toString()),
|
84
|
+
];
|
85
|
+
const [quoteVault, baseVault] = [
|
86
|
+
vaultById.get(proposal.quoteVault.toString()),
|
87
|
+
vaultById.get(proposal.baseVault.toString()),
|
88
|
+
];
|
89
|
+
const dao = daoById.get(proposal.dao.toString());
|
90
|
+
if (!passAmm || !failAmm || !quoteVault || !baseVault || !dao)
|
91
|
+
continue;
|
92
|
+
const daoName = constants_1.daoNameById.get(dao.pubkey.toString());
|
93
|
+
const elementName = `${daoName} Proposal : ${(0, helpers_1.shortenAddress)(proposal.pubkey.toString())} (${structs_1.ProposalState[proposal.state]})`;
|
94
|
+
const usdReserveAccount = tokenAccountById.get(quoteVault.underlyingTokenAccount.toString());
|
95
|
+
const [usdTokenPrice, baseUnderlyingTokenPrice, baseUnderlyingTokenDetail] = [
|
96
|
+
underlyingTokenPriceById.get(quoteVault.underlyingTokenMint.toString()),
|
97
|
+
underlyingTokenPriceById.get(baseVault.underlyingTokenMint.toString()),
|
98
|
+
tokensDetailsById.get(baseVault.underlyingTokenMint.toString()),
|
99
|
+
];
|
100
|
+
// Price the pUSD and fUSD of this proposal
|
101
|
+
if (usdReserveAccount &&
|
102
|
+
!usdReserveAccount.amount.isZero() &&
|
103
|
+
usdTokenPrice) {
|
104
|
+
const pUSDMint = quoteVault.conditionalOnFinalizeTokenMint.toString();
|
105
|
+
const fUSDMint = quoteVault.conditionalOnRevertTokenMint.toString();
|
106
|
+
const underlyingValue = usdReserveAccount.amount
|
107
|
+
.times(usdTokenPrice.price)
|
108
|
+
.dividedBy(Math.pow(10, quoteVault.decimals));
|
109
|
+
const [pUSDMintAccount, fUSDMintAccount] = [
|
110
|
+
mintAccountById.get(pUSDMint),
|
111
|
+
mintAccountById.get(fUSDMint),
|
112
|
+
];
|
113
|
+
if (!pUSDMintAccount || !fUSDMintAccount)
|
114
|
+
continue;
|
115
|
+
const pUSDPrice = underlyingValue
|
116
|
+
.dividedBy(pUSDMintAccount.supply.dividedBy(Math.pow(10, pUSDMintAccount.decimals)))
|
117
|
+
.dividedBy(2);
|
118
|
+
const fUSDPrice = underlyingValue
|
119
|
+
.dividedBy(fUSDMintAccount.supply.dividedBy(Math.pow(10, fUSDMintAccount.decimals)))
|
120
|
+
.dividedBy(2);
|
121
|
+
const fUSDSource = {
|
122
|
+
address: fUSDMint,
|
123
|
+
decimals: fUSDMintAccount.decimals,
|
124
|
+
id: proposal.quoteVault.toString(),
|
125
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
126
|
+
platformId: constants_1.platformId,
|
127
|
+
price: fUSDPrice.toNumber(),
|
128
|
+
timestamp: Date.now(),
|
129
|
+
weight: 1,
|
130
|
+
underlyings: [
|
131
|
+
{
|
132
|
+
amountPerLp: 1,
|
133
|
+
price: fUSDPrice.toNumber(),
|
134
|
+
address: usdTokenPrice.address,
|
135
|
+
decimals: usdTokenPrice.decimals,
|
136
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
137
|
+
},
|
138
|
+
],
|
139
|
+
liquidityName: `fUSD`,
|
140
|
+
elementName,
|
141
|
+
};
|
142
|
+
const pUSDSource = {
|
143
|
+
address: pUSDMint,
|
144
|
+
decimals: pUSDMintAccount.decimals,
|
145
|
+
id: proposal.quoteVault.toString(),
|
146
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
147
|
+
platformId: constants_1.platformId,
|
148
|
+
price: pUSDPrice.toNumber(),
|
149
|
+
timestamp: Date.now(),
|
150
|
+
weight: 1,
|
151
|
+
underlyings: [
|
152
|
+
{
|
153
|
+
amountPerLp: 1,
|
154
|
+
price: pUSDPrice.toNumber(),
|
155
|
+
address: usdTokenPrice.address,
|
156
|
+
decimals: usdTokenPrice.decimals,
|
157
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
158
|
+
},
|
159
|
+
],
|
160
|
+
liquidityName: `pUSD`,
|
161
|
+
elementName,
|
162
|
+
};
|
163
|
+
// If the Proposal has passed, fUSD will not be redeemable (price = 0)
|
164
|
+
if (proposal.state === structs_1.ProposalState.Passed) {
|
165
|
+
fUSDSource.price = 0;
|
166
|
+
if ((_a = fUSDSource.underlyings) === null || _a === void 0 ? void 0 : _a.at(0))
|
167
|
+
fUSDSource.underlyings[0].price = 0;
|
168
|
+
}
|
169
|
+
// If the Proposal has failed, pUSD will not be redeemable (price = 0)
|
170
|
+
if (proposal.state === structs_1.ProposalState.Failed) {
|
171
|
+
pUSDSource.price = 0;
|
172
|
+
if ((_b = pUSDSource.underlyings) === null || _b === void 0 ? void 0 : _b.at(0))
|
173
|
+
pUSDSource.underlyings[0].price = 0;
|
174
|
+
}
|
175
|
+
tokenPriceSources.push(pUSDSource, fUSDSource);
|
176
|
+
usdSourceById.set(pUSDSource.address, pUSDSource);
|
177
|
+
usdSourceById.set(fUSDSource.address, fUSDSource);
|
178
|
+
}
|
179
|
+
// Price the pToken and fToken of this proposal from the pools composition
|
180
|
+
for (const amm of [passAmm, failAmm]) {
|
181
|
+
if (amm.baseAmount.isZero())
|
182
|
+
continue;
|
183
|
+
const [lpMint, baseMint, quoteMint] = [
|
184
|
+
amm.lpMint.toString(),
|
185
|
+
amm.baseMint.toString(),
|
186
|
+
amm.quoteMint.toString(),
|
187
|
+
];
|
188
|
+
const [quoteSource, lpMintAccount] = [
|
189
|
+
usdSourceById.get(amm.quoteMint.toString()),
|
190
|
+
mintAccountById.get(lpMint),
|
191
|
+
];
|
192
|
+
if (!quoteSource ||
|
193
|
+
!lpMintAccount ||
|
194
|
+
!baseUnderlyingTokenPrice ||
|
195
|
+
!baseUnderlyingTokenDetail)
|
196
|
+
continue;
|
197
|
+
const isPassAmm = amm.pubkey.toString() === proposal.passAmm.toString();
|
198
|
+
const liquidityName = isPassAmm ? 'Pass LP' : 'Fail LP';
|
199
|
+
const baseLiquidityName = isPassAmm
|
200
|
+
? `p${baseUnderlyingTokenDetail.symbol}`
|
201
|
+
: `f${baseUnderlyingTokenDetail.symbol}`;
|
202
|
+
const basePrice = amm.quoteAmount
|
203
|
+
.dividedBy(Math.pow(10, amm.quoteMintDecimals))
|
204
|
+
.dividedBy(amm.baseAmount.dividedBy(Math.pow(10, amm.baseMintDecimals)))
|
205
|
+
.toNumber();
|
206
|
+
const baseTokenPriceSource = {
|
207
|
+
address: baseMint,
|
208
|
+
decimals: amm.baseMintDecimals,
|
209
|
+
weight: 1,
|
210
|
+
price: basePrice,
|
211
|
+
id: constants_1.platformId,
|
212
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
213
|
+
platformId: constants_1.platformId,
|
214
|
+
timestamp: Date.now(),
|
215
|
+
underlyings: [Object.assign(Object.assign({}, baseUnderlyingTokenPrice), { amountPerLp: 1 })],
|
216
|
+
liquidityName: baseLiquidityName,
|
217
|
+
elementName,
|
218
|
+
};
|
219
|
+
// If it's the amm handling the Pass LP and the Proposal has failed, pToken will not be redeemable (price = 0)
|
220
|
+
// If it's the amm handling the Fail LP and the Proposal has passed, fToken will not be redeemable (price = 0)
|
221
|
+
if ((proposal.state === structs_1.ProposalState.Failed && isPassAmm) ||
|
222
|
+
(proposal.state === structs_1.ProposalState.Passed && !isPassAmm)) {
|
223
|
+
baseTokenPriceSource.price = 0;
|
224
|
+
if ((_c = baseTokenPriceSource.underlyings) === null || _c === void 0 ? void 0 : _c.at(0))
|
225
|
+
baseTokenPriceSource.underlyings[0].price = 0;
|
226
|
+
}
|
227
|
+
const baseTokenPrice = (0, portfolio_core_1.tokenPriceFromSources)([baseTokenPriceSource]);
|
228
|
+
const quotePrice = (0, portfolio_core_1.tokenPriceFromSources)([quoteSource]);
|
229
|
+
if (!baseTokenPrice)
|
230
|
+
continue;
|
231
|
+
const lpSource = (0, getLpTokenSource_1.getLpTokenSource)({
|
232
|
+
lpDetails: {
|
233
|
+
address: lpMint,
|
234
|
+
decimals: lpMintAccount.decimals,
|
235
|
+
supply: lpMintAccount.supply
|
236
|
+
.dividedBy(Math.pow(10, lpMintAccount.decimals))
|
237
|
+
.toNumber(),
|
238
|
+
},
|
239
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
240
|
+
platformId: constants_1.platformId,
|
241
|
+
poolUnderlyings: [
|
242
|
+
{
|
243
|
+
address: baseMint,
|
244
|
+
decimals: amm.baseMintDecimals,
|
245
|
+
reserveAmount: amm.baseAmount
|
246
|
+
.dividedBy(Math.pow(10, amm.baseMintDecimals))
|
247
|
+
.toNumber(),
|
248
|
+
weight: 0.5,
|
249
|
+
tokenPrice: baseTokenPrice,
|
250
|
+
},
|
251
|
+
{
|
252
|
+
address: quoteMint,
|
253
|
+
decimals: amm.quoteMintDecimals,
|
254
|
+
reserveAmount: amm.quoteAmount
|
255
|
+
.dividedBy(Math.pow(10, amm.quoteMintDecimals))
|
256
|
+
.toNumber(),
|
257
|
+
weight: 0.5,
|
258
|
+
tokenPrice: quotePrice,
|
259
|
+
},
|
260
|
+
],
|
261
|
+
sourceId: constants_1.platformId,
|
262
|
+
liquidityName,
|
263
|
+
elementName,
|
264
|
+
});
|
265
|
+
if (lpSource.at(0)) {
|
266
|
+
// If it's the amm handling the Pass LP and the Proposal has failed, Pass LP will not be redeemable (price = 0)
|
267
|
+
// If it's the amm handling the Fail LP and the Proposal has passed, Fail LP will not be redeemable (price = 0)
|
268
|
+
if ((proposal.state === structs_1.ProposalState.Failed && isPassAmm) ||
|
269
|
+
(proposal.state === structs_1.ProposalState.Passed && !isPassAmm))
|
270
|
+
lpSource[0].price = 0;
|
271
|
+
}
|
272
|
+
tokenPriceSources.push(...lpSource, baseTokenPriceSource);
|
273
|
+
}
|
274
|
+
}
|
275
|
+
yield cache.setTokenPriceSources(tokenPriceSources);
|
276
|
+
});
|
277
|
+
const job = {
|
278
|
+
id: `${constants_1.platformId}-daos`,
|
279
|
+
executor,
|
280
|
+
label: 'normal',
|
281
|
+
};
|
282
|
+
exports.default = job;
|
283
|
+
//# sourceMappingURL=daosJob.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"daosJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/futarchy/daosJob.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,+DAKoC;AAGpC,iDAAsD;AACtD,+CAQ4B;AAC5B,wDAA4D;AAC5D,2CAA8D;AAC9D,uCASmB;AACnB,gDAAoD;AACpD,wEAAqE;AACrE,mDAA8D;AAE9D,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,IAAI,GAAG,MAAM,IAAA,iCAAwB,EACzC,MAAM,EACN,mBAAS,EACT,kBAAM,EACN,IAAA,wBAAc,EAAC,GAAG,CAAC,CACpB,CAAC;IAEF,MAAM,OAAO,GAAoC,IAAI,GAAG,EAAE,CAAC;IAC3D,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC;IAE/D,MAAM,SAAS,GAAG,MAAM,IAAA,iCAAwB,EAC9C,MAAM,EACN,wBAAc,EACd,kBAAM,EACN,IAAA,wBAAc,EAAC,IAAI,CAAC,CACrB,CAAC;IAEF,MAAM,IAAI,GAAgB,EAAE,CAAC;IAC7B,MAAM,MAAM,GAAgB,EAAE,CAAC;IAC/B,SAAS,CAAC,OAAO,CAAC,CAAC,IAAI,E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AAE,SAAS;wBAClB,QAAQ,EAAE,GAAG,CAAC,iBAAiB;wBAC/B,aAAa,EAAE,GAAG,CAAC,WAAW;6BAC3B,SAAS,CAAC,SAAA,EAAE,EAAI,GAAG,CAAC,iBAAiB,CAAA,CAAC;6BACtC,QAAQ,EAAE;wBACb,MAAM,EAAE,GAAG;wBACX,UAAU,EAAE,UAAU;qBACvB;iBACF;gBACD,QAAQ,EAAE,sBAAU;gBACpB,aAAa;gBACb,WAAW;aACZ,CAAC,CAAC;YAEH,IAAI,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBACnB,+GAA+G;gBAC/G,+GAA+G;gBAC/G,IACE,CAAC,QAAQ,CAAC,KAAK,KAAK,uBAAa,CAAC,MAAM,IAAI,SAAS,CAAC;oBACtD,CAAC,QAAQ,CAAC,KAAK,KAAK,uBAAa,CAAC,MAAM,IAAI,CAAC,SAAS,CAAC;oBAEvD,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC;YAC1B,CAAC;YACD,iBAAiB,CAAC,IAAI,CAAC,GAAG,QAAQ,EAAE,oBAAoB,CAAC,CAAC;QAC5D,CAAC;IACH,CAAC;IACD,MAAM,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AACtD,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,OAAO;IACxB,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -5,9 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.fetchers = exports.jobs = exports.platforms = void 0;
|
7
7
|
const constants_1 = require("./constants");
|
8
|
-
const
|
9
|
-
const poolsJob_1 = __importDefault(require("./poolsJob"));
|
8
|
+
const daosJob_1 = __importDefault(require("./daosJob"));
|
10
9
|
exports.platforms = [constants_1.platform];
|
11
|
-
exports.jobs = [
|
10
|
+
exports.jobs = [daosJob_1.default];
|
12
11
|
exports.fetchers = [];
|
13
12
|
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/futarchy/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,wDAAgC;AAEnB,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,iBAAO,CAAC,CAAC;AACxB,QAAA,QAAQ,GAAc,EAAE,CAAC"}
|
@@ -0,0 +1,96 @@
|
|
1
|
+
/// <reference types="node" />
|
2
|
+
import { BeetStruct, FixableBeetStruct } from '@metaplex-foundation/beet';
|
3
|
+
import { PublicKey } from '@metaplex-foundation/js';
|
4
|
+
import BigNumber from 'bignumber.js';
|
5
|
+
export declare enum VaultStatus {
|
6
|
+
Active = 0,
|
7
|
+
Finalized = 1,
|
8
|
+
Reverted = 2
|
9
|
+
}
|
10
|
+
export type ConditionnalVault = {
|
11
|
+
buffer: Buffer;
|
12
|
+
status: VaultStatus;
|
13
|
+
settlementAuthority: PublicKey;
|
14
|
+
underlyingTokenMint: PublicKey;
|
15
|
+
underlyingTokenAccount: PublicKey;
|
16
|
+
conditionalOnFinalizeTokenMint: PublicKey;
|
17
|
+
conditionalOnRevertTokenMint: PublicKey;
|
18
|
+
pdaBump: number;
|
19
|
+
decimals: number;
|
20
|
+
};
|
21
|
+
export declare const conditionnalVaultStruct: BeetStruct<ConditionnalVault, Partial<ConditionnalVault>>;
|
22
|
+
export type TwapOracle = {
|
23
|
+
lastUpdatedSlot: BigNumber;
|
24
|
+
lastPrice: BigNumber;
|
25
|
+
lastObservation: BigNumber;
|
26
|
+
aggregator: BigNumber;
|
27
|
+
maxObservationChangePerUpdate: BigNumber;
|
28
|
+
initialObservation: BigNumber;
|
29
|
+
};
|
30
|
+
export declare const twapOracleStruct: BeetStruct<TwapOracle, Partial<TwapOracle>>;
|
31
|
+
export type Amm = {
|
32
|
+
buffer: Buffer;
|
33
|
+
bump: number;
|
34
|
+
createdAtSlot: BigNumber;
|
35
|
+
lpMint: PublicKey;
|
36
|
+
baseMint: PublicKey;
|
37
|
+
quoteMint: PublicKey;
|
38
|
+
baseMintDecimals: number;
|
39
|
+
quoteMintDecimals: number;
|
40
|
+
baseAmount: BigNumber;
|
41
|
+
quoteAmount: BigNumber;
|
42
|
+
oracle: TwapOracle;
|
43
|
+
};
|
44
|
+
export declare const ammStruct: BeetStruct<Amm, Partial<Amm>>;
|
45
|
+
export type Dao = {
|
46
|
+
buffer: Buffer;
|
47
|
+
treasuryPdaBump: number;
|
48
|
+
treasury: PublicKey;
|
49
|
+
tokenMint: PublicKey;
|
50
|
+
usdcMint: PublicKey;
|
51
|
+
proposalCount: number;
|
52
|
+
passThresholdBps: number;
|
53
|
+
slotsPerProposal: BigNumber;
|
54
|
+
twapInitialObservation: BigNumber;
|
55
|
+
twapMaxObservationChangePerUpdate: BigNumber;
|
56
|
+
minQuoteFutarchicLiquidity: BigNumber;
|
57
|
+
minBaseFutarchicLiquidity: BigNumber;
|
58
|
+
};
|
59
|
+
export declare const daoStruct: BeetStruct<Dao, Partial<Dao>>;
|
60
|
+
export declare enum ProposalState {
|
61
|
+
Pending = 0,
|
62
|
+
Passed = 1,
|
63
|
+
Failed = 2,
|
64
|
+
Executed = 3
|
65
|
+
}
|
66
|
+
export type ProposalAccount = {
|
67
|
+
pubkey: PublicKey;
|
68
|
+
isSigner: boolean;
|
69
|
+
isWritable: boolean;
|
70
|
+
};
|
71
|
+
export declare const proposalAccountStruct: BeetStruct<ProposalAccount, Partial<ProposalAccount>>;
|
72
|
+
export type ProposalInstruction = {
|
73
|
+
programId: PublicKey;
|
74
|
+
accounts: ProposalAccount[];
|
75
|
+
data: number[];
|
76
|
+
};
|
77
|
+
export declare const proposalInstructionStruct: FixableBeetStruct<ProposalInstruction, Partial<ProposalInstruction>>;
|
78
|
+
export type Proposal = {
|
79
|
+
buffer: Buffer;
|
80
|
+
number: number;
|
81
|
+
proposer: PublicKey;
|
82
|
+
descriptionUrl: number[];
|
83
|
+
slotEnqueued: BigNumber;
|
84
|
+
state: ProposalState;
|
85
|
+
instruction: ProposalInstruction;
|
86
|
+
passAmm: PublicKey;
|
87
|
+
failAmm: PublicKey;
|
88
|
+
baseVault: PublicKey;
|
89
|
+
quoteVault: PublicKey;
|
90
|
+
dao: PublicKey;
|
91
|
+
passLpTokensLocked: BigNumber;
|
92
|
+
failLpTokensLocked: BigNumber;
|
93
|
+
nonce: BigNumber;
|
94
|
+
pdaBump: number;
|
95
|
+
};
|
96
|
+
export declare const proposalStruct: FixableBeetStruct<Proposal, Partial<Proposal>>;
|