SuiGate

The gateway between Vietnamese Dong and USDC on Sui blockchain

SuiGate

Created At

HackMoney 2026

Project Description

SuiGate enables Vietnamese users to convert VND ↔ USDC directly on Sui blockchain. Vietnam legalized crypto in January 2026, creating demand for compliant on/offramp solutions. SuiGate solves this with zkLogin (seedless onboarding), sponsored transactions (gasless UX), and a hybrid oracle for VND rates — since major oracles don't support Vietnamese Dong. Built on Sui's high-performance infrastructure with native USDC integration. Designed for compliance with Vietnam's new Digital Technology Industry Law and FATF Travel Rule standards. Target: 20M+ Vietnamese crypto users currently using offshore platforms.

How it's Made

SuiGate is a monorepo with 4 main components: a React Native mobile app (Expo 54), a NestJS backend API, a Next.js 14 admin dashboard, and 5 Move smart contracts deployed on Sui Testnet.

Mobile (8,965 LOC): Built with Expo 54 + React Native 0.81.5 + TypeScript. Uses Zustand for state management across auth, wallet, trading, and UI stores. Sui zkLogin handles wallet creation — users sign in with Google/Apple OAuth and get a Sui address derived from their JWT via jwtToAddress(), no seed phrase needed. Ephemeral keypairs rotate every epoch (~24h). The app communicates with the backend via REST API and directly with Sui RPC for balance queries and transaction signing.

Backend (5,967 LOC): NestJS with 8 modules (auth, orders, rates, wallet, webhooks, bank-accounts, users, admin). PostgreSQL via Supabase with Row Level Security on all user tables. BullMQ + Redis handles async jobs for order matching and rate updates. The rate service fetches VND/USDC mid-rates from a free exchange API every 5 minutes — this was a key hack because no major blockchain oracle (Pyth, Supra) supports VND pricing, so we built a custom on-chain oracle fed by the backend.

Smart Contracts (564 LOC, 5 Move modules): price_oracle.move stores buy/sell rates with a 10-minute staleness check. escrow.move locks USDC for Smart Sell orders with partial fill support. liquidity_pool.move manages the platform USDC reserve. admin_cap.move implements the capability pattern for privileged operations.

The hackiest part: Batch Programmable Transaction Blocks (PTBs). Smart sell execution normally requires 3 separate transactions (update oracle → execute escrow → dispense from pool). We batch all 3 into a single atomic PTB, which prevents stale oracle reads between operations, reduces gas by ~66%, and guarantees all-or-nothing settlement. The backend constructs the PTB and Sui Enoki sponsors gas — so the entire flow is gasless for end users.

Payment integration uses SePay (VietQR) for Vietnamese bank transfers. Buy orders generate a QR code; when the user pays, SePay sends a webhook (HMAC-SHA256 verified), the backend confirms payment, then dispatches USDC on-chain. Sell orders work in reverse — USDC goes to the pool/escrow first, then SePay disburses VND to the user's bank.

Admin Dashboard (Next.js 14): Real-time order management with TanStack Query, Recharts for analytics, and Radix UI + shadcn/ui components. Supports approve/settle/cancel workflows and manual review queues for failed disbursements.

Shared types package ensures type-safe DTOs and enums across all 3 TypeScript codebases (mobile, backend, admin) via npm workspaces.

Deployment: Backend on Render.com (Singapore), admin on Vercel (global CDN), database on Supabase free tier, contracts on Sui Testnet. OAuth proxy runs as a Vercel serverless function to handle redirect callbacks.

background image mobile

Join the mailing list

Get the latest news and updates

SuiGate | ETHGlobal