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.
@@ -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 } from "./types";
3
3
  import { PositionAccount } from "./PositionAccount";
4
4
  import BN from "bn.js";
5
5
  export declare class CustodyAccount {
@@ -26,4 +26,5 @@ export declare class CustodyAccount {
26
26
  updateCustodyData(custody: Custody): void;
27
27
  getCumulativeInterest(curtime: BN): BN;
28
28
  getInterestAmountUsd(position: PositionAccount, curtime: BN): BN;
29
+ getCollectivePosition(side: Side): PositionAccount;
29
30
  }
@@ -15,6 +15,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.CustodyAccount = void 0;
18
+ var types_1 = require("./types");
18
19
  var bn_js_1 = __importDefault(require("bn.js"));
19
20
  var constants_1 = require("./constants");
20
21
  var utils_1 = require("./utils");
@@ -59,6 +60,35 @@ var CustodyAccount = /** @class */ (function () {
59
60
  return (position_interest.mul(position.sizeUsd))
60
61
  .div(new bn_js_1.default(constants_1.RATE_POWER));
61
62
  };
63
+ CustodyAccount.prototype.getCollectivePosition = function (side) {
64
+ var stats;
65
+ if ((0, types_1.isVariant)(side, 'long')) {
66
+ stats = this.longPositions;
67
+ }
68
+ else {
69
+ stats = this.shortPositions;
70
+ }
71
+ ;
72
+ // if (!stats.openPositions.isNeg()) {
73
+ // const obj: Position = {
74
+ // side,
75
+ // price:
76
+ // stats.weighted_price.div(stats.total_quantity)
77
+ // size_usd: stats.size_usd,
78
+ // collateral_usd: stats.collateral_usd,
79
+ // unrealized_loss_usd: stats.cumulative_interest_usd,
80
+ // cumulative_interest_snapshot: stats.cumulative_interest_snapshot,
81
+ // locked_amount: stats.locked_amount,
82
+ // ..Position::default()
83
+ // }
84
+ // return new PositionAccount(
85
+ // new PublicKey('dgfgfg'),
86
+ // )
87
+ // } else {
88
+ // Ok(Position::default())
89
+ // }
90
+ throw Error("Incomplete");
91
+ };
62
92
  return CustodyAccount;
63
93
  }());
64
94
  exports.CustodyAccount = CustodyAccount;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="bn.js" />
2
2
  import { BN } from "@coral-xyz/anchor";
3
- import { Pool, Side, TokenRatios } from "./types";
3
+ import { AumCalcMode, Pool, Side, TokenRatios } from "./types";
4
4
  import { PublicKey } from "@solana/web3.js";
5
5
  import { CustodyAccount } from "./CustodyAccount";
6
6
  import { OraclePrice } from "./OraclePrice";
@@ -31,4 +31,5 @@ export declare class PoolAccount {
31
31
  loss: BN;
32
32
  exitFee: BN;
33
33
  };
34
+ getAssetsUnderManagementUsd(token_prices: OraclePrice[], token_ema_prices: OraclePrice[], custodies: CustodyAccount[], aum_calc_mode: AumCalcMode): BN;
34
35
  }
@@ -20,9 +20,6 @@ var PoolAccount = /** @class */ (function () {
20
20
  PoolAccount.prototype.getTokenId = function (custodyKey) {
21
21
  return this.custodies.findIndex(function (i) { return i.toBase58() == custodyKey.toBase58(); });
22
22
  };
23
- // loadlpData(lpTokenInfo : Mint){
24
- // this.lpTokenInfo = lpTokenInfo
25
- // }
26
23
  PoolAccount.prototype.getAddLiquidityFee = function (tokenId, amount, custody, tokenPrice) {
27
24
  return this.getFee(tokenId, custody.fees.addLiquidity, amount, new anchor_1.BN(0), custody, tokenPrice);
28
25
  };
@@ -45,64 +42,6 @@ var PoolAccount = /** @class */ (function () {
45
42
  var ratios = this.ratios[tokenId];
46
43
  var current_ratio = this.getCurrentRatio(custody, tokenPrice);
47
44
  throw Error("TODODO");
48
- // let new_ratio = self.get_new_ratio(amount_add, amount_remove, custody, token_price)?;
49
- // let improved = match new_ratio.cmp(&ratios.target) {
50
- // Ordering::Less => {
51
- // new_ratio > current_ratio
52
- // || (current_ratio > ratios.target
53
- // && current_ratio - ratios.target > ratios.target - new_ratio)
54
- // }
55
- // Ordering::Greater => {
56
- // new_ratio < current_ratio
57
- // || (current_ratio < ratios.target
58
- // && ratios.target - current_ratio > new_ratio - ratios.target)
59
- // }
60
- // Ordering::Equal => current_ratio != ratios.target,
61
- // };
62
- // let ratio_fee = if new_ratio <= ratios.target {
63
- // if ratios.target == ratios.min {
64
- // Perpetuals::BPS_POWER
65
- // } else {
66
- // math::checked_add(
67
- // Perpetuals::BPS_POWER,
68
- // math::checked_div(
69
- // math::checked_mul(
70
- // custody.fees.ratio_mult as u128,
71
- // math::checked_sub(ratios.target, new_ratio)? as u128,
72
- // )?,
73
- // math::checked_sub(ratios.target, ratios.min)? as u128,
74
- // )?,
75
- // )?
76
- // }
77
- // } else if ratios.target == ratios.max {
78
- // Perpetuals::BPS_POWER
79
- // } else {
80
- // math::checked_add(
81
- // Perpetuals::BPS_POWER,
82
- // math::checked_div(
83
- // math::checked_mul(
84
- // custody.fees.ratio_mult as u128,
85
- // math::checked_sub(new_ratio, ratios.target)? as u128,
86
- // )?,
87
- // math::checked_sub(ratios.max, ratios.target)? as u128,
88
- // )?,
89
- // )?
90
- // };
91
- // let fee = if improved {
92
- // math::checked_div(
93
- // math::checked_mul(base_fee as u128, Perpetuals::BPS_POWER)?,
94
- // ratio_fee,
95
- // )?
96
- // } else {
97
- // math::checked_div(
98
- // math::checked_mul(base_fee as u128, ratio_fee)?,
99
- // Perpetuals::BPS_POWER,
100
- // )?
101
- // };
102
- // Self::get_fee_amount(
103
- // math::checked_as_u64(fee)?,
104
- // std::cmp::max(amount_add, amount_remove),
105
- // )
106
45
  return new anchor_1.BN(0);
107
46
  };
108
47
  PoolAccount.prototype.getFeeAmount = function (fee, amount) {
@@ -301,6 +240,66 @@ var PoolAccount = /** @class */ (function () {
301
240
  }
302
241
  }
303
242
  }; //getPnlUsd
243
+ PoolAccount.prototype.getAssetsUnderManagementUsd = function (token_prices, token_ema_prices, custodies, aum_calc_mode) {
244
+ var pool_amount_usd = constants_1.BN_ZERO;
245
+ for (var index = 0; index < this.custodies.length; index++) {
246
+ if (token_prices.length != this.custodies.length || token_prices.length != token_ema_prices.length) {
247
+ throw Error("token prices length incorrect");
248
+ }
249
+ var aum_token_price = void 0;
250
+ // switch unable to match enum
251
+ if ((0, types_1.isVariant)(aum_calc_mode, "last")) {
252
+ aum_token_price = token_prices[index];
253
+ }
254
+ else if ((0, types_1.isVariant)(aum_calc_mode, "ema")) {
255
+ aum_token_price = token_ema_prices[index];
256
+ }
257
+ else if ((0, types_1.isVariant)(aum_calc_mode, "min")) {
258
+ if (token_prices[index].cmp(token_ema_prices[index])) {
259
+ aum_token_price = token_prices[index];
260
+ }
261
+ else {
262
+ aum_token_price = token_ema_prices[index];
263
+ }
264
+ }
265
+ else if ((0, types_1.isVariant)(aum_calc_mode, "max")) {
266
+ if (token_ema_prices[index].cmp(token_prices[index])) {
267
+ aum_token_price = token_prices[index];
268
+ }
269
+ else {
270
+ aum_token_price = token_ema_prices[index];
271
+ }
272
+ }
273
+ var token_amount_usd = aum_token_price.getAssetAmountUsd(custodies[index].assets.owned, custodies[index].decimals);
274
+ pool_amount_usd = pool_amount_usd.add(token_amount_usd);
275
+ // if (custodies[index].pricing.useUnrealizedPnlInAum) {
276
+ // // compute aggregate unrealized pnl
277
+ // let (long_profit, long_loss, _) = this.getPnlUsd(
278
+ // &custodies[index].get_collective_position(Side::Long)?,
279
+ // &token_price,
280
+ // &token_ema_price,
281
+ // &custodies[index],
282
+ // curtime,
283
+ // false,
284
+ // )?;
285
+ // let (short_profit, short_loss, _) = self.get_pnl_usd(
286
+ // &custodies[index].get_collective_position(Side::Short)?,
287
+ // &token_price,
288
+ // &token_ema_price,
289
+ // &custodies[index],
290
+ // curtime,
291
+ // false,
292
+ // )?;
293
+ // // adjust pool amount by collective profit/loss
294
+ // pool_amount_usd = math::checked_add(pool_amount_usd, long_profit as u128)?;
295
+ // pool_amount_usd = math::checked_add(pool_amount_usd, short_profit as u128)?;
296
+ // pool_amount_usd = pool_amount_usd.saturating_sub(long_loss as u128);
297
+ // pool_amount_usd = pool_amount_usd.saturating_sub(short_loss as u128);
298
+ // }
299
+ throw Error("Incomplete");
300
+ }
301
+ return pool_amount_usd;
302
+ };
304
303
  return PoolAccount;
305
304
  }()); // Pool
306
305
  exports.PoolAccount = PoolAccount;
@@ -0,0 +1,39 @@
1
+ import { Address } from '@project-serum/anchor';
2
+ import { Cluster, PublicKey } from '@solana/web3.js';
3
+ export interface CustodyConfig {
4
+ custodyAccount: PublicKey;
5
+ tokenAccount: PublicKey;
6
+ symbol: string;
7
+ mintKey: PublicKey;
8
+ decimals: number;
9
+ isStable: boolean;
10
+ oracleAddress: PublicKey;
11
+ }
12
+ type Token = {
13
+ symbol: string;
14
+ mintKey: PublicKey;
15
+ decimals: number;
16
+ isStable: boolean;
17
+ pythTicker: string;
18
+ };
19
+ export declare class PoolConfig {
20
+ programId: PublicKey;
21
+ cluster: Cluster;
22
+ poolName: string;
23
+ poolAddress: PublicKey;
24
+ lpTokenMint: PublicKey;
25
+ lpDecimals: number;
26
+ perpetuals: PublicKey;
27
+ tokens: Token[];
28
+ custodies: CustodyConfig[];
29
+ constructor(programId: PublicKey, cluster: Cluster, poolName: string, poolAddress: PublicKey, lpTokenMint: PublicKey, lpDecimals: number, perpetuals: PublicKey, tokens: Token[], custodies: CustodyConfig[]);
30
+ getAllTokenMints(): PublicKey[];
31
+ getNonStableTokens(): PublicKey[];
32
+ getAllCustodies(): PublicKey[];
33
+ getNonStableCustodies(): PublicKey[];
34
+ static getCustodyConfig(custodyAccountPk: Address, poolName: string, cluster: Cluster): CustodyConfig;
35
+ static getTokensInPool(name: string, cluster: Cluster): Token[];
36
+ static fromIdsByName(name: string, cluster: Cluster): PoolConfig;
37
+ static fromIdsByPk(poolPk: PublicKey, cluster: Cluster): PoolConfig;
38
+ }
39
+ export {};
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.PoolConfig = void 0;
18
+ var web3_js_1 = require("@solana/web3.js");
19
+ var PoolConfig_json_1 = __importDefault(require("./PoolConfig.json"));
20
+ var PoolConfig = /** @class */ (function () {
21
+ function PoolConfig(programId, cluster, poolName, poolAddress, lpTokenMint, lpDecimals, perpetuals,
22
+ // public perpMarketAccountKey: string,
23
+ // public multisigAccountKey: string,
24
+ // public transferAuthorityAccountKey: string,
25
+ tokens, custodies) {
26
+ this.programId = programId;
27
+ this.cluster = cluster;
28
+ this.poolName = poolName;
29
+ this.poolAddress = poolAddress;
30
+ this.lpTokenMint = lpTokenMint;
31
+ this.lpDecimals = lpDecimals;
32
+ this.perpetuals = perpetuals;
33
+ this.tokens = tokens;
34
+ this.custodies = custodies;
35
+ }
36
+ PoolConfig.prototype.getAllTokenMints = function () {
37
+ return Array.from(this.tokens.map(function (token) { return new web3_js_1.PublicKey(token.mintKey); }));
38
+ };
39
+ PoolConfig.prototype.getNonStableTokens = function () {
40
+ return Array.from(this.tokens
41
+ .filter(function (token) { return !token.isStable; })
42
+ .map(function (token) { return new web3_js_1.PublicKey(token.mintKey); }));
43
+ };
44
+ PoolConfig.prototype.getAllCustodies = function () {
45
+ return Array.from(this.custodies.map(function (custody) { return new web3_js_1.PublicKey(custody.custodyAccount); }));
46
+ };
47
+ PoolConfig.prototype.getNonStableCustodies = function () {
48
+ return Array.from(this.custodies
49
+ .filter(function (custody) { return !custody.isStable; })
50
+ .map(function (custody) { return new web3_js_1.PublicKey(custody.custodyAccount); }));
51
+ };
52
+ // static getAllPoolConfigs(cluster: Cluster): PoolConfig[] {
53
+ // return poolConfigs.pools.map(p => this.fromIdsByName(p.poolName, cluster))
54
+ // }
55
+ PoolConfig.getCustodyConfig = function (custodyAccountPk, poolName, cluster) {
56
+ return this.fromIdsByName(poolName, cluster).custodies.find(function (f) { return f.custodyAccount.toBase58() === custodyAccountPk.toString(); });
57
+ };
58
+ PoolConfig.getTokensInPool = function (name, cluster) {
59
+ var poolConfig = PoolConfig_json_1.default.pools.find(function (pool) { return pool['poolName'] === name && cluster === pool['cluster']; });
60
+ if (!poolConfig)
61
+ throw new Error("No pool config ".concat(name, " found in Ids!"));
62
+ var tokens = poolConfig['tokens'].map(function (i) {
63
+ return __assign(__assign({}, i), { mintKey: new web3_js_1.PublicKey(i.mintKey) });
64
+ });
65
+ return tokens;
66
+ };
67
+ PoolConfig.fromIdsByName = function (name, cluster) {
68
+ var poolConfig = PoolConfig_json_1.default.pools.find(function (pool) { return pool['poolName'] === name && cluster === pool['cluster']; });
69
+ if (!poolConfig)
70
+ throw new Error("No pool config ".concat(name, " found in Ids!"));
71
+ var tokens = poolConfig['tokens'].map(function (i) {
72
+ return __assign(__assign({}, i), { mintKey: new web3_js_1.PublicKey(i.mintKey) });
73
+ });
74
+ var custodies = poolConfig['custodies'].map(function (i) {
75
+ return __assign(__assign({}, i), { custodyAccount: new web3_js_1.PublicKey(i.custodyAccount), tokenAccount: new web3_js_1.PublicKey(i.tokenAccount), mintKey: new web3_js_1.PublicKey(i.mintKey), oracleAddress: new web3_js_1.PublicKey(i.oracleAddress) });
76
+ });
77
+ return new PoolConfig(new web3_js_1.PublicKey(poolConfig.programId), poolConfig.cluster, poolConfig.poolName, new web3_js_1.PublicKey(poolConfig.poolAddress), new web3_js_1.PublicKey(poolConfig.lpTokenMint), poolConfig.lpDecimals, new web3_js_1.PublicKey(poolConfig.perpetuals), tokens, custodies);
78
+ };
79
+ PoolConfig.fromIdsByPk = function (poolPk, cluster) {
80
+ var poolConfig = PoolConfig_json_1.default.pools.find(function (pool) { return pool['poolAddress'] === poolPk.toString() && cluster === pool['cluster']; });
81
+ if (!poolConfig)
82
+ throw new Error("No pool config ".concat(poolPk.toString(), " found in Ids!"));
83
+ var tokens = poolConfig['tokens'].map(function (i) {
84
+ return __assign(__assign({}, i), { mintKey: new web3_js_1.PublicKey(i.mintKey) });
85
+ });
86
+ var custodies = poolConfig['custodies'].map(function (i) {
87
+ return __assign(__assign({}, i), { custodyAccount: new web3_js_1.PublicKey(i.custodyAccount), tokenAccount: new web3_js_1.PublicKey(i.tokenAccount), mintKey: new web3_js_1.PublicKey(i.mintKey), oracleAddress: new web3_js_1.PublicKey(i.oracleAddress) });
88
+ });
89
+ return new PoolConfig(new web3_js_1.PublicKey(poolConfig.programId), poolConfig.cluster, poolConfig.poolName, new web3_js_1.PublicKey(poolConfig.poolAddress), new web3_js_1.PublicKey(poolConfig.lpTokenMint), poolConfig.lpDecimals, new web3_js_1.PublicKey(poolConfig.perpetuals), tokens, custodies);
90
+ };
91
+ return PoolConfig;
92
+ }());
93
+ exports.PoolConfig = PoolConfig;
@@ -0,0 +1,305 @@
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
+ "programId": "f1avUCGxFGLbUTA8L64rMpRKw5KH6LxkTjGEzhWhAEo",
90
+ "cluster": "devnet",
91
+ "poolName": "F1aPool3",
92
+ "poolAddress": "EjrNsViX2JYLjcHhCjMUdn77SVMAps69N3gNyKTpTLfh",
93
+ "lpTokenMint": "CPUj8x9PVyLi1CuEY5CdxBgwZsq9wZkeMdgknBnbNpHq",
94
+ "lpDecimals": 6,
95
+ "perpetuals": "GKXKKi5bj9P2LsCBqFSKwhKfRM7MJrA4qyEMGXzNQcTz",
96
+ "transferAuthority": "xeizPZDpXPDfu939cxNS27AoAkgw7fJKY4gxbK8khFA",
97
+ "multisig": "84zJ1bS8w2Fn555qC7BkS8eNDMHpTKN48ZSyaSMSyjdT",
98
+ "tokens": [
99
+ {
100
+ "symbol": "USDC",
101
+ "mintKey": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr",
102
+ "decimals": 6,
103
+ "isStable": true,
104
+ "pythTicker": "Crypto.USDC/USD"
105
+ },
106
+ {
107
+ "symbol": "SOL",
108
+ "mintKey": "So11111111111111111111111111111111111111112",
109
+ "decimals": 9,
110
+ "isStable": false,
111
+ "pythTicker": "Crypto.SOL/USD"
112
+ },
113
+ {
114
+ "symbol": "BTC",
115
+ "mintKey": "B8DYqbh57aEPRbUq7reyueY6jaYoN75js5YsiM84tFfP",
116
+ "decimals": 6,
117
+ "isStable": false,
118
+ "pythTicker": "Crypto.BTC/USD"
119
+ },
120
+ {
121
+ "symbol": "ETH",
122
+ "mintKey": "BA17bkYW78GvnirtgRHcceQxZdwkhpzbvrwDU6voUXRz",
123
+ "decimals": 6,
124
+ "isStable": false,
125
+ "pythTicker": "Crypto.ETH/USD"
126
+ }
127
+ ],
128
+ "custodies": [
129
+ {
130
+ "custodyAccount": "5n8Ga254uA4fy2UdCWwjHUvrRHGc3WwmmNsvjpbQYgwE",
131
+ "tokenAccount": "Ga1xofAe2EP3T2KTwL7KPEri9JGTwMTBwgrNmnchrGAg",
132
+ "symbol": "USDC",
133
+ "mintKey": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr",
134
+ "decimals": 6,
135
+ "isStable": true,
136
+ "oracleAddress": "5SSkXsEKQepHHAewytPVwdej4epN1nxgLVM84L4KXgy7"
137
+ },
138
+ {
139
+ "custodyAccount": "8NpLh7UknY7p43432ETcWZQYp8QK81tesxNqisDmnMNU",
140
+ "tokenAccount": "FDMmwmeQrZ6xWTdxXA2MZhZ9uggLgvwfKaW366WH2UAM",
141
+ "symbol": "SOL",
142
+ "mintKey": "So11111111111111111111111111111111111111112",
143
+ "decimals": 9,
144
+ "isStable": false,
145
+ "oracleAddress": "J83w4HKfqxwcq3BEMMkPFSppX3gqekLyLJBexebFVkix"
146
+ },
147
+ {
148
+ "custodyAccount": "BUkVeJxhkQMGJbibjTJUCG8afdudSpm5j2GpnyYrawQA",
149
+ "tokenAccount": "CrCSQpkug4uQCWiqET9AL4sXeBudy7t4RPZ5UPV1xti6",
150
+ "symbol": "BTC",
151
+ "mintKey": "B8DYqbh57aEPRbUq7reyueY6jaYoN75js5YsiM84tFfP",
152
+ "decimals": 6,
153
+ "isStable": false,
154
+ "oracleAddress": "HovQMDrbAgAYPCmHVSrezcSmkMtXSSUsLDFANExrZh2J"
155
+ },
156
+ {
157
+ "custodyAccount": "Hq1JffLuvj8XjBuL552aCFJkgoNWyMLfvQ2wUaNSX8yC",
158
+ "tokenAccount": "D8kDJSWVuMm9oERTJGwUHwLg34TtigYgSbCBAQ5LGvDd",
159
+ "symbol": "ETH",
160
+ "mintKey": "BA17bkYW78GvnirtgRHcceQxZdwkhpzbvrwDU6voUXRz",
161
+ "decimals": 6,
162
+ "isStable": false,
163
+ "oracleAddress": "EdVCmQ9FSPcVe5YySXDPCRmc8aDQLKJ9xvYBMZPie1Vw"
164
+ }
165
+ ]
166
+ },
167
+ {
168
+ "programId": "FastuHRd9PRiuKGy2dHgH4zcSRjARKnPcHiQZnxpR5fD",
169
+ "cluster": "devnet",
170
+ "poolName": "FlashPool1",
171
+ "poolAddress": "98Z59gXJHFFmwmNTR7r2WCkcSiYhp7UTN64YrW6JxVuX",
172
+ "lpTokenMint": "8Kd733EK6ARFbGZXYZbcVTuzLufTTrDWVGLqPwJQabr",
173
+ "lpDecimals": 6,
174
+ "perpetuals": "23APwx3K4h7b2FwVYPCc6QUhjxq1HnfiLF5gJGzjjBug",
175
+ "transferAuthority": "HgM32odRRY36KSmGjAdypSuN5e4QnRdGqQMXMz3Vk26L",
176
+ "multisig": "CHi41aTYPbZf3M4hyT18oiafKQLZZNw8e9VRyUAr2Hgz",
177
+ "tokens": [
178
+ {
179
+ "symbol": "USDC",
180
+ "mintKey": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr",
181
+ "decimals": 6,
182
+ "isStable": true,
183
+ "pythTicker": "Crypto.USDC/USD"
184
+ },
185
+ {
186
+ "symbol": "SOL",
187
+ "mintKey": "So11111111111111111111111111111111111111112",
188
+ "decimals": 9,
189
+ "isStable": false,
190
+ "pythTicker": "Crypto.SOL/USD"
191
+ }
192
+ ],
193
+ "custodies": [
194
+ {
195
+ "custodyAccount": "5P4mY4AYuzbm5VbbQvHwBrbrWTdTKrtFSGWSi1n6jcnE",
196
+ "tokenAccount": "EU7vvLZqoKcqaNwge1jEB5psvM1Fs4UnbqAzs8bsfeKU",
197
+ "symbol": "SOL",
198
+ "mintKey": "So11111111111111111111111111111111111111112",
199
+ "decimals": 9,
200
+ "isStable": false,
201
+ "oracleAddress": "J83w4HKfqxwcq3BEMMkPFSppX3gqekLyLJBexebFVkix"
202
+ },
203
+ {
204
+ "custodyAccount": "2oYSArUnXE2L9a9NTYPmgKCjwdTpcrXxMaoQDQfoo8sE",
205
+ "tokenAccount": "EUhfKyh2fuwgxJFr7abLscwsATn82M3rmuGGvfqxsDKc",
206
+ "symbol": "USDC",
207
+ "mintKey": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr",
208
+ "decimals": 6,
209
+ "isStable": true,
210
+ "oracleAddress": "5SSkXsEKQepHHAewytPVwdej4epN1nxgLVM84L4KXgy7"
211
+ }
212
+ ]
213
+ },
214
+ {
215
+ "programId": "PERP9EeXeGnyEqGmxGSan4nGRAFNLwTufLJmiYsTJ8j",
216
+ "cluster": "devnet",
217
+ "poolName": "TestPool1",
218
+ "poolAddress": "GSa3BkjXpoUdd1Bw1EiuMLRY3jFZBwQJJivPNWgSiGJ3",
219
+ "lpTokenMint": "Han23mxQeHeoBbj4vYtYZNaB5bhwV3n4nxKezM6H6nbr",
220
+ "lpDecimals": 6,
221
+ "perpetuals": "5CpxhcrfvH8s9QDT2nMaPWqPoMwpuiPuP8e8x4YN61A2",
222
+ "tokens": [
223
+ {
224
+ "symbol": "USDC",
225
+ "mintKey": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr",
226
+ "decimals": 6,
227
+ "isStable": true,
228
+ "pythTicker": "Crypto.USDC/USD"
229
+ },
230
+ {
231
+ "symbol": "SOL",
232
+ "mintKey": "So11111111111111111111111111111111111111112",
233
+ "decimals": 9,
234
+ "isStable": false,
235
+ "pythTicker": "Crypto.SOL/USD"
236
+ }
237
+ ],
238
+ "custodies": [
239
+ {
240
+ "custodyAccount": "GBrsFAWty2G2WfsP8XWmzDTrBj8Dafx8ZXpXHD1Th6Y9",
241
+ "tokenAccount": "EYYCHS8eGZYo7yWSwqL3dd2uY3Um5E8vLXjr6EE4zcQv",
242
+ "symbol": "SOL",
243
+ "mintKey": "So11111111111111111111111111111111111111112",
244
+ "decimals": 9,
245
+ "isStable": false,
246
+ "oracleAddress": "J83w4HKfqxwcq3BEMMkPFSppX3gqekLyLJBexebFVkix"
247
+ },
248
+ {
249
+ "custodyAccount": "BCuesBYYCUzfAHoLc1BeJo1Lq71Kacb2hMKJAi5FW9Be",
250
+ "tokenAccount": "BE9ih3oiCSNpMPhdJHzkQs73UUE6tHrdV7nRi3QkfHpi",
251
+ "symbol": "USDC",
252
+ "mintKey": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr",
253
+ "decimals": 6,
254
+ "isStable": true,
255
+ "oracleAddress": "5SSkXsEKQepHHAewytPVwdej4epN1nxgLVM84L4KXgy7"
256
+ }
257
+ ]
258
+ },
259
+ {
260
+ "programId": "PERP9EeXeGnyEqGmxGSan4nGRAFNLwTufLJmiYsTJ8j",
261
+ "cluster": "devnet",
262
+ "poolName": "internal_test",
263
+ "poolAddress": "DXdPxx7mS1EtCPcEm2uoLioYdXoE2HoVrHaR4o8Kg2uh",
264
+ "lpTokenMint": "J1887XKSeZFRzD6ACyiWMurXZd8xtNyb1Edj2oAxKT9E",
265
+ "lpDecimals": 6,
266
+ "perpetuals": "5CpxhcrfvH8s9QDT2nMaPWqPoMwpuiPuP8e8x4YN61A2",
267
+ "tokens": [
268
+ {
269
+ "symbol": "Test",
270
+ "mintKey": "6QGdQbaZEgpXqqbGwXJZXwbZ9xJnthfyYNZ92ARzTdAX",
271
+ "decimals": 9,
272
+ "isStable": true,
273
+ "pythTicker": "Crypto.USDC/USD"
274
+ },
275
+ {
276
+ "symbol": "SOL",
277
+ "mintKey": "So11111111111111111111111111111111111111112",
278
+ "decimals": 9,
279
+ "isStable": false,
280
+ "pythTicker": "Crypto.SOL/USD"
281
+ }
282
+ ],
283
+ "custodies": [
284
+ {
285
+ "custodyAccount": "5Yk9k7Gpyip9ySqYoXgRANVfPbmJdqhXBemancsV5QLJ",
286
+ "tokenAccount": "DmEf6bvLt9eTkRWGUhpmwhJjf7dZL31ziGqNqALYctvH",
287
+ "symbol": "SOL",
288
+ "mintKey": "So11111111111111111111111111111111111111112",
289
+ "decimals": 9,
290
+ "isStable": false,
291
+ "oracleAddress": "J83w4HKfqxwcq3BEMMkPFSppX3gqekLyLJBexebFVkix"
292
+ },
293
+ {
294
+ "custodyAccount": "AZCvUZ1qmbvnqebiYrExLoZtqyCgS33LN4XobAwwizR8",
295
+ "tokenAccount": "EuTHwLfV5pjtWE3sJTbjTgFb4BdLCwo6FZFAc8YdgxeM",
296
+ "symbol": "Test",
297
+ "mintKey": "6QGdQbaZEgpXqqbGwXJZXwbZ9xJnthfyYNZ92ARzTdAX",
298
+ "decimals": 9,
299
+ "isStable": true,
300
+ "oracleAddress": "HovQMDrbAgAYPCmHVSrezcSmkMtXSSUsLDFANExrZh2J"
301
+ }
302
+ ]
303
+ }
304
+ ]
305
+ }