wintergate

Docs · Safety

Tests and results (release rc6, recorded 13 October 2026; app client updated the same day)

Results

Suite Where Result
Contracts, forge test (unit, fuzz 1,000 runs, invariants 256 x 64) this bundle, fresh compile 216 pass, 0 fail, 1 skipped (the fork rehearsal, which needs a mainnet RPC)
Contracts, deep profile (fuzz 10,000, invariants 2,000 x depth 128) final internal review, 11 Oct 216 pass; the recovery one-time invariants ran 128,000 calls each, the attacker and wallet invariants 256,000
Mutation check (do the rc6 tests catch the changes that matter?) final internal review, 11 Oct 4 of 4 mutants of HybridWallet.sol caught
Bytecode vs FREEZE.json (tools/check-freeze.py) this bundle 7 of 7 runtimes match
App client: SDK invariants, one-time key lifecycle, review regressions, the app and exit page checks 13 Oct, after the update below 123 of 123 pass
App signing core (its own tests, run from the package with nothing else) 13 Oct 74 of 74 pass
The several-device cases, each run against the earlier client and the updated one 13 Oct earlier client: a second message on one key in each case; updated client: one, every time (see below)
Mutation check of the update: 6 mutants (an escaped move or a cancel signed with no record, a recovery signed with no record, the way out on a leaf that is not junk, no move in the record, no stale check) 13 Oct 6 of 6 caught
App client, end to end against the real contracts on a local fork of mainnet final internal review, 11 Oct pass (create, 20+ protected actions, two devices, seed-only restore, rotation, escape after 7 days, evacuate, hostile recovery cancelled, recovery finished after 30 days)
Mutation check of the new lifecycle tests: 3 mutants of the client's signing guards (sign before the safe block, sign without a matching on-chain record, sign a second digest on one key) 13 Oct 3 of 3 caught by the client suite
The update's cases against the real contracts on a local fork of mainnet: two devices at once during the escape; someone forging the owner's ECDSA key front-running every record; a lost recovery kit and a new device 13 Oct 3 of 3 pass, run twice

The one-time key lifecycle

A one-time hash key is safe for one signature. Two signatures on different messages from one key can be combined into a forgery. These are the tests that keep that count at one in the cases that break naive designs. Contract tests are in contracts/test/; app tests are in the client suite, and those of the signing core are in its package (names quoted as they appear there).

Case Contract tests (in this bundle) App client tests
Retries. A transaction is dropped or a node answers oddly; the app sends again Commit.t.sol::test_dropped_reveal_resend_same_signature_then_expiry, test_fee_revert_keeps_the_commit_and_the_signature, Wallet.t.sol::test_relayerCannotStarveSignedGas "a dropped commit and a dropped reveal both land on re-send" (identical bytes, one signature); "retry storm: the reveal is dropped three times in a row" (one signature, every re-send identical); "a node that holds the bytes already does not fail the move"; "a signed recovery that was dropped is sent again identical after a reload"; "credit drained after the check ... resume lands the SAME move after a top-up"
Crashes. The app closes between steps (no contract state to test) "crash after signing, before the reveal is sent: the reopened app finishes the same move"; "resume completes an EXIT whose commit was left behind"; "our own pending commit is completed"
Several devices. Two phones, or two tabs, act on one vault Commit.t.sol::test_two_devices_race_for_one_leaf; RC6OpusReview.t.sol::test_opus_compromisedLeaf_outsideEscape_onlyCommittedOrCancel and ..._insideEscape_isTheDocumentedResidual "two devices race for one leaf: no leaf ever carries two digests"; "two tabs on one device (one shared store) send at the same moment"; "one-time keys are tracked per (root, leaf), not per vault"; since the update: "2a now: the same two devices never sign one leaf twice", "2a now: the cancel and the escaped move at the same moment use two leaves", "2a under attack: junk front-running every record blocks a free move (nothing signed); the evacuate still gets out through the fixed way out", "a device recorded a move and went offline; another device finishes THAT move with the identical signature"
A lost recovery kit and a new device audit/RC6Recovery.t.sol (the key is spent on first use) since the update: "2b now: the new device finds the recorded request, sends THAT one (one signature), and the lost kit comes back from the record"; "the escape recorded first decides the round"; "two devices start a recovery at the same moment with different kits: one record wins"
Restores. A new phone from the seed, or an old backup Wallet.t.sol and NonCustodial.t.sol (the chain, not the device, is the record of used keys) "restore from an old backup: the chain wins"; "seed-only restore ... works with no file"; "a seed-only restore on a new phone while the old phone has a commit waiting; the old phone comes back later"; "restore never picks a look-alike vault"; "a seed restore finds a vault that was recovered TO this seed"
Reorgs. A block holding the commit is replaced the commit rule itself (Commit.t.sol, invariant/WalletInvariants.t.sol) "reorg in safe mode: the commit vanishes before Ethereum marks it safe; nothing is signed"; "A3 fast mode: a commit reorged out after signing: the leaf is never offered for a new digest"; "with a lagging safe tag nothing is signed until the commit is safe"; "a stalled finality tag stops the wait at the deadline, with nothing signed"; "the RPC not answering the safe tag is an error, not a silent downgrade"
Recovery (30 days) and escape (7 days) NonCustodial.t.sol::test_recovery_soloTakesTheDelay_andIsFree, test_recovery_signatureBindsTheDelay, test_escapeHatch_ownerLeavesWithNothingFromAnyone; audit/RC6Recovery.t.sol; invariant/RecoveryOneTimeInvariants.t.sol; RC6OpusReview.t.sol::test_opus_alwaysAWayOut_everyTransition, test_opus_recoverySecretThief_cannotTakeOrFreeze; Fee.t.sol::test_exitsNeverTouchTheFeePolicy "exits: escape, act freely once active, evacuate, cancel a hostile recovery, recovery start and finish"; "a recovery the vault would retire is refused BEFORE the one-time key signs"; "the recovery key starts the escape with no commit"; "the owner cancels a pending recovery with no commit"

The 13 October update. Two of the known limits the reviews list are closed in the app client, with no contract change: two devices acting at once during the escape, and a lost recovery kit followed by a new device. Every one-time key, on every device, now signs only after a record on Ethereum says what it will sign: for the codes, the vault's own write-once record of each leaf, now also used during the escape and for the owner's cancel; for the recovery key, a small record written before it signs, at an address only the holder of that key can write to. The app's signing core and these tests are published when the app opens.

What remains: someone who can forge the owner's ECDSA signature can still delay a freely chosen move during the escape by taking its records first, but not the way out (cancel a recovery, or move Ether and the listed tokens to the exit address); fast mode with a second device (a reorg deeper than 3 blocks; the app never uses fast mode during an escape, for the cancel or for the recovery key); and the neighbouring-leaf griefing (a delay, never a loss). The contracts download's SECURITY.md describes the contracts' side, which did not change.