[!WARNING] Work in progress
The rates and constants on this page are placeholder values for development and testing. Final pricing, rate ratios, and economic parameters are still under design review and will change before production.
Lease pricing is fully deterministic. The cost is computed from the resource dimensions and duration using integer arithmetic with milli-XUSD precision. The ledger validates that every lease block carries the exact cost produced by this formula -- no negotiation, no rounding errors.
[!NOTE] Rounding
Memory is rounded up to the nearest GB: 1025 MB counts as 2 GB. Duration is rounded up to the nearest hour: 3601 seconds counts as 2 hours. Cost in milli-XUSD is rounded up to the nearest whole XUSD. All rounding uses integer ceiling division.
Multiplication uses safeMul() with overflow detection via bits.Mul64
Integer arithmetic
All calculations use uint64 -- no floating point
[!WARNING] Overflow protection
The cost calculation uses bits.Mul64 to detect overflow. If perHourMilli * hours would exceed uint64 max, the lease is rejected. This prevents absurdly large resource requests from wrapping around.