🚀 A modern off-ramp solution that enables users to convert Stellar stablecoins (USDC, USDT) directly to fiat currencies through Allbridge and Paycrest integrations.
⚙️ Built using Next.js 15, Stellar SDK, Freighter/Lobstr Wallet, Viem, Allbridge Core SDK, and Paycrest API.
- ✅ Multi-Currency Support: Convert to various fiat currencies
- 💱 Real-time Exchange Rates: Live conversion rates
- 🔄 Seamless Cross-Chain: Allbridge for Stellar → Base transfers
- 🏦 Bank Direct Transfers: Direct to beneficiary accounts
- 💰 Multiple Token Support: USDC, USDT on Stellar
- 🌍 Global Coverage: Multiple regions supported
- 🔐 Secure Transactions: Non-custodial solution
- 🎯 Dual Input Mode: Crypto or fiat input
- 📊 Real-time Calculations: Automatic fee calculations
- 🔍 Order Tracking: Real-time status monitoring
- 📱 Responsive Design: Desktop and mobile
- Next.js 15 (App Router) + React 19 + TypeScript
- Tailwind CSS v4
- Stellar SDK + Freighter/Lobstr API
- Allbridge Bridge Core SDK
- viem (Base chain transfer)
- Paycrest API (fiat payout)
- User connects Stellar wallet (Freighter auto-detect, Lobstr fallback)
- User enters amount + beneficiary bank details
- App fetches quote and locks FX rate
- App builds and signs Stellar bridge transaction (XDR)
- Stellar tx submitted → bridge status polled
- Server executes Base USDC transfer + Paycrest payout order
- Payout status polled until terminal state
| Method | Route | Description |
|---|---|---|
| POST | /api/offramp/quote |
Get conversion quote |
| GET | /api/offramp/currencies |
Supported fiat currencies |
| GET | /api/offramp/institutions/[currency] |
Banks for currency |
| POST | /api/offramp/verify-account |
Verify beneficiary |
| POST | /api/offramp/execute-payout |
Execute payout |
| GET | /api/offramp/status/[orderId] |
Poll payout status |
| POST | /api/offramp/bridge/build-tx |
Build bridge XDR |
| GET | /api/offramp/bridge/status/[txHash] |
Poll bridge status |
| POST | /api/webhooks/paycrest |
Paycrest webhook |
npm installcp .env.example .env.localUse the inline comments in .env.example as the source of truth. The required values are:
PAYCREST_API_KEY: server-only Paycrest API key from the Paycrest dashboardPAYCREST_WEBHOOK_SECRET: server-only Paycrest webhook signing secretBASE_PRIVATE_KEY: server-only private key for the Base payout walletBASE_RETURN_ADDRESS: public Base address used for returns or treasury routingBASE_RPC_URL: Base RPC provider URLSTELLAR_SOROBAN_RPC_URL: server-side Soroban RPC endpointSTELLAR_HORIZON_URL: server-side Horizon endpointNEXT_PUBLIC_STELLAR_SOROBAN_RPC_URL: browser-safe Soroban RPC endpointNEXT_PUBLIC_BASE_RETURN_ADDRESS: browser-safe Base return addressNEXT_PUBLIC_STELLAR_USDC_ISSUER: Stellar USDC issuer account used to filter the correct Horizon trustline
Do not prefix secrets with NEXT_PUBLIC_.
PAYCREST_API_KEYmust never becomeNEXT_PUBLIC_PAYCREST_API_KEYBASE_PRIVATE_KEYmust never becomeNEXT_PUBLIC_BASE_PRIVATE_KEY
The app validates this at startup and throws a clear error if required env vars are missing or if a secret is exposed publicly.
npm run devOpen http://localhost:3001.
Run bundle analysis locally:
npm run build:analyzeThis opens an interactive treemap of all chunks. The CI build fails if the .next output exceeds 150 MB.
Key large dependencies (expected):
@stellar/stellar-sdk— Stellar protocol primitives@allbridge/bridge-core-sdk— cross-chain bridge logicviem— Base chain interaction
Transaction history is stored in browser localStorage (no database required).
- Key:
stellar_spend_transactions - Max records: 50
- Scoped by connected wallet address
MIT License
Need clarification or have questions? Reach out on Telegram: t.me/Xoulomon
Built with ❤️ for the Stellar ecosystem