feat: add use-refund-protocol skill#32
Open
erhnysr wants to merge 1 commit into
Open
Conversation
Adds a new skill for integrating the Circle Refund Protocol on Arc — a non-custodial escrow system for USDC payment disputes and chargebacks. Covers: - Full payment lifecycle: pay(), withdraw(), refundByRecipient(), refundByArbiter(), earlyWithdrawByArbiter() - Arbiter setup: setLockupSeconds(), depositArbiterFunds(), settleDebt() - 8 implementation patterns with TypeScript (viem/wagmi) + Solidity signatures - 7 antipatterns (AP1–AP7) including the known earlyWithdrawByArbiter drain vulnerability, documented with an explicit security warning - Decision guide, use cases (merchant, gig economy, agent-validated escrow), and alternatives
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new skill for integrating the Circle Refund Protocol — a non-custodial escrow system for USDC payment disputes and chargebacks on Arc.
What's included
pay(),withdraw(), all three refund paths (refundByRecipient,refundByArbiter,earlyWithdrawByArbiter),updateRefundTo, and debt settlementearlyWithdrawByArbiterdrain vulnerability documented in the refund-protocol READMEuse-gateway,bridge-stablecoin, and direct transfer when escrow isn't neededSecurity note
The
earlyWithdrawByArbitervulnerability acknowledged in the circlefin/refund-protocol README is documented in both the skill body (Refund Path C section) and Antipattern AP7, with an explicit warning not to use it in production until Circle publishes a fix.Related
use-refund-protocol#11