degenbot.balancer.math¶
Stable companion home for Balancer V2 math functions.
Re-exports the Rust-backed math from the degenbot._ffi.balancer_math
submodule with un-prefixed names. Importers should use:
from degenbot.balancer.math import fixed_point_div_down
rather than reaching into degenbot._ffi directly — this path is stable
across future Rust reshuffles, and the un-prefixed names let the Rust
crate structure (degenbot-balancer-math → fixed_point /
weighted_math / stable_math) show through to Python.
The functions are thin PyO3 wrappers over the pure-Rust degenbot-balancer-math
core crate; see that crate’s docs for the math semantics.