Skip to content

Instantly share code, notes, and snippets.

@danbogd
Created April 12, 2019 04:06
Show Gist options
  • Save danbogd/0cd9ff5b3e481e8afc3db3b5774e6692 to your computer and use it in GitHub Desktop.
Save danbogd/0cd9ff5b3e481e8afc3db3b5774e6692 to your computer and use it in GitHub Desktop.

Euro Token (SREUR) audit report.

1. Summary

This document is a security audit report performed by danbogd, where Euro Token (SREUR) has been reviewed.

2. In scope

Сommit hash 662ec938265d2756943f306266e378f4de46ae88.

3. Findings

In total, 3 issues were reported including:

  • 2 low severity issues.
  • 1 minor observation.

No critical security issues were found.

3.1. 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 into a function transfer(address _to, ... ) following code:

require( _to != address(this) );

3.2. Decrease Allowance

Severity: low

Description

decreaseAllowance throw in case if the value to be subtracted 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, the function might throw and give more chances for the spender to take the rest of the allowed value.

Code snippet

https://github.com/SocialRemit/SOL/blob/662ec938265d2756943f306266e378f4de46ae88/SREUR.sol#L236-L249

3.3. Consider using latest version of solidity.

Severity: minor observation

Description

The contracts use solidity version 0.4.25. It is suggested to use the latest version and fix all compiler warnings that arise. Compiler version should be fixed to avoid any potential discrepancies in smart contract behavior caused by different versions of compiler.

Recommendation

Check if the value allowed is higher or equal to the value to be subtracted if not then set the allowed value to zero.

4. Conclusion

The audited smart contract is safe to deploy. Only low severity issues were found during the audit.

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