IntentSwap is an intent-based swap dApp that lets users create conditional token swap intents (e.g. βswap when price crosses Xβ), which can be executed automatically by an off-chain bot when conditions are met.
π What it does
- Create swap intents with configurable price thresholds and expiration
- Monitor intents off-chain and execute swaps when conditions are satisfied
- Use Chainlink Price Feeds for reliable price checks
- Swap through Uniswap V3 with slippage protection
π How it works (high-level)
- User creates an intent on-chain (token pair, amount, price threshold, expiration) and enables bot auto-execution
- The bot keeps track of active intents and checks prices via Chainlink oracles
- When conditions are met, the bot triggers on-chain execution
- The executor validates the intent and performs the swap via Uniswap V3
ποΈ Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β IntentSwap β
βββββββββββββββββββ¬ββββββββββββββββββ¬ββββββββββββββββββββββββββββββ€
β packages/ β packages/ β packages/ β
β hardhat β web β bot β
βββββββββββββββββββΌββββββββββββββββββΌββββββββββββββββββββββββββββββ€
β Smart Contracts β Next.js App β Cloudflare Worker β
β - IntentFactory β - Create UI β - Cron job monitoring β
β - IntentExecutorβ - Manage UI β - Intent execution β
β - Oracle β β - KV subscriptions β
β - Swapper β β β
βββββββββββββββββββ΄ββββββββββββββββββ΄ββββββββββββββββββββββββββββββ
π οΈ Tech Stack
| Category | Technology |
|---|---|
| Smart Contracts | Solidity, Hardhat, OpenZeppelin |
| Oracles | Chainlink Price Feeds |
| Swap Routing | Uniswap V3 |
| Frontend | Next.js, React, Wagmi, Viem, RainbowKit |
| UI | TailwindCSS, shadcn/ui |
| Bot | Cloudflare Workers, Hono, Viem |
| CI/CD | GitHub Actions |
β¨ Highlights
- Intent-based UX: users define βwhatβ they want, not βhowβ to execute it
- Separation of concerns: on-chain validation + off-chain monitoring/execution
- Safer execution: oracle-backed condition checks and slippage protection
ποΈ License
MIT