feat: add per-side liquidity source parameters - #576
Merged
Conversation
melianessa
approved these changes
Sep 11, 2026
thesems
force-pushed
the
EXBE-580-liquidity-sources
branch
from
September 11, 2026 09:45
483b537 to
3a1e65a
Compare
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
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.
Which Linear task is linked to this PR?
EXBE-580 (originating support ticket: TECHSUP-169).
Why was it implemented this way?
Adds an optional per-side liquidity-venue allow-list to the routing options:
LiquiditySources—{ source?: string[], destination?: string[] }, the venues each swap leg may execute against.RouteOptionsBase.liquiditySources— nested form, alongside the existingpools.ToolConfiguration.liquiditySourcesSource/liquiditySourcesDestination— flat form for the/v1/quotequery surface.Venue names come from Fly's liquidity-source list and are chain-specific (e.g.
aerodrome-stableon Base). Venue-level filtering is Fly-only, so a side with a list set is reduced tofly— the same tradepools.denyalready makes route-wide.Why per-side rather than route-wide. The motivating case needs the destination-chain swap constrained to one venue while the source-chain swap stays unrestricted, and it has to work for a cross-chain swap into that chain as well as a same-chain swap on it. A single route-wide list (the
pools.denyshape) can't express that, andexchanges.allowfilters aggregators rather than venues.Why two shapes. Mirrors
pools.deny/denyPoolsexactly:/v1/advanced/routestakes nested options, the/v1/quotesurfaces take flat query params. The nested interface carries the semantics; the flat keys{@link}to it rather than duplicating the docs.Why placed on
RouteOptionsBase. That is wherepoolslives, and it is the type the backend's presets and integratorrouteOptionOverwritesconfig are declared against — so the parameter is settable per-integrator from config, not only per-request.Why
string[]and not an enum. Fly publishes 811 venue names and is the only authority on which are valid on a given chain. Enumerating them here would go stale and would move rejection from Fly (which can tell "unknown name" from "not on this chain") to us (which cannot). Deliberately left as opaque strings; the backend forwards them unchecked and maps Fly's rejection.Additive and optional only — no existing field changes shape, so this is a minor release.
Visual showcase (Screenshots or Videos)
Not applicable — type definitions only.
Checklist before requesting a review
pnpm build(cjs/esm/declarations), eslint and prettier all clean; the four eslint warnings onsrc/api.tsare pre-existing and outside the changed ranges.public-docs is not yet updated — the parameters need documenting on the quote/routes reference once the backend behaviour lands. Tracking that with the backend PR rather than here, since the user-facing description depends on the final validation and error semantics.
Consumed by lifi-backend
exbe-580(PR to follow). Suggest publishing a beta from this branch for the backend CI to build against, and holding merge until the backend PR is approved — then cutting the official release and bumping the backend catalog to it.