@mento-protocol/mento-sdk 3.0.0-beta.4 → 3.0.0-beta.6
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/cache/routes.d.ts.map +1 -1
- package/dist/cache/routes.js +9 -6
- package/dist/cache/routes.js.map +1 -1
- package/dist/cache/tokens.js +5 -5
- package/dist/cache/tokens.js.map +1 -1
- package/dist/core/abis/breakerbox.d.ts +13 -0
- package/dist/core/abis/breakerbox.d.ts.map +1 -0
- package/dist/core/abis/breakerbox.js +8 -0
- package/dist/core/abis/breakerbox.js.map +1 -0
- package/dist/core/abis/fpmm.d.ts +46 -0
- package/dist/core/abis/fpmm.d.ts.map +1 -1
- package/dist/core/abis/fpmm.js +2 -0
- package/dist/core/abis/fpmm.js.map +1 -1
- package/dist/core/abis/index.d.ts +1 -0
- package/dist/core/abis/index.d.ts.map +1 -1
- package/dist/core/abis/index.js +1 -0
- package/dist/core/abis/index.js.map +1 -1
- package/dist/core/types/index.d.ts +3 -1
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/core/types/index.js +3 -1
- package/dist/core/types/index.js.map +1 -1
- package/dist/core/types/pool.d.ts +4 -0
- package/dist/core/types/pool.d.ts.map +1 -1
- package/dist/core/types/token.d.ts.map +1 -1
- package/dist/core/types/tradingLimits.d.ts +91 -0
- package/dist/core/types/tradingLimits.d.ts.map +1 -0
- package/dist/core/types/tradingLimits.js +3 -0
- package/dist/core/types/tradingLimits.js.map +1 -0
- package/dist/core/types/tradingMode.d.ts +24 -0
- package/dist/core/types/tradingMode.d.ts.map +1 -0
- package/dist/core/types/tradingMode.js +31 -0
- package/dist/core/types/tradingMode.js.map +1 -0
- package/dist/core/types/{provider.d.ts → transaction.d.ts} +1 -1
- package/dist/core/types/transaction.d.ts.map +1 -0
- package/dist/core/types/transaction.js +3 -0
- package/dist/core/types/transaction.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +1 -0
- package/dist/services/index.js.map +1 -1
- package/dist/services/pools/PoolService.d.ts.map +1 -1
- package/dist/services/pools/PoolService.js +3 -1
- package/dist/services/pools/PoolService.js.map +1 -1
- package/dist/services/quotes/QuoteService.d.ts.map +1 -1
- package/dist/services/quotes/QuoteService.js +1 -0
- package/dist/services/quotes/QuoteService.js.map +1 -1
- package/dist/services/swap/SwapService.d.ts.map +1 -1
- package/dist/services/swap/SwapService.js +3 -0
- package/dist/services/swap/SwapService.js.map +1 -1
- package/dist/services/trading/TradingLimitsService.d.ts +38 -0
- package/dist/services/trading/TradingLimitsService.d.ts.map +1 -0
- package/dist/services/trading/TradingLimitsService.js +157 -0
- package/dist/services/trading/TradingLimitsService.js.map +1 -0
- package/dist/services/trading/TradingService.d.ts +110 -0
- package/dist/services/trading/TradingService.d.ts.map +1 -0
- package/dist/services/trading/TradingService.js +162 -0
- package/dist/services/trading/TradingService.js.map +1 -0
- package/dist/services/trading/index.d.ts +3 -0
- package/dist/services/trading/index.d.ts.map +1 -0
- package/dist/services/trading/index.js +19 -0
- package/dist/services/trading/index.js.map +1 -0
- package/dist/utils/costUtils.js +4 -4
- package/dist/utils/costUtils.js.map +1 -1
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/rateFeed.d.ts +18 -0
- package/dist/utils/rateFeed.d.ts.map +1 -0
- package/dist/utils/rateFeed.js +27 -0
- package/dist/utils/rateFeed.js.map +1 -0
- package/dist/utils/tradingLimits.d.ts +41 -0
- package/dist/utils/tradingLimits.d.ts.map +1 -0
- package/dist/utils/tradingLimits.js +171 -0
- package/dist/utils/tradingLimits.js.map +1 -0
- package/package.json +1 -1
- package/dist/core/types/provider.d.ts.map +0 -1
- package/dist/core/types/provider.js +0 -4
- package/dist/core/types/provider.js.map +0 -1
|
@@ -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("./TradingService"), exports);
|
|
18
|
+
__exportStar(require("./TradingLimitsService"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/trading/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAgC;AAChC,yDAAsC"}
|
package/dist/utils/costUtils.js
CHANGED
|
@@ -40,9 +40,9 @@ async function getFPMMCostPercent(poolAddress, publicClient) {
|
|
|
40
40
|
functionName: 'protocolFee',
|
|
41
41
|
}),
|
|
42
42
|
]);
|
|
43
|
-
// Convert from basis points to percentage
|
|
43
|
+
// Convert from basis points to percentage, rounded to 2dp
|
|
44
44
|
const totalBasisPoints = Number(lpFee) + Number(protocolFee);
|
|
45
|
-
return totalBasisPoints / 100;
|
|
45
|
+
return Math.round((totalBasisPoints / 100) * 100) / 100;
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
48
|
* Calculate cost for Virtual pools
|
|
@@ -53,7 +53,7 @@ async function getVirtualPoolCostPercent(poolAddress, publicClient) {
|
|
|
53
53
|
abi: virtualPool_1.VIRTUAL_POOL_ABI,
|
|
54
54
|
functionName: 'protocolFee',
|
|
55
55
|
});
|
|
56
|
-
//
|
|
57
|
-
return Number(protocolFee) / 100;
|
|
56
|
+
// Convert from basis points to percentage, rounded to 2dp
|
|
57
|
+
return Math.round((Number(protocolFee) / 100) * 100) / 100;
|
|
58
58
|
}
|
|
59
59
|
//# sourceMappingURL=costUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"costUtils.js","sourceRoot":"","sources":["../../src/utils/costUtils.ts"],"names":[],"mappings":";;AAaA,gDAQC;AArBD,yCAA8C;AAC9C,uCAAuC;AAEvC,0DAA2D;AAE3D;;;;;;;GAOG;AACI,KAAK,UAAU,kBAAkB,CAAC,IAAU,EAAE,YAA0B;IAC7E,IAAI,IAAI,CAAC,QAAQ,KAAK,gBAAQ,CAAC,IAAI,EAAE,CAAC;QACpC,OAAO,kBAAkB,CAAC,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAA;IACxD,CAAC;SAAM,IAAI,IAAI,CAAC,QAAQ,KAAK,gBAAQ,CAAC,OAAO,EAAE,CAAC;QAC9C,OAAO,yBAAyB,CAAC,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAA;IAC/D,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAA;IACtC,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,KAAK,UAAU,kBAAkB,CAAC,WAAmB,EAAE,YAA0B;IAC/E,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC7C,YAAY,CAAC,YAAY,CAAC;YACxB,OAAO,EAAE,WAA4B;YACrC,GAAG,E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G,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,CAAA;IAC5D,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,gBAAgB,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAA;AACzD,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,yBAAyB,CAAC,WAAmB,EAAE,YAA0B;IACtF,MAAM,WAAW,GAAG,MAAM,YAAY,CAAC,YAAY,CAAC;QAClD,OAAO,EAAE,WAA4B;QACrC,GAAG,EAAE,8BAAgB;QACrB,YAAY,EAAE,aAAa;KAC5B,CAAC,CAAA;IAEF,0DAA0D;IAC1D,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAA;AAC5D,CAAC"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,UAAU,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA"}
|
package/dist/utils/index.js
CHANGED
|
@@ -20,4 +20,6 @@ __exportStar(require("./routes"), exports);
|
|
|
20
20
|
__exportStar(require("./sortUtils"), exports);
|
|
21
21
|
__exportStar(require("./pathEncoder"), exports);
|
|
22
22
|
__exportStar(require("./tokens"), exports);
|
|
23
|
+
__exportStar(require("./rateFeed"), exports);
|
|
24
|
+
__exportStar(require("./tradingLimits"), exports);
|
|
23
25
|
//# sourceMappingURL=index.js.map
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,gDAA6B;AAC7B,2CAAwB;AACxB,8CAA2B;AAC3B,gDAA6B;AAC7B,2CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,gDAA6B;AAC7B,2CAAwB;AACxB,8CAA2B;AAC3B,gDAA6B;AAC7B,2CAAwB;AACxB,6CAA0B;AAC1B,kDAA+B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Computes the rate feed ID from a rate feed identifier string.
|
|
3
|
+
* Follows the Solidity formula: address(uint160(uint256(keccak256(abi.encodePacked(rateFeed)))))
|
|
4
|
+
*
|
|
5
|
+
* @param rateFeed - The rate feed identifier string (e.g., "EURUSD", "relayed:COPUSD")
|
|
6
|
+
* @returns The computed rate feed address as a hex string
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* const rateFeedId = toRateFeedId('EURUSD')
|
|
11
|
+
* // Returns the computed address for the EURUSD rate feed
|
|
12
|
+
*
|
|
13
|
+
* const relayedRateFeedId = toRateFeedId('relayed:COPUSD')
|
|
14
|
+
* // Returns the computed address for the relayed COPUSD rate feed
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function toRateFeedId(rateFeed: string): `0x${string}`;
|
|
18
|
+
//# sourceMappingURL=rateFeed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rateFeed.d.ts","sourceRoot":"","sources":["../../src/utils/rateFeed.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,KAAK,MAAM,EAAE,CAM5D"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toRateFeedId = toRateFeedId;
|
|
4
|
+
const viem_1 = require("viem");
|
|
5
|
+
/**
|
|
6
|
+
* Computes the rate feed ID from a rate feed identifier string.
|
|
7
|
+
* Follows the Solidity formula: address(uint160(uint256(keccak256(abi.encodePacked(rateFeed)))))
|
|
8
|
+
*
|
|
9
|
+
* @param rateFeed - The rate feed identifier string (e.g., "EURUSD", "relayed:COPUSD")
|
|
10
|
+
* @returns The computed rate feed address as a hex string
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* const rateFeedId = toRateFeedId('EURUSD')
|
|
15
|
+
* // Returns the computed address for the EURUSD rate feed
|
|
16
|
+
*
|
|
17
|
+
* const relayedRateFeedId = toRateFeedId('relayed:COPUSD')
|
|
18
|
+
* // Returns the computed address for the relayed COPUSD rate feed
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
function toRateFeedId(rateFeed) {
|
|
22
|
+
const hashedBytes = (0, viem_1.keccak256)((0, viem_1.toBytes)(rateFeed));
|
|
23
|
+
const hashAsBigInt = BigInt(hashedBytes);
|
|
24
|
+
const maskedToUint160 = hashAsBigInt & ((1n << 160n) - 1n);
|
|
25
|
+
return `0x${maskedToUint160.toString(16).padStart(40, '0')}`;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=rateFeed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rateFeed.js","sourceRoot":"","sources":["../../src/utils/rateFeed.ts"],"names":[],"mappings":";;AAkBA,oCAMC;AAxBD,+BAAyC;AAEzC;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,YAAY,CAAC,QAAgB;IAC3C,MAAM,WAAW,GAAG,IAAA,gBAAS,EAAC,IAAA,cAAO,EAAC,QAAQ,CAAC,CAAC,CAAA;IAChD,MAAM,YAAY,GAAG,MAAM,CAAC,WAAW,CAAC,CAAA;IACxC,MAAM,eAAe,GAAG,YAAY,GAAG,CAAC,CAAC,EAAE,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC,CAAA;IAE1D,OAAO,KAAK,eAAe,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,CAAA;AAC9D,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { TradingLimit, TradingLimitsConfigV1, TradingLimitsStateV1, TradingLimitsConfigV2, TradingLimitsStateV2 } from '../core/types';
|
|
2
|
+
/**
|
|
3
|
+
* Compute limit ID for Broker (V1) trading limits.
|
|
4
|
+
* limitId = exchangeId XOR bytes32(uint256(uint160(token)))
|
|
5
|
+
*
|
|
6
|
+
* @param exchangeId - The exchange ID (bytes32)
|
|
7
|
+
* @param token - The token address
|
|
8
|
+
* @returns The limit ID as hex string
|
|
9
|
+
*/
|
|
10
|
+
export declare function computeLimitId(exchangeId: string, token: string): `0x${string}`;
|
|
11
|
+
/**
|
|
12
|
+
* Calculate trading limits from V1 config and state (Broker/Virtual pools).
|
|
13
|
+
* Returns human-friendly TradingLimit objects with maxIn/maxOut/until.
|
|
14
|
+
*
|
|
15
|
+
* @param config - V1 trading limits configuration
|
|
16
|
+
* @param state - V1 trading limits state
|
|
17
|
+
* @param asset - Token address
|
|
18
|
+
* @param tokenDecimals - Token decimals for consumer reference
|
|
19
|
+
* @returns Array of TradingLimit objects
|
|
20
|
+
*/
|
|
21
|
+
export declare function calculateTradingLimitsV1(config: TradingLimitsConfigV1, state: TradingLimitsStateV1, asset: string, tokenDecimals: number): TradingLimit[];
|
|
22
|
+
/**
|
|
23
|
+
* Calculate trading limits from V2 config and state (FPMM pools).
|
|
24
|
+
* V2 uses fixed timeframes: 5 min for L0, 1 day for L1.
|
|
25
|
+
* Values are stored with 15 decimals precision.
|
|
26
|
+
*
|
|
27
|
+
* @param config - V2 trading limits configuration
|
|
28
|
+
* @param state - V2 trading limits state
|
|
29
|
+
* @param asset - Token address
|
|
30
|
+
* @returns Array of TradingLimit objects
|
|
31
|
+
*/
|
|
32
|
+
export declare function calculateTradingLimitsV2(config: TradingLimitsConfigV2, state: TradingLimitsStateV2, asset: string): TradingLimit[];
|
|
33
|
+
/**
|
|
34
|
+
* Check if any trading limits are configured (flags > 0 for V1, or limit0/limit1 > 0 for V2)
|
|
35
|
+
*/
|
|
36
|
+
export declare function hasConfiguredLimitsV1(config: TradingLimitsConfigV1): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Check if any trading limits are configured for V2
|
|
39
|
+
*/
|
|
40
|
+
export declare function hasConfiguredLimitsV2(config: TradingLimitsConfigV2): boolean;
|
|
41
|
+
//# sourceMappingURL=tradingLimits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tradingLimits.d.ts","sourceRoot":"","sources":["../../src/utils/tradingLimits.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EACZ,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,eAAe,CAAA;AActB;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,KAAK,MAAM,EAAE,CAa/E;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,qBAAqB,EAC7B,KAAK,EAAE,oBAAoB,EAC3B,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,GACpB,YAAY,EAAE,CAiEhB;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,qBAAqB,EAC7B,KAAK,EAAE,oBAAoB,EAC3B,KAAK,EAAE,MAAM,GACZ,YAAY,EAAE,CAmDhB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAE5E;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAE5E"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.computeLimitId = computeLimitId;
|
|
4
|
+
exports.calculateTradingLimitsV1 = calculateTradingLimitsV1;
|
|
5
|
+
exports.calculateTradingLimitsV2 = calculateTradingLimitsV2;
|
|
6
|
+
exports.hasConfiguredLimitsV1 = hasConfiguredLimitsV1;
|
|
7
|
+
exports.hasConfiguredLimitsV2 = hasConfiguredLimitsV2;
|
|
8
|
+
const viem_1 = require("viem");
|
|
9
|
+
/** V2 trading limits use 15 decimals internally */
|
|
10
|
+
const V2_INTERNAL_DECIMALS = 15;
|
|
11
|
+
/** V2 L0 window is fixed at 5 minutes */
|
|
12
|
+
const V2_L0_TIMESTEP = 5 * 60; // 300 seconds
|
|
13
|
+
/** V2 L1 window is fixed at 1 day */
|
|
14
|
+
const V2_L1_TIMESTEP = 24 * 60 * 60; // 86400 seconds
|
|
15
|
+
/** Far future timestamp for global limits (year 2030) */
|
|
16
|
+
const TIMESTAMP_FAR_FUTURE = 1893456000;
|
|
17
|
+
/**
|
|
18
|
+
* Compute limit ID for Broker (V1) trading limits.
|
|
19
|
+
* limitId = exchangeId XOR bytes32(uint256(uint160(token)))
|
|
20
|
+
*
|
|
21
|
+
* @param exchangeId - The exchange ID (bytes32)
|
|
22
|
+
* @param token - The token address
|
|
23
|
+
* @returns The limit ID as hex string
|
|
24
|
+
*/
|
|
25
|
+
function computeLimitId(exchangeId, token) {
|
|
26
|
+
// Pad token address to 32 bytes (left-padded with zeros)
|
|
27
|
+
const tokenBytes32 = (0, viem_1.pad)(token, { size: 32 });
|
|
28
|
+
// Convert both to BigInt for XOR operation
|
|
29
|
+
const exchangeIdBigInt = (0, viem_1.hexToBigInt)(exchangeId);
|
|
30
|
+
const tokenBigInt = (0, viem_1.hexToBigInt)(tokenBytes32);
|
|
31
|
+
// XOR operation
|
|
32
|
+
const limitIdBigInt = exchangeIdBigInt ^ tokenBigInt;
|
|
33
|
+
// Convert back to hex with proper padding
|
|
34
|
+
return (0, viem_1.pad)((0, viem_1.numberToHex)(limitIdBigInt), { size: 32 });
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Calculate trading limits from V1 config and state (Broker/Virtual pools).
|
|
38
|
+
* Returns human-friendly TradingLimit objects with maxIn/maxOut/until.
|
|
39
|
+
*
|
|
40
|
+
* @param config - V1 trading limits configuration
|
|
41
|
+
* @param state - V1 trading limits state
|
|
42
|
+
* @param asset - Token address
|
|
43
|
+
* @param tokenDecimals - Token decimals for consumer reference
|
|
44
|
+
* @returns Array of TradingLimit objects
|
|
45
|
+
*/
|
|
46
|
+
function calculateTradingLimitsV1(config, state, asset, tokenDecimals) {
|
|
47
|
+
const nowEpoch = Math.floor(Date.now() / 1000);
|
|
48
|
+
const limits = [];
|
|
49
|
+
// Check if L0 is enabled (bit 0 of flags)
|
|
50
|
+
const isL0Enabled = (config.flags & 0x01) !== 0;
|
|
51
|
+
// Check if L1 is enabled (bit 1 of flags)
|
|
52
|
+
const isL1Enabled = (config.flags & 0x02) !== 0;
|
|
53
|
+
// Check if LG is enabled (bit 2 of flags)
|
|
54
|
+
const isLGEnabled = (config.flags & 0x04) !== 0;
|
|
55
|
+
// Reset netflows if time windows have passed
|
|
56
|
+
const isL0Outdated = isL0Enabled && nowEpoch > state.lastUpdated0 + config.timestep0;
|
|
57
|
+
const isL1Outdated = isL1Enabled && nowEpoch > state.lastUpdated1 + config.timestep1;
|
|
58
|
+
const effectiveNetflow0 = isL0Outdated ? 0n : state.netflow0;
|
|
59
|
+
const effectiveNetflow1 = isL1Outdated ? 0n : state.netflow1;
|
|
60
|
+
const effectiveLastUpdated0 = isL0Outdated ? nowEpoch : state.lastUpdated0;
|
|
61
|
+
const effectiveLastUpdated1 = isL1Outdated ? nowEpoch : state.lastUpdated1;
|
|
62
|
+
// Add L0 limit if configured
|
|
63
|
+
if (isL0Enabled && config.limit0 > 0n) {
|
|
64
|
+
limits.push({
|
|
65
|
+
asset,
|
|
66
|
+
maxIn: config.limit0 - effectiveNetflow0,
|
|
67
|
+
maxOut: config.limit0 + effectiveNetflow0,
|
|
68
|
+
until: effectiveLastUpdated0 + config.timestep0,
|
|
69
|
+
decimals: tokenDecimals,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
// Add L1 limit if configured
|
|
73
|
+
if (isL1Enabled && config.limit1 > 0n) {
|
|
74
|
+
limits.push({
|
|
75
|
+
asset,
|
|
76
|
+
maxIn: config.limit1 - effectiveNetflow1,
|
|
77
|
+
maxOut: config.limit1 + effectiveNetflow1,
|
|
78
|
+
until: effectiveLastUpdated1 + config.timestep1,
|
|
79
|
+
decimals: tokenDecimals,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
// Add LG (global) limit if configured
|
|
83
|
+
if (isLGEnabled && config.limitGlobal > 0n) {
|
|
84
|
+
limits.push({
|
|
85
|
+
asset,
|
|
86
|
+
maxIn: config.limitGlobal - state.netflowGlobal,
|
|
87
|
+
maxOut: config.limitGlobal + state.netflowGlobal,
|
|
88
|
+
until: TIMESTAMP_FAR_FUTURE,
|
|
89
|
+
decimals: tokenDecimals,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
// Apply cascading restrictions: limits with larger timeframes restrict smaller ones
|
|
93
|
+
// e.g., if maxIn is 0 in LG, it should also be 0 in L1 and L0
|
|
94
|
+
for (let i = limits.length - 1; i > 0; i--) {
|
|
95
|
+
if (limits[i - 1].maxIn > limits[i].maxIn) {
|
|
96
|
+
limits[i - 1] = { ...limits[i - 1], maxIn: limits[i].maxIn };
|
|
97
|
+
}
|
|
98
|
+
if (limits[i - 1].maxOut > limits[i].maxOut) {
|
|
99
|
+
limits[i - 1] = { ...limits[i - 1], maxOut: limits[i].maxOut };
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return limits;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Calculate trading limits from V2 config and state (FPMM pools).
|
|
106
|
+
* V2 uses fixed timeframes: 5 min for L0, 1 day for L1.
|
|
107
|
+
* Values are stored with 15 decimals precision.
|
|
108
|
+
*
|
|
109
|
+
* @param config - V2 trading limits configuration
|
|
110
|
+
* @param state - V2 trading limits state
|
|
111
|
+
* @param asset - Token address
|
|
112
|
+
* @returns Array of TradingLimit objects
|
|
113
|
+
*/
|
|
114
|
+
function calculateTradingLimitsV2(config, state, asset) {
|
|
115
|
+
const nowEpoch = Math.floor(Date.now() / 1000);
|
|
116
|
+
const limits = [];
|
|
117
|
+
// Check if L0 is configured (limit0 > 0)
|
|
118
|
+
const isL0Enabled = config.limit0 > 0n;
|
|
119
|
+
// Check if L1 is configured (limit1 > 0)
|
|
120
|
+
const isL1Enabled = config.limit1 > 0n;
|
|
121
|
+
// Reset netflows if time windows have passed
|
|
122
|
+
const isL0Outdated = isL0Enabled && nowEpoch > state.lastUpdated0 + V2_L0_TIMESTEP;
|
|
123
|
+
const isL1Outdated = isL1Enabled && nowEpoch > state.lastUpdated1 + V2_L1_TIMESTEP;
|
|
124
|
+
const effectiveNetflow0 = isL0Outdated ? 0n : state.netflow0;
|
|
125
|
+
const effectiveNetflow1 = isL1Outdated ? 0n : state.netflow1;
|
|
126
|
+
const effectiveLastUpdated0 = isL0Outdated ? nowEpoch : state.lastUpdated0;
|
|
127
|
+
const effectiveLastUpdated1 = isL1Outdated ? nowEpoch : state.lastUpdated1;
|
|
128
|
+
// Add L0 limit if configured
|
|
129
|
+
if (isL0Enabled) {
|
|
130
|
+
limits.push({
|
|
131
|
+
asset,
|
|
132
|
+
maxIn: config.limit0 - effectiveNetflow0,
|
|
133
|
+
maxOut: config.limit0 + effectiveNetflow0,
|
|
134
|
+
until: effectiveLastUpdated0 + V2_L0_TIMESTEP,
|
|
135
|
+
decimals: V2_INTERNAL_DECIMALS, // V2 returns 15 decimal values
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
// Add L1 limit if configured
|
|
139
|
+
if (isL1Enabled) {
|
|
140
|
+
limits.push({
|
|
141
|
+
asset,
|
|
142
|
+
maxIn: config.limit1 - effectiveNetflow1,
|
|
143
|
+
maxOut: config.limit1 + effectiveNetflow1,
|
|
144
|
+
until: effectiveLastUpdated1 + V2_L1_TIMESTEP,
|
|
145
|
+
decimals: V2_INTERNAL_DECIMALS, // V2 returns 15 decimal values
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
// Apply cascading restrictions
|
|
149
|
+
for (let i = limits.length - 1; i > 0; i--) {
|
|
150
|
+
if (limits[i - 1].maxIn > limits[i].maxIn) {
|
|
151
|
+
limits[i - 1] = { ...limits[i - 1], maxIn: limits[i].maxIn };
|
|
152
|
+
}
|
|
153
|
+
if (limits[i - 1].maxOut > limits[i].maxOut) {
|
|
154
|
+
limits[i - 1] = { ...limits[i - 1], maxOut: limits[i].maxOut };
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
return limits;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Check if any trading limits are configured (flags > 0 for V1, or limit0/limit1 > 0 for V2)
|
|
161
|
+
*/
|
|
162
|
+
function hasConfiguredLimitsV1(config) {
|
|
163
|
+
return config.flags > 0;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Check if any trading limits are configured for V2
|
|
167
|
+
*/
|
|
168
|
+
function hasConfiguredLimitsV2(config) {
|
|
169
|
+
return config.limit0 > 0n || config.limit1 > 0n;
|
|
170
|
+
}
|
|
171
|
+
//# sourceMappingURL=tradingLimits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AAC;IACH,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AAED;;GAEG;AACH,SAAgB,qBAAqB,CAAC,MAA6B;IACjE,OAAO,MAAM,CAAC,KAAK,GAAG,CAAC,CAAA;AACzB,CAAC;AAED;;GAEG;AACH,SAAgB,qBAAqB,CAAC,MAA6B;IACjE,OAAO,MAAM,CAAC,MAAM,GAAG,EAAE,IAAI,MAAM,CAAC,MAAM,GAAG,EAAE,CAAA;AACjD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../src/core/types/provider.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAA;IACf,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,CAAA;IACzB,YAAY,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,OAAO,EAAE,CAAA;CACjB;AAED;;;;;GAKG;AACH,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;IAC/D;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;CACd"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../src/core/types/provider.ts"],"names":[],"mappings":";AAAA,kEAAkE"}
|