A Slack bot that provides automated liquidity reporting for blockchain deposits.
- Slash Commands:
/liquidity
- Get current liquidity report - Automated Reports: Hourly reports sent to Slack channel
- Blockchain Integration: Real-time data from Base network
- Heroku Deployment: 24/7 operation with scheduled jobs
- Clone the repository
- Install dependencies:
npm install
- Create
.env
file with required variables - Run:
npm start
- Heroku account
- Git repository
- Slack app configured
-
Create Heroku App:
heroku create your-liquidity-bot
-
Add Scheduler Addon:
heroku addons:create scheduler:standard
-
Set Environment Variables:
heroku config:set SLACK_BOT_TOKEN=xoxb-your-token heroku config:set SLACK_SIGNING_SECRET=your-signing-secret heroku config:set SLACK_CLIENT_ID=your-client-id heroku config:set SLACK_CLIENT_SECRET=your-client-secret heroku config:set SLACK_CHANNEL_ID=C097Z17A64C heroku config:set BASE_RPC_URL=https://mainnet.base.org
-
Deploy:
git add . git commit -m "Initial deployment" git push heroku main
-
Configure Scheduler:
- Go to Heroku Dashboard → Your App → Resources
- Click "Scheduler" addon
- Add job:
npm run scheduler
- Set frequency: "Every hour"
-
Scale Worker:
heroku ps:scale worker=1
Variable | Description | Required |
---|---|---|
SLACK_BOT_TOKEN |
Bot User OAuth Token | Yes |
SLACK_SIGNING_SECRET |
App Signing Secret | Yes |
SLACK_CLIENT_ID |
App Client ID | Yes |
SLACK_CLIENT_SECRET |
App Client Secret | Yes |
SLACK_CHANNEL_ID |
Channel for reports | Yes |
BASE_RPC_URL |
Base network RPC URL | Yes |
- Type
/liquidity
in any Slack channel where the bot is present
- Reports are sent hourly to the configured Slack channel
- Format: "🕐 Hourly Liquidity Report" with current totals
- bot.js: Main Slack bot with slash command handling
- scheduler.js: Automated hourly reporting
- sumUsdcByVerifier.js: Blockchain data processing
- activeDeposits.json: Cached deposit IDs
- Check Heroku logs:
heroku logs --tail
- Monitor scheduler: Heroku Dashboard → Scheduler
- Slack notifications for errors
- Bot not responding: Check Slack app configuration
- Scheduler not running: Verify scheduler addon is active
- Blockchain errors: Check BASE_RPC_URL and network connectivity
- Environment variables: Ensure all required vars are set in Heroku