🧐 Motivation
Add ERC20 extension with configurable approval caps and expiring allowances
📝 Details
The current ERC20 implementation allows unlimited, non-expiring approvals. This has been a vector for token drains in DeFi. While ERC20Permit (ERC-2612) addresses expiry via off-chain signatures, it requires EIP-712 infrastructure not available in simpler applications, and does not address approval caps. We propose an abstract extension ERC20SafeApproval that enforces both on-chain.
🧐 Motivation
Add ERC20 extension with configurable approval caps and expiring allowances
📝 Details
The current ERC20 implementation allows unlimited, non-expiring approvals. This has been a vector for token drains in DeFi. While ERC20Permit (ERC-2612) addresses expiry via off-chain signatures, it requires EIP-712 infrastructure not available in simpler applications, and does not address approval caps. We propose an abstract extension ERC20SafeApproval that enforces both on-chain.