Tier: M (2-4 days) | Type: security
Context. Wave 7 shipped Kani for stealth-registry (three invariants at stealth-registry/src/proofs/mod.rs). stealth-sender is the higher-value target (it holds user funds and does raw i128 fee arithmetic with fee_bp up to 50) and has none. Property tests exist at stealth-sender/tests/properties.rs but only sample; Kani would prove the fee bounds hold across the full input space.
Scope.
- New
stealth-sender/src/proofs/mod.rs gated by #[cfg(kani)].
- Prove: (a)
fee = amount * fee_bp / 10_000 never overflows i128 for any positive amount and fee_bp <= 50, (b) net_to_recipient + fee_to_recipient == amount for every send that reaches token-transfer, (c) withdraw_many cannot leave the contract in a state where sum(unclaimed) > sum(deposited).
- Reuse
stealth-registry/src/mock_sdk.rs shape.
- Extend the existing
stellar-kani CI job to include the sender crate.
- Document the proofs' claim + non-goal in a new
stellar/stealth-sender/PROOFS.md.
Acceptance.
Files. stellar/stealth-sender/src/proofs/mod.rs (new), stellar/stealth-sender/src/mock_sdk.rs (new), stellar/stealth-sender/PROOFS.md (new), stellar/stealth-sender/README.md, .github/workflows/ci.yml.
Tier: M (2-4 days) | Type: security
Context. Wave 7 shipped Kani for
stealth-registry(three invariants atstealth-registry/src/proofs/mod.rs).stealth-senderis the higher-value target (it holds user funds and does rawi128fee arithmetic withfee_bpup to 50) and has none. Property tests exist atstealth-sender/tests/properties.rsbut only sample; Kani would prove the fee bounds hold across the full input space.Scope.
stealth-sender/src/proofs/mod.rsgated by#[cfg(kani)].fee = amount * fee_bp / 10_000never overflowsi128for any positiveamountandfee_bp <= 50, (b)net_to_recipient + fee_to_recipient == amountfor every send that reaches token-transfer, (c)withdraw_manycannot leave the contract in a state wheresum(unclaimed) > sum(deposited).stealth-registry/src/mock_sdk.rsshape.stellar-kaniCI job to include the sender crate.stellar/stealth-sender/PROOFS.md.Acceptance.
stellar-kanijob in under 5 minutes wall clockstellar/stealth-sender/PROOFS.mddocuments each proof's claim + non-goalstellar/stealth-sender/README.mdcross-links to PROOFS.mdFiles.
stellar/stealth-sender/src/proofs/mod.rs(new),stellar/stealth-sender/src/mock_sdk.rs(new),stellar/stealth-sender/PROOFS.md(new),stellar/stealth-sender/README.md,.github/workflows/ci.yml.