You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expose a read-only quote for the next redemption-rate controller tick, using
the pure controller and clamp constants introduced by #312.
Scope
Add a pure stablecoin_ffi quote operation backed directly by run_controller_tick, INTEGRAL_CLAMP, and RATE_DELTA_CLAMP.
Add redemptionRateUpdateQuote() to StablecoinModuleImpl.
Read and validate protocol parameters, redemption-price state, the configured
market-price oracle, and canonical clock.
Project the current redemption price before running the tick, matching the
on-chain update_redemption_rate order.
Return canSubmit, machine-readable blockers, current redemption price,
market price, elapsed milliseconds, next redemption rate, next integral
term, and clamp metadata. Preserve all fixed-point and signed values as exact
decimal strings.
Treat a not-yet-due interval, stale oracle, or zero oracle price as a
non-submittable quote, not as a fabricated controller output.
Quote results match run_controller_tick for positive, zero, and negative
error; proportional-only and PI modes; integral carry-over; both integral
clamp directions; both rate clamp directions; and worst-case bounded inputs.
Sign convention matches the program: error = redemption - market, with no
extra negation before adding the rate adjustment to fixed-point one.
Oracle ID, freshness, non-zero price, and minimum-update-interval gates match
the host instruction.
No floating-point math exists in the FFI or C++ transport layer.
nix build .#stablecoin-module and relevant Rust/module tests pass.
Dependencies
Depends on the scaffold, redemption-price-state, and current-global-projections
sub-issues under #321.
Goal
Expose a read-only quote for the next redemption-rate controller tick, using
the pure controller and clamp constants introduced by #312.
Scope
stablecoin_ffiquote operation backed directly byrun_controller_tick,INTEGRAL_CLAMP, andRATE_DELTA_CLAMP.redemptionRateUpdateQuote()toStablecoinModuleImpl.market-price oracle, and canonical clock.
on-chain
update_redemption_rateorder.canSubmit, machine-readable blockers, current redemption price,market price, elapsed milliseconds, next redemption rate, next integral
term, and clamp metadata. Preserve all fixed-point and signed values as exact
decimal strings.
non-submittable quote, not as a fabricated controller output.
poke API sub-issue.
Acceptance criteria
run_controller_tickfor positive, zero, and negativeerror; proportional-only and PI modes; integral carry-over; both integral
clamp directions; both rate clamp directions; and worst-case bounded inputs.
error = redemption - market, with noextra negation before adding the rate adjustment to fixed-point one.
the host instruction.
nix build .#stablecoin-moduleand relevant Rust/module tests pass.Dependencies
Depends on the scaffold, redemption-price-state, and current-global-projections
sub-issues under #321.