Impact Awards Bot: Enabling Community $PYTH Rewards
Summary
The Impact Awards Bot (IA Bot) is a production-ready Discord automation that powers the Pyth Community’s Impact Awards program. It enables reliable, configurable distribution of PYTH to community contributors with automated “rains,” manual micro-grants, identity/registration, and auditable logs. This work operationalizes the “Impact Awards” budget line, prioritizing sustainable engagement and transparency.
Purpose
This post documents the delivered work on the Impact Awards Bot (IA Bot) and highlights the nature of the Community Council (CC)-funded project: a production-ready Discord automation that enables transparent, auditable community rewards.
Key Features
-
Automates Pyth Impact Awards with configurable autorains and manual “Give Pyth” micro-grants.
-
Registration: Twitter OAuth + Sol/EVM validation with role assignment on completion
-
Transparent accounting: standardized “Give Pyth” embeds and exports (CSV/MD/XLSX)
-
Ready for prod: TLS-ready Twitter OAuth, strict WAL address validation, DB-driven config.
Rationale
-
Scale and fairness: Manual awards don’t scale and are hard to audit. IA Bot standardizes rules and logs.
-
Operational efficiency: Recurring distributions and micro-grants are point-and-click instead of spreadsheets.
-
Community trust: Unified, transparent embeds and exports make it easy for anyone to review outcomes.
What We Built
-
Democratized Rewards appearing on #ia-feed
-
Admin commands for give/transfer with standardized “Give Pyth” embeds for consistent, per-recipient records.
-
Transparent Accounting
-
Wallets and leaderboards.
-
Exports (CSV/Markdown/XLSX) for monthly reporting.
-
DB-driven role multipliers
-
Registration & Identity
-
Twitter OAuth linking.
-
Solana/EVM address collection
Impact
-
Fair, consistent rewards: promotes engagement on Discord
-
Clear UX: no drop spam, clear reactions on winners, rich admin and give-coin embeds.
-
Audit-ready: standardized “Give Pyth” embeds and end-of-event summaries; easy exports.
-
Operational scale: set-and-forget autorains with reliable timing.
Budget Alignment
Directly implements the Community Council’s “Impact Awards” (monthly micro-grants) by:
-
Automating recurring distributions.
-
Standardizing transfer records per recipient.
-
Producing exports to simplify reporting.
No additional funding is requested in this post; this is a delivery and capability report.
Implementation Notes (High-Level)
-
Scheduling: Interval-based drops; optional instant-first-drop; UTC-aware times; end-of-event summary embeds (success/partial/incomplete) with top winners.
-
Messaging: Rain channel uses reactions on winners’ last messages; admin channel receives detailed embeds (strategy, drop number, recipients/metrics); give-coin channel receives one “Give Pyth” embed per recipient.
-
Registration: Twitter OAuth server (TLS-ready for production), strict Solana/EVM validation, role assignment on completion.
-
Accounting: Leaderboards and exports for Council reports; role multipliers from DB with verify/auto-fix tools.
Next Steps
-
Metrics & dashboards: monthly reports (awards, recipients, strategy breakdown, engagement).
-
Upcoming Pythentity alignment: use IA Bot awards as a reputation signal.
-
Community: propose new reward strategies or event formats the bot should automate.
-
Developers: contributions welcome for metrics dashboards, partner integrations, and new identity providers.
Version History
-
2025-09-24 — Autorain UX & Reliability Overhaul
-
Added end-of-event summary embeds (success/partial/incomplete) with Top Winners in
cogs/rain.py. -
Suppressed failed-drop spam; track
failed_drops_countand summarize at end. -
Three-channel messaging: reactions on winners (rain channel), detailed admin embed, per-recipient “Give Pyth” embeds in give-coin channel.
-
Admin exclusions and user-specific reward cooldowns for fair distributions.
-
Instant-first-drop option and correct UTC handling/timing windows.
-
2025-09-13 — Identity & Registration Improvements
-
Twitter OAuth callback server (TLS-ready), persistent UI flows, and templated success/error pages in
cogs/registration.py. -
Strict Solana (Base58, 32 bytes) and Ethereum (
eth_utils.is_address) validation; admin edit modal; automatic role assignment on completion. -
Placeholder-username fixes, startup queue for username updates, and improved Discord reconnect resilience in
modules/helpers.py. -
2025-09-10 — Shop, Multipliers, and Exports
-
DB-driven shop items and stable
/buyUX; improved branding and error handling incogs/shop.py/cogs/inventory.py. -
Role multipliers from DB with verify toggle and auto-fix (role name → ID);
/richest+ CSV/Markdown/XLSX exports incogs/bank.py. -
2025-09-04 — Config & Command Sync Modernization
-
Migrated
sync_channel_commandand emoji/branding to DB-driven config; safer runtime-config access pattern across cogs. -
Added master test runner and cog checks to ease validation and CI setup.
-
2024-05-22 — Initial Import & Scaffolding
-
Baseline bot, DB wrapper (
modules/db.py), and core models (settings,bank,inventory). -
Initial cogs structure and startup flow in
main.py/modules/bot.py.
Security & Privacy
-
Principle of least privilege for Discord permissions and channels
-
DB-driven exclusions and cooldowns to reduce conflicts of interest
-
TLS-required for production Twitter OAuth callback; secrets are environment-based
-
Input sanitation and strict validation for Solana/EVM addresses
-
Logging oriented for diagnostics without storing sensitive OAuth tokens long-term
Admin Quick Actions (High-Level)
-
Plan an Autorain: Define count, interval, recipients per drop, coins per recipient, strategy, exclusions, and cooldown.
-
Choose First-Drop Behavior: Default is after full interval; optionally enable instant-first-drop for immediate feedback.
-
Monitor: During execution, watch the admin channel for detailed embeds; verify per-recipient embeds in the give-coin channel.
-
Adjust: Pause/stop (if supported in your deployment) or tune future runs based on the summary and engagement.
-
Manual Grants: Use “Give Pyth”-style transfers for ad-hoc awards with consistent, auditable embeds.
-
Exports: Generate leaderboards and summaries (CSV/Markdown/XLSX) for public reporting.
Event Walkthrough (Rain Example)
-
Ensure settings include valid channel IDs (admin, give-coin), emoji, role lists, and server ID.
-
Create an autorain with strategy (e.g., Message Activity), recipients per drop, coins per recipient, and interval.
-
Decide on instant-first-drop vs normal interval start.
-
During the event, confirm admin embeds show progress (e.g., “Rain #3 of 10”).
-
Verify give-coin channel receives one “Give Pyth” embed per recipient with correct amounts.
-
Check that winners’ last messages receive the rain emoji in the rain channel.
-
After completion, review the summary embed and export reports for council updates.
Data Collected & Retention
-
Discord: user_id, message/reaction counts (for strategies), role IDs
-
Identity: Twitter handle/ID (if linked), Solana/EVM addresses (validated, sanitized)
-
Awards: per-recipient transfer records and event summaries for auditability