Skip to content

Instantly share code, notes, and snippets.

@RideSolo
Last active July 22, 2019 17:06
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 RideSolo/31016037137d0e6be20bbda32da5181f to your computer and use it in GitHub Desktop.
Save RideSolo/31016037137d0e6be20bbda32da5181f to your computer and use it in GitHub Desktop.

Euro Token Audit Report.

1. Summary

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

Token desription:

Symbol      : SREUR
Name        : EURO TOKEN
Total supply: 300,000,000
Decimals    : 8
Standard    : ERC20

2. In scope

  • SREUR.sol github commit hash 662ec938265d2756943f306266e378f4de46ae88.

3. Findings

2 issues were reported:

  • 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://github.com/RideSolo/SOL/blob/master/SREUR.sol#L236#L249

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) );

Conclusion

The audited contract is safe (no direct indirect exploit), but a low risk for token holders is highighted through the raised issues.

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