Skip to main content
MMujtaba
Back to Projects

Bitnob — Africa's Bitcoin & Dollar Savings Platform

Web AppFinTech
ReactNode.jsPostgreSQLBitcoin LightningAWSRedis

$5M+

Monthly Volume

10+

Countries

<3s

Transaction Speed

Level 1

PCI Compliance

Overview

Bitnob is one of Africa's leading Bitcoin and dollar savings platforms, serving users across Nigeria, Ghana, Kenya, Uganda, Tanzania, Rwanda, and four other countries. The platform enables users to save in USD-denominated accounts (insulated from local currency inflation), send and receive Bitcoin via the Lightning Network, and make cross-border payments at a fraction of traditional wire transfer costs.

I joined as Senior Backend Engineer and led the Lightning Network integration, the multi-currency ledger design, and the compliance infrastructure.

The Challenge

Building financial infrastructure for 10+ African markets means navigating a patchwork of regulatory frameworks, currency controls, mobile money APIs (M-Pesa, MTN Mobile Money, Airtel Money), and banking partners — each with their own idiosyncrasies. A transaction that looks simple to the user ("send $50 to Kenya") may route through a Lightning payment, a stablecoin swap, a mobile money payout, and three compliance checks behind the scenes.

Lightning Network integration added its own complexity: channel liquidity management, routing failures, stuck payments, and the need to reconcile on-chain vs. off-chain balances in real time.

Architecture & Technical Decisions

Multi-Currency Ledger

The core accounting system used a double-entry ledger model implemented in PostgreSQL. Every transaction created two journal entries: a debit and a credit. Currency conversions were modeled as two linked transactions (debit in currency A, credit in currency B) with an exchange rate snapshot locked at execution time. This made reconciliation deterministic — the ledger always balanced.

  • Double-entry ledger with immutable journal entries
  • Currency exchange rates snapshotted at transaction time (never recalculated retroactively)
  • Ledger accounts per user per currency (BTC, USD, NGN, GHS, KES, etc.)
  • Automated daily reconciliation job comparing ledger totals to custodian balances
  • Any discrepancy > $0.01 triggers an immediate PagerDuty alert

Lightning Network Integration

I integrated LND (Lightning Network Daemon) for Bitcoin Lightning payments. The biggest operational challenge was inbound liquidity: our node needed sufficient inbound capacity to receive payments. I built an automated liquidity rebalancing system that monitored channel capacity and triggered circular rebalancing via loop-out when any channel fell below 20% inbound capacity.

  • LND node with automated channel management
  • Circular rebalancing via Lightning Loop to maintain inbound liquidity
  • Payment probe before every send to verify route viability
  • Stuck payment detection: HTLC timeout monitoring with automatic force-close triggers
  • Lightning balance reconciled against on-chain UTXO set every 10 minutes

Compliance & KYC Pipeline

PCI Level 1 compliance required end-to-end encryption for all payment data, network segmentation, quarterly penetration testing, and detailed access logging. The KYC pipeline integrated with three identity verification providers (Smile Identity for African IDs, Onfido for international documents, and a local provider for Nigerian BVN verification) with automatic fallback.

Results

  • $5M+ monthly transaction volume processed across 10+ African countries
  • Lightning payment success rate: 97.3% (industry average: ~90%)
  • Cross-border payment settlement time: <3 seconds via Lightning vs. 3-5 days via SWIFT
  • PCI DSS Level 1 certification achieved — zero findings in first audit
  • Zero ledger discrepancies detected in automated reconciliation over 16 months
  • 99.95% platform uptime — 4 hours total downtime in 16 months

What I Learned

Financial systems demand a fundamentally different engineering mindset. The question is never "what's the happy path?" — it's "what happens when step 3 of 7 fails at 2am on a Sunday?" Every operation needs idempotency keys, every external call needs a compensation action, and every state machine needs an explicit stuck state with a manual recovery path. The 16 months I spent on Bitnob gave me a deep respect for correctness-first engineering — and for the teams who maintain the boring but critical infrastructure that moves money around the world.

Related Projects