Skip to content

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

Open
squadgazzz wants to merge 3 commits into
solana-solvers/pr3-solution-assemblyfrom
solana-solvers/pr4-solve-loop
Open

feat(solana-solvers): PR 4 solve loop + order handling + engine wiring#4656
squadgazzz wants to merge 3 commits 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 2 times, most recently from fff19ba to 966cb9c Compare July 22, 2026 08:08
@squadgazzz
squadgazzz force-pushed the solana-solvers/pr4-solve-loop branch from 966cb9c to 72867ba Compare July 22, 2026 08:51
@squadgazzz
squadgazzz marked this pull request as ready for review July 24, 2026 12:21
@squadgazzz
squadgazzz requested a review from a team as a code owner July 24, 2026 12:21
@linear-code

linear-code Bot commented Jul 24, 2026

Copy link
Copy Markdown

BE-145

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