Auto-Payroll is Remlo’s “OAuth for money” — an employer signs one on-chain transaction that authorizes a Remlo-controlled access key with a periodic spending cap, and Remlo runs payroll automatically every cycle until the key expires or is revoked. Built on Tempo’s TIP-1011 access keys (T3 upgrade, April 2026).Documentation Index
Fetch the complete documentation index at: https://docs.remlo.xyz/llms.txt
Use this file to discover all available pages before exploring further.
When to use it
Auto-Payroll fits employers who:- Run payroll on a fixed cadence (daily, weekly, bi-weekly).
- Don’t want to log in and sign every cycle.
- Have a stable employee roster (the cron uses the active KYC-approved roster at run time, so adds and removals propagate).
Limitations below) or whose roster changes wildly cycle-to-cycle.
How it works
The mechanism is a TIP-1011 access key. The key is a fresh secp256k1 keypair generated by Remlo at the moment of authorization. The employer signs anauthorizeKey(...) transaction at the Tempo AccountKeychain precompile (0xAAAA...) that says, in protocol terms:
“UntilThe chain enforces this. Remlo holds the private key (encrypted at rest) and uses it to sign each cycle’sexpiry, the key with public address0xACCESS_KEYmay spend at mostperPeriodAmountoftokenAddressperperiodSecondsfrom my treasury, but only by callingexecuteBatchPayroll(...)onPAYROLL_BATCHER_ADDRESS.”
executeBatchPayroll transaction. If a cycle would exceed the cap, the chain reverts.
API
All endpoints require Privy bearer auth as the employer owner.GET /api/employers/[id]/autopayroll
Lists the employer’s authorizations, newest first.
POST /api/employers/[id]/autopayroll
PATCH /api/employers/[id]/autopayroll/[authId]
State transitions:
{ action: 'confirm', authorizeTxHash }— flipdraft→activeafter on-chain confirmation{ action: 'pause' }/{ action: 'resume' }— toggle without touching chain{ action: 'revoke', revokeTxHash }— record the on-chain revoke tx
DELETE /api/employers/[id]/autopayroll/[authId]
Returns the calldata the employer signs to revoke. Server does not broadcast — the chain authority sits with the employer.
Cron handler
/api/cron/autopayroll-tick (vercel.json schedule: */15 * * * *).
Per active row whose last_run_at + period_seconds <= now:
- Pull employer + active KYC-approved roster.
- Build
(recipients[], amounts[], memos[], employerAccountId)forPayrollBatcher.executeBatchPayroll. - Decrypt access key, sign, broadcast.
- Record
last_run_status+last_run_tx_hash.
last_run_at BEFORE broadcasting so a concurrent tick sees the updated timestamp and skips.
Schema
autopayroll_authorizations table — see db/migrations/20260509g_autopayroll.sql. Status state machine: draft → active → paused/active → revoked|expired|failed.
The encrypted private key envelope:
UI
Employer dashboard at/dashboard/payroll/auto. Two-step compose flow (configure cap + period + duration → on-chain sign), authorization rows with pause / resume / revoke. Linked from /dashboard/payroll/new.
Limitations
- Fixed-window periods only. Tempo’s TIP-1011 supports
1 dayand1 week(any positiveuint64of seconds). Calendar-month periods land in a future T-upgrade. For monthly payroll, run weekly with 1/4 the amount, or wait for the upgrade. - Single token per authorization. A row authorizes spend on exactly one TIP-20. Multi-currency payroll needs multiple authorizations.
- Recipient set is implicit. The cron uses the employer’s active roster at run time. Adds/removes propagate without re-authorization. The on-chain restriction is on the
executeBatchPayrollselector + thePAYROLL_BATCHER_ADDRESStarget — recipients per call are whatever Remlo passes. - No multi-sig. The employer signs once with a single Privy-managed key. Multi-sig flows would require ERC-4337 / Safe-on-Tempo, neither of which is wired today.
Operator runbook
- Lost
AUTOPAYROLL_ENCRYPTION_KEY→ all encrypted access keys are dead-letter. The cron will fail on every active row. Operator should: mark all active rowsfailed, notify employers to revoke + re-create. No funds are lost (the chain still recognizes the access-key public address; the employer’s revoke is independent of Remlo’s encryption key). - Cron stops firing → check Vercel cron logs. Confirm
CRON_SECRETis set. Confirm rows havestatus='active'andlast_run_at + period_seconds <= now. - A specific row stuck at
failed→ the chain reverted the last cycle (cap exceeded, recipient blocked by TIP-403, contract paused). Inspectlast_run_error. The row stays infaileduntil operator pauses it manually or employer revokes + re-authorizes.
Security
- Access-key signing is server-only. The decrypted private key never crosses the network boundary.
- The chain enforces the cap. Remlo’s signing key cannot exceed the periodic limit even if compromised — the worst case is the per-period amount draining once.
- Revocation is employer-side. Remlo cannot revoke the employer’s access key (it doesn’t have admin rights — only the employer’s root key does).
See also
- Tempo network switching
- Server-side secrets — including
AUTOPAYROLL_ENCRYPTION_KEY - TIP-1011 spec at
docs.tempo.xyz/protocol/tips/tip-1011