Send · Stream · Swap — USDC payments on Arc Testnet (Chain ID: 5042002)
Arcoin is a non-custodial DeFi payment operating system built natively on the Arc Network. It enables users to:
- Send USDC instantly to any address or human-readable ArcID (e.g.
alice.arc) - Stream USDC over time using Arcoin's own native streaming contract (ArcoinStream.sol)
- Swap tokens via ApexiSwap on Arc Testnet
- Escrow funds with on-chain dispute resolution
- Register a human-readable ArcID (ENS-style identity for Arc)
All payments route through auditable smart contracts. No custodian. No intermediary. Your keys, your funds.
┌─────────────────────────────────────────────────────────┐
│ ARCOIN FRONTEND │
│ Next.js 14 · Privy Auth · wagmi · viem │
│ │
│ ConnectScreen → Dashboard → Send / Stream / Swap / │
│ Escrow / Resources │
└────────────────────────┬────────────────────────────────┘
│ USDC transactions
▼
┌─────────────────────────────────────────────────────────┐
│ ARC TESTNET (Chain 5042002) │
│ │
│ ┌─────────────────┐ ┌──────────────────────────┐ │
│ │ ArcoinRegistry │ │ ArcoinPaymentRouter │ │
│ │ (ArcID — ENS) │ │ 0.1% fee → Treasury │ │
│ └─────────────────┘ └──────────────────────────┘ │
│ │ │
│ ┌─────────────────┐ ┌────────────▼─────────────┐ │
│ │ ArcoinEscrow │ │ ArcoinTreasury │ │
│ │ P2P + Arbiter │ │ 72h timelock · 3-bucket │ │
│ └─────────────────┘ └──────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────┐ │
│ │ ArcoinStream (native streaming) │ │
│ │ LockupLinear · LockupDynamic │ │
│ └─────────────────────────────────────────────────┘ │
│ │
│ USDC: 0x3600000000000000000000000000000000000000 │
└─────────────────────────────────────────────────────────┘
| Contract | Role |
|---|---|
ArcoinRegistry |
ArcID human-readable names (alice.arc), 1 USDC/year, 48h fee timelock |
ArcoinTreasury |
Collects protocol fees, 72h distribution timelock, 60/25/15% allocation |
ArcoinPaymentRouter |
Single entry point for all USDC payments, 0.1% fee, OFAC blocklist |
ArcoinEscrow |
Non-custodial P2P escrow with arbiter + auto-refund after deadline |
ArcoinStream |
Native token streaming — no external protocol dependency |
node --version # v18+
npm --version # v9+git clone https://github.com/oamohm/Arcoin.git
cd arcoin
npm install
# Install Hardhat (for contracts)
npm install --save-dev hardhat @nomicfoundation/hardhat-toolbox
npm install @openzeppelin/contractscp .env.example .env.localFill in .env.local:
# Privy — https://dashboard.privy.io → Your App → App ID
NEXT_PUBLIC_PRIVY_APP_ID=clxxxxxxxxxxxxxxxxx
# WalletConnect — https://cloud.walletconnect.com
NEXT_PUBLIC_WALLETCONNECT_ID=xxxxxxxxxxxxxxxxx
# Arc Testnet deployer wallet (TESTNET ONLY — never use mainnet key here)
DEPLOYER_PRIVATE_KEY=0xabc123...
# Treasury allocation addresses
TREASURY_MULTISIG=0xYourAddress
DEV_FUND=0xYourAddress
LIQUIDITY_RESERVE=0xYourAddress
COMMUNITY_MULTISIG=0xYourAddress
# Anthropic (AI Help feature)
ANTHROPIC_API_KEY=sk-ant-xxxxx
# App
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_APP_ENV=development- Go to faucet.circle.com
- Select Arc Testnet
- Paste your deployer wallet address
- Receive 10 USDC
# Deploy all 5 contracts in one command
npx hardhat run contracts/scripts/deploy-all.ts --network arc-testnet
# Auto-patch constants.ts with deployed addresses
npx ts-node contracts/scripts/post-deploy-patch.tsnpm run dev
# Open http://localhost:3000| Contract | Address |
|---|---|
| USDC | 0x3600000000000000000000000000000000000000 |
| ApexiSwap | 0x437b1aBf6e5a69548849b15EC35f83A73Fa1E28F |
| ArcoinRegistry | (deploy and fill) |
| ArcoinTreasury | (deploy and fill) |
| ArcoinPaymentRouter | (deploy and fill) |
| ArcoinEscrow | (Phase 3) |
| ArcoinStream | (deploy and fill) |
Run
contracts/scripts/post-deploy-patch.tsto auto-fill these after deployment.
Explorer: testnet.arcscan.app
Faucet: faucet.circle.com
RPC: https://rpc.testnet.arc.network
| Variable | Required | Description |
|---|---|---|
NEXT_PUBLIC_PRIVY_APP_ID |
✅ | Privy app ID for embedded wallet auth |
NEXT_PUBLIC_WALLETCONNECT_ID |
✅ | WalletConnect project ID |
NEXT_PUBLIC_ARC_CHAIN_ID |
✅ | Arc chain ID (default: 5042002) |
NEXT_PUBLIC_APP_URL |
✅ | App base URL |
ANTHROPIC_API_KEY |
Optional | Claude AI for AI Help feature (server-side only) |
NEXT_PUBLIC_ALCHEMY_KEY |
Optional | Backup RPC key |
DEPLOYER_PRIVATE_KEY |
Contracts only | Wallet key for Hardhat deployment |
Option A — Dashboard:
- vercel.com/new → Import
oamohm/Arcoin - Add environment variables:
NEXT_PUBLIC_PRIVY_APP_IDANTHROPIC_API_KEYNEXT_PUBLIC_APP_URL→ your Vercel URLNEXT_PUBLIC_APP_ENV→production
- Deploy
Option B — CLI:
npm install -g vercel
vercel --prod# ArcoinRegistry
npx hardhat verify --network arc-testnet <REGISTRY_ADDR> \
"0x3600000000000000000000000000000000000000" \
"<TREASURY_ADDR>" "<DEPLOYER_ADDR>"
# ArcoinTreasury
npx hardhat verify --network arc-testnet <TREASURY_ADDR> \
"0x3600000000000000000000000000000000000000" \
"<DEPLOYER_ADDR>" "<DEPLOYER_ADDR>" "<DEPLOYER_ADDR>" "<DEPLOYER_ADDR>" "<DEPLOYER_ADDR>"
# ArcoinPaymentRouter
npx hardhat verify --network arc-testnet <ROUTER_ADDR> \
"0x3600000000000000000000000000000000000000" \
"<TREASURY_ADDR>" "<DEPLOYER_ADDR>"arcoin/
├── contracts/
│ ├── core/
│ │ ├── ArcoinEscrow.sol
│ │ ├── ArcoinPaymentRouter.sol
│ │ ├── ArcoinRegistry.sol
│ │ └── ArcoinTreasury.sol
│ └── scripts/
│ ├── deploy-all.ts
│ ├── deploy-registry.ts
│ ├── deploy-sablier.ts
│ └── post-deploy-patch.ts
├── locales/
│ ├── en.json # English i18n
│ └── hi.json # Hindi i18n
├── src/
│ ├── app/ # Next.js App Router
│ ├── components/
│ │ ├── layout/ # Shell, nav
│ │ ├── payment/ # Send, Escrow, Swap screens
│ │ ├── streaming/ # Native streaming UI (ArcoinStream)
│ │ ├── resources/ # Docs & links
│ │ ├── ui/ # Toast, TxStatusBar
│ │ └── wallet/ # ConnectScreen, Dashboard
│ ├── hooks/ # useArcBalance, useArcID, useSendPayment, ...
│ ├── lib/ # chains, constants, i18n, compliance, errors
│ └── types/ # Shared TypeScript types
├── hardhat.config.ts
├── next.config.js
├── tailwind.config.ts
├── vercel.json
└── DEPLOY.md # Full deployment guide
| Phase | Status | Features |
|---|---|---|
| Phase 1 | ✅ Complete | Wallet connect, USDC send, balance display, Blockscout links |
| Phase 2 | ✅ Complete | Native ArcoinStream streaming, ArcID registry, Escrow, Swap, Hindi i18n |
| Phase 3 | 🔜 Planned | Chainalysis compliance, multisig ownership transfer, mainnet |
| Phase 4 | 🔜 Planned | Mobile app, push notifications |
| Phase 5 | 🔜 Planned | AI Help (Claude) full integration |
- Contracts use ReentrancyGuard and SafeERC20 throughout
- Treasury distributions are 72-hour time-locked
- ArcID fee changes are 48-hour time-locked
- PaymentRouter has an OFAC/sanctions blocklist
- Escrow supports on-chain arbiter dispute resolution
.env.localis gitignored — never commit secrets
⚠️ This is testnet software. Never use mainnet private keys in.env.local.
| Layer | Technology |
|---|---|
| Frontend | Next.js 14, React 18, Tailwind CSS |
| Auth | Privy (email + embedded wallet + WalletConnect) |
| Web3 | wagmi v2, viem v2, @tanstack/react-query |
| Contracts | Solidity 0.8.24, OpenZeppelin, Hardhat |
| Streaming | ArcoinStream.sol (own contract) |
| AI | Anthropic Claude (AI Help — Phase 5) |
| Deploy | Vercel (frontend), Hardhat (contracts) |
| Chain | Arc Testnet — Chain ID 5042002 |
MIT — see LICENSE
Built on Arc Network · Auth by Privy · Explorer by ArcScan