A Rust SDK for building applications on top of Uniswap V3. Migration from the TypeScript Uniswap/v3-sdk.
WIP.
- Opinionated Rust implementation of the Uniswap V3 SDK with a focus on readability and performance
- Usage of alloy-rs types
- Reimplementation of the math libraries in Uniswap V3 Math In Rust based on optimizations presented in Uni V3 Lib
- Extensive unit tests and benchmarks
- An
extensions
module for additional functionality related to Uniswap V3
Add the following to your Cargo.toml
file:
uniswap-v3-sdk = "0.8.0"
The package structure follows that of the TypeScript SDK, but with snake_case
instead of camelCase
.
For easy import, use the prelude:
use uniswap_v3_sdk::prelude::*;
Contributions are welcome. Please open an issue if you have any questions or suggestions.
Tests are run with cargo test
. To test a specific module, use cargo test --test <module_name>
.
Linting is done with clippy
and rustfmt
. To run the linter,
use cargo clippy --all-targets --all-features -- -D warnings
and cargo fmt --all -- --check
.
Benchmarking is done with criterion
. To run the benchmarks, use cargo bench
.
This project is licensed under the MIT License.
This project is inspired by and adapted from the following projects: