OpportunitiesEntities
Docs
    Ring Platform

    Decentralized Self-building Future

    Sign In
    Entities
    Opportunities
    Store
    Docs
    Platform Concepts
    RING EconomySonoratek LLCGlobal ImpactAI Meets Web3
    Get Started
    Quick StartCalculatorRoadmap
    Privacy|Contact
    v1.104.25|Sonoratek LLC

    Documentation

    Concepts, value, and typical clone scenarios — less code.

    Welcome to Ring
    Quick Reference
    Getting Started
    Prerequisites
    Installation
    First Success Validation
    Next Steps
    Features
    Multi-Vendor Store
    Inventory & Stock
    Vendor Management
    Commissions & Settlements
    SubscriptionConductor
    PaymentConductor
    Ring Oracle
    Payments Overview
    Public Pools & DAO Jars
    WayForPay Payment Integration
    Wallet & Credit System
    WalletConductor
    Credit Rewards
    Affiliate & Referral Enablement
    Referral Codes (Refcodes)
    NFT Exhibition Marketplace
    Solana NFT Gates
    Token Staking System
    Owner Project Lab
    Entities
    Opportunities
    Real-Time Messaging
    Ring Tasks
    WebRTC Calls & STUNner TURN
    Peer Games
    News Module
    Member Blogs
    Public Profile Pages
    Profile Account Widgets
    Ring File Cabinet
    Username Reservation System
    Scientific Editor
    Notifications
    Push Notifications with FCM (Ring-Powered)
    Email AI-CRM
    Ring Mailer & RingdomX Mail
    Tunnel Protocol
    VideoConductor
    MediaConductor
    Generative Gallery
    Authentication
    Security & Compliance
    Admin console
    Admin Wiki
    Manage via Telegram
    Locale System
    Mobile Experience
    Performance Optimization Patterns
    Examples
    Quick Start
    Basic Setup
    White Label
    Custom Branding
    Web3 Integration
    Real World
    Advanced Features
    Customization
    Quick Start — Your First Ring Clone
    Customization Guide
    Vertical Presets (SSOT)
    Ringization playbook
    Branding
    Themes
    Features
    Localization
    Token Economics Setup
    Payment Gateway Integration
    Reference Ring deployments
    Project configuration
    Public environment variables
    Order Lab secrets
    WalletConnect Project ID (Reown Cloud)
    Supported services
    NODUS wiki (project knowledge)
    Configuration playbook
    Web3
    Token launch jurisdictions
    Wallet
    Wallet Security Tips
    Integrations
    Ethereum wallets (Wagmi v3)
    RingFileBase (object storage API)
    Ring CDN (RingFileBase edge)
    Deployment
    Self-hosted deployment
    Vercel Deployment
    Docker
    Environment Configuration
    Monitoring & Analytics
    Performance Optimization
    Backup & Recovery
    Architecture
    Data Model
    Security
    Real Time
    Discovery Mutation Sync
    PaymentConductor architecture
    WalletConductor architecture
    News Kingdom architecture
    Backend Services
    Firebase Integration
    Development
    Ring MCP Server
    OSS vs enterprise

    Quick entry (CTOs · auditors · agents)

    Welcome — mission & audiences
    Quick Reference
    Getting started
    Architecture & Auth.js
    Backend modes & databases (DB_BACKEND_MODE)
    Self-hosted
    Ring MCP Tools
    Ring MCP Server
    Token economics
    Token launch jurisdictions
    Deploy (Docker · k8s)
    Security & compliance reads
    ringdom.org — LegioX homebase
    Source — MIT license (GitHub)

    Documentation

    Concepts, value, and typical clone scenarios — less code.

    Welcome to Ring
    Quick Reference
    Getting Started
    Prerequisites
    Installation
    First Success Validation
    Next Steps
    Features
    Multi-Vendor Store
    Inventory & Stock
    Vendor Management
    Commissions & Settlements
    SubscriptionConductor
    PaymentConductor
    Ring Oracle
    Payments Overview
    Public Pools & DAO Jars
    WayForPay Payment Integration
    Wallet & Credit System
    WalletConductor
    Credit Rewards
    Affiliate & Referral Enablement
    Referral Codes (Refcodes)
    NFT Exhibition Marketplace
    Solana NFT Gates
    Token Staking System
    Owner Project Lab
    Entities
    Opportunities
    Real-Time Messaging
    Ring Tasks
    WebRTC Calls & STUNner TURN
    Peer Games
    News Module
    Member Blogs
    Public Profile Pages
    Profile Account Widgets
    Ring File Cabinet
    Username Reservation System
    Scientific Editor
    Notifications
    Push Notifications with FCM (Ring-Powered)
    Email AI-CRM
    Ring Mailer & RingdomX Mail
    Tunnel Protocol
    VideoConductor
    MediaConductor
    Generative Gallery
    Authentication
    Security & Compliance
    Admin console
    Admin Wiki
    Manage via Telegram
    Locale System
    Mobile Experience
    Performance Optimization Patterns
    Examples
    Quick Start
    Basic Setup
    White Label
    Custom Branding
    Web3 Integration
    Real World
    Advanced Features
    Customization
    Quick Start — Your First Ring Clone
    Customization Guide
    Vertical Presets (SSOT)
    Ringization playbook
    Branding
    Themes
    Features
    Localization
    Token Economics Setup
    Payment Gateway Integration
    Reference Ring deployments
    Project configuration
    Public environment variables
    Order Lab secrets
    WalletConnect Project ID (Reown Cloud)
    Supported services
    NODUS wiki (project knowledge)
    Configuration playbook
    Web3
    Token launch jurisdictions
    Wallet
    Wallet Security Tips
    Integrations
    Ethereum wallets (Wagmi v3)
    RingFileBase (object storage API)
    Ring CDN (RingFileBase edge)
    Deployment
    Self-hosted deployment
    Vercel Deployment
    Docker
    Environment Configuration
    Monitoring & Analytics
    Performance Optimization
    Backup & Recovery
    Architecture
    Data Model
    Security
    Real Time
    Discovery Mutation Sync
    PaymentConductor architecture
    WalletConductor architecture
    News Kingdom architecture
    Backend Services
    Firebase Integration
    Development
    Ring MCP Server
    OSS vs enterprise

    Quick entry (CTOs · auditors · agents)

    Welcome — mission & audiences
    Quick Reference
    Getting started
    Architecture & Auth.js
    Backend modes & databases (DB_BACKEND_MODE)
    Self-hosted
    Ring MCP Tools
    Ring MCP Server
    Token economics
    Token launch jurisdictions
    Deploy (Docker · k8s)
    Security & compliance reads
    ringdom.org — LegioX homebase
    Source — MIT license (GitHub)

    Documentation

    Concepts, value, and typical clone scenarios — less code.

    Welcome to Ring
    Quick Reference
    Getting Started
    Prerequisites
    Installation
    First Success Validation
    Next Steps
    Features
    Multi-Vendor Store
    Inventory & Stock
    Vendor Management
    Commissions & Settlements
    SubscriptionConductor
    PaymentConductor
    Ring Oracle
    Payments Overview
    Public Pools & DAO Jars
    WayForPay Payment Integration
    Wallet & Credit System
    WalletConductor
    Credit Rewards
    Affiliate & Referral Enablement
    Referral Codes (Refcodes)
    NFT Exhibition Marketplace
    Solana NFT Gates
    Token Staking System
    Owner Project Lab
    Entities
    Opportunities
    Real-Time Messaging
    Ring Tasks
    WebRTC Calls & STUNner TURN
    Peer Games
    News Module
    Member Blogs
    Public Profile Pages
    Profile Account Widgets
    Ring File Cabinet
    Username Reservation System
    Scientific Editor
    Notifications
    Push Notifications with FCM (Ring-Powered)
    Email AI-CRM
    Ring Mailer & RingdomX Mail
    Tunnel Protocol
    VideoConductor
    MediaConductor
    Generative Gallery
    Authentication
    Security & Compliance
    Admin console
    Admin Wiki
    Manage via Telegram
    Locale System
    Mobile Experience
    Performance Optimization Patterns
    Examples
    Quick Start
    Basic Setup
    White Label
    Custom Branding
    Web3 Integration
    Real World
    Advanced Features
    Customization
    Quick Start — Your First Ring Clone
    Customization Guide
    Vertical Presets (SSOT)
    Ringization playbook
    Branding
    Themes
    Features
    Localization
    Token Economics Setup
    Payment Gateway Integration
    Reference Ring deployments
    Project configuration
    Public environment variables
    Order Lab secrets
    WalletConnect Project ID (Reown Cloud)
    Supported services
    NODUS wiki (project knowledge)
    Configuration playbook
    Web3
    Token launch jurisdictions
    Wallet
    Wallet Security Tips
    Integrations
    Ethereum wallets (Wagmi v3)
    RingFileBase (object storage API)
    Ring CDN (RingFileBase edge)
    Deployment
    Self-hosted deployment
    Vercel Deployment
    Docker
    Environment Configuration
    Monitoring & Analytics
    Performance Optimization
    Backup & Recovery
    Architecture
    Data Model
    Security
    Real Time
    Discovery Mutation Sync
    PaymentConductor architecture
    WalletConductor architecture
    News Kingdom architecture
    Backend Services
    Firebase Integration
    Development
    Ring MCP Server
    OSS vs enterprise

    Quick entry (CTOs · auditors · agents)

    Welcome — mission & audiences
    Quick Reference
    Getting started
    Architecture & Auth.js
    Backend modes & databases (DB_BACKEND_MODE)
    Self-hosted
    Ring MCP Tools
    Ring MCP Server
    Token economics
    Token launch jurisdictions
    Deploy (Docker · k8s)
    Security & compliance reads
    ringdom.org — LegioX homebase
    Source — MIT license (GitHub)
    Ring Logo

    Loading documentation...

    Preparing Ring content

    Ring Logo

    Loading documentation...

    Preparing Ring content

    Ring Logo

    Loading documentation...

    Preparing Ring content

    Credit Rewards

    Use Founder / Developer tabs in the docs sidebar to filter this page. Activity rewards are on when credit.rewards.enabled is omitted or true. Set false to stop every credit-balance-add award and hide the profile quest widget. Credit purchase, admin/MCP mint, and referral ShareEarn stay independent.

    Ring can award credit-balance units when a member completes a real contribution (profile fields, KYC, comments, reviews, requests, approved news). The unit label is credit.creditBalanceUnitLabel (often points). Amounts, role multipliers, and UTC daily caps live in ring-config.json → credit.rewards. This is not on-chain token minting and not the referral rail.

    SurfaceWhen enabled is omitted / trueWhen enabled is false
    enqueueRewardCreditAddEventEvaluates per-trigger rules, caps, idempotencySkips immediately (reason: rewards_disabled)
    Profile quest widgetRenders on /profile (UserProgressWidget)Does not render
    Onboarding KYC hints/login/onboarding lists earn amountsHints empty; lead copy omits earn language
    Reward toast / celebrationCreditRewardReceivedListener mountedListener not mounted
    Catalog / quest boardEnabled event rulesEmpty catalog; no summary query
    Card credit top-upUnchangedUnchanged
    POST /api/mcp/v1/credit/addUnchanged (explicit confirm: true)Unchanged
    Referral ShareEarn / refcodesUnchangedUnchanged
    /admin/rewardsCharts historical credit_add_eventsSame desk with a disabled banner — no new activity awards

    Why this matters for your clone

    Contribution rewards are optional clone policy. Some rings want a published quest board; others (for example a store-first overlay) want members to buy credits and never earn them from comments.

    Wallet & credits

    Credit ledger, Token Desk, and card top-up — independent of activity rewards.

    Profile widgets

    /profile hosts the quest board when rewards are enabled.

    Admin console

    /admin/rewards charts mint history for platform admins.

    Refcodes

    Implementation

    Kill switch lives in lib/wallet/credit-rewards-gate.ts (resolveCreditRewardsEnabled). isCreditRewardsEnabled() in lib/ring-config-core.ts (React cache(), client-safe) reads credit.rewards.enabled, then legacy credits.rewards.enabled. Omitted = true. Client UI calls isClientCreditRewardsEnabled() from lib/ring-config-client.ts. Server re-export: @/lib/ring-oracle.

    ModulePathJob
    Gatelib/wallet/credit-rewards-gate.tsPure boolean resolver
    Accessorlib/ring-config-core.ts → isCreditRewardsEnabledSnapshot read
    Clientlib/ring-config-client.ts → isClientCreditRewardsEnabledWidget / listener
    Schemalib/zod/credit-reward-schemas.ts → CreditRewardsConfigSchema.enabledOptional, default

    Recommended path

    Use clone-customization-with-implementer (L3 overlay only). Do not copy ring/web onto the clone.

    Set credit.rewards.enabled to false on this clone’s overlay web/ring-config.json at the top of the existing credit.rewards object. Do not fork reward-credit-service.ts or UserProgressWidget. Confirm card top-up, POST /api/mcp/v1/credit/add, and referral ShareEarn stay enabled. Pause for approval before compose or deploy.

    Inputs: clone slug, overlay web/ring-config.json already has credit.rewards, operator wants activity awards off.

    Manual path

    1. 1

      Confirm the overlay owns credit.rewards

      If the clone’s web/ring-config.json already has a credit.rewards block, add "enabled": false there. Compose replaces the whole file — Layer1 "enabled": true will not apply.

    2. 2

      If the clone inherits Layer1 config

      Add "enabled": false on Layer1 only when every compose of that image should stop awards. Prefer overlay for a single white-label.

    3. 3

      Do not disable adjacent rails

      Leave CreditAddFsModal, Token Desk, MCP credit add, and refcodes alone. Those paths do not call enqueueRewardCreditAddEvent.

    Frequently asked questions

    Impact

    Will members still see a quest board on /profile?

    No. UserProgressWidget returns null and profile-content.tsx does not mount it when isClientCreditRewardsEnabled() is false. Profile hero credit balances still show.

    Do comments and KYC still write credit_add_events?

    No new awards. Callers still invoke enqueue; the engine returns { status: 'skipped', reason: 'rewards_disabled' } before DB writes.

    Migration

    What if my overlay omits enabled?

    Awards stay on (backward compatible). Layer1 documents "enabled": true explicitly.

    Do Layer2 packs need an upgrade?

    No. Presets have no credit.rewards copies and no quest widget.

    Ops

    Does /admin/rewards go away?

    No. Admins can still chart history. New contribution awards stop.

    Is there an env var for this?

    No. SSOT is ring-config.json → credit.rewards.enabled. env.local.template has no REWARDS_ENABLED flag.

    Related documentation

    Related documentation

    Wallet & Credit System

    Depends-on: credit ledger, Token Desk, and card top-up stay independent of this kill switch.

    Ring Oracle

    Depends-on: awards stamp `getMainCurrencyCreditAccountingRate` and display `getCreditUnitLabel`.

    Profile Account Widgets

    Same-workflow: `/profile` mounts UserProgressWidget only when rewards are enabled.

    Admin console

    Next-step: `/admin/rewards` charts `credit_add_events` for platform admins.

    1. Docs
    2. /Features
    3. /Credit Rewards

    Updated Sep 9, 20266 min listen

    Credit Rewards

    Use Founder / Developer tabs in the docs sidebar to filter this page. Activity rewards are on when credit.rewards.enabled is omitted or true. Set false to stop every credit-balance-add award and hide the profile quest widget. Credit purchase, admin/MCP mint, and referral ShareEarn stay independent.

    Ring can award credit-balance units when a member completes a real contribution (profile fields, KYC, comments, reviews, requests, approved news). The unit label is credit.creditBalanceUnitLabel (often points). Amounts, role multipliers, and UTC daily caps live in ring-config.json → credit.rewards. This is not on-chain token minting and not the referral rail.

    SurfaceWhen enabled is omitted / trueWhen enabled is false
    enqueueRewardCreditAddEventEvaluates per-trigger rules, caps, idempotencySkips immediately (reason: rewards_disabled)
    Profile quest widgetRenders on /profile (UserProgressWidget)Does not render
    Onboarding KYC hints/login/onboarding lists earn amountsHints empty; lead copy omits earn language
    Reward toast / celebrationCreditRewardReceivedListener mountedListener not mounted
    Catalog / quest boardEnabled event rulesEmpty catalog; no summary query
    Card credit top-upUnchangedUnchanged
    POST /api/mcp/v1/credit/addUnchanged (explicit confirm: true)Unchanged
    Referral ShareEarn / refcodesUnchangedUnchanged
    /admin/rewardsCharts historical credit_add_eventsSame desk with a disabled banner — no new activity awards

    Why this matters for your clone

    Contribution rewards are optional clone policy. Some rings want a published quest board; others (for example a store-first overlay) want members to buy credits and never earn them from comments.

    Wallet & credits

    Credit ledger, Token Desk, and card top-up — independent of activity rewards.

    Profile widgets

    /profile hosts the quest board when rewards are enabled.

    Admin console

    /admin/rewards charts mint history for platform admins.

    Refcodes

    Implementation

    Kill switch lives in lib/wallet/credit-rewards-gate.ts (resolveCreditRewardsEnabled). isCreditRewardsEnabled() in lib/ring-config-core.ts (React cache(), client-safe) reads credit.rewards.enabled, then legacy credits.rewards.enabled. Omitted = true. Client UI calls isClientCreditRewardsEnabled() from lib/ring-config-client.ts. Server re-export: @/lib/ring-oracle.

    ModulePathJob
    Gatelib/wallet/credit-rewards-gate.tsPure boolean resolver
    Accessorlib/ring-config-core.ts → isCreditRewardsEnabledSnapshot read
    Clientlib/ring-config-client.ts → isClientCreditRewardsEnabledWidget / listener
    Schemalib/zod/credit-reward-schemas.ts → CreditRewardsConfigSchema.enabledOptional, default

    Recommended path

    Use clone-customization-with-implementer (L3 overlay only). Do not copy ring/web onto the clone.

    Set credit.rewards.enabled to false on this clone’s overlay web/ring-config.json at the top of the existing credit.rewards object. Do not fork reward-credit-service.ts or UserProgressWidget. Confirm card top-up, POST /api/mcp/v1/credit/add, and referral ShareEarn stay enabled. Pause for approval before compose or deploy.

    Inputs: clone slug, overlay web/ring-config.json already has credit.rewards, operator wants activity awards off.

    Manual path

    1. 1

      Confirm the overlay owns credit.rewards

      If the clone’s web/ring-config.json already has a credit.rewards block, add "enabled": false there. Compose replaces the whole file — Layer1 "enabled": true will not apply.

    2. 2

      If the clone inherits Layer1 config

      Add "enabled": false on Layer1 only when every compose of that image should stop awards. Prefer overlay for a single white-label.

    3. 3

      Do not disable adjacent rails

      Leave CreditAddFsModal, Token Desk, MCP credit add, and refcodes alone. Those paths do not call enqueueRewardCreditAddEvent.

    Frequently asked questions

    Impact

    Will members still see a quest board on /profile?

    No. UserProgressWidget returns null and profile-content.tsx does not mount it when isClientCreditRewardsEnabled() is false. Profile hero credit balances still show.

    Do comments and KYC still write credit_add_events?

    No new awards. Callers still invoke enqueue; the engine returns { status: 'skipped', reason: 'rewards_disabled' } before DB writes.

    Migration

    What if my overlay omits enabled?

    Awards stay on (backward compatible). Layer1 documents "enabled": true explicitly.

    Do Layer2 packs need an upgrade?

    No. Presets have no credit.rewards copies and no quest widget.

    Ops

    Does /admin/rewards go away?

    No. Admins can still chart history. New contribution awards stop.

    Is there an env var for this?

    No. SSOT is ring-config.json → credit.rewards.enabled. env.local.template has no REWARDS_ENABLED flag.

    Related documentation

    Related documentation

    Wallet & Credit System

    Depends-on: credit ledger, Token Desk, and card top-up stay independent of this kill switch.

    Ring Oracle

    Depends-on: awards stamp `getMainCurrencyCreditAccountingRate` and display `getCreditUnitLabel`.

    Profile Account Widgets

    Same-workflow: `/profile` mounts UserProgressWidget only when rewards are enabled.

    Admin console

    Next-step: `/admin/rewards` charts `credit_add_events` for platform admins.

    1. Docs
    2. /Features
    3. /Credit Rewards

    Updated Sep 9, 20266 min listen

    Credit Rewards

    Use Founder / Developer tabs in the docs sidebar to filter this page. Activity rewards are on when credit.rewards.enabled is omitted or true. Set false to stop every credit-balance-add award and hide the profile quest widget. Credit purchase, admin/MCP mint, and referral ShareEarn stay independent.

    Ring can award credit-balance units when a member completes a real contribution (profile fields, KYC, comments, reviews, requests, approved news). The unit label is credit.creditBalanceUnitLabel (often points). Amounts, role multipliers, and UTC daily caps live in ring-config.json → credit.rewards. This is not on-chain token minting and not the referral rail.

    SurfaceWhen enabled is omitted / trueWhen enabled is false
    enqueueRewardCreditAddEventEvaluates per-trigger rules, caps, idempotencySkips immediately (reason: rewards_disabled)
    Profile quest widgetRenders on /profile (UserProgressWidget)Does not render
    Onboarding KYC hints/login/onboarding lists earn amountsHints empty; lead copy omits earn language
    Reward toast / celebrationCreditRewardReceivedListener mountedListener not mounted
    Catalog / quest boardEnabled event rulesEmpty catalog; no summary query
    Card credit top-upUnchangedUnchanged
    POST /api/mcp/v1/credit/addUnchanged (explicit confirm: true)Unchanged
    Referral ShareEarn / refcodesUnchangedUnchanged
    /admin/rewardsCharts historical credit_add_eventsSame desk with a disabled banner — no new activity awards

    Why this matters for your clone

    Contribution rewards are optional clone policy. Some rings want a published quest board; others (for example a store-first overlay) want members to buy credits and never earn them from comments.

    Wallet & credits

    Credit ledger, Token Desk, and card top-up — independent of activity rewards.

    Profile widgets

    /profile hosts the quest board when rewards are enabled.

    Admin console

    /admin/rewards charts mint history for platform admins.

    Refcodes

    Implementation

    Kill switch lives in lib/wallet/credit-rewards-gate.ts (resolveCreditRewardsEnabled). isCreditRewardsEnabled() in lib/ring-config-core.ts (React cache(), client-safe) reads credit.rewards.enabled, then legacy credits.rewards.enabled. Omitted = true. Client UI calls isClientCreditRewardsEnabled() from lib/ring-config-client.ts. Server re-export: @/lib/ring-oracle.

    ModulePathJob
    Gatelib/wallet/credit-rewards-gate.tsPure boolean resolver
    Accessorlib/ring-config-core.ts → isCreditRewardsEnabledSnapshot read
    Clientlib/ring-config-client.ts → isClientCreditRewardsEnabledWidget / listener
    Schemalib/zod/credit-reward-schemas.ts → CreditRewardsConfigSchema.enabledOptional, default

    Recommended path

    Use clone-customization-with-implementer (L3 overlay only). Do not copy ring/web onto the clone.

    Set credit.rewards.enabled to false on this clone’s overlay web/ring-config.json at the top of the existing credit.rewards object. Do not fork reward-credit-service.ts or UserProgressWidget. Confirm card top-up, POST /api/mcp/v1/credit/add, and referral ShareEarn stay enabled. Pause for approval before compose or deploy.

    Inputs: clone slug, overlay web/ring-config.json already has credit.rewards, operator wants activity awards off.

    Manual path

    1. 1

      Confirm the overlay owns credit.rewards

      If the clone’s web/ring-config.json already has a credit.rewards block, add "enabled": false there. Compose replaces the whole file — Layer1 "enabled": true will not apply.

    2. 2

      If the clone inherits Layer1 config

      Add "enabled": false on Layer1 only when every compose of that image should stop awards. Prefer overlay for a single white-label.

    3. 3

      Do not disable adjacent rails

      Leave CreditAddFsModal, Token Desk, MCP credit add, and refcodes alone. Those paths do not call enqueueRewardCreditAddEvent.

    Frequently asked questions

    Impact

    Will members still see a quest board on /profile?

    No. UserProgressWidget returns null and profile-content.tsx does not mount it when isClientCreditRewardsEnabled() is false. Profile hero credit balances still show.

    Do comments and KYC still write credit_add_events?

    No new awards. Callers still invoke enqueue; the engine returns { status: 'skipped', reason: 'rewards_disabled' } before DB writes.

    Migration

    What if my overlay omits enabled?

    Awards stay on (backward compatible). Layer1 documents "enabled": true explicitly.

    Do Layer2 packs need an upgrade?

    No. Presets have no credit.rewards copies and no quest widget.

    Ops

    Does /admin/rewards go away?

    No. Admins can still chart history. New contribution awards stop.

    Is there an env var for this?

    No. SSOT is ring-config.json → credit.rewards.enabled. env.local.template has no REWARDS_ENABLED flag.

    Related documentation

    Related documentation

    Wallet & Credit System

    Depends-on: credit ledger, Token Desk, and card top-up stay independent of this kill switch.

    Ring Oracle

    Depends-on: awards stamp `getMainCurrencyCreditAccountingRate` and display `getCreditUnitLabel`.

    Profile Account Widgets

    Same-workflow: `/profile` mounts UserProgressWidget only when rewards are enabled.

    Admin console

    Next-step: `/admin/rewards` charts `credit_add_events` for platform admins.

    1. Docs
    2. /Features
    3. /Credit Rewards

    Updated Sep 9, 20266 min listen

    Wallet-linked share links mint a different rail — not credit.rewards.

    Typical scenarios

    1. Community ring — leave enabled omitted or true. Members see quest progress on /profile and earn within daily caps.
    2. Commerce ring — set "enabled": false on the clone overlay web/ring-config.json. The quest widget disappears; store and top-up still work.
    3. Overlay owns credit.rewards — compose copies that file as a whole. You must set enabled on the overlay; Layer1’s "enabled": true does not leak through.
    true
    Write pathlib/wallet/reward-credit-service.tsFirst-line skip rewards_disabled
    Cataloglib/ring-config-chain.ts → getPublicRewardCatalog[] when disabled
    Quest boardapp/_actions/wallet.ts → getRewardQuestBoardEmpty payload when disabled
    Widgetfeatures/auth/components/user-progress-widget.tsxreturn null when disabled
    Profile mountfeatures/auth/components/profile-content.tsxConditional render
    Listenerfeatures/wallet/components/credit-reward-received-listener.tsxGated in locale-app-chrome.tsx
    Profile hookslib/wallet/profile-reward-hooks.tsStill calls enqueue; skip is inside the engine

    Read fallback for event rules (not the kill switch): credit.rewards.events → credit.creditAddEvents → credits.rewards.events.

    Config shape

    Per-trigger events.*.enabled still applies when the global flag is on. Global false wins without evaluating triggers.

    Engine

    enqueueRewardCreditAddEvent (lib/wallet/reward-credit-service.ts):

    1. Global gate → skipped / rewards_disabled
    2. Load rule → per-event enabled, minRole, username, verified
    3. Idempotency key → existing completed → existing
    4. floor(base × role multiplier) (minimum 1 if base ≥ 1) + UTC daily cap
    5. creditBalanceService.addCredits(..., 'reward_credit_add', getMainCurrencyCreditAccountingRate())
    6. Audit row + appendEvent('reward_credit_add') + notifyRewardCreditReceived

    Daily cap skip returns reason: 'daily_cap' and does not write an idempotency_key row (would permanently block a later award). Ledger failures → status failed.

    Idempotency modeKeyUse
    once_per_usercredit_add_event:{trigger}:{userId}Profile fields, KYC, completion bonus
    once_per_object…:{objectType}:{objectId}Comments, reviews, approved news, requests

    Unique index on credit_add_events.idempotency_key prevents races.

    Wired callers (all go through enqueue)

    TriggerCaller
    ringUsername, addedBio, addedLocation, addedWebsite, addedTelegram, addedWhatsapp, profileCompletedmaybeAwardProfileRewards after updateProfile / vitals onboarding
    addedTelegram (OAuth / Mini App link)features/auth/services/user-resolve.ts
    adminVerifyfeatures/verification/services/admin-manual-user-verification.ts
    newsStoryApprovedfeatures/news/services/news-promotion-workflow.ts (user-authored main-page approval)
    commentCreatedfeatures/comments/services/comment-service.ts
    reviewCreatedapp/api/store/products/[id]/reviews/route.ts
    requestCreatedfeatures/opportunities/services/create-opportunity.ts

    Visitors earn nothing when minRole is subscriber (default).

    Admin monitoring

    SurfacePath
    Console/admin/rewards (AdminRewardsDashboard, minRole: admin)
    StatsGET /api/admin/rewards/stats?range=7d|28d|90d
    EventsGET /api/admin/rewards/events
    Per-userGET /api/admin/rewards/users/[id]

    Disabling awards does not hide this desk. Historical rows remain.

    Layer2 packs (ring-presets/) do not copy reward chrome. Clone TS overlays do not copy UserProgressWidget; compose delivers Layer1. Only overlay ring-config.json files that already contain a credit.rewards object need the enabled key.

    Referral Codes (Refcodes)

    See-also: referral token minting is a separate rail from credit.rewards.

    Wallet API

    Deep-dive: `getRewardQuestBoard` and credit Server Actions in `app/_actions/wallet.ts`.

    Ringization playbook

    Same-workflow: clone overlay ring-config is whole-file compose — set enabled on the overlay you own.

    Wallet-linked share links mint a different rail — not credit.rewards.

    Typical scenarios

    1. Community ring — leave enabled omitted or true. Members see quest progress on /profile and earn within daily caps.
    2. Commerce ring — set "enabled": false on the clone overlay web/ring-config.json. The quest widget disappears; store and top-up still work.
    3. Overlay owns credit.rewards — compose copies that file as a whole. You must set enabled on the overlay; Layer1’s "enabled": true does not leak through.
    true
    Write pathlib/wallet/reward-credit-service.tsFirst-line skip rewards_disabled
    Cataloglib/ring-config-chain.ts → getPublicRewardCatalog[] when disabled
    Quest boardapp/_actions/wallet.ts → getRewardQuestBoardEmpty payload when disabled
    Widgetfeatures/auth/components/user-progress-widget.tsxreturn null when disabled
    Profile mountfeatures/auth/components/profile-content.tsxConditional render
    Listenerfeatures/wallet/components/credit-reward-received-listener.tsxGated in locale-app-chrome.tsx
    Profile hookslib/wallet/profile-reward-hooks.tsStill calls enqueue; skip is inside the engine

    Read fallback for event rules (not the kill switch): credit.rewards.events → credit.creditAddEvents → credits.rewards.events.

    Config shape

    Per-trigger events.*.enabled still applies when the global flag is on. Global false wins without evaluating triggers.

    Engine

    enqueueRewardCreditAddEvent (lib/wallet/reward-credit-service.ts):

    1. Global gate → skipped / rewards_disabled
    2. Load rule → per-event enabled, minRole, username, verified
    3. Idempotency key → existing completed → existing
    4. floor(base × role multiplier) (minimum 1 if base ≥ 1) + UTC daily cap
    5. creditBalanceService.addCredits(..., 'reward_credit_add', getMainCurrencyCreditAccountingRate())
    6. Audit row + appendEvent('reward_credit_add') + notifyRewardCreditReceived

    Daily cap skip returns reason: 'daily_cap' and does not write an idempotency_key row (would permanently block a later award). Ledger failures → status failed.

    Idempotency modeKeyUse
    once_per_usercredit_add_event:{trigger}:{userId}Profile fields, KYC, completion bonus
    once_per_object…:{objectType}:{objectId}Comments, reviews, approved news, requests

    Unique index on credit_add_events.idempotency_key prevents races.

    Wired callers (all go through enqueue)

    TriggerCaller
    ringUsername, addedBio, addedLocation, addedWebsite, addedTelegram, addedWhatsapp, profileCompletedmaybeAwardProfileRewards after updateProfile / vitals onboarding
    addedTelegram (OAuth / Mini App link)features/auth/services/user-resolve.ts
    adminVerifyfeatures/verification/services/admin-manual-user-verification.ts
    newsStoryApprovedfeatures/news/services/news-promotion-workflow.ts (user-authored main-page approval)
    commentCreatedfeatures/comments/services/comment-service.ts
    reviewCreatedapp/api/store/products/[id]/reviews/route.ts
    requestCreatedfeatures/opportunities/services/create-opportunity.ts

    Visitors earn nothing when minRole is subscriber (default).

    Admin monitoring

    SurfacePath
    Console/admin/rewards (AdminRewardsDashboard, minRole: admin)
    StatsGET /api/admin/rewards/stats?range=7d|28d|90d
    EventsGET /api/admin/rewards/events
    Per-userGET /api/admin/rewards/users/[id]

    Disabling awards does not hide this desk. Historical rows remain.

    Layer2 packs (ring-presets/) do not copy reward chrome. Clone TS overlays do not copy UserProgressWidget; compose delivers Layer1. Only overlay ring-config.json files that already contain a credit.rewards object need the enabled key.

    Referral Codes (Refcodes)

    See-also: referral token minting is a separate rail from credit.rewards.

    Wallet API

    Deep-dive: `getRewardQuestBoard` and credit Server Actions in `app/_actions/wallet.ts`.

    Ringization playbook

    Same-workflow: clone overlay ring-config is whole-file compose — set enabled on the overlay you own.

    Wallet-linked share links mint a different rail — not credit.rewards.

    Typical scenarios

    1. Community ring — leave enabled omitted or true. Members see quest progress on /profile and earn within daily caps.
    2. Commerce ring — set "enabled": false on the clone overlay web/ring-config.json. The quest widget disappears; store and top-up still work.
    3. Overlay owns credit.rewards — compose copies that file as a whole. You must set enabled on the overlay; Layer1’s "enabled": true does not leak through.
    true
    Write pathlib/wallet/reward-credit-service.tsFirst-line skip rewards_disabled
    Cataloglib/ring-config-chain.ts → getPublicRewardCatalog[] when disabled
    Quest boardapp/_actions/wallet.ts → getRewardQuestBoardEmpty payload when disabled
    Widgetfeatures/auth/components/user-progress-widget.tsxreturn null when disabled
    Profile mountfeatures/auth/components/profile-content.tsxConditional render
    Listenerfeatures/wallet/components/credit-reward-received-listener.tsxGated in locale-app-chrome.tsx
    Profile hookslib/wallet/profile-reward-hooks.tsStill calls enqueue; skip is inside the engine

    Read fallback for event rules (not the kill switch): credit.rewards.events → credit.creditAddEvents → credits.rewards.events.

    Config shape

    Per-trigger events.*.enabled still applies when the global flag is on. Global false wins without evaluating triggers.

    Engine

    enqueueRewardCreditAddEvent (lib/wallet/reward-credit-service.ts):

    1. Global gate → skipped / rewards_disabled
    2. Load rule → per-event enabled, minRole, username, verified
    3. Idempotency key → existing completed → existing
    4. floor(base × role multiplier) (minimum 1 if base ≥ 1) + UTC daily cap
    5. creditBalanceService.addCredits(..., 'reward_credit_add', getMainCurrencyCreditAccountingRate())
    6. Audit row + appendEvent('reward_credit_add') + notifyRewardCreditReceived

    Daily cap skip returns reason: 'daily_cap' and does not write an idempotency_key row (would permanently block a later award). Ledger failures → status failed.

    Idempotency modeKeyUse
    once_per_usercredit_add_event:{trigger}:{userId}Profile fields, KYC, completion bonus
    once_per_object…:{objectType}:{objectId}Comments, reviews, approved news, requests

    Unique index on credit_add_events.idempotency_key prevents races.

    Wired callers (all go through enqueue)

    TriggerCaller
    ringUsername, addedBio, addedLocation, addedWebsite, addedTelegram, addedWhatsapp, profileCompletedmaybeAwardProfileRewards after updateProfile / vitals onboarding
    addedTelegram (OAuth / Mini App link)features/auth/services/user-resolve.ts
    adminVerifyfeatures/verification/services/admin-manual-user-verification.ts
    newsStoryApprovedfeatures/news/services/news-promotion-workflow.ts (user-authored main-page approval)
    commentCreatedfeatures/comments/services/comment-service.ts
    reviewCreatedapp/api/store/products/[id]/reviews/route.ts
    requestCreatedfeatures/opportunities/services/create-opportunity.ts

    Visitors earn nothing when minRole is subscriber (default).

    Admin monitoring

    SurfacePath
    Console/admin/rewards (AdminRewardsDashboard, minRole: admin)
    StatsGET /api/admin/rewards/stats?range=7d|28d|90d
    EventsGET /api/admin/rewards/events
    Per-userGET /api/admin/rewards/users/[id]

    Disabling awards does not hide this desk. Historical rows remain.

    Layer2 packs (ring-presets/) do not copy reward chrome. Clone TS overlays do not copy UserProgressWidget; compose delivers Layer1. Only overlay ring-config.json files that already contain a credit.rewards object need the enabled key.

    Referral Codes (Refcodes)

    See-also: referral token minting is a separate rail from credit.rewards.

    Wallet API

    Deep-dive: `getRewardQuestBoard` and credit Server Actions in `app/_actions/wallet.ts`.

    Ringization playbook

    Same-workflow: clone overlay ring-config is whole-file compose — set enabled on the overlay you own.