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
This is a fund-custody contract. The single most important safety property is fund conservation:
the contract can never pay out more than was deposited. There is currently no invariant or test
guarding this.
What needs to be done
Add a test-only helper that computes Σ(unreleased milestone amounts across all escrows) per token
Assert the contract's token balance ≥ that sum after every state transition in tests
Add property/fuzz tests (e.g. proptest) generating random sequences of
create → fund → submit → approve → reject → dispute → refund and asserting the invariant holds
Cover the fee path: calculate_fee (escrow_core.rs) must never let payouts + fees exceed deposits
Activity
[-]Fund-conservation invariant + property tests[/-][+][Contract] Fund-conservation invariant + property tests[/+]guptakumarranjeet150 commentedon Oct 7, 2026
Hello team,
I looked into
[Contract] Fund-conservation invariant + property testsand have an implementation approach ready.Technical outline:
Ready to implement immediately upon assignment. Please feel free to assign!