Case Study // FinTech / Web3 Engineering

NexaPay

Cross-Chain Blockchain Payment Platform

Role / OwnershipBlockchain & Full-Stack Engineer (Personal Project)
Timeline2024
StatusLive Web3 Application
Architecture ScopeFinTech
NexaPay

01 // System Overview

What The System Does

NexaPay is a decentralized payment gateway engineered to resolve the fragmentation in crypto checkout experiences. By unifying multiple EVM blockchains into a cohesive client interface and smart-contract payment router, NexaPay allows merchants and users to settle payments across chains with transparent fee structures and instant on-chain verification.

A Web3 payment application built with Next.js, TypeScript, Solidity smart contracts, Ethers.js, and Stargate cross-chain liquidity routing, featuring a built-in platform transaction fee model.

02 // Architecture & Data Flow

End-to-End System Design

User Wallet (MetaMask / WalletConnect)
                    │
                    ▼ Ethers.js Provider
┌───────────────────────────────────────────────┐
│     Next.js / TypeScript Web Application      │
│     (Transaction Builder & Order Session)     │
└───────────────────────┬───────────────────────┘
                        │
                        ▼ RPC / Web3 Call
┌───────────────────────────────────────────────┐
│      NexaPay Router Contract (Solidity)       │
│      ├── Transaction Verification             │
│      ├── Platform Fee Deduction (On-Chain)    │
│      └── Merchant Vault Transfer              │
└───────────────────────┬───────────────────────┘
                        │
                        ▼ Cross-Chain Bridge
┌───────────────────────────────────────────────┐
│       Stargate Protocol (LayerZero EVM)       │
│       (Cross-Chain Liquidity & Settlement)    │
└───────────────────────────────────────────────┘

03 // Engineering Ownership

What I Personally Built

Architected and built the full web application using Next.js and TypeScript with modular wallet connection handling.
Authored, tested, and deployed Solidity smart contracts managing transaction routing, escrow, and fee distribution.
Integrated blockchain wallet interactions supporting MetaMask, Coinbase Wallet, and WalletConnect via Ethers.js.
Implemented cross-chain payment functionality and liquidity transfers leveraging the Stargate protocol router.
Executed contract unit testing, gas optimization, and invariant verification using Hardhat.
Configured deployments across Sepolia testnet and EVM mainnets with comprehensive transaction event listeners.
Implemented a real-time platform fee model that collects protocol revenue trustlessly during contract settlement.

04 // Technical Problems Solved

Engineering Challenges & Solutions

Challenge 01

Preventing transaction slippage and failed bridge transfers when cross-chain gas spikes occur mid-swap.

Engineering Solution

Configured Stargate router calls with configurable gas limits, slippage bounds, and client-side balance pre-checks prior to triggering the contract method.

Challenge 02

Asynchronous block confirmation latency causing indeterminate UI states for users.

Engineering Solution

Engineered a reactive state listener tracking transaction hashes across mempool broadcast, first confirmation, and finality with optimistic visual feedback.

Challenge 03

Security vulnerabilities and reentrancy risks in payment distribution contracts.

Engineering Solution

Followed OpenZeppelin battle-tested contracts, enforced the Checks-Effects-Interactions pattern, and implemented ReentrancyGuard on all payable external entrypoints.

05 // Trade-offs

Key Architectural Decisions

  • Used Solidity with Hardhat for comprehensive contract test coverage, gas profiling, and simulated network forks.
  • Leveraged Stargate for interoperability to enable cross-chain payments without requiring merchants to maintain liquidity pools on every single chain.
  • Built the frontend with Next.js and TypeScript for strict typing of contract ABIs and transaction inputs.

Technologies Used

Next.jsTypeScriptSolidityWeb3Smart ContractsStargateEthers.jsHardhatOpenZeppelinTailwind CSS

Explore Other Work

Next Case Study

ClearPeak Trading

Trading Analytics SaaS Platform

Read Next