permit2 icon indicating copy to clipboard operation
permit2 copied to clipboard

Skip timestamp check when deadline/expiration is set to maximum amount

Open doublespending opened this issue 2 years ago • 0 comments

In order for Permit2 to comply with ERC-4337 validation rules and support account abstraction, certain commonly used operations such as checking the current timestamp cannot be run in function calls.

When permit2 is called with a deadline/expiration with the maximum value possible, this PR interprets that as having no expiry, so the timestamp check is skipped and the operation is compliant with ERC-4337.

For example, this can make user using permit2 to prefund paymaster possible in ERC-4337 validation.

Similar approach has been applied by the permit of USDC.

doublespending avatar Feb 02 '24 05:02 doublespending