Skip to content

feat(solana-solvers): PR 4 solve loop + order handling + engine wiring#4656

Draft
squadgazzz wants to merge 1 commit into
solana-solvers/pr3-solution-assemblyfrom
solana-solvers/pr4-solve-loop
Draft

feat(solana-solvers): PR 4 solve loop + order handling + engine wiring#4656
squadgazzz wants to merge 1 commit into
solana-solvers/pr3-solution-assemblyfrom
solana-solvers/pr4-solve-loop

Conversation

@squadgazzz

@squadgazzz squadgazzz commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Description

PR 4 of the Jupiter solver plan (after #4632, #4635, #4637, #4652): make /solve return real solutions. Until now the handler took an auction and answered with an empty list. This wires the existing pieces (the /solve endpoint 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 a Quote seam over Dex so the loop is testable without the network. It quotes every order concurrently and maps each routable swap into a Solution, leaving out buys and orders Jupiter cannot route.
  • domain::auction: the inbound /solve auction DTO (id, taker, orders). Proposed shape, since the driver spec pins the response and not the request.
  • /solve now runs the loop and returns the solutions. run.rs builds the Jupiter Dex from config and hands it to the API.
  • OrderUid gains FromStr (hex) so it parses inbound, and Side gains Deserialize.

How to test

New unit tests.

@squadgazzz
squadgazzz force-pushed the solana-solvers/pr4-solve-loop branch from 297f53b to fff19ba Compare July 21, 2026 14:03
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.

1 participant