Skip to content

Instantly share code, notes, and snippets.

@rocky
Last active June 12, 2018 09:30
Show Gist options
  • Save rocky/a1305fb62b618d8d03d18bb1882c490d to your computer and use it in GitHub Desktop.
Save rocky/a1305fb62b618d8d03d18bb1882c490d to your computer and use it in GitHub Desktop.
vmyth -v 1 -x coe.sol
22:07:33 INFO Analyzing contract coe.sol:Target
22:07:33 INFO LASER EVM initialized with dynamic loader: None
22:07:33 INFO - Entering function Target:unknown
22:07:33 INFO - Entering function Target:unknown
22:07:40 INFO - Entering function Target:unknown
22:07:41 INFO - Entering function Target:unknown
22:07:41 INFO - Entering function Target:unknown
22:07:41 INFO - Entering function Target:unknown
22:07:41 INFO - Entering function Target:unknown
22:07:41 INFO - Entering function Target:unknown
22:07:41 INFO - Entering function Target:unknown
22:07:41 INFO - Entering function Target:unknown
22:07:41 INFO - Entering function Target:unknown
22:07:41 INFO - Entering function Target:unknown
22:07:42 INFO - Entering function Target:unknown
22:07:42 INFO - Entering function Target:unknown
22:07:42 INFO - Entering function Target:unknown
22:07:42 INFO - Entering function Target:unknown
22:07:42 INFO - Entering function Target:unknown
22:07:42 INFO - Entering function Target:unknown
22:07:42 INFO - Entering function Target:unknown
22:07:55 INFO - Entering function Target:unknown
22:07:56 INFO - Entering function Target:unknown
22:07:56 INFO - Entering function Target:unknown
22:07:56 INFO - Entering function Target:unknown
22:07:57 INFO - Entering function Target:unknown
22:07:57 INFO - Entering function Target:unknown
22:07:58 INFO - Entering function Target:unknown
22:07:58 INFO - Entering function Target:unknown
22:07:58 INFO - Entering function Target:unknown
22:07:58 INFO - Entering function Target:unknown
22:07:59 INFO - Entering function Target:unknown
22:07:59 INFO - Entering function Target:unknown
22:08:01 INFO Execution complete
22:08:01 INFO 927 nodes, 926 edges, 13551 total states
22:08:01 INFO Starting analysis
22:08:01 INFO Executing delegatecall
22:08:01 INFO Executing dependence_on_predictable_vars
22:08:01 INFO Executing deprecated_ops
22:08:01 INFO Executing ether_send
22:08:01 INFO Executing exceptions
22:08:01 INFO Executing external_calls
22:08:01 INFO Executing integer
22:08:01 INFO Executing module: INTEGER on 746 states
22:10:42 INFO Executing multiple_sends
22:10:42 INFO Executing suicide
22:10:42 INFO Executing transaction_order_independence
22:10:42 INFO Executing unchecked_retval
==== Integer Overflow ====
Type: Warning
Contract: Unknown
Function name: transfer(address,uint256)
PC address: 2551
A possible integer overflow exists in the function `transfer(address,uint256)`.
The addition or multiplication may result in a value higher than the maximum representable integer.
--------------------
In file: coe.sol:316
a + b
--------------------
==== Integer Overflow ====
Type: Warning
Contract: Unknown
Function name: setTokenAndRate(uint256,uint256)
PC address: 4191
A possible integer overflow exists in the function `setTokenAndRate(uint256,uint256)`.
The addition or multiplication may result in a value higher than the maximum representable integer.
--------------------
In file: coe.sol:271
maxTier++
--------------------
10:10:44 [issue-203-refactor-analysis+] vagrant@mythril-bionic:~/github/mythril/tests/testdata/benchmark [3,0,b] 0
$ !!
myth -v 1 -x coe.sol
22:19:23 INFO Analyzing contract coe.sol:Target
22:19:23 INFO LASER EVM initialized with dynamic loader: None
22:19:24 INFO - Entering function Target:unknown
22:19:24 INFO - Entering function Target:unknown
22:19:30 INFO - Entering function Target:unknown
22:19:30 INFO - Entering function Target:unknown
22:19:30 INFO - Entering function Target:unknown
22:19:30 INFO - Entering function Target:unknown
22:19:31 INFO - Entering function Target:unknown
22:19:31 INFO - Entering function Target:unknown
22:19:31 INFO - Entering function Target:unknown
22:19:31 INFO - Entering function Target:unknown
22:19:31 INFO - Entering function Target:unknown
22:19:31 INFO - Entering function Target:unknown
22:19:31 INFO - Entering function Target:unknown
22:19:31 INFO - Entering function Target:unknown
22:19:31 INFO - Entering function Target:unknown
22:19:32 INFO - Entering function Target:unknown
22:19:32 INFO - Entering function Target:unknown
22:19:32 INFO - Entering function Target:unknown
22:19:32 INFO - Entering function Target:unknown
22:19:40 INFO - Entering function Target:unknown
22:19:41 INFO - Entering function Target:unknown
22:19:41 INFO - Entering function Target:unknown
22:19:41 INFO - Entering function Target:unknown
22:19:41 INFO - Entering function Target:unknown
22:19:41 INFO - Entering function Target:unknown
22:19:42 INFO - Entering function Target:unknown
22:19:42 INFO - Entering function Target:unknown
22:19:42 INFO - Entering function Target:unknown
22:19:42 INFO - Entering function Target:unknown
22:19:42 INFO - Entering function Target:unknown
22:19:42 INFO - Entering function Target:unknown
22:19:43 INFO Execution complete
22:19:43 INFO 927 nodes, 926 edges, 13551 total states
22:19:43 INFO Starting analysis
22:19:43 INFO Executing delegatecall
22:19:43 INFO Executing dependence_on_predictable_vars
22:19:44 INFO Executing deprecated_ops
22:19:44 INFO Executing ether_send
22:19:44 INFO Executing exceptions
22:19:57 INFO Executing external_calls
22:19:57 INFO [EXTERNAL_CALLS] Call to: Concat(0, Extract(167, 8, storage_4)), value = storage_14, gas = 2300*If(storage_14 == 0, 1, 0)
22:19:57 INFO [EXTERNAL_CALLS] Call to: Concat(0, Extract(159, 0, calldata_Target_4)), value = 0, gas = gas
22:19:57 INFO [EXTERNAL_CALLS] Call to: Concat(0, Extract(159, 0, calldata_Target_4)), value = calldata_Target_32 + 4, gas = 2300*If(calldata_Target_32 + 4 == 0, 1, 0)
22:19:57 INFO Executing integer
22:19:57 INFO Executing module: INTEGER on 746 states
22:22:37 INFO Executing multiple_sends
22:22:37 INFO Executing suicide
22:22:37 INFO Executing transaction_order_independence
22:22:37 INFO Executing unchecked_retval
==== Integer Overflow ====
Type: Warning
Contract: Unknown
Function name: transfer(address,uint256)
PC address: 2551
A possible integer overflow exists in the function `transfer(address,uint256)`.
The addition or multiplication may result in a value higher than the maximum representable integer.
--------------------
In file: coe.sol:316
a + b
--------------------
==== Transaction order dependence ====
Type: Warning
Contract: Unknown
Function name: withdrawDevFees()
PC address: 3799
A possible transaction order independence vulnerability exists in function withdrawDevFees(). The value or direction of the call statement is determined from a tainted storage location
--------------------
In file: coe.sol:214
devFeesAddr.transfer(devFees)
--------------------
==== Integer Overflow ====
Type: Warning
Contract: Unknown
Function name: setTokenAndRate(uint256,uint256)
PC address: 4191
A possible integer overflow exists in the function `setTokenAndRate(uint256,uint256)`.
The addition or multiplication may result in a value higher than the maximum representable integer.
--------------------
In file: coe.sol:271
maxTier++
--------------------
==== Exception state ====
Type: Informational
Contract: Unknown
Function name: setTokenAndRate(uint256,uint256)
PC address: 4213
A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking.
--------------------
In file: coe.sol:272
tierTokens[maxTier]
--------------------
==== Exception state ====
Type: Informational
Contract: Unknown
Function name: setTokenAndRate(uint256,uint256)
PC address: 4245
A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking.
--------------------
In file: coe.sol:273
costPerToken[maxTier]
--------------------
==== Message call to external contract ====
Type: Warning
Contract: Unknown
Function name: handleTokensFromOtherContracts(address,address,uint256)
PC address: 4589
This contract executes a message call to an address provided as a function argument. Generally, it is not recommended to call user-supplied addresses using Solidity's call() construct. Note that attackers might leverage reentrancy attacks to exploit race conditions or manipulate this contract's state.
--------------------
In file: coe.sol:256
t.transfer(_recipient, _tokens)
--------------------
==== Exception state ====
Type: Informational
Contract: Unknown
Function name: balanceInTier()
PC address: 7788
A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking.
--------------------
In file: coe.sol:186
tierTokens[tierLevel]
--------------------
-- mode: compilation; default-directory: "~/github/mythril/tests/testdata/benchmark/" --
Compilation started at Sun Jun 10 09:32:47
myth -v 1 -x coe.sol
09:32:48 INFO Analyzing contract coe.sol:Target
09:32:48 INFO LASER EVM initialized with dynamic loader: None
09:32:49 INFO - Entering function Target:unknown
09:32:49 INFO - Entering function Target:unknown
09:32:54 INFO - Entering function Target:unknown
09:32:54 INFO - Entering function Target:unknown
09:32:55 INFO - Entering function Target:unknown
09:32:55 INFO - Entering function Target:unknown
09:32:55 INFO - Entering function Target:unknown
09:32:55 INFO - Entering function Target:unknown
09:32:55 INFO - Entering function Target:unknown
09:32:55 INFO - Entering function Target:unknown
09:32:55 INFO - Entering function Target:unknown
09:32:55 INFO - Entering function Target:unknown
09:32:55 INFO - Entering function Target:unknown
09:32:56 INFO - Entering function Target:unknown
09:32:56 INFO - Entering function Target:unknown
09:32:56 INFO - Entering function Target:unknown
09:32:56 INFO - Entering function Target:unknown
09:32:56 INFO - Entering function Target:unknown
09:32:56 INFO - Entering function Target:unknown
09:33:03 INFO - Entering function Target:unknown
09:33:04 INFO - Entering function Target:unknown
09:33:04 INFO - Entering function Target:unknown
09:33:04 INFO - Entering function Target:unknown
09:33:04 INFO - Entering function Target:unknown
09:33:04 INFO - Entering function Target:unknown
09:33:05 INFO - Entering function Target:unknown
09:33:05 INFO - Entering function Target:unknown
09:33:05 INFO - Entering function Target:unknown
09:33:05 INFO - Entering function Target:unknown
09:33:05 INFO - Entering function Target:unknown
09:33:05 INFO - Entering function Target:unknown
09:33:06 INFO Execution complete
09:33:06 INFO 927 nodes, 926 edges, 13551 total states
09:33:06 INFO Starting analysis
09:33:06 INFO Executing <module 'delegatecall' from '/home/vagrant/github/mythril/mythril/analysis/modules/delegatecall.py'>
09:33:06 INFO Executing <module 'dependence_on_predictable_vars' from '/home/vagrant/github/mythril/mythril/analysis/modules/dependence_on_predictable_vars.py'>
09:33:07 INFO Executing <module 'deprecated_ops' from '/home/vagrant/github/mythril/mythril/analysis/modules/deprecated_ops.py'>
09:33:07 INFO Executing <module 'ether_send' from '/home/vagrant/github/mythril/mythril/analysis/modules/ether_send.py'>
09:33:07 INFO Executing <module 'exceptions' from '/home/vagrant/github/mythril/mythril/analysis/modules/exceptions.py'>
09:33:20 INFO Executing <module 'external_calls' from '/home/vagrant/github/mythril/mythril/analysis/modules/external_calls.py'>
09:33:20 INFO [EXTERNAL_CALLS] Call to: Concat(0, Extract(167, 8, storage_4)), value = storage_14, gas = 2300*If(storage_14 == 0, 1, 0)
09:33:20 INFO [EXTERNAL_CALLS] Call to: Concat(0, Extract(159, 0, calldata_Target_4)), value = 0, gas = gas
09:33:20 INFO [EXTERNAL_CALLS] Call to: Concat(0, Extract(159, 0, calldata_Target_4)), value = calldata_Target_32 + 4, gas = 2300*If(calldata_Target_32 + 4 == 0, 1, 0)
09:33:20 INFO Executing <module 'integer' from '/home/vagrant/github/mythril/mythril/analysis/modules/integer.py'>
09:36:45 INFO Executing <module 'multiple_sends' from '/home/vagrant/github/mythril/mythril/analysis/modules/multiple_sends.py'>
09:36:45 INFO Executing <module 'suicide' from '/home/vagrant/github/mythril/mythril/analysis/modules/suicide.py'>
09:36:45 INFO Executing <module 'transaction_order_independence' from '/home/vagrant/github/mythril/mythril/analysis/modules/transaction_order_independence.py'>
09:36:45 INFO Executing <module 'unchecked_retval' from '/home/vagrant/github/mythril/mythril/analysis/modules/unchecked_retval.py'>
==== Integer Overflow ====
Type: Warning
Contract: Unknown
Function name: transfer(address,uint256)
PC address: 2551
A possible integer overflow exists in the function `transfer(address,uint256)`.
The addition or multiplication may result in a value higher than the maximum representable integer.
--------------------
In file: coe.sol:316
a + b
--------------------
==== Transaction order dependence ====
Type: Warning
Contract: Unknown
Function name: withdrawDevFees()
PC address: 3799
A possible transaction order independence vulnerability exists in function withdrawDevFees(). The value or direction of the call statement is determined from a tainted storage location
--------------------
In file: coe.sol:214
devFeesAddr.transfer(devFees)
--------------------
==== Integer Overflow ====
Type: Warning
Contract: Unknown
Function name: setTokenAndRate(uint256,uint256)
PC address: 4191
A possible integer overflow exists in the function `setTokenAndRate(uint256,uint256)`.
The addition or multiplication may result in a value higher than the maximum representable integer.
--------------------
In file: coe.sol:271
maxTier++
--------------------
==== Exception state ====
Type: Informational
Contract: Unknown
Function name: setTokenAndRate(uint256,uint256)
PC address: 4213
A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking.
--------------------
In file: coe.sol:272
tierTokens[maxTier]
--------------------
==== Exception state ====
Type: Informational
Contract: Unknown
Function name: setTokenAndRate(uint256,uint256)
PC address: 4245
A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking.
--------------------
In file: coe.sol:273
costPerToken[maxTier]
--------------------
==== Message call to external contract ====
Type: Warning
Contract: Unknown
Function name: handleTokensFromOtherContracts(address,address,uint256)
PC address: 4589
This contract executes a message call to an address provided as a function argument. Generally, it is not recommended to call user-supplied addresses using Solidity's call() construct. Note that attackers might leverage reentrancy attacks to exploit race conditions or manipulate this contract's state.
--------------------
In file: coe.sol:256
t.transfer(_recipient, _tokens)
--------------------
==== Exception state ====
Type: Informational
Contract: Unknown
Function name: balanceInTier()
PC address: 7788
A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking.
--------------------
In file: coe.sol:186
tierTokens[tierLevel]
--------------------
Compilation finished at Sun Jun 10 09:36:46
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment