A production-ready React Native template for building token swap applications on the Monad blockchain. This template provides a complete mobile DEX interface with embedded wallet functionality powered by Privy.
- 🔄 Token Swapping - Exchange tokens on Monad testnet with real-time quotes
- 👛 Embedded Wallet - Seamless wallet creation and management via Privy
- 📱 Cross-Platform - Works on iOS and Android using React Native & Expo
- 🎨 Modern UI - Beautiful dark/light theme with smooth animations
- ⚡ Real-time Updates - Auto-refreshing quotes with visual countdown
- 🔐 Secure - Email-based authentication with secure key storage
- MON - Native Monad token
- USDC - USD Coin
- USDT - Tether
- WBTC - Wrapped Bitcoin
- WETH - Wrapped Ethereum
- WSOL - Wrapped Solana
- WMON - Wrapped Monad
- Node.js (v18 or higher)
- npm or yarn
- Expo CLI
- iOS Simulator (for iOS development) or Android Studio (for Android development)
- Clone the repository:
git clone https://github.com/monad-developers/expo-swap-template.git
cd expo-swap-template- Install dependencies:
npm install- Set up environment variables:
Create a
.envfile in the project root with:
EXPO_PUBLIC_PRIVY_APP_ID=your_privy_app_id
EXPO_PUBLIC_PRIVY_CLIENT_ID=your_privy_client_id- Visit Privy Dashboard
- Create a new app or use an existing one
- Navigate to Settings > API Keys
- Copy your App ID and Client ID
npm startnpm run iosnpm run androidnpm run webFor iOS:
npx expo run:iosFor Android:
npx expo run:androideas build --platform ioseas build --platform androidexpo-swap-template/
├── app/ # Main application screens
│ ├── _layout.tsx # Root layout with providers
│ └── index.tsx # Main swap interface
├── components/ # Reusable UI components
│ ├── SwapInput.tsx # Token input/output component
│ ├── TokenSelector.tsx # Token selection modal
│ └── WalletConnect.tsx # Wallet connection component
├── services/ # Business logic
│ ├── realSwapService.ts # DEX swap implementation
│ └── web3Service.ts # Blockchain interactions
├── hooks/ # Custom React hooks
├── constants/ # App configuration
├── config/ # Token configuration
└── ios/android/ # Native platform code
- React Native - Cross-platform mobile framework
- Expo - Development platform for React Native
- Privy - Embedded wallet and authentication
- Viem & Wagmi - Web3 interaction libraries
- TypeScript - Type-safe development
Default: 2.5%
Location: constants/swap.ts
Default: 20 minutes
Location: constants/swap.ts
Currently configured for Monad Testnet. To add more networks, update:
services/web3Service.tsapp/_layout.tsx(Privy configuration)
To learn more about developing your project with Expo, Privy, and Monad look at the following resources:
- Expo documentation
- Expo guides
- Learn Expo tutorial
- Creating embedded wallet on the client side
- Sending transactions using embedded wallet
- Signing transactions using embedded wallet
- Tooling and infra options on Monad
- Discord community: Chat with fellow Monad developers and ask questions.