Skip to content

docs: [lend] add Lend AMM integration guide for routers#929

Open
0xYankee-Raccoons wants to merge 7 commits into
mainfrom
feat/lend-dex-integration
Open

docs: [lend] add Lend AMM integration guide for routers#929
0xYankee-Raccoons wants to merge 7 commits into
mainfrom
feat/lend-dex-integration

Conversation

@0xYankee-Raccoons

@0xYankee-Raccoons 0xYankee-Raccoons commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

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-deployments branch of the private Instadapp/fluid-contracts-solana repo; 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 at lend/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-account DexOperation context, 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)

  • Upstream claims the IDL ships at @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 uses anchor idl fetch instead.
  • The ./dex subpath (getSwapInIx/getSwapOutIx) only exists on the beta dist-tag (0.2.0-beta.2), not latest (0.1.10). The SDK page carries a Note about installing @jup-ag/lend@beta until 0.2.x ships to latest — drop the Note at launch.

Linear Issues

  • Fixes DEV-690 — Lend dex integration guide

Checklist

  • node generate-llms-from-docs.js run
  • mint broken-links passes
  • All pages have title, description, llmsDescription
  • docs.json navigation updated
  • Redirects added (n/a — new paths only)
  • Changelog entry added to changelog
  • .claude/rules/ updated with learnings and IA decision

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mintlify

mintlify Bot commented Jul 2, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Jupiter 🟢 Ready View Preview Jul 2, 2026, 11:39 AM

💡 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>
@0xYankee-Raccoons 0xYankee-Raccoons changed the title docs: [lend] add Jupiter Lend DEX integration guide for routers docs: [lend] add Lend AMM integration guide for routers Jul 2, 2026
…ing fix

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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