flash-sdk 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/CustodyAccount.d.ts +2 -1
- package/lib/CustodyAccount.js +30 -0
- package/lib/PoolAccount.d.ts +2 -1
- package/lib/PoolAccount.js +60 -61
- package/lib/PoolConfig.d.ts +39 -0
- package/lib/PoolConfig.js +93 -0
- package/lib/PoolConfig.json +305 -0
- package/lib/PoolDisplayData.d.ts +34 -0
- package/lib/PoolDisplayData.js +152 -0
- package/lib/constants/index.d.ts +3 -0
- package/lib/constants/index.js +3 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/index.d.ts +14 -0
- package/lib/types/index.js +11 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +45 -1
- package/package.json +1 -1
- package/src/CustodyAccount.ts +33 -1
- package/src/PoolAccount.ts +75 -67
- package/src/PoolConfig.json +307 -0
- package/src/PoolConfig.ts +158 -0
- package/src/PoolDisplayData.ts +173 -0
- package/src/constants/index.ts +4 -0
- package/src/index.ts +2 -0
- package/src/target/idl/perpetuals.json +3537 -0
- package/src/types/index.ts +9 -2
- package/src/utils/index.ts +51 -0
- package/tsconfig.json +1 -1
package/lib/utils/index.js
CHANGED
@@ -3,13 +3,57 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.checkedDecimalDiv = exports.checkedDecimalMul = exports.checkedDecimalCeilMul = exports.checkedCeilDiv = exports.scaleToExponent = exports.getUnixTs = void 0;
|
6
|
+
exports.checkedDecimalDiv = exports.checkedDecimalMul = exports.checkedDecimalCeilMul = exports.checkedCeilDiv = exports.scaleToExponent = exports.toUiDecimals = exports.getUnixTs = void 0;
|
7
7
|
var bn_js_1 = __importDefault(require("bn.js"));
|
8
8
|
var constants_1 = require("../constants");
|
9
9
|
var getUnixTs = function () {
|
10
10
|
return new Date().getTime() / 1000;
|
11
11
|
};
|
12
12
|
exports.getUnixTs = getUnixTs;
|
13
|
+
// 99999.123456
|
14
|
+
// 99999.123
|
15
|
+
function toUiDecimals(nativeAmount, decimals, precision, commaSeperated) {
|
16
|
+
// TODO: remove BN and upgrade to bigint https://github.com/solana-labs/solana/issues/27440
|
17
|
+
if (precision === void 0) { precision = 3; }
|
18
|
+
if (commaSeperated === void 0) { commaSeperated = false; }
|
19
|
+
if (precision > decimals) {
|
20
|
+
throw "not allowed precision> decimals";
|
21
|
+
}
|
22
|
+
var r = '';
|
23
|
+
if (nativeAmount instanceof bn_js_1.default) {
|
24
|
+
var nativeAmountString = nativeAmount.toString();
|
25
|
+
// get decimals
|
26
|
+
var d = nativeAmountString.slice((decimals) * -1);
|
27
|
+
var p = d.slice(0, precision);
|
28
|
+
var nativeAmountWithoutDecimalsStr = nativeAmount.div(new bn_js_1.default(Math.pow(10, decimals))).toString();
|
29
|
+
r = nativeAmountWithoutDecimalsStr + "." + p;
|
30
|
+
}
|
31
|
+
else if (typeof nativeAmount === "string") {
|
32
|
+
if (isNaN(Number(nativeAmount))) {
|
33
|
+
throw "String No valid ";
|
34
|
+
}
|
35
|
+
var d = nativeAmount.slice((decimals) * -1);
|
36
|
+
var p = d.slice(0, precision);
|
37
|
+
var nativeAmountWithoutDecimalsStr = (new bn_js_1.default(nativeAmount)).div(new bn_js_1.default(Math.pow(10, decimals))).toString();
|
38
|
+
r = nativeAmountWithoutDecimalsStr + "." + p;
|
39
|
+
}
|
40
|
+
else if (typeof nativeAmount === "number") {
|
41
|
+
var d = nativeAmount.toString().slice((decimals) * -1);
|
42
|
+
var p = d.slice(0, precision);
|
43
|
+
var nativeAmountWithoutDecimalsStr = (new bn_js_1.default(nativeAmount)).div(new bn_js_1.default(Math.pow(10, decimals))).toString();
|
44
|
+
r = nativeAmountWithoutDecimalsStr + "." + p;
|
45
|
+
}
|
46
|
+
else {
|
47
|
+
return 'type unknown';
|
48
|
+
}
|
49
|
+
if (commaSeperated) {
|
50
|
+
return Number(r).toLocaleString();
|
51
|
+
}
|
52
|
+
else {
|
53
|
+
return r;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
exports.toUiDecimals = toUiDecimals;
|
13
57
|
// recheck ?? logic
|
14
58
|
var scaleToExponent = function (arg, exponent, target_exponent) {
|
15
59
|
if (target_exponent.eq(exponent)) {
|
package/package.json
CHANGED
package/src/CustodyAccount.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { PublicKey } from "@solana/web3.js";
|
2
|
-
import { Assets, FeesStats, Custody, Fees, PricingParams, TradeStats, Permissions, BorrowRateParams, OracleParams, VolumeStats, PositionStats, BorrowRateState } from "./types";
|
2
|
+
import { Assets, FeesStats, Custody, Fees, PricingParams, TradeStats, Permissions, BorrowRateParams, OracleParams, VolumeStats, PositionStats, BorrowRateState, Side, isVariant, Position } from "./types";
|
3
3
|
import { PositionAccount } from "./PositionAccount";
|
4
4
|
import BN from "bn.js";
|
5
5
|
import { BN_ZERO, RATE_POWER } from "./constants";
|
@@ -84,6 +84,38 @@ export class CustodyAccount {
|
|
84
84
|
|
85
85
|
}
|
86
86
|
|
87
|
+
getCollectivePosition(side: Side):PositionAccount {
|
88
|
+
let stats : PositionStats;
|
89
|
+
if ( isVariant(side,'long')) {
|
90
|
+
stats = this.longPositions;
|
91
|
+
} else {
|
92
|
+
stats = this.shortPositions;
|
93
|
+
};
|
94
|
+
// if (!stats.openPositions.isNeg()) {
|
95
|
+
|
96
|
+
// const obj: Position = {
|
97
|
+
// side,
|
98
|
+
// price:
|
99
|
+
// stats.weighted_price.div(stats.total_quantity)
|
100
|
+
|
101
|
+
// size_usd: stats.size_usd,
|
102
|
+
// collateral_usd: stats.collateral_usd,
|
103
|
+
// unrealized_loss_usd: stats.cumulative_interest_usd,
|
104
|
+
// cumulative_interest_snapshot: stats.cumulative_interest_snapshot,
|
105
|
+
// locked_amount: stats.locked_amount,
|
106
|
+
// ..Position::default()
|
107
|
+
// }
|
108
|
+
// return new PositionAccount(
|
109
|
+
// new PublicKey('dgfgfg'),
|
110
|
+
|
111
|
+
// )
|
112
|
+
// } else {
|
113
|
+
// Ok(Position::default())
|
114
|
+
// }
|
115
|
+
|
116
|
+
throw Error("Incomplete")
|
117
|
+
}
|
118
|
+
|
87
119
|
|
88
120
|
|
89
121
|
|
package/src/PoolAccount.ts
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
import { BN_ZERO, BPS_DECIMALS, BPS_POWER, PERCENTAGE_DECIMALS, PRICE_DECIMALS, USD_DECIMALS } from "./constants";
|
3
3
|
import { BN } from "@coral-xyz/anchor";
|
4
4
|
import { Mint } from "@solana/spl-token";
|
5
|
-
import { Custody, FeesMode, Pool, Side, TokenRatios, isVariant } from "./types";
|
5
|
+
import { AumCalcMode, Custody, FeesMode, Pool, Side, TokenRatios, isVariant } from "./types";
|
6
6
|
import { PublicKey } from "@solana/web3.js";
|
7
7
|
import {CustodyAccount} from "./CustodyAccount";
|
8
8
|
import { OraclePrice } from "./OraclePrice";
|
@@ -10,6 +10,7 @@ import { PositionAccount } from "./PositionAccount";
|
|
10
10
|
import { checkedCeilDiv, checkedDecimalCeilMul, checkedDecimalMul, scaleToExponent } from "./utils";
|
11
11
|
|
12
12
|
|
13
|
+
|
13
14
|
export class PoolAccount {
|
14
15
|
|
15
16
|
publicKey: PublicKey;
|
@@ -42,9 +43,6 @@ export class PoolAccount {
|
|
42
43
|
return this.custodies.findIndex(i => i.toBase58()==custodyKey.toBase58())
|
43
44
|
}
|
44
45
|
|
45
|
-
// loadlpData(lpTokenInfo : Mint){
|
46
|
-
// this.lpTokenInfo = lpTokenInfo
|
47
|
-
// }
|
48
46
|
|
49
47
|
getAddLiquidityFee(
|
50
48
|
tokenId: number,
|
@@ -89,69 +87,6 @@ export class PoolAccount {
|
|
89
87
|
let ratios = this.ratios[tokenId];
|
90
88
|
let current_ratio = this.getCurrentRatio(custody, tokenPrice);
|
91
89
|
throw Error("TODODO");
|
92
|
-
// let new_ratio = self.get_new_ratio(amount_add, amount_remove, custody, token_price)?;
|
93
|
-
|
94
|
-
// let improved = match new_ratio.cmp(&ratios.target) {
|
95
|
-
// Ordering::Less => {
|
96
|
-
// new_ratio > current_ratio
|
97
|
-
// || (current_ratio > ratios.target
|
98
|
-
// && current_ratio - ratios.target > ratios.target - new_ratio)
|
99
|
-
// }
|
100
|
-
// Ordering::Greater => {
|
101
|
-
// new_ratio < current_ratio
|
102
|
-
// || (current_ratio < ratios.target
|
103
|
-
// && ratios.target - current_ratio > new_ratio - ratios.target)
|
104
|
-
// }
|
105
|
-
// Ordering::Equal => current_ratio != ratios.target,
|
106
|
-
// };
|
107
|
-
|
108
|
-
// let ratio_fee = if new_ratio <= ratios.target {
|
109
|
-
// if ratios.target == ratios.min {
|
110
|
-
// Perpetuals::BPS_POWER
|
111
|
-
// } else {
|
112
|
-
// math::checked_add(
|
113
|
-
// Perpetuals::BPS_POWER,
|
114
|
-
// math::checked_div(
|
115
|
-
// math::checked_mul(
|
116
|
-
// custody.fees.ratio_mult as u128,
|
117
|
-
// math::checked_sub(ratios.target, new_ratio)? as u128,
|
118
|
-
// )?,
|
119
|
-
// math::checked_sub(ratios.target, ratios.min)? as u128,
|
120
|
-
// )?,
|
121
|
-
// )?
|
122
|
-
// }
|
123
|
-
// } else if ratios.target == ratios.max {
|
124
|
-
// Perpetuals::BPS_POWER
|
125
|
-
// } else {
|
126
|
-
// math::checked_add(
|
127
|
-
// Perpetuals::BPS_POWER,
|
128
|
-
// math::checked_div(
|
129
|
-
// math::checked_mul(
|
130
|
-
// custody.fees.ratio_mult as u128,
|
131
|
-
// math::checked_sub(new_ratio, ratios.target)? as u128,
|
132
|
-
// )?,
|
133
|
-
// math::checked_sub(ratios.max, ratios.target)? as u128,
|
134
|
-
// )?,
|
135
|
-
// )?
|
136
|
-
// };
|
137
|
-
|
138
|
-
// let fee = if improved {
|
139
|
-
// math::checked_div(
|
140
|
-
// math::checked_mul(base_fee as u128, Perpetuals::BPS_POWER)?,
|
141
|
-
// ratio_fee,
|
142
|
-
// )?
|
143
|
-
// } else {
|
144
|
-
// math::checked_div(
|
145
|
-
// math::checked_mul(base_fee as u128, ratio_fee)?,
|
146
|
-
// Perpetuals::BPS_POWER,
|
147
|
-
// )?
|
148
|
-
// };
|
149
|
-
|
150
|
-
// Self::get_fee_amount(
|
151
|
-
// math::checked_as_u64(fee)?,
|
152
|
-
// std::cmp::max(amount_add, amount_remove),
|
153
|
-
// )
|
154
|
-
|
155
90
|
|
156
91
|
return new BN(0);
|
157
92
|
}
|
@@ -430,5 +365,78 @@ export class PoolAccount {
|
|
430
365
|
}
|
431
366
|
}
|
432
367
|
} //getPnlUsd
|
368
|
+
|
369
|
+
|
370
|
+
getAssetsUnderManagementUsd(
|
371
|
+
token_prices: OraclePrice[],
|
372
|
+
token_ema_prices: OraclePrice[],
|
373
|
+
custodies : CustodyAccount[],
|
374
|
+
aum_calc_mode: AumCalcMode,
|
375
|
+
) :BN {
|
376
|
+
|
377
|
+
let pool_amount_usd: BN = BN_ZERO;
|
378
|
+
|
379
|
+
for (let index=0;index<this.custodies.length;index++) {
|
380
|
+
|
381
|
+
if( token_prices.length != this.custodies.length || token_prices.length != token_ema_prices.length ){
|
382
|
+
throw Error("token prices length incorrect");
|
383
|
+
}
|
384
|
+
|
385
|
+
|
386
|
+
let aum_token_price : OraclePrice;
|
387
|
+
// switch unable to match enum
|
388
|
+
if(isVariant(aum_calc_mode,"last")){
|
389
|
+
aum_token_price = token_prices[index];
|
390
|
+
} else if( isVariant(aum_calc_mode, "ema") ){
|
391
|
+
aum_token_price = token_ema_prices[index];
|
392
|
+
} else if( isVariant(aum_calc_mode, "min") ) {
|
393
|
+
if (token_prices[index].cmp(token_ema_prices[index])) {
|
394
|
+
aum_token_price = token_prices[index];
|
395
|
+
} else {
|
396
|
+
aum_token_price = token_ema_prices[index];
|
397
|
+
}
|
398
|
+
} else if( isVariant(aum_calc_mode, "max") ) {
|
399
|
+
if (token_ema_prices[index].cmp(token_prices[index])) {
|
400
|
+
aum_token_price = token_prices[index];
|
401
|
+
} else {
|
402
|
+
aum_token_price = token_ema_prices[index];
|
403
|
+
}
|
404
|
+
}
|
405
|
+
|
406
|
+
let token_amount_usd :BN =
|
407
|
+
aum_token_price.getAssetAmountUsd(custodies[index].assets.owned, custodies[index].decimals);
|
408
|
+
|
409
|
+
pool_amount_usd = pool_amount_usd.add(token_amount_usd);
|
410
|
+
|
411
|
+
// if (custodies[index].pricing.useUnrealizedPnlInAum) {
|
412
|
+
// // compute aggregate unrealized pnl
|
413
|
+
// let (long_profit, long_loss, _) = this.getPnlUsd(
|
414
|
+
// &custodies[index].get_collective_position(Side::Long)?,
|
415
|
+
// &token_price,
|
416
|
+
// &token_ema_price,
|
417
|
+
// &custodies[index],
|
418
|
+
// curtime,
|
419
|
+
// false,
|
420
|
+
// )?;
|
421
|
+
// let (short_profit, short_loss, _) = self.get_pnl_usd(
|
422
|
+
// &custodies[index].get_collective_position(Side::Short)?,
|
423
|
+
// &token_price,
|
424
|
+
// &token_ema_price,
|
425
|
+
// &custodies[index],
|
426
|
+
// curtime,
|
427
|
+
// false,
|
428
|
+
// )?;
|
429
|
+
|
430
|
+
// // adjust pool amount by collective profit/loss
|
431
|
+
// pool_amount_usd = math::checked_add(pool_amount_usd, long_profit as u128)?;
|
432
|
+
// pool_amount_usd = math::checked_add(pool_amount_usd, short_profit as u128)?;
|
433
|
+
// pool_amount_usd = pool_amount_usd.saturating_sub(long_loss as u128);
|
434
|
+
// pool_amount_usd = pool_amount_usd.saturating_sub(short_loss as u128);
|
435
|
+
// }
|
436
|
+
throw Error("Incomplete")
|
437
|
+
}
|
438
|
+
|
439
|
+
return pool_amount_usd;
|
440
|
+
}
|
433
441
|
|
434
442
|
} // Pool
|
@@ -0,0 +1,307 @@
|
|
1
|
+
{
|
2
|
+
"cluster_urls": {
|
3
|
+
"devnet": "https://api.devnet.solana.com",
|
4
|
+
"localnet": "http://127.0.0.1:8899",
|
5
|
+
"mainnet": "https://api.mainnet-beta.solana.com",
|
6
|
+
"testnet": "http://api.testnet.rpcpool.com"
|
7
|
+
},
|
8
|
+
"pools": [
|
9
|
+
{
|
10
|
+
"programId": "BPkaJkzjqZ3u3sMnK7oHup5GGV5EHp4hYthz9Yodvydj",
|
11
|
+
"cluster": "devnet",
|
12
|
+
"poolName": "pool1",
|
13
|
+
"poolAddress": "Goy1R4LyBbvrmzqdCAs5M8KUb3baMxFnZP3bYoEtLEjA",
|
14
|
+
"lpTokenMint": "8nw7Qg7t6wAvfLpQhUxyWhXUbdQ9QSMcLJsV1e5Ggom1",
|
15
|
+
"lpDecimals": 6,
|
16
|
+
"perpetuals": "GZTJamEMs5fhCh6y4fRskTA9n8UsXSAWpQNd2sesevLX",
|
17
|
+
"transferAuthority" : "FidHtZMaZXzUBcfqTt9jHffNoydHP4RGiaVwwoE15mMu",
|
18
|
+
"multisig" : "4cMawSeiiJe6JKxF4Qzc3NQ1ZAJ37gVdsd6LF27gZBv9",
|
19
|
+
"tokens": [
|
20
|
+
{
|
21
|
+
"symbol": "USDC",
|
22
|
+
"mintKey": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr",
|
23
|
+
"decimals": 6,
|
24
|
+
"isStable": true,
|
25
|
+
"pythTicker" : "Crypto.USDC/USD"
|
26
|
+
},
|
27
|
+
{
|
28
|
+
"symbol": "SOL",
|
29
|
+
"mintKey": "So11111111111111111111111111111111111111112",
|
30
|
+
"decimals": 9,
|
31
|
+
"isStable": false,
|
32
|
+
"pythTicker" : "Crypto.SOL/USD"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"symbol": "BTC",
|
36
|
+
"mintKey": "B8DYqbh57aEPRbUq7reyueY6jaYoN75js5YsiM84tFfP",
|
37
|
+
"decimals": 6,
|
38
|
+
"isStable": false,
|
39
|
+
"pythTicker" : "Crypto.BTC/USD"
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"symbol": "ETH",
|
43
|
+
"mintKey": "BA17bkYW78GvnirtgRHcceQxZdwkhpzbvrwDU6voUXRz",
|
44
|
+
"decimals": 6,
|
45
|
+
"isStable": false,
|
46
|
+
"pythTicker" : "Crypto.ETH/USD"
|
47
|
+
}
|
48
|
+
],
|
49
|
+
"custodies": [
|
50
|
+
{
|
51
|
+
"custodyAccount": "CkYddgaB8c5tvs9WP11B83HvMaU35ZFpTzLLGg4NviEj",
|
52
|
+
"tokenAccount": "DHy9BXo36hwKkvBJnPd11zH77BefA77mTiL7yu2LNWPx",
|
53
|
+
"symbol": "USDC",
|
54
|
+
"mintKey": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr",
|
55
|
+
"decimals": 6,
|
56
|
+
"isStable": true,
|
57
|
+
"oracleAddress": "5SSkXsEKQepHHAewytPVwdej4epN1nxgLVM84L4KXgy7"
|
58
|
+
},
|
59
|
+
{
|
60
|
+
"custodyAccount": "4ueMZBmpTMPykYwTENJs7diYfgx6UBCPQnRwb2F5UFgw",
|
61
|
+
"tokenAccount": "G9bJQdZkzXZsiwouZ8MsZw6p8Pg5vtM9hbVHjfqSrJZo",
|
62
|
+
"symbol": "SOL",
|
63
|
+
"mintKey": "So11111111111111111111111111111111111111112",
|
64
|
+
"decimals": 9,
|
65
|
+
"isStable": false,
|
66
|
+
"oracleAddress": "J83w4HKfqxwcq3BEMMkPFSppX3gqekLyLJBexebFVkix"
|
67
|
+
},
|
68
|
+
{
|
69
|
+
"custodyAccount": "F9qzX5pHGS5SFfP5M24a8dqXUHQdraexJ3P9TNGF2WFj",
|
70
|
+
"tokenAccount": "y5vPUaQdM3fJkEyn3oA8uFMRzwJYcNJsjBZyW1yRUar",
|
71
|
+
"symbol": "BTC",
|
72
|
+
"mintKey": "B8DYqbh57aEPRbUq7reyueY6jaYoN75js5YsiM84tFfP",
|
73
|
+
"decimals": 6,
|
74
|
+
"isStable": false,
|
75
|
+
"oracleAddress": "HovQMDrbAgAYPCmHVSrezcSmkMtXSSUsLDFANExrZh2J"
|
76
|
+
},
|
77
|
+
{
|
78
|
+
"custodyAccount": "BZggMsfpcpbB3tnhmtM2qJ1uMobKVBEmYZp2jmDrBHZD",
|
79
|
+
"tokenAccount": "HP4CcezCpCZqcoo8BsrroFEaykz2F4bz6sWBCCUJEBPy",
|
80
|
+
"symbol": "ETH",
|
81
|
+
"mintKey": "BA17bkYW78GvnirtgRHcceQxZdwkhpzbvrwDU6voUXRz",
|
82
|
+
"decimals": 6,
|
83
|
+
"isStable": false,
|
84
|
+
"oracleAddress": "EdVCmQ9FSPcVe5YySXDPCRmc8aDQLKJ9xvYBMZPie1Vw"
|
85
|
+
}
|
86
|
+
|
87
|
+
]
|
88
|
+
},
|
89
|
+
{
|
90
|
+
"programId": "f1avUCGxFGLbUTA8L64rMpRKw5KH6LxkTjGEzhWhAEo",
|
91
|
+
"cluster": "devnet",
|
92
|
+
"poolName": "F1aPool3",
|
93
|
+
"poolAddress": "EjrNsViX2JYLjcHhCjMUdn77SVMAps69N3gNyKTpTLfh",
|
94
|
+
"lpTokenMint": "CPUj8x9PVyLi1CuEY5CdxBgwZsq9wZkeMdgknBnbNpHq",
|
95
|
+
"lpDecimals": 6,
|
96
|
+
"perpetuals": "GKXKKi5bj9P2LsCBqFSKwhKfRM7MJrA4qyEMGXzNQcTz",
|
97
|
+
"transferAuthority" : "xeizPZDpXPDfu939cxNS27AoAkgw7fJKY4gxbK8khFA",
|
98
|
+
"multisig" : "84zJ1bS8w2Fn555qC7BkS8eNDMHpTKN48ZSyaSMSyjdT",
|
99
|
+
"tokens": [
|
100
|
+
{
|
101
|
+
"symbol": "USDC",
|
102
|
+
"mintKey": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr",
|
103
|
+
"decimals": 6,
|
104
|
+
"isStable": true,
|
105
|
+
"pythTicker" : "Crypto.USDC/USD"
|
106
|
+
},
|
107
|
+
{
|
108
|
+
"symbol": "SOL",
|
109
|
+
"mintKey": "So11111111111111111111111111111111111111112",
|
110
|
+
"decimals": 9,
|
111
|
+
"isStable": false,
|
112
|
+
"pythTicker" : "Crypto.SOL/USD"
|
113
|
+
},
|
114
|
+
{
|
115
|
+
"symbol": "BTC",
|
116
|
+
"mintKey": "B8DYqbh57aEPRbUq7reyueY6jaYoN75js5YsiM84tFfP",
|
117
|
+
"decimals": 6,
|
118
|
+
"isStable": false,
|
119
|
+
"pythTicker" : "Crypto.BTC/USD"
|
120
|
+
},
|
121
|
+
{
|
122
|
+
"symbol": "ETH",
|
123
|
+
"mintKey": "BA17bkYW78GvnirtgRHcceQxZdwkhpzbvrwDU6voUXRz",
|
124
|
+
"decimals": 6,
|
125
|
+
"isStable": false,
|
126
|
+
"pythTicker" : "Crypto.ETH/USD"
|
127
|
+
}
|
128
|
+
],
|
129
|
+
"custodies": [
|
130
|
+
{
|
131
|
+
"custodyAccount": "5n8Ga254uA4fy2UdCWwjHUvrRHGc3WwmmNsvjpbQYgwE",
|
132
|
+
"tokenAccount": "Ga1xofAe2EP3T2KTwL7KPEri9JGTwMTBwgrNmnchrGAg",
|
133
|
+
"symbol": "USDC",
|
134
|
+
"mintKey": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr",
|
135
|
+
"decimals": 6,
|
136
|
+
"isStable": true,
|
137
|
+
"oracleAddress": "5SSkXsEKQepHHAewytPVwdej4epN1nxgLVM84L4KXgy7"
|
138
|
+
},
|
139
|
+
{
|
140
|
+
"custodyAccount": "8NpLh7UknY7p43432ETcWZQYp8QK81tesxNqisDmnMNU",
|
141
|
+
"tokenAccount": "FDMmwmeQrZ6xWTdxXA2MZhZ9uggLgvwfKaW366WH2UAM",
|
142
|
+
"symbol": "SOL",
|
143
|
+
"mintKey": "So11111111111111111111111111111111111111112",
|
144
|
+
"decimals": 9,
|
145
|
+
"isStable": false,
|
146
|
+
"oracleAddress": "J83w4HKfqxwcq3BEMMkPFSppX3gqekLyLJBexebFVkix"
|
147
|
+
},
|
148
|
+
{
|
149
|
+
"custodyAccount": "BUkVeJxhkQMGJbibjTJUCG8afdudSpm5j2GpnyYrawQA",
|
150
|
+
"tokenAccount": "CrCSQpkug4uQCWiqET9AL4sXeBudy7t4RPZ5UPV1xti6",
|
151
|
+
"symbol": "BTC",
|
152
|
+
"mintKey": "B8DYqbh57aEPRbUq7reyueY6jaYoN75js5YsiM84tFfP",
|
153
|
+
"decimals": 6,
|
154
|
+
"isStable": false,
|
155
|
+
"oracleAddress": "HovQMDrbAgAYPCmHVSrezcSmkMtXSSUsLDFANExrZh2J"
|
156
|
+
},
|
157
|
+
{
|
158
|
+
"custodyAccount": "Hq1JffLuvj8XjBuL552aCFJkgoNWyMLfvQ2wUaNSX8yC",
|
159
|
+
"tokenAccount": "D8kDJSWVuMm9oERTJGwUHwLg34TtigYgSbCBAQ5LGvDd",
|
160
|
+
"symbol": "ETH",
|
161
|
+
"mintKey": "BA17bkYW78GvnirtgRHcceQxZdwkhpzbvrwDU6voUXRz",
|
162
|
+
"decimals": 6,
|
163
|
+
"isStable": false,
|
164
|
+
"oracleAddress": "EdVCmQ9FSPcVe5YySXDPCRmc8aDQLKJ9xvYBMZPie1Vw"
|
165
|
+
}
|
166
|
+
|
167
|
+
]
|
168
|
+
},
|
169
|
+
{
|
170
|
+
"programId": "FastuHRd9PRiuKGy2dHgH4zcSRjARKnPcHiQZnxpR5fD",
|
171
|
+
"cluster": "devnet",
|
172
|
+
"poolName": "FlashPool1",
|
173
|
+
"poolAddress": "98Z59gXJHFFmwmNTR7r2WCkcSiYhp7UTN64YrW6JxVuX",
|
174
|
+
"lpTokenMint": "8Kd733EK6ARFbGZXYZbcVTuzLufTTrDWVGLqPwJQabr",
|
175
|
+
"lpDecimals": 6,
|
176
|
+
"perpetuals": "23APwx3K4h7b2FwVYPCc6QUhjxq1HnfiLF5gJGzjjBug",
|
177
|
+
"transferAuthority" : "HgM32odRRY36KSmGjAdypSuN5e4QnRdGqQMXMz3Vk26L",
|
178
|
+
"multisig" : "CHi41aTYPbZf3M4hyT18oiafKQLZZNw8e9VRyUAr2Hgz",
|
179
|
+
"tokens": [
|
180
|
+
{
|
181
|
+
"symbol": "USDC",
|
182
|
+
"mintKey": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr",
|
183
|
+
"decimals": 6,
|
184
|
+
"isStable": true,
|
185
|
+
"pythTicker" : "Crypto.USDC/USD"
|
186
|
+
},
|
187
|
+
{
|
188
|
+
"symbol": "SOL",
|
189
|
+
"mintKey": "So11111111111111111111111111111111111111112",
|
190
|
+
"decimals": 9,
|
191
|
+
"isStable": false,
|
192
|
+
"pythTicker" : "Crypto.SOL/USD"
|
193
|
+
}
|
194
|
+
],
|
195
|
+
"custodies": [
|
196
|
+
{
|
197
|
+
"custodyAccount": "5P4mY4AYuzbm5VbbQvHwBrbrWTdTKrtFSGWSi1n6jcnE",
|
198
|
+
"tokenAccount": "EU7vvLZqoKcqaNwge1jEB5psvM1Fs4UnbqAzs8bsfeKU",
|
199
|
+
"symbol": "SOL",
|
200
|
+
"mintKey": "So11111111111111111111111111111111111111112",
|
201
|
+
"decimals": 9,
|
202
|
+
"isStable": false,
|
203
|
+
"oracleAddress": "J83w4HKfqxwcq3BEMMkPFSppX3gqekLyLJBexebFVkix"
|
204
|
+
},
|
205
|
+
{
|
206
|
+
"custodyAccount": "2oYSArUnXE2L9a9NTYPmgKCjwdTpcrXxMaoQDQfoo8sE",
|
207
|
+
"tokenAccount": "EUhfKyh2fuwgxJFr7abLscwsATn82M3rmuGGvfqxsDKc",
|
208
|
+
"symbol": "USDC",
|
209
|
+
"mintKey": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr",
|
210
|
+
"decimals": 6,
|
211
|
+
"isStable": true,
|
212
|
+
"oracleAddress": "5SSkXsEKQepHHAewytPVwdej4epN1nxgLVM84L4KXgy7"
|
213
|
+
}
|
214
|
+
]
|
215
|
+
},
|
216
|
+
{
|
217
|
+
"programId": "PERP9EeXeGnyEqGmxGSan4nGRAFNLwTufLJmiYsTJ8j",
|
218
|
+
"cluster": "devnet",
|
219
|
+
"poolName": "TestPool1",
|
220
|
+
"poolAddress": "GSa3BkjXpoUdd1Bw1EiuMLRY3jFZBwQJJivPNWgSiGJ3",
|
221
|
+
"lpTokenMint": "Han23mxQeHeoBbj4vYtYZNaB5bhwV3n4nxKezM6H6nbr",
|
222
|
+
"lpDecimals": 6,
|
223
|
+
"perpetuals": "5CpxhcrfvH8s9QDT2nMaPWqPoMwpuiPuP8e8x4YN61A2",
|
224
|
+
"tokens": [
|
225
|
+
{
|
226
|
+
"symbol": "USDC",
|
227
|
+
"mintKey": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr",
|
228
|
+
"decimals": 6,
|
229
|
+
"isStable": true,
|
230
|
+
"pythTicker" : "Crypto.USDC/USD"
|
231
|
+
},
|
232
|
+
{
|
233
|
+
"symbol": "SOL",
|
234
|
+
"mintKey": "So11111111111111111111111111111111111111112",
|
235
|
+
"decimals": 9,
|
236
|
+
"isStable": false,
|
237
|
+
"pythTicker" : "Crypto.SOL/USD"
|
238
|
+
}
|
239
|
+
],
|
240
|
+
"custodies": [
|
241
|
+
{
|
242
|
+
"custodyAccount": "GBrsFAWty2G2WfsP8XWmzDTrBj8Dafx8ZXpXHD1Th6Y9",
|
243
|
+
"tokenAccount": "EYYCHS8eGZYo7yWSwqL3dd2uY3Um5E8vLXjr6EE4zcQv",
|
244
|
+
"symbol": "SOL",
|
245
|
+
"mintKey": "So11111111111111111111111111111111111111112",
|
246
|
+
"decimals": 9,
|
247
|
+
"isStable": false,
|
248
|
+
"oracleAddress": "J83w4HKfqxwcq3BEMMkPFSppX3gqekLyLJBexebFVkix"
|
249
|
+
},
|
250
|
+
{
|
251
|
+
"custodyAccount": "BCuesBYYCUzfAHoLc1BeJo1Lq71Kacb2hMKJAi5FW9Be",
|
252
|
+
"tokenAccount": "BE9ih3oiCSNpMPhdJHzkQs73UUE6tHrdV7nRi3QkfHpi",
|
253
|
+
"symbol": "USDC",
|
254
|
+
"mintKey": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr",
|
255
|
+
"decimals": 6,
|
256
|
+
"isStable": true,
|
257
|
+
"oracleAddress": "5SSkXsEKQepHHAewytPVwdej4epN1nxgLVM84L4KXgy7"
|
258
|
+
}
|
259
|
+
]
|
260
|
+
},
|
261
|
+
{
|
262
|
+
"programId": "PERP9EeXeGnyEqGmxGSan4nGRAFNLwTufLJmiYsTJ8j",
|
263
|
+
"cluster": "devnet",
|
264
|
+
"poolName": "internal_test",
|
265
|
+
"poolAddress": "DXdPxx7mS1EtCPcEm2uoLioYdXoE2HoVrHaR4o8Kg2uh",
|
266
|
+
"lpTokenMint": "J1887XKSeZFRzD6ACyiWMurXZd8xtNyb1Edj2oAxKT9E",
|
267
|
+
"lpDecimals": 6,
|
268
|
+
"perpetuals": "5CpxhcrfvH8s9QDT2nMaPWqPoMwpuiPuP8e8x4YN61A2",
|
269
|
+
"tokens": [
|
270
|
+
{
|
271
|
+
"symbol": "Test",
|
272
|
+
"mintKey": "6QGdQbaZEgpXqqbGwXJZXwbZ9xJnthfyYNZ92ARzTdAX",
|
273
|
+
"decimals": 9,
|
274
|
+
"isStable": true,
|
275
|
+
"pythTicker" : "Crypto.USDC/USD"
|
276
|
+
},
|
277
|
+
{
|
278
|
+
"symbol": "SOL",
|
279
|
+
"mintKey": "So11111111111111111111111111111111111111112",
|
280
|
+
"decimals": 9,
|
281
|
+
"isStable": false,
|
282
|
+
"pythTicker" : "Crypto.SOL/USD"
|
283
|
+
}
|
284
|
+
],
|
285
|
+
"custodies": [
|
286
|
+
{
|
287
|
+
"custodyAccount": "5Yk9k7Gpyip9ySqYoXgRANVfPbmJdqhXBemancsV5QLJ",
|
288
|
+
"tokenAccount": "DmEf6bvLt9eTkRWGUhpmwhJjf7dZL31ziGqNqALYctvH",
|
289
|
+
"symbol": "SOL",
|
290
|
+
"mintKey": "So11111111111111111111111111111111111111112",
|
291
|
+
"decimals": 9,
|
292
|
+
"isStable": false,
|
293
|
+
"oracleAddress": "J83w4HKfqxwcq3BEMMkPFSppX3gqekLyLJBexebFVkix"
|
294
|
+
},
|
295
|
+
{
|
296
|
+
"custodyAccount": "AZCvUZ1qmbvnqebiYrExLoZtqyCgS33LN4XobAwwizR8",
|
297
|
+
"tokenAccount": "EuTHwLfV5pjtWE3sJTbjTgFb4BdLCwo6FZFAc8YdgxeM",
|
298
|
+
"symbol": "Test",
|
299
|
+
"mintKey": "6QGdQbaZEgpXqqbGwXJZXwbZ9xJnthfyYNZ92ARzTdAX",
|
300
|
+
"decimals": 9,
|
301
|
+
"isStable": true,
|
302
|
+
"oracleAddress": "HovQMDrbAgAYPCmHVSrezcSmkMtXSSUsLDFANExrZh2J"
|
303
|
+
}
|
304
|
+
]
|
305
|
+
}
|
306
|
+
]
|
307
|
+
}
|