Skip to content

scalecrx/jupiter-sdk-amm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jupiter-sdk-amm

Scale AMM adapter crate for Jupiter's jupiter-amm-interface.

What This Implements

  • ScaleAmm implementing jupiter_amm_interface::Amm.
  • Offline quote logic matching Scale on-chain math for:
    • Constant product
    • Exponential
    • Buy path (mint_a -> mint_b) with fee on input mint_a
    • Sell path (mint_b -> mint_a) with fee on output mint_a
  • ExactIn support and explicit ExactOut rejection.
  • Dynamic account metas including beneficiary token accounts.
  • PDA/ATA derivation for:
    • Config PDA: ["config"]
    • Vault PDA: [pool, mint]
    • Fee token ATA for platform + beneficiaries on mint_a

Swap Leg Selection

By default, this adapter emits Swap::TokenSwap.

You can override per market using KeyedAccount.params:

{ "swap": "gamma" }

Supported overrides:

  • token_swap
  • gamma
  • meteora_damm_v2
  • obsidian
  • raydium_v2

Jupiter must confirm the final swap leg contract on their side.

Local Validation

cargo test

About

Scale AMM adapter implementing Jupiter AMM interface

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages