atomic-distribute

Distributes USDC rewards to pump.fun coin holders with sqrt-weighted allocation on Solana.

15|2|Updated May 19, 2026
One-click install
npx skills add https://github.com/nirholas/atomic --skill atomic-distribute-nirholas
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: atomic-distribute
Source: https://github.com/nirholas/atomic/tree/main/skills/distribute
Command: npx skills add https://github.com/nirholas/atomic --skill atomic-distribute-nirholas

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Paying out USDC rewards to every holder of a pump.fun coin manually is impractical, and naive pro-rata payouts let whales dominate while dust holders cost more in fees than they receive. This Skill automates holder-weighted USDC distribution on Solana with a fairer weighting curve and a minimum-share floor. ## Core Features & Use Cases - Sqrt-weighted payouts: Each holder's share is computed as sqrt(balance) / sum(sqrt(balance)), flattening whale dominance while still rewarding larger holders. - Minimum-bps floor: Holders below a configurable MIN_BPS threshold (e.g. 10 bps = 0.1% of supply) are skipped and logged for audit. - Emergency sweep mode: Setting EMERGENCY=1 bypasses holder weighting and drains all USDC from the funder wallet to a single destination address. - Automatic ATA creation: Creates USDC associated token accounts for holders who lack one, inside the same batched transaction. - Use Case: A token creator wants to distribute 80% of accumulated USDC fees to all holders with at least 0.1% of supply, run as a single npm command from the repo root. ## Quick Start Set MINT, REWARD_PERCENT, MIN_BPS, and FUNDER_SECRET in your environment, then ask the assistant to run the sqrt-weighted USDC distribution to all eligible holders of your coin.

Frequently Asked Questions about atomic-distribute

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I distribute USDC rewards to pump.fun coin holders?▼

Set MINT, REWARD_PERCENT, MIN_BPS, and FUNDER_SECRET as environment variables, then run npm run distribute from the repo root. The script reads all token accounts for the mint, weights each holder by sqrt(balance), and submits batched USDC transfers.

How does sqrt-weighted token distribution work?▼

Each holder's share equals sqrt(balance) divided by the sum of sqrt(balance) across all holders. This flattens the payout curve so whales receive proportionally less than under linear pro-rata, while larger holders still earn more than small ones.

Can I sweep all USDC to one address instead of paying holders?▼

Yes, set EMERGENCY=1 and EMERGENCY_DESTINATION to a single address. This skips holder weighting entirely and sends the funder wallet's full USDC balance to that destination, useful for shutting down a rewards program.

Why does the distribution script get rate-limited on public RPC?▼

The script enumerates all SPL token accounts via getProgramAccounts filtered on mint, which is read-heavy. Public mainnet RPC endpoints rate-limit after a few hundred calls, so use a paid RPC like Helius or Triton for coins with over 100 holders.

What are the limitations of sqrt-weighted holder payouts?▼

Sqrt weighting does not defeat Sybil attacks, since splitting funds across many wallets yields more than holding in one. Setting MIN_BPS too low also creates dust payouts costing more in transaction fees than the payout itself; 10-50 bps is recommended.