Skip to content

mrtomdev/Solana-Stablecoin-SaaS

Repository files navigation

Solana

πŸͺ™ StableMint β€” The Open-Source Solana Stablecoin SaaS Platform

Launch, manage, and scale production-ready stablecoins on Solana in minutes. No Metaplex. No backend keys. 100% Token-2022 native.

Solana Next.js TypeScript Prisma TailwindCSS License: MIT PRs Welcome Stars

πŸš€ Quick Start Β· ✨ Features Β· πŸ“š Docs Β· ❓ FAQ Β· πŸ“Έ Screenshots Β· πŸ—οΈ Architecture Β· 🀝 Contributing

The fastest way to launch a fiat-backed, multi-sig governed, fully-auditable stablecoin on Solana. Built for DeFi founders, fintechs, banks, and treasuries. Built on SPL Token-2022 for enterprise-grade compliance.


⭐ Why StableMint?

Launching a stablecoin used to require an army of Rust developers, a custom Solana program, custodial infrastructure, and 6+ months of audits. StableMint changes that.

It ships a complete stablecoin issuance & operations platform built entirely on SPL Token-2022 extensions β€” no custom on-chain program required, no Metaplex dependency, no server-side private keys, 100% open-source.

If Circle (USDC), Tether (USDT), Paxos (USDP), and PayPal (PYUSD) had an open-source little sibling, this would be it.

Who Should Use StableMint?

  • 🏦 Banks & Fintechs: Launch CBDC-equivalent stablecoins on Solana
  • πŸ’° Treasuries: Issue corporate or sovereign stablecoins for treasury management
  • πŸͺ™ DeFi Protocols: Create collateralized stablecoins (like MakerDAO but simpler)
  • πŸ“ˆ Fintech Startups: Skip 6-month dev cycles; go live in days

✨ Features

πŸ”₯ Core Issuance β€” Stablecoin Creation

  • βœ… One-click stablecoin creation β€” SPL Token-2022 with MetadataPointer extension (no Metaplex)
  • βœ… Native on-chain metadata β€” name, symbol, image, description embedded directly in the mint
  • βœ… Configurable decimals, supply cap, and authorities for your stablecoin
  • βœ… Devnet & mainnet-beta support out of the box
  • βœ… Mint, Burn, Freeze, Thaw β€” full authority control flows for stablecoin management

πŸ›‘οΈ Governance & Compliance

  • βœ… Squads V4 multi-sig integration (@sqds/multisig) β€” enterprise-grade key management for stablecoin governance
  • βœ… Freeze / Thaw individual accounts β€” KYC, AML, OFAC compliance workflows built-in
  • βœ… Global Pause & per-action pause β€” Mint, Burn, Transfer, Freeze independently pausable
  • βœ… Audit log of every admin action with wallet, signature, and timestamp for regulatory compliance
  • βœ… Role-based admin auth via wallet signature (no API keys)

πŸ“Š Real-Time Monitoring & Analytics

  • βœ… Live peg monitor β€” track USD price deviation with configurable threshold alerts
  • βœ… Supply analytics β€” historical supply snapshots, holder count, growth charts (Recharts)
  • βœ… Fee revenue dashboard β€” per-fee-type breakdown with daily/weekly/monthly views
  • βœ… Transaction explorer β€” paginated, filterable history of all admin operations
  • βœ… Pause history with reason tracking for compliance audits

πŸ’° Economic Controls & Fee Engine

  • βœ… Configurable fee engine β€” mint fee, burn fee, transfer fee, stability fee, liquidation penalty
  • βœ… Fee collector address routing for revenue management
  • βœ… Liquidity reserve tracking β€” collateral ratio, reserve target, runway alerts
  • βœ… Peg config β€” target price + deviation threshold per token

🚨 Risk Management β€” Circuit Breakers

  • βœ… Circuit breakers β€” auto-pause if supply changes more than X% in N minutes
  • βœ… Configurable per-mint thresholds for different stablecoins
  • βœ… Emergency global kill switch for immediate market halts

🎨 Developer & UX Excellence

  • βœ… 100% client-side transaction signing β€” zero private keys server-side (security first)
  • βœ… TanStack Query for snappy, cached UX
  • βœ… Tailwind + custom design system β€” looks great out of the box
  • βœ… Wallet adapter β€” Phantom, Solflare, Backpack, Ledger, and 30+ wallets supported
  • βœ… Prisma + SQLite for fast local dev β€” drop in PostgreSQL for production
  • βœ… Strict TypeScript, ESLint, Next.js 16 App Router, React 18, RSC-ready

πŸ“š Documentation

Quick Links to Deep Dives:

  • πŸ“– FAQ.md β€” 50+ questions on stablecoins, Token-2022, governance, and compliance
  • πŸ” SECURITY.md β€” Security practices, responsible disclosure, legal disclaimers
  • 🀝 CONTRIBUTING.md β€” How to contribute code, report bugs, request features
  • 🎯 SEO.md β€” SEO strategy, content roadmap, keyword research

❓ FAQ β€” Popular Questions

What is Token-2022 and why does StableMint use it?

Token-2022 is the next-generation token standard for Solana, featuring native metadata, transfer hooks, and built-in fee support. Unlike legacy SPL tokens:

  • βœ… No Metaplex dependency (metadata stored on-mint)
  • βœ… Native transfer fees (no middleware)
  • βœ… Freeze/Thaw for compliance (KYC/AML/OFAC)

πŸ‘‰ Full explanation: docs/FAQ.md#what-is-token-2022

Can I deploy StableMint on mainnet?

Yes. StableMint is production-ready on mainnet-beta. However:

  • ⚠️ Ensure regulatory compliance before issuing real stablecoins
  • ⚠️ Maintain >100% collateral reserves
  • ⚠️ Consider external audits for >$1M TVL

πŸ‘‰ Full guide: docs/FAQ.md#can-i-use-stablemint-on-mainnet

What's the difference between Freeze and Pause?
Mechanism Scope Use Case
Freeze Single wallet KYC/AML/OFAC compliance
Pause All users Emergency supply halt

πŸ‘‰ Full comparison: docs/FAQ.md#whats-the-difference-between-freeze-and-pause

How does the fee engine work?

StableMint supports 5 independent fee types: mint, burn, transfer, stability, and liquidation fees. All revenue routes to your treasury address.

πŸ‘‰ Full details: docs/FAQ.md#how-does-the-fee-engine-work

πŸ‘‰ More FAQs: docs/FAQ.md


πŸ“Έ Screenshots

Drop your dashboard screenshots into /docs/screenshots/ and they'll render here.

Landing Create Stablecoin Dashboard
Landing Create Dashboard
Mint & Burn Peg Monitor Fee Revenue
Mint Peg Fees

πŸš€ Quick Start

Launch a production stablecoin in 5 minutes:

# 1. Clone
git clone https://github.com/mrtomdev/solana-stablecoin-saas.git
cd solana-stablecoin-saas

# 2. Install dependencies
npm install

# 3. Configure environment
cp .env.example .env
#   β†’ set NEXT_PUBLIC_SOLANA_RPC_URL (Helius / QuickNode / public devnet)
#   β†’ set DATABASE_URL (defaults to local SQLite)

# 4. Setup database
npx prisma generate
npx prisma db push

# 5. Run locally
npm run dev

Open http://localhost:3000:

  1. Connect your Solana wallet (Phantom, Solflare, etc.)
  2. Click Create Stablecoin
  3. Sign one transaction
  4. Your stablecoin is live on Solana ✨

For mainnet deployment, see docs/FAQ.md#can-i-deploy-stablemint-to-production.


πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        BROWSER (Wallet)                            β”‚
β”‚   Phantom Β· Solflare Β· Backpack Β· Ledger Β· 30+ adapters            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚ signs                   β”‚ reads
                   β–Ό                         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Next.js 16 App Router  β”‚     β”‚      Solana RPC          β”‚
β”‚   ─────────────────────  β”‚     β”‚   (Helius / QuickNode)   β”‚
β”‚   /create  /dashboard    β”‚     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚   /api/peg /api/fees ... β”‚                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                    β”‚
           β”‚                                    β”‚
           β”‚ Prisma ORM                         β”‚
           β–Ό                                    β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  SQLite / Postgres   β”‚         β”‚  SPL Token-2022 Mint     β”‚
β”‚  ─────────────────   β”‚         β”‚  + MetadataPointer       β”‚
β”‚  Configs Β· Audit Log β”‚         β”‚  + Squads V4 Multi-sig   β”‚
β”‚  Snapshots Β· Fees    β”‚         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Tech Stack

Layer Tech
Frontend Next.js 16 Β· React 18 Β· TypeScript 5 Β· Tailwind 3.4
State TanStack Query Β· React Context
Blockchain @solana/web3.js Β· @solana/spl-token (Token-2022) Β· @solana/spl-token-metadata
Wallets @solana/wallet-adapter-* (Phantom, Solflare, Backpack, +30)
Multi-sig @sqds/multisig (Squads V4)
Backend Next.js API Routes Β· Prisma 5 Β· SQLite (dev) / PostgreSQL (prod)
Charts Recharts
UX react-hot-toast Β· custom design system

πŸ“‚ Project Structure

src/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ api/                  # REST API routes
β”‚   β”‚   β”œβ”€β”€ analytics/supply  # Supply snapshots & analytics
β”‚   β”‚   β”œβ”€β”€ fees/             # Fee config + revenue
β”‚   β”‚   β”œβ”€β”€ liquidity/        # Reserve config
β”‚   β”‚   β”œβ”€β”€ pause/            # Pause state, circuit breaker, history
β”‚   β”‚   β”œβ”€β”€ peg/              # Peg config + historical data
β”‚   β”‚   └── token/            # Token info, holders, transactions
β”‚   β”œβ”€β”€ create/               # Stablecoin creation flow
β”‚   β”œβ”€β”€ dashboard/
β”‚   β”‚   β”œβ”€β”€ mint, burn        # Mint / burn operations
β”‚   β”‚   β”œβ”€β”€ freeze            # Freeze / thaw accounts
β”‚   β”‚   β”œβ”€β”€ peg               # Peg monitoring dashboard
β”‚   β”‚   β”œβ”€β”€ fees              # Fee engine config
β”‚   β”‚   β”œβ”€β”€ liquidity         # Reserves & collateral tracking
β”‚   β”‚   β”œβ”€β”€ pause             # Global pause + circuit breakers
β”‚   β”‚   β”œβ”€β”€ transactions      # Audit log explorer
β”‚   β”‚   └── settings          # Token settings
β”‚   └── page.tsx              # Marketing landing page
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ dashboard/            # 14 dashboard widgets
β”‚   └── ui/                   # Button Β· Card Β· Dialog Β· Input
β”œβ”€β”€ contexts/                 # Wallet Β· Token Β· Config providers
β”œβ”€β”€ hooks/                    # useFees Β· usePeg Β· usePause Β· useSquads Β· ...
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ solana/               # Token-2022 ops, metadata, Squads, account utils
β”‚   └── db/                   # Prisma client + queries
prisma/schema.prisma          # 10 models: config, audit, peg, fees, pause, ...

πŸ”‘ Environment Variables

# Solana Blockchain Configuration
NEXT_PUBLIC_SOLANA_NETWORK=devnet                    # devnet | mainnet-beta
NEXT_PUBLIC_SOLANA_RPC_URL=https://api.devnet.solana.com
NEXT_PUBLIC_MINT_ADDRESS=                            # auto-set after stablecoin creation

# Database Configuration
DATABASE_URL="file:./prisma/dev.db"                  # or postgresql://user:pass@host/db

# Optional: Squads V4 Multi-sig Integration
NEXT_PUBLIC_SQUADS_MULTISIG=

# Optional: Oracle Configuration (future)
NEXT_PUBLIC_PYTH_PROGRAM_ID=
NEXT_PUBLIC_SWITCHBOARD_PROGRAM_ID=

πŸ§ͺ Roadmap

βœ… Completed

  • Token-2022 issuance with native metadata
  • Mint / Burn / Freeze / Thaw flows
  • Squads V4 multi-sig integration
  • Peg monitor with deviation alerts
  • Configurable fee engine + revenue tracking
  • Circuit breakers + global pause
  • Audit log for every admin action
  • Comprehensive documentation & FAQ

πŸ”„ In Progress

  • Pyth / Switchboard oracle integration (live peg pricing)
  • API documentation (OpenAPI/Swagger)
  • Docker deployment support

⏳ Planned

  • Proof-of-Reserves with Chainlink PoR
  • One-click Solana Pay checkout
  • Jupiter swap integration for instant liquidity
  • Mobile app (React Native + Expo)
  • CCTP-style cross-chain bridge
  • Enterprise SLA support tier

πŸ’‘ Have an idea? Open an issue or vote on existing ones.


🀝 Contributing

We love contributions! Whether you're fixing a typo, improving docs, or shipping a feature, read CONTRIBUTING.md first.

# 1. Fork the repo
# 2. Create your feature branch: git checkout -b feat/awesome-feature
# 3. Commit your changes: git commit -m 'feat: add awesome feature'
# 4. Push: git push origin feat/awesome-feature
# 5. Open a Pull Request

Great first contributions:

  • πŸ“– Documentation improvements
  • πŸ› Bug fixes
  • βœ… Unit test coverage
  • 🎨 UI/UX enhancements
  • πŸ“ Blog posts or tutorials

πŸ›‘οΈ Security

Found a vulnerability? Please do NOT open a public issue. See SECURITY.md for responsible disclosure instructions.

⚠️ This software is provided as-is, MIT-licensed. Stablecoins are highly regulated financial instruments. Operating a real stablecoin requires legal counsel, banking partners, reserve audits, and regulatory compliance. See SECURITY.md for full disclaimers.


πŸ“œ License

MIT Β© 2026 β€” Free to use, fork, modify, and ship. See LICENSE for details.


πŸ’Ž Star History

Star History Chart


🌐 Keywords & SEO

Helping search engines and devs discover StableMint.

Core Keywords: solana stablecoin Β· open-source stablecoin Β· token-2022 Β· solana defi Β· stablecoin saas Β· fiat-backed stablecoin Β· spl-token Β· solana-dapp Β· stablecoin-issuance

Related Keywords: usdc alternative Β· solana fintech Β· solana treasury Β· multi-sig governance Β· circuit breaker Β· peg monitor Β· fee engine Β· audit log Β· compliance stablecoin Β· solana blockchain Β· cryptocurrency token Β· payment processing

Use Cases: how to create a stablecoin Β· launch stablecoin on solana Β· stablecoin platform Β· token issuance platform Β· defi stablecoin


⭐ If you find this useful, please star the repo β€” it helps a lot!

Built with ❀️ for the Solana ecosystem.

Report Bug Β· Request Feature Β· Discussions Β· Blog

About

πŸͺ™ Open-source SaaS to launch, manage & monitor fiat-backed stablecoins on Solana. Token-2022 native, Squads multi-sig, peg monitor, fee engine, circuit breakers, audit log. Next.js + TypeScript.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages