Area: packages/contracts/src/scaling.ts
Goal: Verify protocol-scale price/amount scaling stays lossless.
Tasks:
- Add fixtures converting human amounts to/from protocol decimals.
- Cover
1e30 USD scale and token decimal boundaries.
- Assert round-trips never downcast through JavaScript
number.
Acceptance:
- Values stay as
bigint/string; no precision loss.
bun run --cwd packages/contracts test passes.
Area:
packages/contracts/src/scaling.tsGoal: Verify protocol-scale price/amount scaling stays lossless.
Tasks:
1e30USD scale and token decimal boundaries.number.Acceptance:
bigint/string; no precision loss.bun run --cwd packages/contracts testpasses.