@michaleffffff/mcp-trading-server 3.0.27 → 3.0.29
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/CHANGELOG.md +10 -0
- package/dist/auth/resolveClient.js +2 -2
- package/dist/server.js +1 -1
- package/dist/services/poolService.js +9 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.0.29] - 2026-03-20
|
|
4
|
+
- **Fix**: Implemented oracle validation bypass for State 0 (Cook) and State 1 (Primed) pools in liquidity management.
|
|
5
|
+
- This allows adding/removing liquidity on newly created pools that haven't initialized their oracle feeds yet.
|
|
6
|
+
- Uses a dummy 1.0 USD price for preview/slippage calculations in these states.
|
|
7
|
+
|
|
8
|
+
## [3.0.28] - 2026-03-20
|
|
9
|
+
- **Fix**: Disabled problematic Beta mode auto-detection for Arbitrum Sepolia and Linea Sepolia.
|
|
10
|
+
- This restores discovery for standard testnet pools (e.g., ARB/USDC, KNY/USDC) which were previously hidden in the empty beta environment.
|
|
11
|
+
- Users can still manually override via `IS_BETA_MODE=true` in `.env`.
|
|
12
|
+
|
|
3
13
|
## 3.0.27 - 2026-03-20
|
|
4
14
|
|
|
5
15
|
### Fixed
|
|
@@ -3,8 +3,8 @@ import { JsonRpcProvider, Wallet } from "ethers";
|
|
|
3
3
|
import { normalizeAddress } from "../utils/address.js";
|
|
4
4
|
let cached = null;
|
|
5
5
|
const BETA_BROKERS_BY_CHAIN = {
|
|
6
|
-
421614: [
|
|
7
|
-
59141: [
|
|
6
|
+
421614: [],
|
|
7
|
+
59141: [],
|
|
8
8
|
};
|
|
9
9
|
function getDefaultBrokerByChainId(chainId) {
|
|
10
10
|
// Testnet mappings
|
package/dist/server.js
CHANGED
|
@@ -461,7 +461,7 @@ function zodSchemaToJsonSchema(zodSchema) {
|
|
|
461
461
|
};
|
|
462
462
|
}
|
|
463
463
|
// ─── MCP Server ───
|
|
464
|
-
const server = new Server({ name: "myx-mcp-trading-server", version: "3.0.
|
|
464
|
+
const server = new Server({ name: "myx-mcp-trading-server", version: "3.0.29" }, { capabilities: { tools: {}, resources: {}, prompts: {} } });
|
|
465
465
|
// List tools
|
|
466
466
|
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
467
467
|
return {
|
|
@@ -314,7 +314,15 @@ async function executeLiquidityTxViaRouter(params) {
|
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
316
|
if (oraclePayload.referencePrice30 <= 0n) {
|
|
317
|
-
|
|
317
|
+
const isCookOrPrimed = marketDetail.state === 0 || marketDetail.state === 1;
|
|
318
|
+
if (isCookOrPrimed) {
|
|
319
|
+
const dummyPrice = 10n ** 30n; // 1.0 USD (30 decimals)
|
|
320
|
+
logger.warn(`[LP] Oracle unavailable for pool ${poolId} in state ${marketDetail.state}; using dummy price 1.0 for preview.`);
|
|
321
|
+
oraclePayload.referencePrice30 = dummyPrice;
|
|
322
|
+
}
|
|
323
|
+
else {
|
|
324
|
+
throw new Error(`Oracle price unavailable for LP preview on pool ${poolId}.`);
|
|
325
|
+
}
|
|
318
326
|
}
|
|
319
327
|
const amountOut = await previewAmountOutForLiquidity(signer, chainId, poolId, poolType, action, amountIn, oraclePayload.referencePrice30);
|
|
320
328
|
const minAmountOut = applyMinOutBySlippage(amountOut, slippage);
|