Goose Automated Market Making Algorithm (GAMMA) is a decentralized exchange (DEX) protocol built on Solana. It provides dynamic fee AMM functionality with customizable fee structures and liquidity pool management.
- Dynamic fees based on volatility and pool rebalancing mechanisms, up to 10% of swap amount
- Permissionless pool creation with low fees (less than 0.1 SOL)
- Migration tool for to transfer LP position from other AMMs
- Referral program and open source code
- Token2022 support
- Highly CU optimized for faster swaps
- $GOFX revenue share and burn mechanism (see docs.goosefx.io for more info)
- Create and manage AMM configurations
- Initialize liquidity pools
- Deposit and withdraw liquidity
- Swap tokens with base input or base output
- Oracle price feed integration
- Transfer fee handling for SPL tokens (Token22 support)
programs/gamma
: Solana program (smart contract) codeclient
: Rust client for interacting with the Gamma program
- Rust and Cargo
- Solana CLI tools
- Anchor framework
To build the project:
cargo make build_all
To deploy the program:
cargo make deploy_program
The client provides a command-line interface for interacting with the Gamma program. Use the following command to see available options:
cargo install --path client
gamma-cli --help
create-config
: Create a new AMM configurationinitialize-pool
: Initialize a new liquidity poolinit-user-pool-liquidity
: Initialize user pool liquidity accountdeposit
: Deposit liquidity into a poolwithdraw
: Withdraw liquidity from a poolswap-base-in
: Perform a token swap with a specified input amountswap-base-out
: Perform a token swap with a specified output amount
To run the test suite:
cargo test-sbf
Note: Do not use
cargo update
, it adds some unwanted dependency version which then causes the compilation to fail. At the time of writing this, it was adding multiple version of solana-sdk and borsh and then the jupiter-library and the external anchor providers we have for those the compilation was failing. If you want to check if the project is compiling its better to usecargo check