feat: RecurringPaymentHook – ERC-8191 × ERC-8183 subscription integration#4
feat: RecurringPaymentHook – ERC-8191 × ERC-8183 subscription integration#4chasseurmic wants to merge 1 commit intoerc-8183:mainfrom
Conversation
|
Great work — the trust model is exactly right. Reading subscription status live at _preFund rather than caching it is the correct call; stale state would be a silent security issue. On _postComplete/_postReject: these map cleanly to our afterSettle pattern in pot-x402. The events give off-chain verification services (like ThoughtProof) the hook they need to report outcomes back to reputation systems after settlement — without being able to block the on-chain flow. One thought on the trust model: the hook currently trusts the SubscriptionManager address at deploy time. For long-lived subscriptions it might be worth considering whether the SubscriptionManager address should be upgradeable or locked — a compromised oracle at that address could unilaterally gate or ungate all jobs. We're building complementary infrastructure — if useful we'd be happy to add a ThoughtProofVerificationHook example to this repo that shows how off-chain reasoning verification feeds back into the ACP lifecycle alongside your subscription gating. |
|
Thanks for the RecurringPaymentHook! I see you're proposing ERC-8191 as a companion standard for on-chain recurring payments. Architecture question for open standard alignment: We can extract ISubscription interface and have ERC 8191 as the reference implementation |
|
+1 on decoupling. From our experience implementing ThoughtProofReasoningHook, keeping the interface narrow and the standard dependency loose makes hooks much easier to maintain. A minimal ISubscription capability interface sounds right." |
What this hook does
RecurringPaymentHook bridges ERC-8183 agentic jobs with ERC-8191 onchain
recurring payment subscriptions, enabling subscription-gated pricing and
access control in the ACP job lifecycle.
Use case
Agents offering tiered, subscription-based services need to:
Profile
B — Advanced Escrow: multi-phase flow, maintains job↔subscription state,
integrates an external ERC standard (ERC-8191).
Hook callbacks used
_preSetBudgetsubscriberMinBudget, othersnonSubscriberMinBudget_preFund_postFund_postCompleteJobCompletedForSubscriberfor off-chain services_postRejectJobRejectedForSubscriberfor dunning / retry logicTrust assumptions
registerSubscriptionvalidates that caller is the subscriber and merchant matches_postComplete/_postRejectare informational only, no external state-changing callsRelated
cc
@psmiratisu — this implements the subscription-gated pricing flow you sketched
in the ERC-8183 Ethereum Magicians thread (check subscription status at
setBudget/fundfor tiered pricing).@ThoughtProof — the
_postReject/_postCompleteevents are designed tofeed the same kind of off-chain continuation logic you described with
beforeSettlein pot-x402. Would love your thoughts on the trust model.