Skip to main content

Remit Caller Workflow

Goal

A caller runs the permissionless remit() function to process due subscription payments and earn caller fees in the subscription's ERC-20 token.

Who is involved

RoleWhat they do
CallerAny wallet — pays gas and receives caller fee payouts
Your botChecks readiness, prepares remit txs, signs, and broadcasts in a loop
Clocktower APIScans the due queue and returns unsigned remit() calldata

Steps

  1. Check remit readiness — scan how many subscriptions are due and whether remit() can run now.
  2. Prepare remit — get unsigned remit() calldata plus gas estimates.
  3. Sign & broadcast — caller wallet signs and your bot sends to the chain in unsignedTransactions[].chainId.
  4. Repeat — one remit() clears at most maxRemits payments; loop until the backlog is caught up.

The caller pays gas for every broadcast (unlike the protocol's operator cron).

Flow diagram

Calls by surface

StepRESTMCP toolSDK
1. ReadinessPOST /check_remit_readinesscheck_remit_readinesscheckRemitReadiness() (also runs inside remit() by default)
2. PreparePOST /prepare/remitprepare_remitremit() — scans unless { skipReadiness: true }
3–4. LoopRepeat until caught upSamerunRemitUntilCaughtUp()

Tips

  • Large backlogs may need multiple broadcasts — check gasSummary.backlogMultiplier in prepare responses.
  • Use get_subscriptions_due / getSubscriptionsDue() for a lightweight single-day read without preparing a transaction.
  • On REST, pass ?chainId= so readiness, prepare, and status poll the same chain. On MCP, pass the same chainId on those tools (omitted uses Base).