-
-
Notifications
You must be signed in to change notification settings - Fork 264
feat: CLMM improvements for LP Position Executor #591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
fengtality
wants to merge
32
commits into
development
Choose a base branch
from
feat/connector-specific-params
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adds optional defaultNetworks array to Solana and Ethereum chain configs to allow specifying which networks to query for balance operations. This optimizes performance by avoiding queries to all 9+ networks when only 1-2 are needed. Changes: - Add defaultNetworks to chain schemas with additionalProperties: true for backwards compatibility - Add defaultNetworks to SolanaChainConfig and EthereumChainConfig interfaces - Update config getter functions to include defaultNetworks - Add commented examples in template files Closes #581 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add optional strategyType parameter to /trading/clmm/open endpoint to support Meteora-specific position strategies (Spot vs Curve). This parameter is ignored by other connectors (Uniswap, Raydium, etc.). - Update UnifiedOpenPositionRequest schema with strategyType field - Pass strategyType to meteoraOpenPosition function - Maintains backward compatibility (optional parameter) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add support for requesting bin liquidity data in the unified /trading/clmm/pool-info endpoint. This parameter is only supported by Meteora connector and ignored by others. Changes: - Add optional `bins` boolean parameter to UnifiedPoolInfoRequest schema - Pass bins parameter through getSolanaPoolInfo to Meteora connector - Update Meteora's getPoolInfo to conditionally fetch bins (default: false) - Make bins field optional in MeteoraPoolInfoSchema Backward compatibility: - bins parameter defaults to false (existing clients unaffected) - bins parameter is optional (existing clients don't need to send it) - Non-Meteora connectors ignore this parameter - Fetching bins is expensive, so only done when explicitly requested Usage: GET /trading/clmm/pool-info?connector=meteora&chainNetwork=solana-mainnet-beta&poolAddress=xxx&bins=true Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changed Meteora pool-info to always include bins field in response without requiring it as a request parameter. This maintains backward compatibility while providing richer data for Meteora pools. Changes: - Remove bins parameter from pool-info request schema - Always fetch and include bins in Meteora pool-info responses - Other CLMM connectors (Raydium, Uniswap, etc.) remain unchanged - Bins field is optional in schema for cross-connector compatibility Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add ErrorCode enum with TRANSACTION_TIMEOUT code - Add transactionTimeout helper in httpErrors - Include error code in HTTP error response - Use transactionTimeout error in solana.ts for confirmation failures Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When a transaction is sent but not confirmed within the timeout period,
the gateway now returns the signature with status=0 (pending) instead
of throwing TRANSACTION_TIMEOUT error. This preserves the transaction
hash so callers can track/poll the transaction instead of losing it.
Changes:
- sendAndConfirmTransaction now returns {signature, fee, confirmed} with
confirmed=false when tx sent but not confirmed (instead of throwing)
- All Meteora CLMM routes updated to handle confirmed=false and return
pending status with signature
- Error is only thrown when transaction was never sent (no signature)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
… throwing" This reverts commit 6c9607f.
When SOL is base/quote token, wallet balance changes include the transaction fee and position rent. This fix properly separates these: - openPosition: Use requested amounts, calculate rent separately - closePosition: Track rent refund separately from liquidity - addLiquidity: Subtract fee from SOL token amount - removeLiquidity: Add fee back to SOL token amount Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Check transaction history to determine if a position was closed (had transactions) vs never existed (no transactions). This helps clients recognize when a close operation timed out but actually succeeded on-chain. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
33 tasks
5 tasks
- GET /config?namespace=solana-mainnet-beta now returns merged chain + network config - POST /config/update routes chain-level fields (defaultWallet, defaultNetwork, rpcProvider) to parent chain namespace - Add comprehensive tests for chain-network config merging and routing Chain-level fields that get routed: - solana: defaultNetwork, defaultWallet, rpcProvider - ethereum: defaultNetwork, defaultWallet Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…into feat/connector-specific-params
- Uncomment defaultNetworks in ethereum.yml and solana.yml templates - Remove 'namespace' from templateDirectories since conf/namespace is never used for validation (schemas are loaded from dist/src/templates) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove hardcoded CHAIN_LEVEL_FIELDS mapping - Check if field exists in chain config to determine routing - Add defaultNetworks to test mock data Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
ETH (native token) is not in the token list because it's not an ERC20 contract. This caused price queries for ETH pairs to fail or return 0. The fix converts ETH to WETH before token resolution since they have equivalent value. This matches the existing pattern used in addLiquidity. - Add native token detection using ethereum.nativeTokenSymbol - Convert ETH to WETH for both baseToken and quoteToken (case-insensitive) - Add tests for ETH-to-WETH conversion scenarios Fixes #598 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixes "SwapRouter.swapERC20CallParameters is not a function" error that occurred due to version mismatch between smart-order-router and universal-router-sdk. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Handle edge cases where no swap is needed: - Same token quotes (e.g., USDC/USDC) return price=1 - Native to wrapped token (e.g., ETH/WETH) return price=1 - Wrapped to native token (e.g., WETH/ETH) return price=1 This avoids unnecessary DEX router calls for equivalent tokens and prevents errors when fetching prices for stablecoins against themselves. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
V4 pool addresses are not configured for all chains (e.g., Base), causing "Invariant failed: ADDRESSES" error. Restrict routing to V2 and V3 protocols only. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Return price=1 for: - Same token quotes (e.g., USDC/USDC) - Native/wrapped equivalents (SOL/WSOL, WSOL/SOL) Prevents "Input and output mints are not allowed to be equal" error from Jupiter API. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This reverts commit deb3899.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Switch from parallel Promise.all to sequential for-loop when fetching all token balances to avoid RPC rate limiting and timeout errors. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ax clamping - Add priorityFeeLevel as request parameter to /chains/solana/estimate-gas (default: High) - Add maxPriorityFeePerCU config option to cap priority fees (default: 1.0 lamports/CU) - Add getHeliusApiKey helper to extract API key from config or nodeURL - Return priorityFeeLevel and priorityFeePerCUEstimate in response for debugging - Add comprehensive tests for priority fee functionality Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use confirmRetryInterval * confirmRetryCount for WebSocket timeout instead of hardcoded 60 seconds, matching REST polling behavior. Default: 1s * 10 = 10 seconds. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add 10-second cache for priority fee estimates to reduce RPC calls - Return detailed fee result including priorityFeeLevel and raw estimate - Update estimate-gas route to use new estimateGasPriceDetailed method - Update tests to match new API and fix URL pattern assertions Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Gateway improvements to support the LP Position Executor in Hummingbot.
Related PR: hummingbot/hummingbot#7948
Key Changes
Files Modified
src/connectors/meteora/meteora.ts- Position status check usinggetSignaturesForAddresssrc/connectors/meteora/clmm-routes/*.ts- Fee/rent separation, strategyType supportsrc/trading/trading-clmm-routes/open.ts- Pass extraParams to connectorsrc/services/error-handler.ts- TRANSACTION_TIMEOUT error codeTest plan
🤖 Generated with Claude Code