Skip to content

Instantly share code, notes, and snippets.

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/26e2ee2e96ecb93091c5efbc2bddc7a4 to your computer and use it in GitHub Desktop.
Save yuriy77k/26e2ee2e96ecb93091c5efbc2bddc7a4 to your computer and use it in GitHub Desktop.
Bills of exchange factory security audit report

Bills of exchange factory security audit report

Summary

This is the report from a security audit performed on Bills of exchange factory by gorbunovperm.

'Bills Of Exchange Factory' is a smart contracts based service that allows user to draw electronic bills or exchange.

https://cryptonomica.net/bills-of-exchange/

In scope

  1. BillsOfExchangeFactory.sol

Findings

In total, 3 issues were reported including:

  • 0 critical severity issue.

  • 0 high severity issue.

  • 1 medium severity issues.

  • 2 low severity issues.

  • 0 minor observations.

Security issues

1. Known vulnerabilities of ERC-20 token

Severity: low

Description

  • It is possible to double withdrawal attack. More details here

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

2. ERC20 Compliance: event missing

Severity: low

Code snippet

Description

According to ERC20 standard, when initializing a token contract if any token value is set to any given address a Transfer event should be emitted. An event isn't emitted when assigning the initial supply to the msg.sender.

3. Any admin can take all the power

Severity: medium

Code snippet

Description

Any admin can remove the contract creator from admin list. Together with the ability to change the withdrawal address by admin, this can be quite dangerous.

Conclusion

There are some vulnerabilities were discovered in these contracts.

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