echidna icon indicating copy to clipboard operation
echidna copied to clipboard

Symbolic execution PoC

Open arcz opened this issue 2 years ago • 0 comments
trafficstars

A quick PoC that breaks this contract (included in tests):

contract VulnerableContract {
   function func_one(int256 x) public pure {
     if (x / 4 == -20) {
       assert(false); // BUG
     }
   }

   function func_two(int128 x) public payable {
     if ((msg.value >> 30) / 7 == 2) {
       assert(false); // BUG
     }
   }
}

Screenshot 2023-04-19 at 00 21 49

Non-nix tests fail because I need to figure out how to install solvers :p

arcz avatar Apr 18 '23 01:04 arcz