FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Token-based storage quota: hold tokens, get storage · Issue #185 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub

Repository navigation

Token-based storage quota: hold tokens, get storage #185

Open

Description

Concept

Pod tokens as storage quota. Instead of (or in addition to) admin-assigned byte limits, users hold pod tokens that grant storage capacity. More tokens = more storage.

How it works

  1. Token balance = quota — e.g. 1 PODS token = 1 MB of storage
  2. Webledger tracks balance — existing infrastructure, no new deps
  3. Quota check on PUT — before writing, check user's token balance vs current usage
  4. Automatic or manual — pod owner configures rate (tokens per MB)
  5. Top up anytime — buy more tokens via /pay/.buy, deposit via /pay/.deposit
  6. Withdraw unused — /pay/.withdraw converts unused quota back to portable tokens

Integration with existing quota system

JSS already has --default-quota (bytes per pod). Token quota would be an alternative mode:

# Traditional: fixed 50MB quota
jss start --default-quota 50MB

# Token-based: 1 token = 1MB, users buy their own quota
jss start --pay --pay-token PODS --quota-per-token 1MB

Both could coexist — a base free quota + token-purchased additional storage.

Economics

  • Free tier: pod owner mints small allocation per user (e.g. 10 tokens = 10MB free)
  • Paid tier: when free storage fills up, buy more tokens
  • Market pricing: storage cost follows token price on secondary market
  • Deflation: as pod fills up, remaining quota becomes scarcer/more valuable

Related

  • Existing quota system: src/storage/quota.js
  • Pay API: /pay/.buy, /pay/.withdraw, /pay/.balance
  • Token management: jss token mint/transfer/info

Activity

  1. added
    pluginCould be implemented as a plugin (#206); core/plugin line defined in #564
    on Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    pluginCould be implemented as a plugin (#206); core/plugin line defined in #564

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL