Distribution Scripts

19 specialized TypeScript scripts powering the most advanced rewards distribution system in DeFi.

19
Total Scripts
7
Active/Integrated
7
Ready for PM2
5
Analytics

Core Distribution (PM2 Automated)

These scripts run automatically via PM2 cron every 2 minutes

run-distribution.tsActive

Main orchestrator - collects fees from Meteora DAMM v2 and triggers distribution

PM2 - Every 2 min
distribute-tokens.tsActive

Distribution engine with all 4 multiplier systems (tier, streak, engagement, time lock)

Called by run-distribution
collect-dammv2-fees.tsActive

Fee collector - claims USD1 from Meteora DAMM v2 LP position

Called by run-distribution

Multiplier Systems (Integrated)

These scripts are integrated directly into distribute-tokens.ts

streak-tracker.tsIntegrated

Tracks consecutive holding days - Diamond Hands multipliers from 1.0x to 1.25x

1.0x - 1.25x
engagement-score.tsIntegrated

XP-based engagement system - earn XP from distributions and check-ins

1.0x - 1.2x
time-lock.tsIntegrated

Voluntary commitment locks - soft locks that boost rewards without locking tokens

1.05x - 2.0x
auto-compound.tsIntegrated

Automatically swaps USD1 rewards to $FED via Jupiter Ultra API

N/A

Analytics & Reporting

holder-report.ts

Unified holder analytics - aggregates tier, streak, engagement, and time lock data

Analytics API
reputation-score.ts

Fed Credit Score - reputation tracking based on commitment history

Credit Scoring
milestone-tracker.ts

QE milestone event tracking - triggers celebration bonuses at milestones

Event Tracking
fed-funds-rate.ts

Calculates real-time APY based on distribution history

APY Calculation
rate-decision.ts

AI-powered analysis of optimal distribution timing

Timing Optimization

Gamification (Ready for Activation)

These scripts are ready but need PM2 cron setup to activate

season-tracker.tsReady

Seasonal competition tracking with leaderboards

fed-quests.tsReady

Quest and badge system for holder achievements

referral-bonus.tsReady

Referral rewards program for bringing new holders

Treasury Operations (Ready for PM2)

Advanced treasury management scripts ready for deployment

treasury-buyback.tsReady

Treasury buyback & burn - uses portion of fees to buy and burn $FED

smart-timing.tsReady

Intelligent distribution timing based on gas prices and volume

smart-distribution.tsReady

AI-powered distribution optimization

sybil-detector.tsReady

Anti-sybil detection - quality over quantity protection

How Scripts Run

PM2 Automated (Currently Active)

PM2 Task 0: fed-distribution
Cron: */2 * * * * (every 2 min)
Script: run-distribution.ts

The main distribution runs automatically. All integrated scripts (multipliers) are called within this flow.

To Activate Additional Scripts

pm2 start "npx tsx script.ts" \
  --name "fed-script" \
  --cron "*/10 * * * *"

Ready scripts can be activated by adding them to PM2 with a cron schedule.

All scripts are open source and available on GitHub

View on GitHub