Skip to content

Security model ​

Assets ​

AssetWhereProtection
User wallet secretsUser.stellarSecretEncAES-256-GCM with ENCRYPTION_KEY
Escrowed XLMPer-trade Stellar accountsMaster key disabled; platform co-signer only signs release to buyer or merge to seller
Platform co-signerPLATFORM_SECRET_KEY envSecrets manager; never logged
Identity dataUser.kyc*Only last 4 digits + keyed fingerprint stored
PasswordsUser.passwordHashbcrypt, 12 rounds
SessionsJWTHS256, 7-day expiry, user reloaded each request

Key compromise scenarios ​

CompromisedImpactMitigation
Database onlyEncrypted secrets are useless without ENCRYPTION_KEYKeep the key outside the database and backups
ENCRYPTION_KEY + databaseAttacker can decrypt custodial walletsSplit storage, restrict access, rotate with re-encryption
PLATFORM_SECRET_KEYAttacker can co-sign open escrowsKeep offline/HSM in production; monitor escrow operations; limit open escrow value

Application controls ​

  • Zod validation on every input; parsed values only
  • Rate limiting on auth, KYC and withdrawals
  • Helmet security headers; x-powered-by disabled
  • CORS restricted to CLIENT_URL
  • JSON body limit 100 KB; uploads 5 MB and content-sniffed
  • Timing-safe login responses; no user enumeration on password reset
  • Atomic trade transitions prevent double release/refund
  • Session users never include secrets or hashes

Known gaps (tracked) ​

  • No 2FA yet (Phase 2)
  • No dispute resolution flow — admins can't settle a PAID trade whose seller is unresponsive (Phase 2)
  • Upload URLs are unauthenticated if leaked
  • Rate limit store is in-memory per instance

Reporting vulnerabilities ​

Email security@nexlm.app. Please don't open public issues for security reports.

Nexlm is a peer-to-peer facilitator and never holds customer Naira.