docs: [lend] add Lend AMM integration guide for routers#929
Open
0xYankee-Raccoons wants to merge 7 commits into
Open
docs: [lend] add Lend AMM integration guide for routers#9290xYankee-Raccoons wants to merge 7 commits into
0xYankee-Raccoons wants to merge 7 commits into
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… stub Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ing fix Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
Ports Fluid's DEX swap integration guide into the docs as a public Lend AMM section under Lend, for routers, aggregators, and on-chain programs that want to route swaps directly through Jupiter Lend as a DEX (Jupiter's own routing engine already integrates it). Source is the DEX docs on the
dex-deploymentsbranch of the privateInstadapp/fluid-contracts-solanarepo; because that repo is private, the pages are fully self-contained with no links back to it.Naming convention (per YY): product is the Lend AMM; "DEX" is reserved for the on-chain program (
jupZ4m2…) and code identifiers (Dex,dex_id,DexOperation,Dex*errors). File paths stay atlend/dex/to match the program name and keep preview links stable.Changes
Nav: new "Lend AMM" group in the Lend sidebar, ordered Earn → Borrow → Lend AMM.
lend/dex/index.mdx— AMM Overview: pool shapes,swap_in/swap_out, integrator conventions, program addresses, PDA seeds, plus a condensed architecture section (Liquidity Layer relationship, shares, re-entrancy, pausing) with a Mermaid CPI-flow diagram. Consolidated from two source pages (integration README + architecture).lend/dex/typescript.mdx— AMM SDK: quote → guard → execute with@jup-ag/lend-read+@jup-ag/lend/dex, ALT/versioned-transaction handling, simulation-based exact quoting, error handling.lend/dex/api.mdx— AMM APIs (coming soon): stub pointing at the SDK and CPI paths until the REST endpoints launch.lend/dex/cpi.mdx— AMM CPI Integration:declare_program!CPI client, the 25-accountDexOperationcontext, PDA signing, external center-price remaining accounts, gotchas, raw instruction recipe for non-Anchor programs.lend/dex/errors.mdx— AMM Errors: full swap-path error code reference.lend/program-addresses.mdx— added the AMM/DEX program.changelog/index.mdx— July 2026 entry..claude/rules/— decisions entry, product-learning section, style-guide naming + Mermaid conventions.Deviations from the upstream doc (verified against npm/mainnet)
@jup-ag/lend/dist/idl/dex.json— it does not (checked 0.1.10 and 0.2.0-beta.2 tarballs). The IDL is published on-chain, so the CPI page usesanchor idl fetchinstead../dexsubpath (getSwapInIx/getSwapOutIx) only exists on thebetadist-tag (0.2.0-beta.2), notlatest(0.1.10). The SDK page carries a Note about installing@jup-ag/lend@betauntil 0.2.x ships to latest — drop the Note at launch.Linear Issues
Checklist
node generate-llms-from-docs.jsrunmint broken-linkspassestitle,description,llmsDescriptiondocs.jsonnavigation updated.claude/rules/updated with learnings and IA decision🤖 Generated with Claude Code