perpcity_sdk/math/mod.rs
1//! Pure math functions for the PerpCity protocol.
2//!
3//! These operate directly on Alloy primitives (`U256`, `I256`) and f64 —
4//! no structs, no state, just math. Each submodule corresponds to a domain:
5//!
6//! | Module | Purpose |
7//! |---|---|
8//! | [`tick`] | Tick ↔ price conversions, tick alignment, `getSqrtRatioAtTick` |
9//! | [`liquidity`] | Liquidity estimation for maker positions |
10//! | [`position`] | Entry price, size, value, leverage, liquidation price |
11
12pub mod liquidity;
13pub mod position;
14pub mod tick;