A privacy-focused payment protocol for Solana that combines stealth addresses, transaction relaying, and gas abstraction to enable private transfers without exposing a recipient's primary wallet address on-chain.
StealthPay allows recipients to publish a reusable meta-address while senders generate unique one-time destination addresses for every payment. A relayer infrastructure handles transaction broadcasting and fee sponsorship, creating a smoother and more private payment experience.
Example:
Traditional Solana payments expose a recipient's public wallet address.
StealthPay introduces a privacy layer where:
- Recipients generate a Meta Address
- Senders derive a unique one-time Stealth Address
- Every payment goes to a different destination address
- Recipients can recover ownership of the funds
- Relayers can sponsor transaction fees
Recipient -> Meta Address -> Sender -> Stealth Address Generation -> Relayer -> Solana Network
Most blockchain transactions are fully transparent.
Anyone can:
- Track wallet balances
- Link multiple transactions together
- Monitor payment activity
- Build transaction histories
StealthPay reduces wallet traceability by generating a unique destination address for every payment while preserving the recipient's ability to recover and spend the funds.
Recipients create a Meta Address consisting of:
Public View Key
Public Spend Key
Senders use the Meta Address and an ephemeral keypair to derive a unique destination address.
Meta Address
+
Ephemeral Key
↓
Stealth Address
Every transfer results in a different address.
The protocol uses Elliptic Curve Diffie-Hellman (ECDH) over Curve25519.
Sender:
r × A
Recipient:
a × R
Both parties derive the same shared secret independently.
Each payment generates:
R = Ephemeral Public Key
P = Stealth Public Key
Result:
Payment 1 → Address A
Payment 2 → Address B
Payment 3 → Address C
Even when sent to the same recipient.
The sender publishes the ephemeral public key inside a Solana Memo instruction.
Recipients scan transaction memos to discover stealth payments intended for them.
Transaction
├── Transfer
└── Memo (Ephemeral Public Key)
A relayer service validates transactions before broadcasting them.
Responsibilities include:
- Transaction validation
- Fee payment verification
- Fee sponsorship
- Transaction broadcasting
User
│
▼
Relayer
│
▼
Solana
Recipients can scan transactions and determine whether a payment belongs to them.
The detection flow:
Read Memo -> Recover Ephemeral Key -> Derive Shared Secret -> Reconstruct Expected Address -> Match Found
Frontend (Next.js) -> Axum API -> Stealth Engine -> Relayer -> Solana
GET /healthReturns:
{
"status": "ok"
}POST /meta-address/createGenerates a new recipient meta-address.
POST /sendBuilds a stealth transaction from a recipient's meta-address.
POST /relayValidates and broadcasts transactions through the relayer.
GET /paymentsScans transactions for stealth payments intended for a recipient.
- Rust
- Tokio
- Axum
- Curve25519-Dalek
- Solana SDK
- Serde
- Next.js
- React
- TypeScript
- Tailwind CSS
- Curve25519
- ECDH
- BLAKE3
- SHA-256
stealthpay/
│
├── backend/
│ ├── src/
│ │ ├── routes/
│ │ ├── stealth/
│ │ ├── relayer/
│ │ └── main.rs
│ │
│ └── Cargo.toml
│
├── frontend/
│ ├── src/
│ ├── app/
│ ├── components/
│ └── package.json
│
└── README.md
git clone https://github.com/your-username/stealthpay.git
cd stealthpaycd backend
cargo build
cargo runBackend starts on:
http://localhost:8080
cd frontend
pnpm install
pnpm run devFrontend starts on:
http://localhost:3000
Run both services:
Frontend → http://localhost:3000
Backend → http://localhost:8080
The frontend communicates with the backend through HTTP API endpoints.
- Stealth address generation
- Meta address generation
- ECDH shared secret derivation
- Memo-based ephemeral key publication
- Payment detection logic
- Relayer validation architecture
- Axum backend
- Next.js frontend
- Transaction fee sponsorship
- Full relayer signing flow
- Wallet integration
- Automated stealth payment scanning
- MPC-based relayer signing
- Secure enclave integration
- Sponsored gas payments
- Multi-relayer architecture
- Wallet adapter integration
- Mobile support
- Encrypted payment metadata
- Payment notifications
MIT License
Built with Rust, Solana, and an unreasonable amount of time spent convincing cryptography and frontend tooling to coexist peacefully.