AUTOMATION

Keeper lifecycle

The keeper turns time-based reward rules into bounded mainnet transactions. A minute-level dispatcher leases due projects, while background workers handle collection, swap, snapshot, commitment, and payout work.

Execution states

  1. Due.The configured interval has elapsed, the fee threshold is met, and no valid worker lease is active.
  2. Verify.Confirm mainnet genesis, program identity, project state, reward mint, keeper identity, vault ownership, and round sequence.
  3. Collect.Use the official bonding-curve or graduated Pump fee path and reconcile the amount received.
  4. Begin.Create the on-chain round before executing the swap so recovery always has a durable sequence and status.
  5. Swap.Request and validate a bounded Jupiter route, then record the exact reward-token output.
  6. Snapshot.Read finalized balances, consolidate duplicate token accounts, apply exclusions, and calculate eligible supply.
  7. Commit.Store the snapshot slot, holder count, total reward amount, and Merkle root against the existing round.
  8. Distribute.Submit bounded batches or service holder claims, using claim PDAs to prevent duplicates.

Retry and concurrency controls

ControlPurpose
Database leasePrevents two workers from processing the same project simultaneously
Round sequenceGives every collection and distribution a unique on-chain identity
Swap statusAllows a retry to recover output without repeating a completed swap
Claim PDAMakes every wallet entitlement idempotent
Bounded batch sizeKeeps transactions within compute, account, and execution limits
BackoffReleases failed leases without creating a tight retry loop
Keeper authority

The keeper is an operator, not a custodian. Program constraints determine which mints, vaults, routes, amounts, and round transitions are valid.

Netlify operating model

The scheduled function only finds and leases work. Background functions perform longer RPC and transaction tasks. High-volume projects can move the same state machine to a durable queue without changing the on-chain round or claim model.