A sophisticated Dynamic Liquidity Market Maker protocol built on Sui blockchain, providing efficient liquidity management, automated market making, and reward distribution for decentralized exchanges.
Cetus DLMM is an advanced AMM protocol that dynamically adjusts liquidity distribution based on market conditions. It features:
- Dynamic Liquidity Management: Automatically rebalances liquidity across price ranges
- Multi-Bin Architecture: Supports up to 1000 bins per position for granular liquidity control
- Advanced Fee Management: Configurable fee rates with partner and protocol fee support
- Reward Distribution: Built-in reward system with up to 5 different reward types per position
- Access Control: Comprehensive ACL system for user and position restrictions
- Flash Swaps: Support for flash loan functionality
- Version Management: Upgradeable protocol with version tracking
The protocol consists of several core modules:
pool: Main pool functionality handling swaps, liquidity management, and position operationsposition: Position management for liquidity providers with fee collection and reward distributionbin: Bin management system for organizing liquidity across price rangesregistry: Global pool registry for creating and tracking all poolsconfig: Global configuration management with access control and restrictionsreward: Reward distribution and management systempartner: Partner fee management and trackingrestriction: User and position blocking with operation-level restrictionsacl: Access Control List implementation for permission managementadmin_cap: Administrative capabilities and permissionsparameters: Variable parameter management for poolsdlmm_math: Mathematical utilities for price calculations and liquidity managementprice_math: Price calculation utilitiesversioned: Version management and upgrade mechanismsconstants: Protocol constants and configuration values
Add the following dependencies to your Move.toml:
[dependencies]
cetusdlmm = { git = "https://github.com/CetusProtocol/cetus-dlmm-interface.git", subdir = "packages/dlmm", rev = "mainnet-v0.5.0", override = true }
integer_mate = { git = "https://github.com/CetusProtocol/integer-mate.git", rev = "mainnet-v1.3.0", override = true }
move_stl = { git = "https://github.com/CetusProtocol/move-stl.git", rev = "mainnet-v1.3.0", override = true }Configure the package address in your Move.toml:
[addresses]
cetusdlmm = "0x0" # Replace with actual deployed address# Build the package
sui move build
# Run tests
sui move testThe package includes comprehensive tests for all modules. Run tests with:
sui move testThe repository includes a standalone Rust SDK for off-chain swap simulations and price calculations:
sdk/: Lightweight Rust library implementing DLMM swap pricing logic without blockchain dependencies
The SDK enables developers to simulate swaps, calculate price impact, and analyze liquidity distribution without requiring a connection to the Sui network. See the SDK README for detailed documentation and usage examples.
Copyright (c) Cetus Technology Limited
For support and questions, please visit our GitHub Issues or contact us through our official channels.