Start here

Platform Overview

What SocialPay is, what it is made of, and which parts run on Arc and which do not.

What SocialPay is

SocialPay combines messaging, a social feed and USDC payments in one web app on Arc Mainnet. Our mission is to make sending money as easy and as personal as sending a message, while you keep control of your funds.

Money moves onchain. Conversations, posts and profiles are off-chain data, because storing them onchain would cost gas for every message and could not be edited or deleted.

Main components

ComponentWhat it doesWhere it lives
Web appPay, Messages, Explore, Swap, Bridge, Activity, Settingssrc/App.tsx, src/components/
ArcSocialPay contractPayments and tips with an onchain memocontracts/ArcSocialPay.sol
API routesChat, social data, explorer history, receipt checksapp/api/
Database (optional)Stores chat and social data when configuredlib/turso.ts
Wallet layerConnect, sign and switch networksrc/config.ts, wagmi, viem, ConnectKit

Your device

SocialPay web app

  • Next.js 15, React 18, Tailwind
  • Pay, Swap, Bridge, Messages, Explore
  • src/App.tsx, src/components/

Your wallet

  • Injected wallet via ConnectKit and wagmi
  • You sign every transaction
  • Keys never leave the wallet

Browser storage

  • Settings, drafts, activity cache
  • Used for chat when no database is set
  • src/store/appStore.ts

SocialPay services (Next.js API routes)

Chat and social API

  • app/api/conversations, messages, posts
  • Wallet-signed sessions guard private data
  • Optional Turso (LibSQL) database

Explorer and upstream proxies

  • app/api/explorer, tx, upstream
  • Optional Blockscout key for history
  • Token and chain lists, cached

Transaction verification

  • app/api/tx reads the Arc node
  • Checks receipt, transaction and logs
  • src/server/arcRpc.ts

Arc Mainnet (chain 5042)

ArcSocialPay

  • pay() and tip() with a memo
  • Pulls USDC, forwards it at once, holds nothing
  • 0x3b61...bf54

Circle USDC, EURC, cirBTC

  • USDC is also the gas token
  • 6 decimals as ERC-20, 18 as gas
  • src/lib/arcTokens.ts

Swap and bridge protocols

  • Uniswap v3, KyberSwap, LI.FI
  • Circle App Kit, CCTP, Across, Relay
  • Contracts called directly or via quotes

Onchain and off-chain data

DataWhere it is kept
USDC balances and transfersArc Mainnet
Payment memos and tip post idsArc Mainnet, as events from ArcSocialPay
Chat messages, posts, comments, follows, profilesSocialPay database when configured, otherwise your browser
Settings, approval limit, scheduled remindersYour browser
Activity cacheYour browser (IndexedDB)

Self-hosting note

Chat history persists on the server only when TURSO_DATABASE_URL and TURSO_AUTH_TOKEN are set. Without them the app keeps data in the browser.

USDC on Arc

On Arc, USDC is the native gas token and also a normal ERC-20. It is one pool of money exposed two ways: the ERC-20 view uses 6 decimals and the native gas view uses 18 decimals. SocialPay shows a single USDC balance and uses exact integer math, so the two views are never added together.

Found something unclear or out of date? Open an issue on GitHub.