Skip to content

Latest commit

 

History

History
5 lines (3 loc) · 494 Bytes

Account_Existence_Check_for_low_level_calls.md

File metadata and controls

5 lines (3 loc) · 494 Bytes

As written in the solidity documentation, the low-level functions call, delegatecall and staticcall return true as their first return value if the account called is non-existent, as part of the design of the EVM. Account existence must be checked prior to calling if needed.

Remediation

Check before any low-level call that the address actually exists, for example before the low level call in the callERC20 function you can check that the address is a contract by checking its code size.