Appic DEX is a decentralized exchange built in Rust, deployed on the Internet Computer (ICP). It enables trustless, permission-less trading of tokens with features like automated market maker (AMM) pools, liquidity provision, and fee collection. This project leverages the scalability and security of ICP to provide a fast and cost-efficient trading experience.
canister_id on mainnet: nbepk-iyaaa-aaaad-qhlma-cai
- Pool Creation and Management: Create and manage AMM pools with customizable fees and initial price settings.
- Token Swapping: Perform single or multi-hop swaps with exact input or output amounts, supporting flexible trading paths.
- Quoting: Performs quoting for single or multi-hop swaps in both exact input or exact output directions.
- Liquidity Management: Add, increase, decrease, or burn liquidity positions with precise control over price ranges (ticks).
- Fee Collection: Collect accumulated fees from liquidity positions in both tokens of a pool.
- Comprehensive Queries: Access pool states,, historical data, user balances, and position details for transparency and analysis.
- Security: Built with Rust for memory safety and designed with robust error handling for reliable operation.
To run or develop this DEX, ensure you have the following installed:
- Rust
- DFX (Internet Computer SDK, version 0.20.0 or later)
- Make (for simplified build and test process; see installation guide below)
To use the make build and make test commands, install make:
brew install makesudo apt update && sudo apt install makemake --version-
Clone the Repository:
git clone https://github.com/Appic-Solutions/appic-dex.git cd appic-dex -
Build the Project: Run the following command to build the project:
make build
-
Start DFX: Ensure DFX is running in the background:
dfx start --background
-
Deploy the DEX Canister: Deploy the DEX canister using:
dfx deploy appic_dex
-
Interact with the DEX: Use the Candid UI or a custom frontend to interact with the deployed canister. Access the canister ID from the deployment output.
Run all tests (unit and integration) with:
make testWe welcome contributions! To contribute:
- Fork the repository.
- Create a feature branch (
git checkout -b feature/your-feature). - Commit changes (
git commit -m 'Add your feature'). - Push to the branch (
git push origin feature/your-feature). - Open a pull request.
Please follow the Code of Conduct and ensure tests pass before submitting.
This project has been developed with following security best practices including how to audit a canister, security best practices, effective rust canisters, and leveraging Rust’s memory safety guarantees. If you find vulnerabilities, please report them responsibly via tech@appicdao.com or open an issue.
This project is licensed under the Apache-2.0 License. See the LICENSE file for details.
- Built with Rust and Internet Computer.
- Thanks to the ICP community for all the amazing support.