You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NoBell is a marketplace where startups can raise funding by tokenizing equity, employees can sell vested shares, and investors can buy private equity β all settled in under one second via Bitcoin's Lightning Network.
Every listing is automatically analyzed by an AI-powered risk inspector before going live. Ownership is proven by Merkle inclusion proofs. Settlement is atomic via HTLC submarine swaps. No brokers, no clearinghouses, no waiting.
One-liner:Robinhood for private equity, powered by Bitcoin and AI.
π¨ The Problem
Problem
Today's Reality
NoBell's Fix
Locked equity
Startup employees sit on options they can't sell. Legal fees: $5K-$15K per transfer.
One-click sell with AI validation
Slow settlement
T+1 to T+2 (1-2 business days). Counterparty risk during the gap.
Under 1 second via Lightning
No ownership
A central depository holds your shares. They can freeze your account.
Your wallet, your keys (Taproot Assets)
No risk intelligence
Zero analyst coverage for private markets. You're flying blind.
Lightning Network β Sub-second settlement via HTLC submarine swaps
Taproot Assets β Bitcoin-native tokenized equity with Sparse-Merkle Tree ownership
AI Inspector β 12-feature risk scoring + Gemini AI explanations + Merkle proof verification
β‘ Lightning Pipeline Deep Dive
Submarine Swap β How It Works
A submarine swap atomically exchanges Bitcoin (Lightning, off-chain) for Taproot Asset tokens (on-chain). Neither side can cheat because both are locked by the same HTLC hash.
SAME HASH LOCKS BOTH SIDES
ββββββββββββββββββββββ
β SHA256(preimage) β
β = payment_hash β
ββββββββββ¬ββββββββββββ
β
ββββββββββββββββ΄βββββββββββββββ
β β
Lightning Side Taproot Side
(Buyer's BTC) (Seller's Tokens)
β β
Payment HELD Tokens LOCKED
by HTLC by same HTLC
β β
ββββββββββββββββ¬βββββββββββββββ
β
PREIMAGE REVEALED
ββββββββββββββββββββββ
β Both sides settle β
β simultaneously β
ββββββββββββββββββββββ
10-Stage Pipeline
Stage
Name
Duration
What Happens
0
Inspector Validation
<1ms
Risk score check, approve/reject
1
Security Checks
<1ms
6 layers verified
2
HTLC Creation
<1ms
Single hash/preimage locks both sides
3
Lightning Invoice
<1ms
Bolt11 invoice locked to HTLC hash
4
Edge Node RFQ
<1ms
Price quote with 0.1-0.5% spread
5
Payment Routing
200-1000ms
2-hop Lightning payment, HELD by HTLC
6
Lightning Loop
100-300ms
Off-chain β on-chain bridge
7
Submarine Swap
50-150ms
Preimage reveal = atomic settlement
8
HTLC Verification
<1ms
SHA256(preimage) == payment_hash
9
Certificate
<1ms
Full HTLC chain + atomic proof
Total: ~500-1500ms per transaction. Average across 4 items: 908ms.
Verifying a Certificate
Anyone can verify a submarine swap certificate:
HTLC Check:SHA256(payment_preimage) must equal payment_hash
Atomicity Check: Both Lightning and Taproot sides reference the same payment_hash
Taproot Check:taproot_tx_hash can be verified on the Bitcoin blockchain
Atomic Proof Check:SHA256(preimage:taproot_tx:amount_sats) must match atomic_proof
git clone https://github.com/Nezha-Amine/NoBell.git
cd NoBell
2. Set Up AI Inspector (Port 8000)
cd backend/ai_inspector
# Install dependencies
pip install fastapi uvicorn pandas httpx python-dotenv
# Create .env file
cat > .env <<EOFLLM_PROVIDER=geminiGEMINI_API_KEY=your_gemini_api_key_hereBTC_PRICE_USD=65000MAX_TRANSACTION_USD=100000EOF# Start the service
python3 main.py
The AI Inspector runs at http://localhost:8000. Swagger docs at http://localhost:8000/docs.
3. Set Up Backend (Port 8001)
β οΈImportant: Campus WiFi may block MongoDB Atlas TLS connections. Use phone hotspot if you get connection errors.
cd backend
# Create virtual environment with Python 3.12
python3.12 -m venv venv312
source venv312/bin/activate
# Install dependencies
pip install fastapi uvicorn motor beanie python-dotenv pyjwt certifi httpx
# Create .env file
cat > .env <<EOFMONGODB_URL=mongodb+srv://Nobell:[email protected]/NoBellMONGODB_DB=NoBellJWT_SECRET=nobell_jwt_secret_2026DEMO_MODE=trueEOF# Seed the database (with AI Inspector running on port 8000)
python seed_data.py
python seed_merkle.py
python seed_wallets.py
python seed_transactions.py
# Start the service
uvicorn main:app --host 0.0.0.0 --port 8001 --reload
4. Set Up Frontend
cd .. # back to project root
npm install
npm run dev
Frontend runs at http://localhost:5173.
5. Open the App
Open http://localhost:5173 in your browser
Click "Demo as Investor" to explore as an investor
Click "Demo as Inspector" to access the admin panel
Or connect MetaMask for real wallet authentication
Response includes: 10-stage pipeline per item, submarine swap certificates, HTLC proofs, Taproot tx hashes, Lightning fees, settlement time, portfolio update.
π Database Schema
MongoDB Atlas Collections
Collection
Documents
Description
startups
50
Company financial data (revenue, runway, churn, margins)
peers
50
P2P borrower data (credit score, income, debt ratios)
taproot_assets
70
Minted Taproot Asset tokens
ownership_certificates
70
Certificates with valid Merkle proofs
merkle_batches
1
Anchored Merkle tree (root for Ethereum)
transfers
15
Token transfer records
users
7
User accounts (demo + MetaMask)
loyalty
5
Loyalty points, tiers, streaks
wallets
6
USD wallet balances
wallet_transactions
16+
Deposit, purchase, sale records
orders
5+
Checkout order records
transactions
Varies
Individual submarine swap transactions
certificates
Varies
Full submarine swap certificates
π Security
8 Security Layers
#
Layer
Protection
1
API Key Auth
X-API-Key header required
2
HMAC-SHA256 Signing
Request body signature prevents tampering
3
Data Encryption
Sensitive fields encrypted (preimages, proofs)
4
Rate Limiting
100/min per IP, 30/min per wallet
5
Audit Logging
Every request logged (IP, timestamp, action)
6
Response Integrity
SHA-256 hash on every response
7
Input Sanitization
SQL injection, XSS, script tag protection
8
Security Headers
HSTS, X-Frame-Options, no-cache
Transaction Security
Check
What It Prevents
Wallet validation
Malformed or blocked addresses
Rate limiting
Transaction flooding / DDoS
Amount limits
Abnormally large transactions
Self-trade detection
Wash trading (buying from yourself)
Double-spend protection
Same transaction processed twice
Risk-adjusted limits
High-risk listings get lower transaction caps
HTLC verification
Fake or tampered preimages
π¬ Demo Walkthrough
As an Investor
Open http://localhost:5173
Click "Demo as Investor"
Marketplace: See 100 listings with AI risk scores, recommendations, growth metrics
Buy: Click NovaMed AI β set quantity β "Pay with Lightning β‘"
Watch: 10-stage submarine swap pipeline animates in real-time
Certificate: See HTLC ID, payment hash, Taproot TX, atomic proof
Sell: Go to Sell Shares β select NovaMed AI β set price β AI Inspector validates
Rewards: See loyalty points, tier progress, streak multiplier
As an Inspector
Click "Demo as Inspector"
Admin Panel: See pending listings waiting for review
Approve/Reject: Each listing shows price deviation and risk data
Anchor Batch: Click to build Merkle tree and get root for Ethereum
In Postman
GET http://localhost:8000/data/startups β All 50 startups with AI scores
GET http://localhost:8000/data/stats β Platform risk statistics
POST http://localhost:8000/checkout β Full submarine swap checkout
GET http://localhost:8000/taproot/assets β All Taproot assets
POST http://localhost:8000/merkle/verify β Verify a certificate proof
GET http://localhost:8000/security/status β Security configuration
GET http://localhost:8000/security/audit β Request audit log
GET http://localhost:8001/wallet/bc1q_kunal_investor/history β Transaction history
GET http://localhost:8001/loyalty/bc1q_kunal_investor β Loyalty profile
π Acknowledgments
Lightning Labs β synthlock and justjason (Discord) for guiding the submarine swap architecture
MIT Bitcoin Hackathon β for the platform and mentorship