Skip to content

Airdrop: post-campaign runbook & automation gaps #1010

@realproject7

Description

@realproject7

Context

The airdrop campaign has automated point accrual, price recording, and a claim UI — but the post-campaign resolution requires ~5 manual steps in sequence with no documentation or safety checks.

Post-Campaign Runbook (current state)

After CAMPAIGN_END passes:

Step 1: Run finalization script

npx tsx scripts/airdrop-finalize.ts
  • Computes 7-day TWAP FDV from pl_daily_prices
  • Determines highest reached milestone tier
  • Calculates per-address distribution (points-proportional, largest-remainder)
  • Generates Merkle tree + per-address proofs
  • Writes to scripts/airdrop-proofs.json + pl_airdrop_proofs DB table

Step 2: Unlock PLOT from Mint Club Locker

  • Manual tx on Base to unlock from Locker contract (0xA3dCf3Ca587D9929d540868c924f208726DC9aB6)
  • Locker ID: stored in AIRDROP_CONFIG.LOCKER_ID
  • Requires unlock time to have passed

Step 3: Deploy MerkleClaim.sol

  • Deploy with: PLOT token address + Merkle root from Step 1
  • Verify contract on Basescan

Step 4: Transfer PLOT to claim contract

  • Send the distributed amount (pool × milestone pct) to the MerkleClaim contract address
  • UI auto-switches to <ClaimPanel/> — users can now claim

Step 5: Burn remaining PLOT

  • Calculate: poolAmount × (1 - pct/100)
  • Send to dead address (0x000...dead)
  • If no milestone reached: burn 100%

Gaps / Missing automation

  1. No runbook doc — these steps exist only in code comments and tribal knowledge
  2. Burn not automated — finalization script calculates burn amount but doesn't execute
  3. No contract deployment script — manual Foundry/Hardhat deploy
  4. No emergency stop — no way to pause or terminate campaign early
  5. No unclaimed token handling — no sweep deadline for unclaimed PLOT after claim period
  6. No post-deploy verification — no script to verify claim contract has correct balance + root
  7. No alerts — no notification when campaign ends or when finalization should run

Acceptance Criteria

  • Document the full runbook in docs/ (step-by-step with exact commands and addresses)
  • Add pre-flight checks to finalization script (campaign ended? enough price data for TWAP? locker unlockable?)
  • Consider: automate burn tx in finalization script
  • Consider: add deploy script for MerkleClaim.sol
  • Consider: add unclaimed token sweep mechanism with deadline

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/T3Assigned to T3 builder agent

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions