Skip to content

Harden RefundProtocol refund accounting and token transfers - #48

Open
kutluhaneth46 wants to merge 2 commits into
circlefin:masterfrom
kutluhaneth46:cursor/fix-refund-protocol-hardening-88c1
Open

Harden RefundProtocol refund accounting and token transfers#48
kutluhaneth46 wants to merge 2 commits into
circlefin:masterfrom
kutluhaneth46:cursor/fix-refund-protocol-hardening-88c1

Conversation

@kutluhaneth46

Copy link
Copy Markdown

Summary

  • reject refunds after a payment has been fully withdrawn and refund only the remaining amount after partial withdrawal
  • use SafeERC20 for all token transfers
  • retain releaseTimestamp for compatibility while documenting intentional immediate withdrawal behavior
  • add focused Foundry regression coverage for recipient and arbiter refunds, partial refunds, and false-returning tokens

Testing

  • forge test -vvv (4 passed)

Fixes #40

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.

RefundProtocol.sol: robustness & correctness hardening (dead releaseTimestamp, refund-after-withdraw double-pay, unchecked ERC20 returns)

1 participant