← Back to home

RageQuit Kit

🧨 RageQuit: Exit risky tokens across many chains with one click and telegram bot alerts.

Problem Statement

RageQuit is an app that helps users exit their risky tokens into stablecoins across multiple chains with a single click. If you're tilted and need to get out fast, RageQuit scans your balances on Ethereum, Base, Arbitrum, Optimism, and Polygon, then routes everything into your chosen stablecoin using optimal swap routes using 1Inch's APIs.The platform consists of two components: (1) RageQuit web app - a Next.js dApp that uses Privy for embedded wallet creation, allowing users to connect without existing wallets. It automatically scans for degen tokens (PEPE, DEGEN, BRETT, PORK, TOBY, etc.) and executes multi-chain swaps from 1inch aggregation API. (2) RageGuard Telegram bot - a helper bot that provides price alerts for tracked tokens, notifying users when prices hit their thresholds and providing direct links to rage quit. (3) Smart contracts built and launched with Hardhat 3 tracking dApp metadata and recording past transactions.The core value proposition: no portfolio theory, no "maybe later" buttons - just a big red button that gets users out when then need it most. Users go from scattered exposure across multiple chains to a clean stablecoin position in one emotionless moment.

Solution

Built with Next.js 16 (App Router) and TypeScript for the frontend, using Tailwind CSS v4 for styling. The blockchain integration uses wagmi v3 and viem for EVM interactions across 5 chains. Privy powers embedded wallet creation and social login, making it accessible to users without existing wallets.The swap execution leverages 1inch Aggregation API v6 for optimal DEX routing. We built a custom hook (useTokenBalances) that scans balances in parallel across all supported chains using viem's public clients. The RageQuitButton component handles the complex flow: checking token approvals, executing approvals when needed, fetching swap quotes, and executing transactions sequentially per chain.For the Telegram bot (RageGuard), we used Telegraf framework with persistent JSON file storage for price alerts. CoinGecko API provides real-time price data, and the bot monitors prices every 60 seconds, sending notifications via bot.telegram.sendMessage when thresholds are hit. The bot includes commands for setting alerts, viewing active alerts, and testing alert notifications.Notable hack: We use a single RageQuitButton component that groups tokens by chain and executes swaps sequentially, handling chain switching automatically. The price alert system uses in-memory Map storage with file-based persistence, allowing alerts to survive bot restarts while keeping the code simple.

Hackathon

ETHGlobal Buenos Aires

2025

Prizes

  • 🏆

    Utilize 1inch APIs

    1inch

Contributors