You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -53,7 +58,7 @@ use openzeppelin_math::u64::{mul_div, sqrt};
53
58
54
59
public fun quote_with_fee(amount: u64): u64 {
55
60
// 2.5% fee, rounded to nearest.
56
-
let quoted = mul_div(amount,1025u64, 1000u64, rounding::nearest());
61
+
let quoted = mul_div(amount,1025u64, 1000u64, rounding::nearest());
57
62
quoted.destroy_some()
58
63
}
59
64
@@ -69,7 +74,15 @@ sui move build
69
74
sui move test
70
75
```
71
76
77
+
## Picking a package
78
+
79
+
- Need integer arithmetic with safe overflow and explicit rounding? Use [Integer Math](/contracts-sui/1.x/math).
80
+
- Need fractional values — prices, fees, rates, signed deltas? Use [Fixed-Point Math](/contracts-sui/1.x/fixed-point).
81
+
- Need controlled transfer of admin/treasury/upgrade capabilities? Use [Access](/contracts-sui/1.x/access).
82
+
83
+
The packages compose. A typical protocol module imports `openzeppelin_math` for share math, `openzeppelin_fp_math` for rate and fee math, and `openzeppelin_access` for the admin capability that governs both.
0 commit comments