Skip to content

Add cumulative variance logging engine with PriceVarianceEvent#355

Open
AugistineCreates wants to merge 1 commit into
StellarFlow-Network:mainfrom
AugistineCreates:variance-logging
Open

Add cumulative variance logging engine with PriceVarianceEvent#355
AugistineCreates wants to merge 1 commit into
StellarFlow-Network:mainfrom
AugistineCreates:variance-logging

Conversation

@AugistineCreates
Copy link
Copy Markdown

This pr closes #286

  • Introduces a new PriceVarianceEvent that records the percentage change
    (in basis points) between the new price and the previous baseline.
  • set_price now captures the prior price, computes the variance via
    calculate_percentage_change_bps, emits the PriceVarianceEvent,
    and logs the variance event using the existing log_event helper.
  • Ensures variance is logged even when the price does not change
    (variance = 0) to keep the on‑chain divergence index up‑to‑date.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

@AugistineCreates 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

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.

📊 Contracts | Cumulative Variance Logging Engine

1 participant