Skip to content

docs(stablecoin): document the CLOCK_01 clock account - #342

Merged
gravityblast merged 1 commit into
mainfrom
docs/stablecoin-clock-account
Aug 28, 2026
Merged

docs(stablecoin): document the CLOCK_01 clock account#342
gravityblast merged 1 commit into
mainfrom
docs/stablecoin-clock-account

Conversation

@gravityblast

@gravityblast gravityblast commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

now is used throughout the spec but its source was never documented: it is the
system CLOCK_01 account, passed as an ordinary account input.

Adds §5.4 "Wall-clock time", and adds the clock entry plus the corrected
account count to the nine instructions that need it (mermaid diagrams included).
Verified against artifacts/stablecoin-idl.json — §10.1, §10.2, §10.3 and
§10.3a were each off by one.

§10.4, §10.6, §10.7, §10.8 and setter 10 are updated too, but aren't implemented
yet, so those entries document intent. Instructions that don't reference time
are unchanged.

The spec used `now` throughout without ever saying where it comes from, and
omitted the clock account from every time-dependent instruction's input list.
Adds §5.4 and corrects the nine affected lists.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Stablecoin program design spec to explicitly document the source of now as the system CLOCK_01 account, and propagates that account through the instruction documentation where wall-clock time is required.

Changes:

  • Adds §5.4 “Wall-clock time” explaining how programs read now via CLOCK_01 and the resulting account/post-state implications.
  • Updates affected instruction account lists and mermaid diagrams to include a trailing clock account and fixes the corresponding account counts.
  • Updates the admin setter documentation to reflect that set_stability_fee_per_millisecond requires the clock account.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/stablecoin/README.md
Comment on lines +1164 to 1166
subgraph In["Base inputs (2 + 0..2)"]
a1[admin<br/>auth, == admin_account_id] ~~~ a2[protocol_parameters<br/>write] ~~~ ax[stability_fee_accumulator<br/>write — only set_stability_fee] ~~~ ay[new_oracle<br/>read — only set_market_price_oracle]
end
@gravityblast
gravityblast merged commit 0a1f30a into main Aug 28, 2026
8 checks passed
@gravityblast
gravityblast deleted the docs/stablecoin-clock-account branch August 28, 2026 13:02
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.

3 participants