Open
Conversation
Add Jupiter AMM interface adapter for MnM DLMM (Dynamic Liquidity Market Maker). ## What is MnM DLMM? A concentrated liquidity AMM with bin shifting — bins automatically reposition with trades to keep liquidity around the active price. Program ID: MnMRzPXhhuFFzfXvffkMGeodBqY7hnaqNpQcYGeREi5 ## Implementation - Self-contained mnm-dlmm crate with quote engine, state deserialization, and PDA derivation - Implements Amm trait: from_keyed_account, quote, get_swap_and_account_metas - Cross-BinArray quoting for large trades - Token-2022 support (SPL Token and Token-2022 mints) - Dynamic accounts (BinArray PDAs shift with active bin) - 12 swap instruction accounts ## Features - 5 fee tiers (1bps-100bps) - Bin shifting (auto liquidity repositioning) - Q64.64 fixed-point math for precise pricing ## Security - 260M+ fuzz iterations on core swap logic - 48/48 on-chain program tests passing - Internal security audit completed ## Note Uses Swap::MeteoraDlmm as placeholder — needs new Swap::MnmDlmm variant in jupiter-amm-interface. Team: MnM Labs (https://mnm.ag)
Use T::zeroed() + bytes_of_mut() instead of from_bytes() to guarantee alignment when account data arrives from RPC with arbitrary pointer alignment. Fixes: TargetAlignmentGreaterAndInputNotAligned on PoolState/BinArray (u128 fields require 16-byte alignment). Added regression tests for misaligned deserialization.
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.
MnM — Jupiter AMM Adapter
Adds a self-contained adapter for the MnM Market Maker protocol.
Program
MnMRzPXhhuFFzfXvffkMGeodBqY7hnaqNpQcYGeREi5What is MnM?
A concentrated liquidity AMM with bin shifting — bins automatically reposition with trades to keep liquidity around the active price. Features 5 fee tiers, Token-2022 support, and cross-BinArray quoting.
Implementation
mnm-dlmm/crate — self-contained with quote engine, state deserialization, PDA derivationAmmtrait:from_keyed_account,quote,get_swap_and_account_metashas_dynamic_accounts() = true) — BinArray PDAs shift with active binSecurity
Note
Uses
Swap::MeteoraDlmmas placeholder — needs newSwap::MnmDlmmvariant injupiter-amm-interface.Team: MnM Labs — https://mnm.ag
Explorer: https://explorer.solana.com/address/MnMRzPXhhuFFzfXvffkMGeodBqY7hnaqNpQcYGeREi5