Repository navigation
Orca - CLMM position-info intermittently fails while an LP position is open #686
Description
Describe the bug
This was found while live-testing the LP Rebalancer changes in Hummingbot PR #8431 together with Gateway PR #683 on Solana mainnet-beta. While an Orca CLMM LP position was open, Gateway intermittently failed to read its position information and returned Amount exceeds max u64.
#### Position 2zaEK... was open.
2026-08-25 18:08:54,934 - 112504 - hummingbot.strategy_v2.executors.lp_executor.lp_executor - INFO - Position created: 2zaEKGUUjze73At5XNGzt4PXPEoCANYkvFfgJQLDVreU, rent: 0.0100572 SOL, base: 0.007752774, quote: 5.999999, bounds: [99.5510553134259 - 99.67058230540471]
2026-08-25 18:08:54,952 - 112504 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1787652534.0, "order_id": "range-SOL-USDC-1787652528869380", "exchange_order_id": "5Aw8kPNjGu7rwzHk7HPXBeUXhUHiTHxUVuoCXhyyDckA1g9LByqqBPAzmGgHu8DXa1coFWsPK9aJWKBkvpDeJ4XS", "trading_pair": "SOL-USDC", "lower_price": "99.5510553134259", "upper_price": "99.67058230540471", "amount": "0.06795930717265066555903718817", "fee_tier": "Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE", "creation_timestamp": 1787652534.0, "trade_fee": {"percent": "0", "percent_token": null, "flat_fees": [{"token": "SOL", "amount": "0.00002288"}]}, "token_id": 0, "position_address": "2zaEKGUUjze73At5XNGzt4PXPEoCANYkvFfgJQLDVreU", "mid_price": "99.65694225897649", "base_amount": "0.007752774", "quote_amount": "5.999999", "position_rent": "0.0100572", "event_name": "RangePositionLiquidityAddedEvent", "event_source": "solana-mainnet-beta"}
#### Gateway’s position-info request failed with that warning.
2026-08-25 18:09:18,603 - 112504 - Gateway - WARNING - Gateway error: Failed to get CLMM position info: Amount exceeds max u64 (HttpError)
2026-08-25 18:09:18,604 - 112504 - hummingbot.strategy_v2.executors.lp_executor.lp_executor - WARNING - Error fetching position info: Gateway error: Failed to get CLMM position info: Amount exceeds max u64 (HttpError)
#### Price was outside the upper limit so began closing and completed. Returned USDC, fees and rent ok
2026-08-25 18:09:21,483 - 112504 - hummingbot.strategy_v2.executors.lp_executor.lp_executor - INFO - Price 99.69067848191754 above upper limit (upper_limit=99.666907953202387649, lower_limit=99.5772236811552669363543), closing
2026-08-25 18:09:24,697 - 112504 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1787652564.0, "type": "OrderType.AMM_REMOVE", "trading_pair": "SOL-USDC", "amount": "0", "price": "0", "order_id": "range-SOL-USDC-1787652564678179", "creation_timestamp": 1787652564.0, "exchange_order_id": null, "leverage": 1, "position": "NIL", "event_name": "SellOrderCreatedEvent", "event_source": "solana-mainnet-beta"}
2026-08-25 18:09:30,456 - 112504 - hummingbot.strategy_v2.executors.lp_executor.lp_executor - INFO - Position close confirmed, signature=4ioh8piQiGzFsniZ4g1Mg1WijoLSB6MRvP21FBmPWCdPL1YiSgfNmqm8UFKsZUijsHfHBaWKMJoXQvrrW1h343xv
2026-08-25 18:09:30,457 - 112504 - hummingbot.strategy_v2.executors.lp_executor.lp_executor - INFO - Position closed: 2zaEKGUUjze73At5XNGzt4PXPEoCANYkvFfgJQLDVreU, rent refunded: 0.0100572 SOL, base: 0, quote: 6.77267, fees: 0 base / 0.000269 quote
2026-08-25 18:09:30,476 - 112504 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1787652570.0, "order_id": "range-SOL-USDC-1787652564678179", "exchange_order_id": "4ioh8piQiGzFsniZ4g1Mg1WijoLSB6MRvP21FBmPWCdPL1YiSgfNmqm8UFKsZUijsHfHBaWKMJoXQvrrW1h343xv", "trading_pair": "SOL-USDC", "token_id": "0", "trade_fee": {"percent": "0", "percent_token": null, "flat_fees": [{"token": "SOL", "amount": "0.000011197000000000001"}]}, "creation_timestamp": 1787652570.0, "position_address": "2zaEKGUUjze73At5XNGzt4PXPEoCANYkvFfgJQLDVreU", "lower_price": "99.5510553134259", "upper_price": "99.67058230540471", "mid_price": "99.70615075635274", "base_amount": "0", "quote_amount": "6.77267", "base_fee": "0", "quote_fee": "0.000269", "position_rent_refunded": "0.0100572", "event_name": "RangePositionLiquidityRemovedEvent", "event_source": "solana-mainnet-beta"}
##### Gateway logs
2026-08-25 02:09:18 | error | Failed to get CLMM position info: Amount exceeds max u64
The warning happened during normal position polling, before a close was requested. In the observed run, Hummingbot logged the warning for position 2zaEKGUUjze73At5XNGzt4PXPEoCANYkvFfgJQLDVreU at 2026-08-25 18:09:18, then detected that the price had left the configured range and closed the same position successfully at 18:09:30. The close returned 6.772670 USDC, collected 0.000269 USDC fees, and refunded 0.0100572 SOL position rent.
- No functional impact was observed on the test, the warning did not prevent the range-exit decision, the close transaction, fee collection, or rent refund. It only caused that individual position-info refresh to fail ✅
Incase needed, here is the LPrebalancer v2 controller config used for the test:
id: EYyNFPJP8EK6AS6rNHazJNxNKKESXCt8Cy9akKLY9muy
controller_name: lp_rebalancer
controller_type: generic
total_amount_quote: '6'
manual_kill_switch: false
initial_positions: []
candles_config: []
connector_name: solana-mainnet-beta
lp_provider: orca/clmm
trading_pair: SOL-USDC
pool_address: Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE
side: 3
position_width_pct: '0.07'
position_offset_pct: '0'
rebalance_threshold_pct: '0.01'
sell_price_max: null
sell_price_min: null
buy_price_max: null
buy_price_min: null
strategy_type: null
autoswap: false
swap_buffer_pct: '0.01'
Steps to reproduce
- Run the LP Rebalancer against an Orca CLMM SOL-USDC pool on Solana mainnet-beta with an active position.
- Keep the position open while Hummingbot repeatedly polls Gateway for its CLMM position information; a narrow range makes these polls frequent.
- Review Gateway and Hummingbot logs for
Failed to get CLMM position info: Amount exceeds max u64orError fetching position info. - Continue monitoring or trigger the normal close condition and confirm whether the same position can still be closed.
Release version
dev-2.17
Type of installation
Source
Attach required files
na
Activity
mlguys commentedon Aug 25, 2026
The fix is available in #687, stacked on #683.
The failure came from assembling Orca fee-growth data across separate RPC reads: a tick crossing between those reads could produce a torn position/pool/tick snapshot and cause the exact Amount exceeds max u64 error. The fix reads the position, Whirlpool, both mints, and both boundary tick arrays in one getMultipleAccounts response, validates discovery metadata, and performs one bounded retry for an inconsistent snapshot. Transient RPC failures continue to propagate rather than being reported as a closed position.
I also performed read-only live verification using pool Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE and a live position: 20 of 20 paced reads succeeded over 45 seconds with changing live amounts/fees and no snapshot or u64 overflow errors.