Distribution Scripts
19 specialized TypeScript scripts powering the most advanced rewards distribution system in DeFi.
Core Distribution (PM2 Automated)
These scripts run automatically via PM2 cron every 2 minutes
run-distribution.tsActiveMain orchestrator - collects fees from Meteora DAMM v2 and triggers distribution
distribute-tokens.tsActiveDistribution engine with all 4 multiplier systems (tier, streak, engagement, time lock)
collect-dammv2-fees.tsActiveFee collector - claims USD1 from Meteora DAMM v2 LP position
Multiplier Systems (Integrated)
These scripts are integrated directly into distribute-tokens.ts
streak-tracker.tsIntegratedTracks consecutive holding days - Diamond Hands multipliers from 1.0x to 1.25x
engagement-score.tsIntegratedXP-based engagement system - earn XP from distributions and check-ins
time-lock.tsIntegratedVoluntary commitment locks - soft locks that boost rewards without locking tokens
auto-compound.tsIntegratedAutomatically swaps USD1 rewards to $FED via Jupiter Ultra API
Analytics & Reporting
holder-report.tsUnified holder analytics - aggregates tier, streak, engagement, and time lock data
Analytics APIreputation-score.tsFed Credit Score - reputation tracking based on commitment history
Credit Scoringmilestone-tracker.tsQE milestone event tracking - triggers celebration bonuses at milestones
Event Trackingfed-funds-rate.tsCalculates real-time APY based on distribution history
APY Calculationrate-decision.tsAI-powered analysis of optimal distribution timing
Timing OptimizationGamification (Ready for Activation)
These scripts are ready but need PM2 cron setup to activate
season-tracker.tsReadySeasonal competition tracking with leaderboards
fed-quests.tsReadyQuest and badge system for holder achievements
referral-bonus.tsReadyReferral rewards program for bringing new holders
Treasury Operations (Ready for PM2)
Advanced treasury management scripts ready for deployment
treasury-buyback.tsReadyTreasury buyback & burn - uses portion of fees to buy and burn $FED
smart-timing.tsReadyIntelligent distribution timing based on gas prices and volume
smart-distribution.tsReadyAI-powered distribution optimization
sybil-detector.tsReadyAnti-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.tsThe 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