Skip to content

docs: add consolidated trust-model page (admin authority, key custody) - #751

Merged
collinsezedike merged 2 commits into
drydocs:mainfrom
Iker2522:issue-726-trust-model
Sep 9, 2026
Merged

docs: add consolidated trust-model page (admin authority, key custody)#751
collinsezedike merged 2 commits into
drydocs:mainfrom
Iker2522:issue-726-trust-model

Conversation

@Iker2522

@Iker2522 Iker2522 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Admin-authority and immutability facts were scattered across docs/contracts.md, the #557 bug thread, and SECURITY.md (a vulnerability-disclosure policy, not a trust/permissions explainer). Nothing stated in one place what the ADMIN key can and cannot do, or what happens if it's lost or compromised.

Adds apps/docs/overview/trust-model.md, covering exactly what the issue asked for: what ADMIN can do (set_paused, set_adapter, begin_migration/migrate_adapter, transfer_admin/accept_admin), what it structurally cannot do (no upgrade path exists at all, cross-referenced from docs/contracts.md rather than duplicated), key-loss/compromise consequences, and a pointer to the incident-response runbook tracked as #721 (confirmed not yet written — referenced as forthcoming, not linked as if it exists).

States plainly, since it's true and directly relevant to the page's own purpose: Meridian is already live on mainnet with real depositor funds, and per mainnet-deployment.md's own go-live checklist, neither the security audit nor ADMIN key custody finalization is done yet. This page describes what the contract enforces regardless of who holds ADMIN; it does not claim either open item is resolved.

What changed

New apps/docs/overview/trust-model.md, grounded directly in packages/contracts/vault/src/lib.rs — read every admin-gated function's real implementation and doc comments (which already name #557's threat model explicitly) to confirm claims like "set_paused never blocks withdraw" and "transfer_admin requires the current admin's signature" against actual require_auth() calls, not assumptions.
Added the page to .vitepress/config.ts's sidebar nav.

Test plan

vitepress build (apps/docs) — failed on first attempt with 11 dead-link errors from linking directly to files outside apps/docs's source root (docs/contracts.md, SECURITY.md, two .rs files); fixed by matching the existing convention in this docs site (plain backtick-code references for out-of-tree files), not by disabling the check
Clean build after the fix; confirmed the new page's real content renders in the built HTML output, not just that the build succeeded
No contract or test changes — docs only

Closes #726

Closes drydocs#726

Admin-authority and immutability facts were scattered across
docs/contracts.md, the drydocs#557 bug thread, and SECURITY.md (a
vulnerability-disclosure policy, not a trust/permissions explainer).
Nothing stated in one place what the ADMIN key can and cannot do, or
what happens if it's lost or compromised.

Adds apps/docs/overview/trust-model.md, covering exactly the four
things the issue asked for: what ADMIN can do (set_paused, set_adapter,
begin_migration/migrate_adapter, transfer_admin/accept_admin), what it
structurally cannot do (no upgrade path exists at all, cross-referenced
from docs/contracts.md rather than duplicated), key-loss/compromise
consequences, and a pointer to the incident-response runbook tracked as
drydocs#721 (confirmed not yet written -- referenced as forthcoming, not
linked as if it exists).

States plainly, since it's true and directly relevant to the page's own
purpose: Meridian is already live on mainnet with real depositor funds,
and per mainnet-deployment.md's own go-live checklist, neither the
security audit nor ADMIN key custody finalization is done yet. This
page describes what the contract enforces regardless of who holds
ADMIN; it does not claim either open item is resolved.

Grounded directly in packages/contracts/vault/src/lib.rs, not just
existing docs: read every admin-gated function's real implementation
and doc comments (which already name drydocs#557's threat model explicitly)
to confirm claims like 'set_paused never blocks withdraw' and
'transfer_admin requires the current admin's signature' against actual
require_auth() calls and storage keys, not assumptions.

Verified: vitepress build (apps/docs) failed on first attempt with 11
dead-link errors from linking directly to files outside apps/docs's
source root (docs/contracts.md, SECURITY.md, two .rs source files);
fixed by matching the existing convention in this docs site (plain
backtick-code references for out-of-tree files, e.g. in
architecture/vault-contract.md), not by disabling the check. Clean
build after the fix, confirmed the new page's real content renders in
the built HTML output (not just that the build succeeded), and added
the page to .vitepress/config.ts's sidebar nav.
@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown

@Iker2522 is attempting to deploy a commit to the Collins' projects Team on Vercel.

A member of the Team first needs to authorize it.

@collinsezedike collinsezedike left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Iker2522 apps/docs/overview/trust-model.md fails pnpm format:check: it uses single-asterisk italics (*word*) throughout, and Prettier normalizes markdown italics to underscores (_word_). Run pnpm prettier --write apps/docs/overview/trust-model.md and push the result; that's the only thing blocking CI.

Content itself checked out well against packages/contracts/vault/src/lib.rs and storage.rs (the pause/withdraw independence, the two-step admin handoff, the migration timelock and slippage bound, and the absence of any upgrade entry point all match the actual code and existing tests), and the cross-referenced anchors in mainnet-deployment.md all resolve correctly.

@collinsezedike

collinsezedike commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

@Iker2522 The quoted sentence "the ~1-day timelock ... is the only thing standing between a leaked key and the vault's entire position moving to an address the attacker controls" is cited to migrate_adapter's doc comment, but it's actually verbatim from begin_migration's doc comment (packages/contracts/vault/src/lib.rs lines 781-783). migrate_adapter's own doc comment makes a related but differently-worded point. Since the page's whole premise is precise citation back to source, the attribution is worth fixing.

collinsezedike caught two things:

1. pnpm format:check failed: the page used single-asterisk markdown
   italics (*word*) throughout; Prettier normalizes these to
   underscores (_word_). Fixed with prettier --write.

2. The quoted sentence 'the ~1-day timelock ... is the only thing
   standing between a leaked key and the vault's entire position moving
   to an address the attacker controls' was attributed to
   migrate_adapter's doc comment, but it's actually verbatim from
   begin_migration's doc comment (lib.rs lines 781-783).
   migrate_adapter's own doc comment makes a related but
   differently-worded point (citing the same MIN_LEDGER_GAP mechanism,
   and additionally naming the two concrete reaction options:
   transfer_admin/accept_admin rotation, or pausing deposits). Fixed by
   citing each doc comment separately and accurately, rather than
   merging them under one attribution.

Verified: prettier --check passes, vitepress build succeeds, and
confirmed the corrected content (not a stray encoding artifact from my
own edit, which I introduced and caught before pushing) renders
correctly in the built HTML output.

@collinsezedike collinsezedike left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging now.

@collinsezedike
collinsezedike merged commit 725ac41 into drydocs:main Sep 9, 2026
8 of 9 checks passed
@collinsezedike

Copy link
Copy Markdown
Collaborator

@Iker2522 thank you for the contribution! If you have a moment, a star on the repo goes a long way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs] Write a consolidated trust-model document

2 participants