Skip to content

feat(metering): build subscription metering with real-time usage tracking - #1025

Merged
Smartdevs17 merged 3 commits into
Smartdevs17:mainfrom
morelucks:feat/subscription-metering-realtime
Sep 1, 2026
Merged

feat(metering): build subscription metering with real-time usage tracking#1025
Smartdevs17 merged 3 commits into
Smartdevs17:mainfrom
morelucks:feat/subscription-metering-realtime

Conversation

@morelucks

Copy link
Copy Markdown
Contributor

Closes #963

Summary of Changes

1. Smart Contract ()

  • Implemented on Soroban Rust SDK.
  • Support for metered plans, usage tracking per subscription, accrued fee calculation (base price + excess units * unit rate), hard usage cap limits, period resets, usage history logging, and rate limits.
  • Full Soroban unit test suite covering critical paths, authorization, limit enforcement, and period resets.

2. Frontend Zustand Store ( & )

  • Implemented with and persistence.
  • Features: real-time usage recording, cost accrual calculations, spending limits enforcement, threshold alert triggers (80%, 90%, 100%), cycle resets, alert acknowledgement, and telemetry simulation.
  • Exported via and .
  • Comprehensive Jest unit test coverage in and .

3. Documentation & Benchmarks ()

  • Detailed contract API specification, frontend store usage examples, telemetry setup guide, and performance benchmark tables.

@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

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

@morelucks
morelucks deployed to security-review August 27, 2026 02:38 — with GitHub Actions Active
@Smartdevs17
Smartdevs17 merged commit ec50dd3 into Smartdevs17:main Sep 1, 2026
17 of 45 checks passed
@Smartdevs17

Copy link
Copy Markdown
Owner

Thanks for contributing! The changes have been merged. Feel free to leave a review or feedback.

@morelucks
morelucks deployed to security-review September 1, 2026 09:52 — with GitHub Actions Active
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.

Build subscription metering with real-time usage tracking

2 participants