Arc Swap — token swap + gasless cross-asset payments DApp on Arc Testnet #181
osr21
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What I built
Arc Swap is a full-stack DeFi application on Arc Testnet (Chain ID 5042002) with three features:
Live app: https://arc-swap-dapp.replit.app
Architecture
Stack: React + Vite + TypeScript frontend · Express 5 + Node.js 24 backend · PostgreSQL + Drizzle ORM · Wagmi v2 + viem
Swap routing (three-tier fallback):
Uniswap V2 pool (on-chain, user pays gas)
→ only used if pool price is within 5% of live Frankfurter forex rate
Circle App Kit (LiFi Diamond → Curve StableSwap)
→ works for USDC→EURC; fails for EURC→USDC on testnet (no reverse route)
Backend peer-to-peer transfer at live market rate
→ always available, zero gas for user
Exchange rates come from real-world APIs — testnet pool prices are artificial:
Gasless payment flow (ERC-2612 permit):
User signs permit off-chain (zero gas)
→ Backend submits permit tx
→ Backend calls transferFrom (pulls tokenIn from sender)
→ Backend sends tokenOut to recipient at live market rate
→ Wrapped in Arc v0.7.2 Memo precompile for on-chain metadata
Deployed contracts (Arc Testnet)
0x7483847d46db2920dd64efa676cf72dcf765814f0xe27d5d256b370604f1ff060fb489c6a8e3f8a6d90xb3685D16AAa06361ED28377b1319136650Fa9A130x5294E9927c3306DcBaDb03fe70b92e01cCede505Live pool: ~$144 TVL · 72.4 USDC / 53.9 EURC reserves
Arc-specific learnings
1.
eth_estimateGasis brokenEvery
writeContractcall needs an explicitgas:override. Without it, transactions revert silently or fail to submit entirely.Beta Was this translation helpful? Give feedback.
All reactions