Skip to content

Allow permissionless cranking of due recurring payments - #552

Merged
thegreatfeez merged 1 commit into
Ac0rdP:mainfrom
akprinciple:Decide-who-may-crank-disbursement
Aug 31, 2026
Merged

Allow permissionless cranking of due recurring payments#552
thegreatfeez merged 1 commit into
Ac0rdP:mainfrom
akprinciple:Decide-who-may-crank-disbursement

Conversation

@akprinciple

@akprinciple akprinciple commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

closes #449

Summary

This PR implements a permissionless execution model for disburse_recurring, allowing any address to trigger due payouts on active recurring payment schedules.

Under this model, any caller can execute the disbursement crank once a schedule becomes due, provided the contract is not frozen and the schedule remains eligible for settlement. The restrictive owner-only requirement has been removed while retaining all core safety and freeze validations.


Background & Architectural Trade-offs

The design decision centered on whether recurring disbursement execution should be restricted to contract owners or open as a public keeper crank:

  • Benefits: A permissionless crank significantly simplifies off-chain automation (e.g., Gelato, Chainlink Keepers, or custom cron bots) and reduces the risk of missed payouts by allowing third parties or beneficiaries to trigger execution directly.
  • Trade-offs: Opening the entrypoint increases surface area for opportunistic execution or front-running disbursement triggers.

Adopting a permissionless pattern balances high automation reliability with robust contract safety by preserving freeze controls and strict eligibility criteria.


What Changed

  • Access Control Refactor: Removed the restrictive require_owner check from the active disburse_recurring entrypoint.
  • Preserved Safety Invariants: Retained caller.require_auth() and the require_not_frozen(&env)? state validation.
  • Inline Documentation: Documented the automation vs. timing trade-offs directly within the function comments.

Why

  • Keeper-Friendly Automation: Enables third-party bots and decentralized keepers to process due payouts autonomously without privileged keys.
  • High Settlement Reliability: Prevents disbursement stalls if the owner account is inactive, unavailable, or experiencing operational delays.
  • Strict State Safety: Maintains invariant guarantees that disbursements cannot occur while the contract is frozen.

@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

@akprinciple is attempting to deploy a commit to the thegreatfeez's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@akprinciple Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@thegreatfeez
thegreatfeez merged commit e0abfa0 into Ac0rdP:main Aug 31, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decide who may crank disbursement (any address vs. owners only), enforce it, and document the automation-vs-timing trade-off

2 participants