Description:
Specify the intent lifecycle, solver bonding, slashing, escrow, and disputes in Quint. Model-check safety properties (no double payout, bond never negative, no stuck funds) and liveness properties (every intent eventually reaches a terminal state). Then add a conformance test that replays traces from the model against the real contract.
Problem Statement & Context:
The state machine now has 11 states and more than 20 transitions spread across 5,000 lines. A formal model is the only way to reason about it with confidence, and it's a strong signal to auditors.
Scope & Acceptance Criteria:
spec/vortex.qnt covering every IntentState transition documented in the README diagram.
- At least 6 safety invariants and 2 liveness properties, checked with Apalache or the Quint simulator.
- A trace-conformance harness: Rust tests consume ITF traces exported by Quint and replay them.
- Document each property in plain English.
- Out of scope: cross-chain proof semantics (abstracted as an oracle).
Implementation Guidelines:
- Key Files/Modules: new
spec/, intent_settlement/tests/conformance.rs, docs/formal-spec.md.
- Design/Architecture: Abstract amounts to small domains, and model time as discrete ticks.
- Edge Cases/Constraints: State explosion (bound the actors to 2 users and 2 solvers).
- Testing: The model checker passes, and the conformance replay passes.
Definition of "Done":
- Spec, doc, and conformance tests merged, with model-checker output in the PR.
- Reviewed and approved.
Resources:
Complexity: High (200 points)
Description:
Specify the intent lifecycle, solver bonding, slashing, escrow, and disputes in Quint. Model-check safety properties (no double payout, bond never negative, no stuck funds) and liveness properties (every intent eventually reaches a terminal state). Then add a conformance test that replays traces from the model against the real contract.
Problem Statement & Context:
The state machine now has 11 states and more than 20 transitions spread across 5,000 lines. A formal model is the only way to reason about it with confidence, and it's a strong signal to auditors.
Scope & Acceptance Criteria:
spec/vortex.qntcovering everyIntentStatetransition documented in the README diagram.Implementation Guidelines:
spec/,intent_settlement/tests/conformance.rs,docs/formal-spec.md.Definition of "Done":
Resources:
Complexity: High (200 points)