Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

Latest commit

 

History

History
31 lines (14 loc) · 1 KB

047.md

File metadata and controls

31 lines (14 loc) · 1 KB

Bnke0x0

low

REQUIRE MESSAGES ARE TOO SHORT AND UNCLEAR

Summary

Vulnerability Detail

Impact

The correct and clear error description explains to the user why the function reverts, but the error descriptions below in the project are not self-explanatory. These error descriptions are very important in the debug features of DApps like Tenderly. Error definitions should be added to the require block, not exceeding 32 bytes.

Code Snippet

https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/vendor/WETH9.sol#L39 => 'require(balanceOf[msg.sender] >= wad);'

https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/vendor/WETH9.sol#L63 => 'require(balanceOf[src] >= wad);'

https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/vendor/WETH9.sol#L66 => 'require(allowance[src][msg.sender] >= wad);'

Tool used

Manual Review

Recommendation