Crates.io | pmm_math |
lib.rs | pmm_math |
version | 0.1.1 |
source | src |
created_at | 2024-11-08 16:59:57.029738 |
updated_at | 2024-11-09 07:56:08.441507 |
description | Rust Implementation Version of PMM Mathematical Formula Library. |
homepage | |
repository | |
max_upload_size | |
id | 1441342 |
size | 16,962 |
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.
https://etherscan.io/address/0x5b87acd78283e17bd8c5c532b8086f30dd2f2316#code
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 |