feat(solana-solvers): PR 4 solve loop + order handling + engine wiring#4656
Draft
squadgazzz wants to merge 1 commit into
Draft
feat(solana-solvers): PR 4 solve loop + order handling + engine wiring#4656squadgazzz wants to merge 1 commit into
squadgazzz wants to merge 1 commit into
Conversation
squadgazzz
force-pushed
the
solana-solvers/pr4-solve-loop
branch
from
July 21, 2026 14:03
297f53b to
fff19ba
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.
Description
PR 4 of the Jupiter solver plan (after #4632, #4635, #4637, #4652): make
/solvereturn real solutions. Until now the handler took an auction and answered with an empty list. This wires the existing pieces (the/solveendpoint from PR1, the Jupiter adapter from PR2, solution assembly from PR3) into a working solve loop.For each order the solver asks Jupiter for a swap and turns it into a single-order solution, quoting all orders at once. Buys (when disabled) and orders Jupiter cannot route drop out with no candidate, and the rest of the auction still returns solutions. A full Jupiter outage yields an empty solution set, not a crash.
Stacked on PR3 (#4652).
Changes
domain::solver: the solve loop, plus aQuoteseam overDexso the loop is testable without the network. It quotes every order concurrently and maps each routable swap into aSolution, leaving out buys and orders Jupiter cannot route.domain::auction: the inbound/solveauction DTO (id, taker, orders). Proposed shape, since the driver spec pins the response and not the request./solvenow runs the loop and returns the solutions.run.rsbuilds the JupiterDexfrom config and hands it to the API.OrderUidgainsFromStr(hex) so it parses inbound, andSidegainsDeserialize.How to test
New unit tests.