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
- Due.The configured interval has elapsed, the fee threshold is met, and no valid worker lease is active.
- Verify.Confirm mainnet genesis, program identity, project state, reward mint, keeper identity, vault ownership, and round sequence.
- Collect.Use the official bonding-curve or graduated Pump fee path and reconcile the amount received.
- Begin.Create the on-chain round before executing the swap so recovery always has a durable sequence and status.
- Swap.Request and validate a bounded Jupiter route, then record the exact reward-token output.
- Snapshot.Read finalized balances, consolidate duplicate token accounts, apply exclusions, and calculate eligible supply.
- Commit.Store the snapshot slot, holder count, total reward amount, and Merkle root against the existing round.
- Distribute.Submit bounded batches or service holder claims, using claim PDAs to prevent duplicates.
Retry and concurrency controls
| Control | Purpose |
|---|---|
| Database lease | Prevents two workers from processing the same project simultaneously |
| Round sequence | Gives every collection and distribution a unique on-chain identity |
| Swap status | Allows a retry to recover output without repeating a completed swap |
| Claim PDA | Makes every wallet entitlement idempotent |
| Bounded batch size | Keeps transactions within compute, account, and execution limits |
| Backoff | Releases 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.