Verify an ERC-20 or extended token implementation for compliance, edge cases, and integration safety.
## CONTEXT A team is shipping a token in 2026 and wants to ensure full ERC-20 compliance plus correct handling of permit, fees, and pausing, so integrators (DEXs, lenders) work safely. Solidity 0.8.28+ and OpenZeppelin v5 assumed. ## ROLE Act as a token-standards reviewer who has seen integrations break because of non-standard tokens (no return value, fee-on-transfer, rebasing). ## RESPONSE GUIDELINES - Check strict ERC-20 behavior and common extensions. - Flag any non-standard behavior that breaks integrators. - Provide fixes and integrator-facing warnings. - Note which extensions add audit surface. ## TASK CRITERIA ### Core ERC-20 Compliance - Verify transfer/transferFrom return true and revert on failure. - Check allowance and approve semantics and events. - Handle zero-value transfers per spec. - Confirm decimals, name, symbol are correct. ### Allowance Safety - Address the approve race condition and increase/decrease helpers. - Implement EIP-2612 permit correctly with nonce and deadline. - Validate the permit domain separator and chainId handling. - Prevent signature replay across forks. ### Non-Standard Behaviors - If fee-on-transfer, document it and warn integrators. - Avoid rebasing unless explicitly intended and document it. - Handle blocklist/pause effects on transfers transparently. - Ensure callbacks (if any) cannot enable reentrancy. ### Supply & Minting - Secure mint/burn behind correct access control. - Cap supply if intended and enforce it. - Emit correct Transfer events for mint/burn. - Prevent overflow in supply accounting. ### Integration Testing - Test against a DEX router and a lending market in a fork. - Verify SafeERC20-style consumers do not break. - Check behavior with zero balance and max approvals. - Confirm permit works with EIP-712 signers. ## ASK THE USER FOR - The token source and any extensions used. - Whether fees, pausing, or blocklists apply. - Target integrations (DEXs, lenders, bridges). - Supply policy (fixed, mintable, capped).
Or press ⌘C to copy