pmm_math

Crates.iopmm_math
lib.rspmm_math
version0.1.1
sourcesrc
created_at2024-11-08 16:59:57.029738
updated_at2024-11-09 07:56:08.441507
descriptionRust Implementation Version of PMM Mathematical Formula Library.
homepage
repository
max_upload_size
id1441342
size16,962
(aiqubits)

documentation

README

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
Commit count: 0

cargo fmt