Automated rent tracking for Kora operators so they never lose $SOL to locked rent again
When Kora operators sponsor account creation on Solana, $SOL gets locked as rent. When these accounts close, the rent should automatically return to the operator but nobody tracks this resulting to operators losing $SOL silently.
Example: You sponsor 100 accounts × 0.001 SOL rent each = 0.1 SOL locked. If 50 close, you should get back 0.05 SOL. This bot makes sure you know about it.
A simple, automated bot that:
- Monitors your Kora-sponsored accounts
- Tracks when accounts close
- Alerts you about rent returns
- Shows how much $SOL you've recovered
# Clone and setup
git clone https://github.com/TimothyBayode/kora-autoclaim-bot.git
cd kora-rent-reclaim-bot
npm install# Copy the example config
cp .env.example .env
# Edit .env with your info
nano .envYour .env should look like:
SOLANA_RPC_URL=https://api.devnet.solana.com
KORA_NODE_PUBKEY=YourKoraNodeAddressHere
OPERATOR_WALLET=YourWalletAddressHere
SCAN_INTERVAL_MINUTES=15# Start the bot
npm startThat's it. Your bot is now monitoring for rent returns.
Once running, you'll see:
Kora Rent Reclaim Bot Started!
Kora Node: YourNodeAddress...
Scanning every 1 minute...
Commands:
stats - Show statistics
scan - Manual scan now
exit - Stop bot
Type a command:
scan- Check for reclaimable accounts right nowstats- See how much rent you've trackedexit- Stop the bot gracefully
- Bot runs in the background
- Checks your Kora-sponsored accounts
- Detects when accounts close
- Tracks the rent that gets returned
- Shows you the results
1. Fetch Kora-sponsored accounts
└── From Kora API/logs (real) or mock data (demo)
2. Check each account on-chain
├── Account exists? → Still active, rent locked
└── Account missing? → Closed, rent returned!
3. Track and report
├── Log successful rent returns
├── Calculate total recovered SOL
└── Provide operator insights
Edit .env for:
- Different RPC: Use your own Solana RPC endpoint
- Scan frequency:
SCAN_INTERVAL_MINUTES=5for more frequent checks - Logging:
LOG_LEVEL=debugfor detailed output
Replace the mock Kora client in src/kora-client.ts with:
- Real Kora API calls
- Kora RPC integration
- Transaction log parsing
kora-rent-bot/
├── src/ # Source code
│ ├── index.ts # Main bot & CLI
│ ├── rent-checker.ts # Core rent detection logic
│ ├── kora-client.ts # Kora integration (mock/real)
│ └── config-manager.ts # Handles settings
├── scripts/ # Utilities
│ ├── create-test-accounts.ts
│ └── monitor-accounts.ts
├── data/ # Storage (auto-created)
├── logs/ # Logs (auto-created)
└── .env # Your configuration
- Reads public blockchain data
- Tracks account status
- Logs rent return events
- Provides statistics
- Never asks for private keys
- Never sends transactions
- Never moves your funds
- Never modifies accounts
Want to add features? Key files:
src/rent-checker.ts- Add new detection logicsrc/kora-client.ts- Implement real Kora APIsrc/index.ts- Add new CLI commands
// In rent-checker.ts, after detecting rent return:
if (config.telegramBotToken) {
await sendTelegramAlert(`Rent returned: ${amount} SOL`);
}Found a bug? Want a feature?
- Fork the repository
- Create a feature branch
- Submit a pull request
- Superteam Nigeria for the bounty opportunity
- Kora & Solana teams for the amazing infrastructure
- Open source community for countless tools and libraries