Skip to content

Instantly share code, notes, and snippets.

@yuriy77k
Forked from RideSolo/ETH_ExploreCoin_report.md
Created May 4, 2019 09:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuriy77k/18e58f1d87b9cf05db92b89b7512b87f to your computer and use it in GitHub Desktop.
Save yuriy77k/18e58f1d87b9cf05db92b89b7512b87f to your computer and use it in GitHub Desktop.

ExploreCoin Audit Report.

1. Summary

This document is a security audit report performed by RideSolo, where ExploreCoin has been reviewed.

2. In scope

3. Findings

2 issues were reported including:

  • 2 low severity issues.

3.1. Decrease Allowance

Severity: low

Description

decreaseAllowance throw in case if the value to be substracted is higher than the amount that is allowed, if the address owner wants to change the value allowed by reducing it and the spender withdraw a part of it before, the function might throw and give more chances for the spender to take the rest of the allowed value.

The value should be set to zero if the value to be subtracted is higher than the allowance.

Code snippet

https://gist.github.com/RideSolo/72e9a54ef16c6f3c615e98dc26ab2ef5#file-explorecoin-sol-L211

3.2. Known vulnerabilities of ERC-20 token

Severity: low

Description

  1. It is possible to double withdrawal attack. More details here
  2. Lack of transaction handling mechanism issue. WARNING! This is a very common issue and it already caused millions of dollars losses for lots of token users! More details here

Recommendation

Add the following code to the transfer(_to address, ...) function:

require( _to != address(this) );

4. Conclusion

The audited contract is safe.

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