You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#980 adds cross-chain partial fills to IntentGatewayV2 at the contract level (multiple solvers each fill a slice of a cross-chain order; RedeemEscrowPartial releases a proportional escrow slice without finalizing; cancels refund only the proven-unredeemed fraction). That PR is contract-only — its own "Follow-ups" section defers the off-chain work. This issue tracks everything else required to ship the feature end-to-end.
This work should land after #981 (make IntentGatewayV2 a UUPS proxy upgradeable via cross-chain governance). Reasons:
Cross-chain partial fills are a substantial change to a fund-custody contract deployed at one canonical address across 9 chains. Without the proxy, rolling it out means redeploying and re-registering the gateway on every chain — which changes the canonical address and breaks cross-chain auth (_authenticate keys off the gateway address) and any in-flight orders. With the proxy, it ships as a single coordinated governance upgrade via the intents-coprocessor, preserving the address.
The PR itself flags "cross-chain fund movement — independent/cloud review recommended before mainnet." The proxy gives a governance-driven hotfix/rollback path if an issue is found post-deployment, instead of another multi-chain redeploy.
[evm]: cross-chain partial fills for IntentGatewayV2 #980 adds storage (_partialFills use for cross-chain, plus a slot guard). Landing the proxy first fixes the canonical storage layout so these additions are appended cleanly under the append-only rule.
Off-chain work required
SDK (sdk/packages/sdk/src/protocols/intents/)
Bid.ts / BidManager.ts — construct partial cross-chain fills (fill a slice of the outputs), decode/allow partial-amount fill-options for cross-chain bids. Today Bid.ts parses OrderFilled/PartialFill only to classify status; it must also be able to build a partial cross-chain fill.
OrderExecutor.ts — extend the cross-chain lifecycle (AWAITING_BIDS → BIDS_RECEIVED → BID_SELECTED → FILLED) to support repeated PARTIAL_FILL transitions like the same-chain path already does, until the order is fully filled, cancelled, or expired.
OrderStatusChecker.ts — cross-chain status can no longer be derived from the single _filled slot (it's cleared on partial, set only on completion). Read _partialFills per output to compute fill progress.
OrderCanceller.ts — cross-chain cancel quoting/refund must reflect that only the proven-unredeemed fraction is refunded (the GET proof now proves _partialFills), not the full escrow.
types.ts — add the RedeemEscrowPartial request kind and any new event shapes (EscrowReleased now fires per source-side release and carries the solver).
Simplex (sdk/packages/simplex/)
core/filler.ts + strategies/{base,basic,fx}.ts — canFill/fill decisioning currently treats cross-chain as all-or-nothing. Add slice sizing for cross-chain orders and the ability to submit a partial fill.
Fee-pot economics — the completing solver takes the whole fee pot ("completing-solver-takes-all"). Strategy profitability/bid logic must account for this: a partial filler that never completes earns no fees, which changes expected value.
In-flight redeem risk — solvers must tolerate the cancel-vs-redeem race (cancel refunds only the unredeemed fraction; an in-flight RedeemEscrowPartial stays covered). Settlement tracking must not assume a fill is final until the finalizing RedeemEscrow.
core/event-monitor.ts — already watches OrderFilled/PartialFill; confirm cross-chain partials are surfaced and re-evaluated for follow-on fills.
ABI regen — IntentGatewayV2Abi needs regenerating for changed event signatures (e.g. EscrowReleased now carries the solver and fires on every source-side release including partial redeems).
escrowReleasedV3 handler — must aggregate cumulative released amount per commitment (and per solver) rather than treating a release as terminal; partial redeems are now non-finalizing.
partialFilledV3 / orderFilledV3 handlers — represent "cross-chain order partially redeemed, escrow still open" in the order/settlement model; finalization only on the completing RedeemEscrow.
escrowRefundedV3 handler — handle partial refund amounts from cross-chain cancels (unredeemed fraction), not just full refunds.
Summary
#980 adds cross-chain partial fills to
IntentGatewayV2at the contract level (multiple solvers each fill a slice of a cross-chain order;RedeemEscrowPartialreleases a proportional escrow slice without finalizing; cancels refund only the proven-unredeemed fraction). That PR is contract-only — its own "Follow-ups" section defers the off-chain work. This issue tracks everything else required to ship the feature end-to-end.Prerequisite: complete #981 first
This work should land after #981 (make
IntentGatewayV2a UUPS proxy upgradeable via cross-chain governance). Reasons:_authenticatekeys off the gateway address) and any in-flight orders. With the proxy, it ships as a single coordinated governance upgrade via theintents-coprocessor, preserving the address._partialFillsuse for cross-chain, plus a slot guard). Landing the proxy first fixes the canonical storage layout so these additions are appended cleanly under the append-only rule.Off-chain work required
SDK (
sdk/packages/sdk/src/protocols/intents/)Bid.ts/BidManager.ts— construct partial cross-chain fills (fill a slice of the outputs), decode/allow partial-amount fill-options for cross-chain bids. TodayBid.tsparsesOrderFilled/PartialFillonly to classify status; it must also be able to build a partial cross-chain fill.OrderExecutor.ts— extend the cross-chain lifecycle (AWAITING_BIDS → BIDS_RECEIVED → BID_SELECTED → FILLED) to support repeatedPARTIAL_FILLtransitions like the same-chain path already does, until the order is fully filled, cancelled, or expired.OrderStatusChecker.ts— cross-chain status can no longer be derived from the single_filledslot (it's cleared on partial, set only on completion). Read_partialFillsper output to compute fill progress.OrderCanceller.ts— cross-chain cancel quoting/refund must reflect that only the proven-unredeemed fraction is refunded (the GET proof now proves_partialFills), not the full escrow.types.ts— add theRedeemEscrowPartialrequest kind and any new event shapes (EscrowReleasednow fires per source-side release and carries the solver).Simplex (
sdk/packages/simplex/)core/filler.ts+strategies/{base,basic,fx}.ts—canFill/fill decisioning currently treats cross-chain as all-or-nothing. Add slice sizing for cross-chain orders and the ability to submit a partial fill.RedeemEscrowPartialstays covered). Settlement tracking must not assume a fill is final until the finalizingRedeemEscrow.core/event-monitor.ts— already watchesOrderFilled/PartialFill; confirm cross-chain partials are surfaced and re-evaluated for follow-on fills.Indexer (
sdk/packages/indexer/src/handlers/events/intentGatewayV3/+services/intentGatewayV3.service.ts)IntentGatewayV2Abineeds regenerating for changed event signatures (e.g.EscrowReleasednow carries the solver and fires on every source-side release including partial redeems).escrowReleasedV3handler — must aggregate cumulative released amount per commitment (and per solver) rather than treating a release as terminal; partial redeems are now non-finalizing.partialFilledV3/orderFilledV3handlers — represent "cross-chain order partially redeemed, escrow still open" in the order/settlement model; finalization only on the completingRedeemEscrow.escrowRefundedV3handler — handle partial refund amounts from cross-chain cancels (unredeemed fraction), not just full refunds.Coprocessor (
modules/pallets/intents-coprocessor/) — secondaryRequestKind(RedeemEscrowPartial) intypes.rsso the wire-byte mapping stays in sync, and add partial support flagged in [evm]: cross-chain partial fills for IntentGatewayV2 #980's follow-ups (e.g. price/liquidity indexing per [runtime/simplex]: Intent Coprocessor Price and Liquidity indexing #977 if affected by partial settlement).Acceptance criteria
IntentGatewayV2deployed as a proxy; this feature ships as a governance upgrade.RequestKindbyte parity maintained with the contract.