Are there any bugs in the AnyswapV4ERC20.sol?
- 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.