Skip to content

[Airdrop P0] 3-day test run on mainnet #892

@realproject7

Description

@realproject7

Parent: #877
Depends on: #878, #879, #880, #881, #882, #883, #884, #885, #886, #887, #888, #889, #890, #891

Scope

End-to-end test of the full airdrop pipeline on mainnet with a tiny pool (10 PLOT, 3 days).

Setup

Parameter Test Value Production Value
Pool 10 PLOT 50,000 PLOT
Duration 3 days 6 months
Bronze target $7,000 (current mcap) $1M
Silver target $10,000 $10M
Gold target $50,000 $70M
Env var NEXT_PUBLIC_AIRDROP_MODE=test NEXT_PUBLIC_AIRDROP_MODE=prod

Bronze at current mcap guarantees the claim flow can be tested.

Test Plan

Day 0 — Setup

  1. Set NEXT_PUBLIC_AIRDROP_MODE=test in Vercel env
  2. Deploy Phases 1-4 code
  3. Lock 10 PLOT via Mint Club Locker (3-day unlock time)
  4. Verify /airdrop page loads with test config (3-day timer, $7K Bronze target)

Day 1 — Point Accumulation

  1. SIWE check-in → verify streak = 1 (no boost yet)
  2. Buy a story token with P7 wallet → verify buy points appear
  3. Generate referral code (test both nanoid and Farcaster username option) → open referral link in a second wallet → buy a token → verify referrer gets 20% points
  4. Test manual referral input: third wallet connects without ref link → sets referrer via "Who referred you?" input → verify future buys generate referral points (not past ones)
  5. Publish a storyline → verify 50 PL write points
  6. Rate a story → verify 5 PL rate points
  7. Try check-in again within 30 min → should be rejected
  8. Test story sharing: share a story → verify shared URL contains ?ref=CODE → open in another browser → verify ref is captured in localStorage
  9. Verify daily price snapshot cron ran and pl_daily_prices has an entry

Day 2 — Monitoring

  1. SIWE check-in → verify streak = 2
  2. Verify points continue accumulating from new buys
  3. Check referral relationship persists (second wallet buys again → referrer gets more points)
  4. Verify anti-gaming: rate same story twice (should be rejected), exceed 10 ratings/day (should cap)
  5. Manually trigger weekly snapshot cron → verify pl_weekly_snapshots entry
  6. (Optional) Manually set streak to 7 in DB → buy a token → verify +5% boost applied to points

Day 3 — Campaign End & Claim

  1. Wait for campaign end timestamp
  2. Verify point accumulation stops (new buys after end don't generate points)
  3. Run finalize script: compute TWAP → determine milestone → generate Merkle tree
  4. Unlock 10 PLOT from Mint Club Locker
  5. Deploy MerkleClaim contract with earned portion
  6. Send burn portion to dead address
  7. Test claim flow: connect wallet on /airdrop → click Claim → verify PLOT received
  8. Verify claimed status displays correctly

After Test

DELETE FROM pl_points;
DELETE FROM pl_referrals;
DELETE FROM pl_referral_codes;
DELETE FROM pl_streaks;
DELETE FROM pl_daily_prices;
DELETE FROM pl_weekly_snapshots;

Acceptance Criteria

  • All point-earning actions work (buy, referral, write, rate)
  • Streak check-in works (increment, reject duplicate, boost applied)
  • Referral system works (code gen, URL capture, manual input, story share)
  • Leaderboard + weekly snapshots display correctly
  • Campaign end freezes point accumulation
  • Finalize script computes TWAP + milestone correctly
  • MerkleClaim contract deploys and distributes correctly
  • Burn tx succeeds
  • Claim flow works end-to-end on /airdrop
  • Test data wiped cleanly

Metadata

Metadata

Assignees

No one assigned

    Labels

    airdropPLOT 10x Airdrop CampaignoperatorRequires manual operator action

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions