Simple intent-based swap in ETH
Built on Scaffold-ETH 2
eth-intent-swap is a lightweight prototype demonstrating gasless, intent-based asset swaps on Ethereum. Users sign swap intents off-chain, and a relayer executes them on-chain—enabling a flexible, UX-friendly swap experience. This is built using Scaffold-ETH 2 for fast development and testing.
- ✅ Intent-based swaps using EIP-712 signatures
- ✅ Supports ETH → Token and Token → Token swaps via Uniswap V2
- ✅ Fully gasless for users (relayer pays gas)
- ✅ Local relayer for executing signed intents
- ✅ Scaffold-ETH 2 frontend with wallet integration
- Scaffold-ETH 2
- Solidity & Hardhat
- Ethers.js & Wagmi
- Uniswap V2 Router
- TypeScript & Next.js (frontend)
git clone https://github.com/nathfred/eth-intent-swap.git
cd eth-intent-swappnpm installpnpm chain
pnpm deploy
pnpm dev 4. Sign and Execute a Swap Sign an intent from the frontend
Trigger backend/relayer to execute on-chain
pnpm relayer📁 Project Structure contracts/ → Solidity smart contracts (IntentSwap, tokens) nextjs/ → Scaffold-ETH 2 frontend scripts/ → Deployment scripts relayer/ → Off-chain relayer to execute signed intents 🧪 Local Testing Uses Hardhat for testing contracts
Use mockERC20 tokens to simulate swaps
Preload test wallets with ETH & tokens on local node
📜 License MIT License
Built with ❤️ using Scaffold-ETH 2
Let me know if you want badges (build, license, etc.), GIFs/screenshots, or more details for deployment to testnets/mainnet.