Skip to content

Repository files navigation

DegenBroom

Reclaim locked SOL from empty Solana token accounts — non-custodial, open source, built for reliability.

Every time you trade or receive a token on Solana, a small rent deposit (~0.002039 SOL) gets locked in an SPL token account. After you sell or transfer the full balance, the account sits empty — zero tokens, but your SOL is still stuck inside. If you've been active on-chain, you might have dozens or hundreds of these accounts. That adds up fast.

DegenBroom scans your wallet, finds every empty account, and closes them in batched transactions so the rent flows back to you.


What it does

  1. Connect your wallet (Phantom or Solflare)
  2. Scan — queries both the classic SPL Token program and Token-2022 in parallel
  3. Review — see exactly how many dead accounts you have, how much SOL is locked, and what you'll receive after fees
  4. Sweep — sign one transaction to close up to 15 accounts at a time; SOL lands in your wallet immediately

No signup. No API keys required. Your keys never leave your wallet.


Why DegenBroom?

Most rent-reclaim tools do the same on-chain operation (close empty accounts). Where they differ is reliability, transparency, and who controls the stack.

vs. Sol Incinerator

The most popular wallet cleaner (~2% fee). Polished product with NFT burning, token incineration, LP cleanup, and wide wallet support.

DegenBroom Sol Incinerator
Open source Yes — audit, fork, self-host Closed source
RPC failover 6+ free endpoints, auto-retry on rate limits Single endpoint (opaque)
Fee transparency Full breakdown shown before you sign Fee shown, less granular
Token-2022 Native dual-program scan Supported
Scope Focused: rent reclaim only Full wallet cleanup suite
Platform fee 15% (configurable if self-hosted) ~2%

DegenBroom wins on: transparency, uptime (multi-RPC), and ownership — you can read every line of code and run your own instance.

Sol Incinerator wins on: lower fees, more wallet options, and extra features (burn spam NFTs, tokens, domains).

vs. ClaimYourSol / Unclaimed SOL

Simpler tools that only close empty accounts. ClaimYourSol charges ~20%, Unclaimed SOL ~5%.

DegenBroom ClaimYourSol Unclaimed SOL
Open source Yes No No
RPC failover Yes No No
Token-2022 Yes SPL only Varies
Platform fee 15% ~20% ~5%
Self-hostable Yes No No

DegenBroom wins on: open code, Token-2022 support, RPC reliability, and a lower fee than ClaimYourSol.

vs. doing it manually (CLI / scripts)

Possible with spl-token close, but painful at scale.

DegenBroom wins on: one-click scan, batched transactions (15 accounts per tx), live fee preview, and a UI that doesn't require a terminal.


Key features

  • Dual-program scan — SPL Token + Token-2022 queried in parallel
  • Multi-RPC failover — rotates through 6 free public mainnet endpoints; retries automatically on 401, 403, 429, and network errors. Add your own RPCs via env var (comma-separated) and they get tried first
  • Batched closes — up to 15 empty accounts per transaction to minimize signature fatigue
  • Transparent fee model — UI shows dead account count, total locked SOL, platform fee (15%), and your net payout before you sign anything
  • Non-custodial — all transactions are built client-side; you approve in your own wallet. DegenBroom never touches your private keys
  • Instant payout — reclaimed rent minus fee is transferred to your wallet in the same transaction
  • Self-hostable — fork it, change PLATFORM_FEE_BPS in src/app/page.tsx, deploy under your own domain, keep 100% of fees

How the fee works

Each empty token account holds ~0.002039 SOL in rent.

Amount
Rent per account ~0.002039 SOL
Platform fee 15% of reclaimed rent
You receive 85% of reclaimed rent

Example: 50 empty accounts → ~0.102 SOL locked → you get ~0.087 SOL, platform keeps ~0.015 SOL.

The fee is collected in the same transaction via a SOL transfer to the configured treasury wallet. No upfront cost — you only pay from SOL you actually reclaim.

Running your own instance? Change PLATFORM_FEE_BPS (currently 0.15) to whatever you want.


Tech stack

  • Next.js 16 (App Router)
  • @solana/web3.js + @solana/spl-token
  • Wallet Adapter (Phantom, Solflare)
  • Tailwind CSS 4
  • Deployed on Vercel (or any Node host)

Getting started

Prerequisites

  • Node.js 18+
  • A Solana mainnet wallet pubkey for the treasury (receives platform fees)

Install

git clone https://github.com/farhanqaz/DegenBroom.git
cd DegenBroom
npm install
cp .env.example .env.local

Environment variables

Variable Required Description
NEXT_PUBLIC_TREASURY_WALLET Yes Mainnet pubkey that receives the 15% platform fee
NEXT_PUBLIC_SOLANA_RPC_URL No Custom RPC endpoint(s), comma-separated. Leave empty to use free public RPCs with automatic failover

Run locally

npm run dev

Open http://localhost:3000.

Build

npm run build
npm start

Deploy

Vercel (recommended)

  1. Push this repo to GitHub
  2. Import at vercel.com/new
  3. Add environment variables in project settings:
    • NEXT_PUBLIC_TREASURY_WALLET = your mainnet pubkey
    • NEXT_PUBLIC_SOLANA_RPC_URL = optional custom RPC
  4. Deploy

Every push to main triggers a new production deploy.


Security

  • Non-custodial — DegenBroom only builds transactions; your wallet signs them
  • No private keys in code — treasury wallet is a public key env var, never a secret key
  • Open source — review the transaction builder in src/app/page.tsx before trusting it
  • .env.local is gitignored — secrets stay local

Always verify you're on the correct domain before connecting your wallet. Phishing clones are a real risk with any popular Solana tool.


Project structure

src/
├── app/
│   ├── page.tsx          # Main UI + scan/sweep logic
│   ├── layout.tsx        # Root layout
│   └── globals.css       # Styles
├── components/
│   ├── BroomLogo.tsx     # Brand mark
│   ├── SolanaProvider.tsx
│   └── WalletButton.tsx
└── lib/
    └── rpc.ts            # Multi-RPC failover

Roadmap ideas

  • More wallet adapters (Backpack, Ledger)
  • Burn spam tokens/NFTs before closing accounts
  • Configurable fee via env var (no code change)
  • Devnet toggle for testing

License

Open source — fork and self-host freely. Add a license file if you plan to distribute commercially.


Built for degens who left rent scattered across the chain. Sweep it back.

About

Sweep empty Solana token accounts and reclaim rent SOL

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages