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
Copy these into backend/.env. No mock data; all values must be real or explicitly empty.
The app uses Prisma Accelerate for the primary database (managed PostgreSQL; not a local PostgreSQL instance) and MongoDB Atlas for cache (managed; not local MongoDB).
Prisma (single Accelerate URL): You use one prisma+postgres://accelerate.prisma-data.net/?api_key=... link for both DATABASE_URL and PRISMA_ACCELERATE_URL. Set both to that same value in backend/.env.
Important: Prisma CLI loads onlybackend/.env (not .env.local). If you use backend/.env.local, either add DATABASE_URL (and PRISMA_ACCELERATE_URL) to backend/.env as well, or copy .env.local to .env. Otherwise prisma migrate / prisma db push will report "Environment variable not found: DATABASE_URL".
Required (app fails without them)
Variable
Description
DATABASE_URL
Prisma Accelerate URL (prisma+postgres://accelerate.prisma-data.net/?api_key=...). Used for schema, migrate, db push, studio. Same value as PRISMA_ACCELERATE_URL when using one link.
MONGODB_URI
MongoDB Atlas connection string, e.g. mongodb+srv://user:password@cluster.mongodb.net/acbu?retryWrites=true&w=majority
RABBITMQ_URL
RabbitMQ URL, e.g. amqp://acbu:acbu_password@localhost:5672
JWT_SECRET
Secret for JWT signing (min 32 chars)
Database: Prisma Accelerate
Variable
Description
PRISMA_ACCELERATE_URL
Same as DATABASE_URL when using one link. Runtime connection via Accelerate adapter. Required in production.
DATABASE_URL
Same Accelerate URL. Used by Prisma schema and CLI (migrate, db push, studio).
Server
Variable
Default
Description
NODE_ENV
development
development | test | production
PORT
3000
HTTP port
API_VERSION
v1
API path prefix
Fintech: Flutterwave
Variable
Default
Description
FLUTTERWAVE_PUBLIC_KEY
—
Flutterwave public key
FLUTTERWAVE_SECRET_KEY
—
Flutterwave secret key
FLUTTERWAVE_ENCRYPTION_KEY
—
Flutterwave encryption key
FLUTTERWAVE_BASE_URL
https://api.flutterwave.com/v3
Flutterwave API base
Fintech: Paystack (NGN)
Variable
Default
Description
PAYSTACK_SECRET_KEY
—
Paystack secret key
PAYSTACK_BASE_URL
https://api.paystack.co
Paystack API base
Fintech: MTN Mobile Money (RWF, etc.)
Variable
Default
Description
MTN_MOMO_SUBSCRIPTION_KEY
—
MTN MoMo API subscription key
MTN_MOMO_API_USER_ID
—
API user id from MTN MoMo provisioning
MTN_MOMO_API_KEY
—
API key from MTN MoMo provisioning
MTN_MOMO_BASE_URL
sandbox/production URL by env
Override if needed
MTN_MOMO_TARGET_ENVIRONMENT
sandbox
sandbox | production
Fintech: currency → provider (optional)
Variable
Description
FINTECH_CURRENCY_PROVIDERS
JSON {"NGN":"paystack","RWF":"mtn_momo",...} or CSV NGN=paystack,RWF=mtn_momo,KES=flutterwave. If unset, defaults: NGN→paystack, RWF→mtn_momo, others→flutterwave.
Stellar / Soroban
Variable
Default
Description
STELLAR_NETWORK
testnet
testnet | mainnet
STELLAR_HORIZON_URL
horizon-testnet URL
Horizon base URL
STELLAR_SECRET_KEY
—
Secret key for contract txs
STELLAR_BASE_FEE_STROOPS
100
Base transaction fee in stroops (1 stroop = 0.0000001 XLM). Used as the static fee when dynamic fees are disabled, and as the fallback when a Horizon fee fetch fails.
STELLAR_USE_DYNAMIC_FEES
false
Set to true to fetch the current recommended base fee from Horizon before each transaction. Automatically falls back to STELLAR_BASE_FEE_STROOPS if the Horizon request fails. Recommended for mainnet deployments under variable network load.
Slippage tolerance for the USDC→XLM pathPaymentStrictSend DEX swap, in basis points (50 = 0.5%). The backend queries Horizon for the expected XLM output and rejects the swap if the DEX delivers fewer XLM than expected × (1 − slippage).
Stellar contract IDs (after deploy)
Variable
Description
CONTRACT_ORACLE
Oracle contract id
CONTRACT_RESERVE_TRACKER
Reserve tracker contract id
CONTRACT_MINTING
Minting contract id
CONTRACT_BURNING
Burning contract id
Or per network: CONTRACT_ORACLE_TESTNET, CONTRACT_ORACLE_MAINNET, etc.
Oracle (40/40/20: central bank, fintech, forex)
Variable
Default
Description
ORACLE_UPDATE_INTERVAL_HOURS
6
Hours between oracle updates
ORACLE_EMERGENCY_THRESHOLD
0.05
Emergency deviation threshold
ORACLE_MAX_DEVIATION_PER_UPDATE
0.05
Max 5% change per update; log warning if exceeded
ORACLE_CIRCUIT_BREAKER_THRESHOLD
0.10
If currency moves >10%, use 48h average instead
EXCHANGERATE_API_BASE_URL
https://v6.exchangerate-api.com/v6
Forex layer (Layer 3) base URL
EXCHANGERATE_API_KEY
—
API key for ExchangeRate-API (Layer 3); if unset, forex layer skipped
CURRENCY_CENTRAL_BANK_URLS
{}
JSON map of currency to central bank API URL (e.g. {"NGN":"https://..."}) for Layer 1
Basket metrics (proposed weights job)
Variable
Default
Description
BASKET_METRICS_INTERVAL_DAYS
30
Days between metrics ingestion and proposed basket weight creation
Limits (Deposit/Withdrawal & Circuit Breakers)
Variable
Default (USD)
Description
LIMIT_RETAIL_DEPOSIT_DAILY_USD
5000
Daily deposit limit for retail users
LIMIT_RETAIL_DEPOSIT_MONTHLY_USD
50000
Monthly deposit limit for retail users
LIMIT_RETAIL_WITHDRAWAL_DAILY_USD
10000
Daily withdrawal limit for retail users
LIMIT_RETAIL_WITHDRAWAL_MONTHLY_USD
80000
Monthly withdrawal limit for retail users
LIMIT_BUSINESS_DEPOSIT_DAILY_USD
50000
Daily deposit limit for business users
LIMIT_BUSINESS_DEPOSIT_MONTHLY_USD
500000
Monthly deposit limit for business users
LIMIT_BUSINESS_WITHDRAWAL_DAILY_USD
100000
Daily withdrawal limit for business users
LIMIT_BUSINESS_WITHDRAWAL_MONTHLY_USD
800000
Monthly withdrawal limit for business users
LIMIT_GOV_DEPOSIT_DAILY_USD
500000
Daily deposit limit for government users
LIMIT_GOV_DEPOSIT_MONTHLY_USD
5000000
Monthly deposit limit for government users
LIMIT_GOV_WITHDRAWAL_DAILY_USD
500000
Daily withdrawal limit for government users
LIMIT_GOV_WITHDRAWAL_MONTHLY_USD
4000000
Monthly withdrawal limit for government users
LIMIT_CIRCUIT_BREAKER_RESERVE_WEIGHT_PCT
10
Reserve % weight threshold circuit breaker
LIMIT_CIRCUIT_BREAKER_MIN_RATIO
1.02
Minimum reserve ratio threshold circuit breaker
Reserve
Variable
Default
Description
RESERVE_MIN_RATIO
1.02
Min overcollateralization (102%)
RESERVE_TARGET_RATIO
1.05
Target ratio (105%)
RESERVE_ALERT_THRESHOLD
1.02
Alert when below this
KYC (Pi-style two-layer)
Variable
Default
Description
KYC_FEE_ACBU
1
ACBU amount required per KYC check. Fee is typically paid via a mint (user deposits local currency, we mint ACBU; applicant passes mint_transaction_id). Optional: fee can be paid by Stellar transfer to collector (fee_tx_hash).
KYC_FEE_COLLECTOR_ADDRESS
—
Stellar address that receives KYC fee when using fee_tx_hash; if unset, any successful Stellar tx is accepted. Not used when fee is paid via mint (mint_transaction_id).