https://github.com/goosefx1/gamma-swap
GooseFX constant product AMM with dynamic fees GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT
https://github.com/goosefx1/gamma-swap
Last synced: 10 months ago
JSON representation
GooseFX constant product AMM with dynamic fees GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT
- Host: GitHub
- URL: https://github.com/goosefx1/gamma-swap
- Owner: GooseFX1
- License: other
- Created: 2024-09-29T13:57:14.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-07-09T22:57:24.000Z (11 months ago)
- Last Synced: 2025-07-10T08:59:03.059Z (11 months ago)
- Language: Rust
- Homepage: https://goosefx.io
- Size: 1.13 MB
- Stars: 26
- Watchers: 1
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GAMMA
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.
## Key Features
- 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)
## Developer Features
- 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)
## Project Structure
- `programs/gamma`: Solana program (smart contract) code
- `client`: Rust client for interacting with the Gamma program
## Getting Started
### Prerequisites
- Rust and Cargo
- Solana CLI tools
- Anchor framework
### Building
To build the project:
```bash
cargo make build_all
```
### Deploying
To deploy the program:
```bash
cargo make deploy_program
```
### Running the Client
The client provides a command-line interface for interacting with the Gamma program. Use the following command to see available options:
```bash
cargo install --path client
```
## Commands
```bash
gamma-cli --help
```
- `create-config`: Create a new AMM configuration
- `initialize-pool`: Initialize a new liquidity pool
- `init-user-pool-liquidity`: Initialize user pool liquidity account
- `deposit`: Deposit liquidity into a pool
- `withdraw`: Withdraw liquidity from a pool
- `swap-base-in`: Perform a token swap with a specified input amount
- `swap-base-out`: Perform a token swap with a specified output amount
### Testing
To run the test suite:
```bash
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 use `cargo check`