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
{{ message }}
Repository navigation
Property-based tests: cascade payouts always sum to amount #16
Add randomized tests (e.g. proptest in dev-deps) generating random split graphs (incl. cycles) and amounts, asserting conservation of funds and depth ≤ 3.
Added proptest = "1.6" to dev-dependencies in contracts/cascade_splitter/Cargo.toml.
Added property-based tests in contracts/cascade_splitter/src/test.rs generating randomized multi-node split graphs with varying allocations, basis points, and amounts up to $10^{15}$.
Verified that total settled payouts identically equal the initial amount (sum == amount) across all divisions and dust settlements.
Verified that every payout satisfies depth <= 3 (MAX_DEPTH) and amount > 0.
Verified actual token distribution on-chain transfers sum exactly to amount and debit the payer by amount.
Cyclic Graph Termination:
Explicitly validated 2-node mutual cycles ($A \leftrightarrow B$), 3-node cyclic rings ($A \to B \to C \to A$), and dense multigraph cycles, asserting deterministic termination and conservation of funds.
Deep Linear Cascades:
Validated that cascading through 6 hops strictly settles at depth 3 without recursing deeper.
CI Runtime:
All property test cases execute in just a few seconds, well below the 30-second CI threshold.
Activity
NePreby commentedon Nov 9, 2026
I have implemented comprehensive property-based tests verifying conservation of funds, depth bounds, and cycle termination for CascadeSplitter:
Summary of Coverage
proptest = "1.6"to dev-dependencies incontracts/cascade_splitter/Cargo.toml.contracts/cascade_splitter/src/test.rsgenerating randomized multi-node split graphs with varying allocations, basis points, and amounts up tosum == amount) across all divisions and dust settlements.depth <= 3(MAX_DEPTH) andamount > 0.amountand debit the payer byamount.Payout Details
TMqmJjRgVS21NL2eFtfyHciTxvE4BqGmEv