Copy
Ask AI
1. Check/init reward state
2. Skip if no fees
3. Scan holders on-chain
4. Register new holders (2/tx)
5. Update all holders (4/tx)
6. Claim from Meteora
7. Deposit 81.25% to vault
8. Transfer 18.75% to treasury
Update all holders before depositing. Deposit changes reward-per-share — stale data means wrong distribution.
CLI
Copy
Ask AI
node crank.js # All pools, once
node crank.js --loop --interval 60 # Loop
node crank.js --mint <address> # One token

