Skip to content

[#544] Make fee accounting and rounding invariant-safe - #564

Merged
1nonlypiece merged 2 commits into
Commitlabs-Org:masterfrom
arisu6804:feat/issue-544-fee-invariants
Aug 27, 2026
Merged

1nonlypiece merged 2 commits into
Commitlabs-Org:masterfrom
arisu6804:feat/issue-544-fee-invariants

Conversation

@arisu6804

@arisu6804 arisu6804 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Summary\n\nThis PR centralizes fee arithmetic and makes every supported fee lifecycle use a conservation-safe split.\n\n- adds checked quotient/remainder arithmetic that avoids intermediate multiplication overflow;\n- makes rate and amount validation explicit and fail closed;\n- returns gross, fee, net, and rounding remainder together;\n- supports optional persisted remainder carry for repeated dust-sized operations;\n- wires the policy into commitment creation and early-exit accounting;\n- wires the same policy into marketplace listings, offers, and auction settlement;\n- rejects invalid marketplace configuration instead of silently clamping it;\n- adds boundary, large-value, carry, ledger, and conservation tests;\n- documents rounding, lifecycle ordering, events, reconciliation, and upgrade rules.\n\nThe change set contains 521 added lines of implementation, tests, and accounting documentation.\n\n## Validation\n\n- \n- (blocked by the repository's existing Rust/toolchain incompatibility in dependency , before project code compilation)\n\nCloses #544

@1nonlypiece
1nonlypiece merged commit 9ed1868 into Commitlabs-Org:master Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants