Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
hpmaxi
marked this pull request as ready for review
October 17, 2026 14:20
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Governance could change the vault's custodian, roles and admin, and lower the notice or the wind-down delay, all at once.
Now role grants, admin hand-overs, revoking a manager role, the custodian, and lowering the notice or the wind-down delay (now at least 7 days) wait for the timelock. Pause and unpause, the deposit cap in both directions, raising the notice or the wind-down delay, and revoking an operational role are instant. Wiring is instant in a setup window that closes once, and the vault takes no deposit until that window is closed and its wiring checks pass, so every deposit is covered by the timelock. During an active wind-down nothing timelocked is proposed or applied, revoking the manager role included.
Part of #108:
finish_setupchecks the wiring, and the harness deploy fails without it. A later runbook PR closes it.Changes
finish_setupchecks the token and oracle bindings, the sole manager role, an empty share supply, the allowlist and the compliance binding, and refuses while a hand-over offered during setup is pendingrequest_depositis refused withSetupOpenuntil then; nothing is proposed during setupmanager, admin hand-over, a lower notice and a lower wind-down delay go throughpropose_change; their bounds are checked again when they applytreasuryorguardian, raising the notice or the wind-down delay, and the deposit cap stay instant;set_role_adminis always refusedshort_wind_downbuild for local tests drops it to zero and says so in its metadataDeviations
managerwaits; other vault roles revoke at once.WindDownDelayTooShortbeforeUseTimelock.set_custodianfails onUseTimelockbefore any signature, so that harness guard usespropose_change.managerrevoke.Acceptance criteria
request_depositis refused withSetupOpenuntilfinish_setupfinish_setupchecks the token and oracle bindings, the sole manager role, an empty share supply, the allowlist and the compliance binding, and refuses while a hand-over offered during setup is pendingmanager, admin hand-over, and lowering the notice or the wind-down delay go throughpropose_change; raising is instant; revokingtreasuryorguardianis instant; the deposit cap stays instantTest plan
Automated tests
cargo test --locked: all green, with 359 tests inasync-vault(31 new), 80 innav-oracleand 51 inshare-token.docs/TESTING.mdsays, thencargo test --locked -p async-vault --features upgrade_wasm with_wasm: 5 passed. CI does not run this yet.cargo check -p async-vault --features short_wind_downcompiles; that WASM's metadata readsbuild: short wind-down; local tests only.HARNESS_NETWORK=local npm run deploy -w scripts/harness, thentest:happy-path(24 passed) andtest:guards(46 passed).Manual verification
HARNESS_NETWORK=local npm run deploy -w scripts/harness. It prints "vault setup finished" before "wrote deployed.local.json".setup_open: it returnsfalse. Simulateset_custodianfrom any account: it is refused withError(Contract, #6065)(UseTimelock).Breaking changes
Deposits need
finish_setup; until thenrequest_depositis refused withSetupOpen(6064). The development deploy fromenvironments.tomlcannot finish setup, so a working local vault comes from the harness deploy. After setup,set_custodian,grant_role,transfer_admin_rolewith a non-zero ledger, revokingmanager, and lowering the notice or the wind-down delay are refused withUseTimelock(6065);set_role_adminis always refused. The wind-down delay defaults to 7 days and cannot go lower (6069). New error codes 6064–6067, 6069 and 6074. The console still calls the instant setters and adapts at the testnet redeploy.Checklist
Screenshots
None.