Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are there any bugs in the AnyswapV4ERC20.sol? #104

Open
xuebingqing opened this issue Nov 8, 2023 · 0 comments
Open

Are there any bugs in the AnyswapV4ERC20.sol? #104

xuebingqing opened this issue Nov 8, 2023 · 0 comments

Comments

@xuebingqing
Copy link

Description

When we recently used the fuzz testing tool, we scanned the contract AnyswapV4ERC20.sol. We found some issues and wanted to confirm with you.

    function depositWithPermit(address target, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s, address to) external returns (uint) {
        IERC20(underlying).permit(target, address(this), value, deadline, v, r, s);
        IERC20(underlying).safeTransferFrom(target, address(this), value);
        return _deposit(value, to);
    }

WETH does not implement the permit function specified by ERC20 and implements the fallback function. At the same time, the permit function has no return value, so no error will be reported when calling WETH's permit function. If the underlying address is the address of the WETH contract, will there be such a problem?

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

No branches or pull requests

1 participant