Skip to content

Conversation

@adamgall
Copy link
Collaborator

Fixes #28

The permit() function was missing zero address validation for the spender parameter, allowing gasless approvals to the zero address which violates the ERC-20 standard and EIP-2612 best practices.

This fix adds spender validation at the beginning of permit(), ensuring consistency with the approve() function and preventing invalid permits.

The permit() function was missing zero address validation for the spender
parameter, allowing gasless approvals to the zero address which violates the
ERC-20 standard and EIP-2612 best practices.

This fix adds spender validation at the beginning of permit(), ensuring
consistency with the approve() function and preventing invalid permits.
@mudgen
Copy link
Contributor

mudgen commented Oct 21, 2025

Thanks for your help with this!

@mudgen mudgen merged commit a30a790 into Perfect-Abstractions:main Oct 21, 2025
@adamgall adamgall deleted the fix/permit-validation branch October 21, 2025 17:55
JackieXu pushed a commit to JackieXu/Compose that referenced this pull request Nov 6, 2025
…alidation

Fix: Missing zero address validation in permit()
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.

ERC20Facet: permit() allows zero address spender

2 participants