Skip to content

[filler-v2, sdk, indexer]: fx strategy, intentsV2 refactor, partial fills indexing#285

Merged
Wizdave97 merged 43 commits intomainfrom
roy/intents-server
Mar 4, 2026
Merged

[filler-v2, sdk, indexer]: fx strategy, intentsV2 refactor, partial fills indexing#285
Wizdave97 merged 43 commits intomainfrom
roy/intents-server

Conversation

@royvardhan
Copy link
Contributor

@royvardhan royvardhan commented Feb 25, 2026

Closes #283

@royvardhan royvardhan changed the title [sdk,filler-v2]: support same chain swaps [sdk,filler-v2]: support same chain fills/swaps Feb 25, 2026
@royvardhan royvardhan changed the title [sdk,filler-v2]: support same chain fills/swaps [sdk,filler-v2]: add fx strategy Feb 25, 2026
@royvardhan royvardhan marked this pull request as ready for review February 25, 2026 15:42
@seunlanlege
Copy link
Member

Btw does this support partial fills?

@seunlanlege
Copy link
Member

We should also update the indexer to track partial fills

@seunlanlege
Copy link
Member

Also i think fetching bids & executing them should be part of the placeOrder generator.

@seunlanlege
Copy link
Member

BidManager.ts — Incomplete token price coverage
validateAndSortBids assigns 0 USD value because we agreed that the order.inputs -- the final escrowed tokens after executing predispatch calldata will be stables and WETH. And in 99% of the cases it will be USDC.
The need to compute USD values come from having WETH in the order. If this order's final escrowed tokens are WETH only then we can do with comparing the amounts without USD value. Simple integar comparisons. But let's say an order has WETH, USDC, and USDT involved. Then simple integar comparisons can fool the algorightm. This is why USD value is need to verify what is the final USD worth the user is getting.
Question: What tokens are we going to have in the order.inputs. What can be the legth of the order.inputs array? 1? (USDC only) 2? (USDC/USDT) 3?(USDC, USDT, WETH)

This is no longer the case, FX swaps means we will support any token to be escrowed.

BidManager.ts — Bid deduplication key too broad
Aren't we receiving one bid from a filler - whether it is a cross chain fill(full fill) or same chain fill(partial fill). Because that is what our strategies does right now. The partial fill (only applied to FX now) happens because of two reasons. First, the order usd value is too high, and the filler can only give X usd value maximum, because this is set in the constructor. Second, the filler does not hold enough balance (less likely but possible).

Prefer we just be defensive from edge cases as much as possible

Destination-initiated cancellation — not implemented
I believe this is a part of future prs.

Lets try to wrap everything up on this PR

IntentsV2.ts — Fee token cache never refreshes
I was under impression that we will restart this instance if we have any governance execution.

Downstream SDK users will not remember to do this

@seunlanlege
Copy link
Member

Probably a good idea to allow getRecordedStorageSlot fallback to fetching the slot via debug_traceCall for FxSwaps

@royvardhan royvardhan force-pushed the roy/intents-server branch from b867378 to c40b834 Compare March 2, 2026 17:30
@royvardhan royvardhan force-pushed the roy/intents-server branch from fdf81a5 to 58052a6 Compare March 3, 2026 05:51
@royvardhan royvardhan changed the title [sdk,filler-v2]: add fx strategy [filler-v2, sdk, indexer]: fx strategy, intentsV2 refactor, partial fills indexing Mar 3, 2026
@Wizdave97 Wizdave97 merged commit e0cdb2f into main Mar 4, 2026
1 of 2 checks passed
@Wizdave97 Wizdave97 deleted the roy/intents-server branch March 4, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Filler] Same Chain fills

3 participants