Crate uniswap_v3_sdk

source ·
Expand description

§uniswap-v3-sdk

A Rust SDK for building applications on top of Uniswap V3. Migration from the TypeScript Uniswap/v3-sdk.

§Features

  • 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 feature for additional functionalities related to Uniswap V3, including:

    • pool module for creating a Pool struct from a pool key and fetching the liquidity map within a tick range for the specified pool, using RPC client
    • position module for creating a Position struct from a token id and fetching the state and pool for all positions of the specified owner, using RPC client, etc
    • price_tick_conversions module for converting between prices and ticks
    • ephemeral_tick_data_provider module for fetching ticks using an ephemeral contract in a single eth_call

Modules§