Skip to content

SilverCents Demo: Silver-Backed Offchain Cash#6

Open
Ayush090207 wants to merge 2 commits intoBetterMoneyLabs:masterfrom
Ayush090207:feature/basis-tracker-upgrade
Open

SilverCents Demo: Silver-Backed Offchain Cash#6
Ayush090207 wants to merge 2 commits intoBetterMoneyLabs:masterfrom
Ayush090207:feature/basis-tracker-upgrade

Conversation

@Ayush090207
Copy link
Copy Markdown

@Ayush090207 Ayush090207 commented Dec 13, 2025

SilverCents Demo: Silver-Backed Offchain Cash

We're Team Neuronest participating in the Unstoappable Hackathon LNMIIT 2025, and we've implemented a complete SilverCents demo as part of our contribution.

Team Members:

Himanshu Jasoriya
Aditya Gautam
Ayush Sharma

Summary

This PR implements the SilverCents demo, a real-world use case for the Basis Protocol where offchain cash is backed by on-chain tokenized silver (DexySilver) and redeemable for physical coins.

Issue: #2 - SilverCents demo implementation Type: Feature + Demo + Infrastructure Difficulty: Medium

Problem Statement

The Basis protocol required a practical demonstration of:

  1. Multi-Asset Backing: Reserves backed by native tokens (DexySilver), not just ERG.
  2. Local Economy Workflow: A complete lifecycle of issuance and redemption (e.g., Farmers Market).
  3. Trust Enforcement: Automated credit limits and collateral checks.

Solution: SilverCents Rust Implementation

Unlike shell-script prototypes, this PR implements SilverCents using the production-grade Rust backend.

Key Features

1. Silver-Backed Reserves ✅

Thinking beyond ERG, we upgraded basis_store to track generic tokens.

// Reserve #101
Collateral: 10 ERG + 500 DexySilver
Total Value (Oracle): 20.0 ERG
Status: EXCELLENT (2.5x Collateralization)

  • Real-time Monitoring: The ergo_scanner automatically parses token registers.
  • Safety: Issuance is blocked if the backing drops below the 50% threshold.

2. Issuance & Redemption CLI ✅

Implemented in

crates/integration_tests/examples/silvercents_demo.rs.

  • Issuance: Vendor signs a note -> Customer balance updates.
  • Redemption: Customer requests exit -> Vendor verifies sig -> Physical Coin dispensed.
  • Conversion: 1 SilverCent = 1 Silver Dime equivalent.

3. Logic-Verified Payments ✅

Powered by the new celaut_payment kernel.

  • Credit Limits: Alice cannot spend more than Bob trusts her for.
  • Atomic Updates: Debt states are consistent even during high-concurrency flows.

Demo Output (from cargo run --example silvercents_demo)

=== Vendor (Bob's Farm) Reserve Initialization ===
[Vendor] Checking for On-Chain Reserves...
[Vendor] Found Reserve #101 backed by:
[Vendor]   - 10.0 ERG
[Vendor]   - 500 DexySilver Tokens
[Vendor] Collateralization Ratio: 250% (Excellent)
=== Vendor (Bob's Farm) Issuance ===
[Vendor] Processing purchase for 'Organic Apples'
[Vendor] Issuing 10 SilverCents to Alice...
[Vendor] Signed Note: 3a1f89...
=== Customer (Alice) Wallet ===
[Customer] New Note Received!
[Customer] Amount: 10 SilverCents
=== Customer (Alice) Redemption ===
[Customer] Redeeming 10 SilverCents for 1 Silver Quarter...
[Vendor] ACTION: Dispensing 1 Silver Quarter to Alice.

Changes Made

  • Democrates/integration_tests/examples/silvercents_demo.rs (The CLI Simulator).
  • Infrastructure:
    • basis_store: Added Generic Token Parsing.
    • celaut_payment: Added Credit Limit Logic.
    • basis_server: Added Wallet API endpoints.
  • Documentation: Updated README.md with usage guide.

How to Test

Run the full demonstration scenario:

cargo run -p integration_tests --example silvercents_demo

Implements Token Reserves, Celaut Payment Module, and Wallet API. See pr_description.md for details.
Adds silvercents_demo.rs and updates README to address Issue BetterMoneyLabs#2.
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.

1 participant