feat(solana-solvers): PR 2 Jupiter v1 swap adapter (sells)#4635
Open
squadgazzz wants to merge 17 commits into
Open
feat(solana-solvers): PR 2 Jupiter v1 swap adapter (sells)#4635squadgazzz wants to merge 17 commits into
squadgazzz wants to merge 17 commits into
Conversation
…ers, drop cu-default
…not the user account
…ll, ExactIn only)
…zen-liquidity phrasing
…zen-liquidity phrasing
squadgazzz
marked this pull request as ready for review
July 17, 2026 17:14
…o solana-solvers/PR2-jupiter-adapter # Conflicts: # crates/solana-solvers/config/example.jupiter.toml
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
Second PR of the Jupiter solver. Adds the adapter that turns one order into an executable Solana swap by calling Jupiter's v1 swap API, so later PRs can assemble solutions and run the solve loop. The solver holds no liquidity: for each order it asks Jupiter for a swap and returns the instructions. Builds on PR1.
/solvestays a scaffold until PR3/4 wire the adapter in.Changes
dexmodule with Solana-nativeOrder,Side, andSwaptypes (u64 amounts,Pubkeymints, instructions).GET /swap/v1/quote?swapMode=ExactInthenPOST /swap/v1/swap-instructions, returning amounts, instructions (setup, swap, cleanup), and the lookup-table addresses the driver needs for the v0 transaction.OrderNotSupported, buys land in PR2.2.destinationTokenAccount), resolved upstream and passed in.FinalizeSettlepushes it to the user.api.jup.ag, or a Triton-hosted endpoint (same v1 API), a config base-URL and key swap.reqwest,solana-sdk,base64,thiserror.How to test
New unit tests (buy rejection, response parsing). Also an
#[ignore]live sell test:cargo test -p solana-solvers -- --ignored jupiter_live(keyless works,JUPITER_API_KEYoptional).Notes
solana-solvers/PR1-skeleton), review that first.takeris the driver's settlement signer, supplied at solve time in PR4./swap/v2/build, so a Triton-hosted endpoint stays a drop-in failover. Triton runs v1/Metis only.