connext / connext/chaindata

Are there any bugs in the AnyswapV4ERC20.sol?

Open
#104 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Solidity
Stars
166
Forks
175
PR merge metrics
No merged PRs in 30d

Description

## 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.
```sol
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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.