Skip to content

feat(stablecoin): expose current global state - #338

Open
3esmit wants to merge 1 commit into
feat/stablecoin-module-redemption-price-statefrom
feat/stablecoin-module-current-global-state
Open

feat(stablecoin): expose current global state#338
3esmit wants to merge 1 commit into
feat/stablecoin-module-redemption-price-statefrom
feat/stablecoin-module-current-global-state

Conversation

@3esmit

@3esmit 3esmit commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add a pure stablecoin_ffi projection over validated protocol parameters, accumulator state, redemption state, and canonical CLOCK_01.
  • Expose currentGlobalState() with four public account reads and exact decimal-string output.
  • Preserve saturating elapsed-time handling and the seven-day compounding clamp by calling the stablecoin core helpers directly.

Scope

Read-only global projection only. No controller quote, poke submission, position logic, guest instruction, program-core, or IDL changes.

Stack

Built on #333 because this API composes its accumulator and redemption-state surfaces.

Validation

  • cargo +nightly fmt --all -- --check
  • taplo fmt --check .
  • RISC0_SKIP_BUILD=1 cargo +1.94.0 clippy --workspace --all-targets -- -D warnings
  • make clippy-guest
  • RISC0_DEV_MODE=1 cargo +1.94.0 test --workspace --exclude integration_tests
  • RISC0_DEV_MODE=1 cargo +1.94.0 test -p integration_tests
  • nix build path:.#stablecoin_ffi path:.#stablecoin-module path:.#stablecoin-module-tests
  • make build-programs
  • Tracked program IDLs match committed artifacts.

Closes #326

Copilot AI lite review requested due to automatic review settings August 27, 2026 15:26

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@3esmit
3esmit force-pushed the feat/stablecoin-module-current-global-state branch from 724aafb to 638424b Compare September 2, 2026 13:53
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