Skip to content

igneous-labs/jupiter-amm-implementation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jupiter Amm Implementation

This is a guide to help create the implementation necessary

Guideline

  • Limit the Amm implementation to deserializing the state and calling your sdk to quote, the detailed implementation should remain in your AMM sdk
  • Move everything that needs to be done only when the state changes to update, rather than quote

Example Implementation

SPL Token Swap

Use cargo test to run the integration tests to verify that the simulation yields the same swap outcome as the Amm implementation

Test your own implementation

Make sure your AMM is implemented and added to amm_factory

Take a snapshot of your AMM state, this is to allow reproducible test and being able to capture edge cases

cargo run -r -- --rpc-url <RPC-URL> snapshot-amm --amm-id <AMM-ID>

Add your amm to test_exact_in_amms and run the tests cargo test...

Jupiter AMM Interface

Most importantly, the Jupiter AMM Interface is the main crate this integration depends on and must be used to be compatible with Jupiter. Do check it out.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%