Skip to content

SafeUpgradeableTokenERC20 #265

Closed
Closed

Description

@yuriy77k

Audit request

The SafeUpgradeableTokenERC20 smart contract is an ERC20 token implementation created to serve the BOK token of the Blockium platform https://www.blockium.io/ which will be provided in an IEO on Bitforex in the beginning of June and then in an IEO on Coineal right after it. More information about BOK can be found in the Blockium link.
However the SafeUpgradeableTokenERC20 was a result of an extensive security recommendations research and it combines numerous security recommendations and best practices as described here: https://github.com/guylando/EthereumSmartContracts/blob/master/README.md#safeupgradeabletokenerc20-contract
It was open sourced and provided together with the 200+ unit tests publicly so that after its security level will be proven it will be available for other tokens creators who want to use a safe and secure ERC20 implementation which has many protection mechanisms and this way to make the general community and network more secure.
We will appreciate for SafeUpgradeableTokenERC20 to be audited by the Callisto network and we will gladly publish in the contract github afterwards that it was audited by the Callisto network.

Source code

https://github.com/guylando/EthereumSmartContracts/blob/master/SafeUpgradeableTokenERC20/contracts/SafeUpgradeableTokenERC20.sol

Disclosure policy

guylando@fokoyagroup.com

Platform

ETH

Number of lines:

394

Activity

  1. added
    approved
    solidity
    on May 29, 2019
  2. MrCrambo commented on May 29, 2019

    @MrCrambo

    Auditing time 2 days

  3. yuriy77k commented on May 30, 2019

    @yuriy77k
    ContributorAuthor

    @MrCrambo assigned

  4. danbogd commented on May 31, 2019

    @danbogd

    Auditing time 3 days.

  5. RideSolo commented on May 31, 2019

    @RideSolo

    Auditing time 2 days.

  6. yuriy77k commented on Jun 1, 2019

    @yuriy77k
    ContributorAuthor
  7. danbogd commented on Jun 1, 2019

    @danbogd

    My report is finished.

  8. yuriy77k commented on Jun 9, 2019

    @yuriy77k
    ContributorAuthor

    Safe Upgradeable Token ERC20 Security Audit Report

    1. Summary

    Safe Upgradeable Token ERC20 smart contract security audit report performed by Callisto Security Audit Department

    2. In scope

    3. Findings

    In total, 2 issues were reported including:

    • 1 low severity issues.

    • 1 owner privileges (the ability of an owner to manipulate contract, may be risky for investors).

    No critical security issues were found.

    3.1. Allowance Approval

    Severity: low

    Description

    Following ERC20 standard, approve function "Allows _spender to withdraw from your account multiple times, up to the _value amount. If this function is called again it overwrites the current allowance with _value.", However the implemented function throw in case if allowed[msg.sender][_spender] is different than zero or _value different than zero. This partially solve double withdrawal attack but create incompatibility for some Dapps and do not allow the user to directly reduce the allowance creating a race between user and spender.

    Code snippet

    https://github.com/RideSolo/EthereumSmartContracts/blob/master/SafeUpgradeableTokenERC20/contracts/SafeUpgradeableTokenERC20.sol#L217#LL229

    3.2. Owner Privilege

    Severity: owner privileges

    Description

    The token owner allow himself to:

    • Pause/unpause tokens transfers / transferFrom / allowance allocation and approvals

    Code snippet

    https://github.com/RideSolo/EthereumSmartContracts/blob/master/SafeUpgradeableTokenERC20/contracts/SafeUpgradeableTokenERC20.sol#L505#L524

    4. Conclusion

    The audited smart contract can be deployed. Only low severity issues were found during the audit.

    5. Revealing audit reports

    https://gist.github.com/yuriy77k/1dd50f527012fc0d18ba5cc8ea34edbe

    https://gist.github.com/yuriy77k/c15a757737adcf079bd6e92156796231

    https://gist.github.com/yuriy77k/c2c2132bcb35c54d82f4c2828990f500

  9. guylando commented on Jun 9, 2019

    @guylando

    @yuriy77k Thanks for the audit!
    Correct me if I am wrong but in setUpgradeMaster there is a modifier validateAddress which DOES check for input address not being the zero address. Did 3.3 miss this modifier?

  10. yuriy77k commented on Jun 9, 2019

    @yuriy77k
    ContributorAuthor
  11. MillianoConti commented on Jul 6, 2019

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    approvedsolidity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions