Nexus Ledger
Built to explore the engineering challenges behind reliable financial systems, Nexus Ledger replaces mutable balance updates with an auditable ledger where every transaction is represented by balanced entries. It combines a REST API, relational database architecture, payment provider integrations, webhook processing, and blockchain infrastructure to demonstrate how traditional fintech systems and Web3 payment flows can work together.

Overview
I designed and engineered this product from the ground up.
Nexus Ledger is a backend financial infrastructure project designed around the principles of real-world accounting systems. It uses double-entry bookkeeping, immutable ledger entries, precise monetary arithmetic, and transactional safeguards to maintain financial consistency. The system also integrates Paystack and Stripe for payment processing and Ethereum infrastructure for crypto deposits and balance reconciliation.
My role
Fullstack Developer
Technology
The challenge
Building something simple on the surface usually requires solving complicated problems underneath.
Ensuring financial accuracy across multiple currencies and blockchain tokens without floating-point errors.
Maintaining balanced debit and credit entries while keeping account balances consistent.
Preventing duplicate transactions when requests are retried or payment webhooks are delivered more than once.
Handling concurrent transactions safely to avoid race conditions and incorrect balances.
Preserving an immutable, traceable audit history while supporting transaction voiding.
Reconciling external payment and blockchain events with internal ledger records.
Engineering
What's happening under the hood.
Double-Entry Ledger Engine
Designed a ledger engine where every financial transaction produces balanced debit and credit entries. This makes every movement of funds traceable and ensures transactions balance before they are posted.
Precision-Safe Money Handling
Implemented monetary arithmetic using integer values in each currency's smallest unit, avoiding floating-point inaccuracies. Supports representations such as kobo, cents, wei, and USDC base units.
Immutable Financial Records
Designed an append-only ledger with database triggers that prevent existing entries from being updated or deleted. Corrections are represented through reversal entries, preserving the original audit trail.
Idempotent Transaction Processing
Implemented idempotency keys for state-changing operations so repeated requests can return their original results without executing the same financial transaction twice.
Concurrency Control & Row Locking
Used PostgreSQL row-level locking to coordinate concurrent operations involving the same accounts, reducing the risk of race conditions and inconsistent financial state.
Transactional Database Architecture
Structured accounts, transactions, entries, and payment records with PostgreSQL and Prisma, using database transactions to keep related financial operations consistent.
Payment Provider Integration
Integrated Paystack and Stripe payment flows for payment initialization, verification, status tracking, and refunds, connecting external payment events to internal ledger operations.
Secure Webhook Processing
Designed webhook handlers around signature verification, duplicate-event detection, raw payload storage, and decoupled processing to make payment event handling more reliable.
Ledger-Based Balance Calculation
Computed account balances from posted ledger entries rather than relying on a mutable balance field, enabling account statements and transaction histories to be derived from the underlying records.
Transaction Reversals
Implemented transaction voiding through compensating entries instead of modifying historical records, maintaining traceability while correcting previously posted transactions.
Ethereum Wallet Infrastructure
Integrated ethers.js and Ethereum infrastructure to derive dedicated deposit addresses from a hierarchical deterministic wallet using BIP44-style derivation.
ERC-20 Deposit Monitoring
Designed an event-listening and deposit-processing flow to detect ERC-20 transfers and connect on-chain deposits to internal financial records.
Crypto Balance Reconciliation
Designed reconciliation checks that compare internal ledger balances with on-chain USDC balances and create alerts when discrepancies require investigation.
API Validation & Type Safety
Used TypeScript and Zod to define structured application inputs and validate incoming data at runtime, improving consistency across financial API operations.
Financial REST API Design
Organized the Express API into dedicated account, transaction, payment, webhook, and crypto routes, separating external interfaces from the core ledger engine and supporting services.