@perena/bankineco-services 1.0.1
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/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/oracle/index.d.ts +2 -0
- package/dist/oracle/index.d.ts.map +1 -0
- package/dist/oracle/index.js +18 -0
- package/dist/oracle/index.js.map +1 -0
- package/dist/oracle/updateSeedLPPrice.d.ts +3 -0
- package/dist/oracle/updateSeedLPPrice.d.ts.map +1 -0
- package/dist/oracle/updateSeedLPPrice.js +48 -0
- package/dist/oracle/updateSeedLPPrice.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +18 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/numeraire.d.ts +3 -0
- package/dist/utils/numeraire.d.ts.map +1 -0
- package/dist/utils/numeraire.js +54 -0
- package/dist/utils/numeraire.js.map +1 -0
- package/package.json +51 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./oracle"), exports);
|
|
18
|
+
__exportStar(require("./utils"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,0CAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/oracle/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./updateSeedLPPrice"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/oracle/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateSeedLPPrice.d.ts","sourceRoot":"","sources":["../../src/oracle/updateSeedLPPrice.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,WAAW,EAQZ,MAAM,uBAAuB,CAAC;AAiF/B,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,WAAW,EAChB,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,MAAM,iBAQf"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runUpdateSeedLPPrice = runUpdateSeedLPPrice;
|
|
4
|
+
const web3_js_1 = require("@solana/web3.js");
|
|
5
|
+
const anchor_1 = require("@coral-xyz/anchor");
|
|
6
|
+
const utils_1 = require("../utils");
|
|
7
|
+
const bankineco_sdk_1 = require("@perena/bankineco-sdk");
|
|
8
|
+
async function updatePrice(bankineco, signerKeypairFp) {
|
|
9
|
+
const vaultState = bankineco.vaultPDA(bankineco.bankPDA(bankineco_sdk_1.USD_STAR_BANK_INDEX), new web3_js_1.PublicKey(bankineco_sdk_1.OLD_USD_STAR), bankineco_sdk_1.OLD_USD_STAR_CONTRACT_INDEX);
|
|
10
|
+
const oracleState = bankineco.oraclePDA(vaultState);
|
|
11
|
+
const oracleInfo = await bankineco.pg.account.oracleGenState.fetch(oracleState);
|
|
12
|
+
const decimals = oracleInfo.config.yieldingMintDecimals;
|
|
13
|
+
let associatedOracleIdx = oracleInfo.data.oracleRegistry.findIndex((x) => bankineco.provider.wallet.publicKey.equals(x));
|
|
14
|
+
const signerIsRegisteredOracle = associatedOracleIdx !== -1;
|
|
15
|
+
if (!signerIsRegisteredOracle) {
|
|
16
|
+
// Just to test the logic afterwards, no TX will be sent
|
|
17
|
+
associatedOracleIdx = 0;
|
|
18
|
+
}
|
|
19
|
+
const currentOracleUiPrices = oracleInfo.data.oraclePrices.map((x) => (0, bankineco_sdk_1.toUiAmount)(x, decimals));
|
|
20
|
+
const currentReportedUiPrice = (0, bankineco_sdk_1.toUiAmount)(oracleInfo.data.oraclePrices[associatedOracleIdx], decimals);
|
|
21
|
+
const lastUpdatedTs = oracleInfo.data.oracleLastTs[associatedOracleIdx];
|
|
22
|
+
const impliedPrice = await (0, utils_1.getOldUsdStarPriceFromBurnSim)(bankineco.provider, signerKeypairFp);
|
|
23
|
+
const diffMs = Date.now() - lastUpdatedTs.toNumber() * 1000;
|
|
24
|
+
const hoursSinceLastUpdate = diffMs / (1000 * 60 * 60);
|
|
25
|
+
console.log("Current oracle index: ", associatedOracleIdx);
|
|
26
|
+
console.log("All reported prices: ", currentOracleUiPrices);
|
|
27
|
+
console.log("Current reported price: ", currentReportedUiPrice);
|
|
28
|
+
console.log("Hours since last update: ", hoursSinceLastUpdate);
|
|
29
|
+
console.log("Implied Seedpool price: ", impliedPrice);
|
|
30
|
+
const priceDiffBps = Math.floor(Math.abs((currentReportedUiPrice / impliedPrice - 1) * 100000));
|
|
31
|
+
if (priceDiffBps > 5 || hoursSinceLastUpdate >= 23) {
|
|
32
|
+
console.log("Updating price to ", impliedPrice, " vs. a current price of ", currentReportedUiPrice);
|
|
33
|
+
console.log("Sending price update...");
|
|
34
|
+
if (signerIsRegisteredOracle) {
|
|
35
|
+
const sig = await (0, bankineco_sdk_1.signSendAndConfirm)(bankineco.connection, await bankineco.updateYieldingPriceGen(bankineco_sdk_1.USD_STAR_BANK_INDEX, vaultState, bankineco.provider.publicKey, new web3_js_1.PublicKey(bankineco_sdk_1.OLD_USD_STAR), (0, bankineco_sdk_1.fromUiAmount)(impliedPrice, 6)), [bankineco.provider.wallet]);
|
|
36
|
+
console.log("Success broadcasting price, tx ", sig);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
console.log("Not updating price, contract price is up to date");
|
|
41
|
+
console.log("Difference in bps: ", priceDiffBps);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
async function runUpdateSeedLPPrice(env, signerKeypairFp, rpcUrl) {
|
|
45
|
+
const bankineco = new bankineco_sdk_1.BankinecoProgram(env, (0, bankineco_sdk_1.createAnchorProvider)(rpcUrl, new anchor_1.Wallet((0, bankineco_sdk_1.readKeypairFile)(signerKeypairFp))));
|
|
46
|
+
await updatePrice(bankineco, signerKeypairFp);
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=updateSeedLPPrice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateSeedLPPrice.js","sourceRoot":"","sources":["../../src/oracle/updateSeedLPPrice.ts"],"names":[],"mappings":";;AA+FA,oDAWC;AA1GD,6CAA4C;AAC5C,8CAA2C;AAC3C,oCAAyD;AACzD,yDAW+B;AAE/B,KAAK,UAAU,WAAW,CACxB,SAA2B,EAC3B,eAAuB;IAEvB,MAAM,UAAU,GAAG,SAAS,CAAC,QAAQ,CACnC,SAAS,CAAC,OAAO,CAAC,mCAAmB,CAAC,EACtC,IAAI,mBAAS,CAAC,4BAAY,CAAC,EAC3B,2CAA2B,CAC5B,CAAC;IACF,MAAM,WAAW,GAAG,SAAS,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACpD,MAAM,UAAU,GAAG,MAAM,SAAS,CAAC,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,CAChE,WAAW,CACZ,CAAC;IACF,MAAM,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,oBAAoB,CAAC;IACxD,IAAI,mBAAmB,GAAG,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CACvE,SAAS,CAAC,QAAQ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|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./numeraire"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numeraire.d.ts","sourceRoot":"","sources":["../../src/utils/numeraire.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAe,MAAM,mBAAmB,CAAC;AAIhE,wBAAsB,6BAA6B,CACjD,QAAQ,EAAE,cAAc,EACxB,eAAe,EAAE,MAAM,mBAuDxB"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getOldUsdStarPriceFromBurnSim = getOldUsdStarPriceFromBurnSim;
|
|
4
|
+
const numeraire_sdk_1 = require("@perena/numeraire-sdk");
|
|
5
|
+
const anchor_1 = require("@coral-xyz/anchor");
|
|
6
|
+
const web3_js_1 = require("@solana/web3.js");
|
|
7
|
+
const bankineco_sdk_1 = require("@perena/bankineco-sdk");
|
|
8
|
+
async function getOldUsdStarPriceFromBurnSim(provider, signerKeypairFp) {
|
|
9
|
+
// Needed when using the numeraire-sdk
|
|
10
|
+
process.env.ANCHOR_PROVIDER_URL = provider.connection.rpcEndpoint;
|
|
11
|
+
process.env.ANCHOR_WALLET = (0, bankineco_sdk_1.resolveFp)(signerKeypairFp);
|
|
12
|
+
// Intialize numeraire sdk
|
|
13
|
+
(0, numeraire_sdk_1.init)({ applyD: false });
|
|
14
|
+
(0, anchor_1.setProvider)(provider);
|
|
15
|
+
const decimals = 6;
|
|
16
|
+
const d = 10 ** decimals;
|
|
17
|
+
// Simulate the burn of 1 Seedpool LP
|
|
18
|
+
const { call } = await (0, numeraire_sdk_1.removeLiquidity)({
|
|
19
|
+
pool: new web3_js_1.PublicKey(numeraire_sdk_1.PRODUCTION_POOLS.tripool),
|
|
20
|
+
lpTokenRedeemAmount: 1 * d,
|
|
21
|
+
out: 1,
|
|
22
|
+
});
|
|
23
|
+
let simulatedBurn = await call.simulate({ commitment: "confirmed" });
|
|
24
|
+
console.log("Simulated burn...");
|
|
25
|
+
// Retrieve the output amounts in PYUSD, USDT and USDC
|
|
26
|
+
let burningTransfers1 = simulatedBurn.events[0].data.xReserveDeltas;
|
|
27
|
+
let amountUsdc = Number(burningTransfers1[0]) / 1000000;
|
|
28
|
+
let amountUsdt = Number(burningTransfers1[1]) / 1000000;
|
|
29
|
+
let amountPyusd = Number(burningTransfers1[2]) / 1000000;
|
|
30
|
+
// Calculate the burned amount of USDStar
|
|
31
|
+
let burnedUsdstar = Number(simulatedBurn.events[0].data.lpTokenRedeemAmount) / 1000000;
|
|
32
|
+
// Deduct the onchain USDT price from the USDC-USDT price practiced on Numeraire
|
|
33
|
+
// We're assuming the numeraire local USDC-USDT price is in line with the rest of the market
|
|
34
|
+
// This is an important assumption but it seams valid to me because otherwise the Numeraire price would be arbitraged
|
|
35
|
+
// We're also not considering slippage here
|
|
36
|
+
const callSwap1 = await (0, numeraire_sdk_1.swapExactIn)({
|
|
37
|
+
pool: new web3_js_1.PublicKey(numeraire_sdk_1.PRODUCTION_POOLS.tripool),
|
|
38
|
+
in: 1,
|
|
39
|
+
out: 0,
|
|
40
|
+
exactAmountIn: 100000,
|
|
41
|
+
minAmountOut: 0,
|
|
42
|
+
});
|
|
43
|
+
let simulatedUsdtSell = await callSwap1.call.simulate({
|
|
44
|
+
commitment: "confirmed",
|
|
45
|
+
});
|
|
46
|
+
let spentUsdt = simulatedUsdtSell.events[0].data.amountIn;
|
|
47
|
+
let gatheredUsdc = simulatedUsdtSell.events[0].data.amountOut;
|
|
48
|
+
let impliedUsdtPrice = gatheredUsdc / spentUsdt;
|
|
49
|
+
// With the below formula, we're assuming PYUSD will always be 1 USDC
|
|
50
|
+
// The implied price is also in USDC ie we get a price of 1 Seedpool = X USDC (and not 1 Seedpool = W USD)
|
|
51
|
+
let impliedPrice = (amountUsdc + amountUsdt * impliedUsdtPrice + amountPyusd) / burnedUsdstar;
|
|
52
|
+
return impliedPrice;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=numeraire.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numeraire.js","sourceRoot":"","sources":["../../src/utils/numeraire.ts"],"names":[],"mappings":";;AAUA,sEAyDC;AAnED,yDAK+B;AAC/B,8CAAgE;AAChE,6CAA4C;AAC5C,yDAAkD;AAE3C,KAAK,UAAU,6BAA6B,CACjD,QAAwB,EACxB,eAAuB;IAEvB,sCAAsC;IACtC,OAAO,CAAC,GAAG,CAAC,mBAAmB,GAAG,QAAQ,CAAC,UAAU,CA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IACrH,2CAA2C;IAC3C,MAAM,SAAS,GAAG,MAAM,IAAA,2BAAW,EAAC;QAClC,IAAI,EAAE,IAAI,mBAAS,CAAC,gCAAgB,CAAC,OAAO,CAAC;QAC7C,EAAE,EAAE,CAAC;QACL,GAAG,EAAE,CAAC;QACN,aAAa,EAAE,MAAO;QACtB,YAAY,EAAE,CAAC;KAChB,CAAC,CAAC;IAEH,IAAI,iBAAiB,GAAG,MAAM,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC;QACpD,UAAU,EAAE,WAAW;KACxB,CAAC,CAAC;IACH,IAAI,SAAS,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC1D,IAAI,YAAY,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC;IAC9D,IAAI,gBAAgB,GAAG,YAAY,GAAG,SAAS,CAAC;IAEhD,qEAAqE;IACrE,0GAA0G;IAC1G,IAAI,YAAY,GACd,CAAC,UAAU,GAAG,UAAU,GAAG,gBAAgB,GAAG,WAAW,CAAC,GAAG,aAAa,CAAC;IAE7E,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@perena/bankineco-services",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Services infra for maintaining Bankineco program on Solana.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist/**/*"
|
|
9
|
+
],
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/quineco/bankineco-sdk.git"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"solana",
|
|
16
|
+
"defi",
|
|
17
|
+
"sdk",
|
|
18
|
+
"bankineco"
|
|
19
|
+
],
|
|
20
|
+
"author": "Perena",
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "rm -rf dist && tsc -p tsconfig.json",
|
|
24
|
+
"deploy": "npm publish --access public --userconfig ~/.npmrc.perena"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@coral-xyz/anchor": "=0.30.1",
|
|
28
|
+
"@perena/bankineco-sdk": "=1.0.32",
|
|
29
|
+
"@perena/numeraire-sdk": "^1.1.1",
|
|
30
|
+
"@solana/spl-token": "=0.4.13",
|
|
31
|
+
"@solana/web3.js": "=1.98.4",
|
|
32
|
+
"@sqds/multisig": "^2.1.4"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@types/bn.js": "^5.1.0",
|
|
36
|
+
"@types/chai": "^4.3.0",
|
|
37
|
+
"@types/mocha": "^9.1.1",
|
|
38
|
+
"@types/node": "^24.3.1",
|
|
39
|
+
"chai": "^4.3.4",
|
|
40
|
+
"mocha": "^9.0.3",
|
|
41
|
+
"prettier": "^2.6.2",
|
|
42
|
+
"ts-mocha": "^10.0.0",
|
|
43
|
+
"typescript": "^5.6.3"
|
|
44
|
+
},
|
|
45
|
+
"overrides": {
|
|
46
|
+
"node-fetch": "2.6.11"
|
|
47
|
+
},
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public"
|
|
50
|
+
}
|
|
51
|
+
}
|