pmm_math 0.1.1

Rust Implementation Version of PMM Mathematical Formula Library.
Documentation
  • Coverage
  • 61.11%
    11 out of 18 items documented0 out of 11 items with examples
  • Size
  • Source code size: 16.64 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.68 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • aiqubits

Rust Implementation Version of PMM (Proactive Market Maker, aka Concentrated Liquidity Market Maker) Mathematical Formula Library

The Rust version of the pmm mathematical formula library is completely consistent with the DODO PMM interface and implementation on the ETH main network, and can be used for Solana/Near/Polka SmartContract and other frameworks that can write contracts using Rust.

Refer to DODO's eth mainnet code

https://etherscan.io/address/0x5b87acd78283e17bd8c5c532b8086f30dd2f2316#code

Compare

DODO ETH Mainnet Code Rust Implementation
library SafeMath mod safe_math
divCeil div_ceil
sqrt sqrt
--- ---
library DecimalMath mod decimal_math
mulFloor mul_floor
mulCeil mul_ceil
divFloor div_floor
divCeil div_floor_ceil
reciprocalFloor reciprocal_floor
reciprocalCeil reciprocal_ceil
--- ---
library DODOMath mod dodo_math
_GeneralIntegrate general_integrate
_SolveQuadraticFunctionForTarget solve_quadratic_function_for_target
_SolveQuadraticFunctionForTrade solve_quadratic_function_for_trade