Skip to content

docs: add contract and user-facing reference docs for treasury, devices, and contract security - #646

Merged
codebestia merged 4 commits into
codebestia:devfrom
Dannyorji:drips-issues
Oct 20, 2026
Merged

codebestia merged 4 commits into
codebestia:devfrom
Dannyorji:drips-issues

Conversation

@Dannyorji

Copy link
Copy Markdown
Contributor

Summary

  • Add contracts/docs/concepts-state-archival.md: a per-contract storage/TTL audit showing
    that none of the three Soroban contracts (token_transfer, group_treasury, proposals)
    ever extend any entry's TTL — every key is at risk of archival — and gives operators the
    stellar contract extend / stellar contract restore commands to recover.
  • Add docs/user-guide/devices-and-privacy.md: a plain-language guide to what Clicked's
    end-to-end encryption does and doesn't protect (aligned with docs/threat-model.md,
    including the metadata the server does see), linking/revoking devices, verifying a
    contact's safety number, handling a "security code changed" notice, why a newly linked
    device can't read older group history, the AI assistant's explicit E2EE exception, and what
    to do after losing a device.
  • Add contracts/docs/security-checklist.md: a checklist reviewers can run on any contract
    PR, with every item (require_auth coverage, init front-running vs. re-initialization, admin
    key powers, i128 overflow, zero/negative amounts, threshold edge cases, double voting,
    storage archival) answered per contract with a code/test citation or marked as an open
    finding — including that token_transfer::initialize and group_treasury::initialize have
    no auth check at all. Links the testing guide's mock_all_auths caveat and is now
    referenced from the PR template's new "Contracts" checklist section.
  • Add docs/user-guide/treasury.md: how a group's shared treasury works today — a worked
    three-member/threshold-of-two example, that funds live in an on-chain contract rather than
    inside Clicked, why voting asks for a Freighter signature, and that proposal rejection/expiry
    never moves funds because nothing is reserved when a proposal is created.

All four are documentation only — no application code changed.

Closes #632
Closes #633
Closes #644
Closes #645

Documents that none of the three contracts ever extend TTLs, so every
instance-storage key is at risk of archival, and gives operators the
stellar CLI commands to extend or restore before/after it happens.
Plain-language companion to threat-model.md covering device linking
and revocation, safety-number verification, why a newly linked device
can't read old group history, and the AI assistant's E2EE exception.
Walks through require_auth coverage, init front-running vs.
re-initialization, admin key powers, i128 overflow, zero/negative
amounts, threshold edge cases, double voting, and storage archival
for all three contracts, citing the exact code or test behind each
answer and marking unproven items as open findings. Adds a contracts
checklist section to the PR template that links it.
Explains membership and the approval threshold with a worked
three-member example, that funds live in an on-chain contract rather
than inside Clicked, why voting asks for a Freighter signature, and
that proposal expiry/rejection never moves funds since nothing is
reserved when a proposal is created.
@drips-wave

drips-wave Bot commented Oct 20, 2026

Copy link
Copy Markdown

@Dannyorji Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@codebestia
codebestia merged commit 43defa6 into codebestia:dev Oct 20, 2026
7 of 8 checks passed
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.

2 participants