Q2 2026 Security & Compliance Report67 incidents, $764M in losses, 88% from operational failures.
Get the report →

Audit name:

[SCA] CoinVertible | ERC20 | Oct2023

Date:

Oct 17, 2023

Table of Content

→Introduction
→Audit Summary
→Document Information
→System Overview
→Executive Summary
→Risks
→Findings
→Appendix 1. Severity Definitions
→Appendix 2. Scope
→Disclaimer

Want a comprehensive audit report like this?

Introduction

We express our gratitude to the Societe Generale Forge (SG Forge) team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.

CoinVertible EURCV is an institutional-grade stablecoin with full transparency issued by Societe Generale - Forge.

titlecontent
PlatformEthereum
LanguageSolidity
TagsERC20 token, StableCoin
Timeline01/10/2023 - 16/10/2023
Methodologyhttps://hackenio.cc/sc_methodology→

    Review Scope

    RepositoryZip file
    Commitdab4c9e
    • Review Scope

      Repository
      Zip file
      Commit
      dab4c9e

    Audit Summary

    Total6.5/10
    Security Score

    5/10

    Test Coverage

    100%

    Code Quality Score

    10/10

    Documentation Quality Score

    100/10

    9Total Findings
    7Resolved
    1Accepted
    1Mitigated

    The system users should acknowledge all the risks summed up in the risks section of the report

    Document Information

    This report may contain confidential information about IT systems and the intellectual property of the Customer, as well as information about potential vulnerabilities and methods of their exploitation.

    The report can be disclosed publicly after prior consent by another Party. Any subsequent publication of this report shall be without mandatory consent.

    Document

    NameSmart Contract Code Review and Security Analysis Report for Societe Generale Forge (SG Forge)
    Audited ByHacken
    Websitehttps://www.sgforge.com/→
    Changelog03/10/2023 – Initial Review
    16/10/2023 - Second Review
    • Document

      Name
      Smart Contract Code Review and Security Analysis Report for Societe Generale Forge (SG Forge)
      Audited By
      Hacken
      Changelog
      03/10/2023 – Initial Review
      16/10/2023 - Second Review

    System Overview

    SMART_COIN is an ERC20 stablecoin pegged to the Euro, with the following contracts:

    • SmartCoin — ERC20 extended with: \-UUPS upgrade mechanism. \-Operator Roles: registrar, operations, technical. These roles are introduced to manage the upgrade to new implementations and control transfers of tokens amongst these roles.

    • WhitelistUpgradeable — the contract, which: \-Manages the 3 roles: sets and holds their addresses, includes roles’ modifiers. \-Manages the whitelist: adds/removes addresses, and includes whitelist modifiers. \-Manages new implementations: authorizes implementation, names new implementation operators, and allows operators to accept the new roles.

    • WhitelistDataLayout - the contract contains the storage part of the WhitelistUpgradeable contract, and stores the data of the new implementation contract: its address and the addresses of new roles. Furthermore, it stores the whitelisted users.

    • SmartCoinDataLayout - the contract, which contains the storage part of the SmartCoin contract.

    • EncodingUtils - a library that has the functionality to compute the hash of transfer requests

    Privileged roles

    Registrar operator:

    • Manages Whitelist of authorized users.

    • Validates/Rejects transfers to registrar and operations operators.

    • Names the operators for the new implementation.

    • Authorizes the upgrade to the next implementation.

    • Cannot be used as spender or destination of transferFrom().

    • Can retrieve tokens from any address to itself.

    • Can mint and burn SmartCoin tokens.

    Operations operator:

    • Used when token owners want to sell the SmartCoin tokens to the issuer in exchange for cash.

    • Cannot be used as spender or destination of transferFrom().

    • Transfers to operations must be validated by the registrar.

    Technical operator:

    • Launches a previously authorized (by registrar) implementation upgrade.

    Executive Summary

    Documentation quality

    The total Documentation quality score is 10 out of 10.

    • Functional requirements are provided.

    • Technical specification is provided.

    • NatSpec is sufficient.

    Code quality

    The total Code quality score is 10 out of 10.

    • The development environment is configured.

    • Deployment instructions are provided.

    Test coverage

    Code coverage of the project is 100% (branch coverage).

    • Deployment and basic user interactions are covered with tests.

    • Negative cases coverage is covered.

    • Interactions by several users are tested thoroughly.

    Security score

    Upon auditing, the code was found to contain 0 critical, 1 high, 0 medium, and 2 low severity issues. Out of these, 2 issues have been addressed and resolved, leading to a security score of 5 out of 10.

    All identified issues are detailed in the “Findings” section of this report.

    Summary

    The comprehensive audit of the customer's smart contract yields an overall score of 6.5. This score reflects the combined evaluation of documentation, code quality, test coverage, and security aspects of the project.

    Risks

    The SmartCoin contract is upgradeable, which means that the contract logic can be changed by the protocol owners at any time. The users should be aware of this fact when interacting with Upgradeable Contracts.

    The protocol uses a whitelisting method in order to control the users who can transfer the SmartCoin tokens. This means that users’ tokens can become locked in their wallets if they are removed from the whitelist while holding tokens.

    The stablecoin supply is managed as explained in section 4 of the WhitePaper →, although being a centralized protocol the users must trust the owners to keep manage peg EUR-EURCV and manage the collateral correctly.

    Findings

    F-2023-1034Highly Permissive Role Allows Access To Users Funds
    Status
    accepted
    Severity

    High
    F-2023-1036Multiple Roles Can Be Set For A Single Address
    Status
    fixed
    Severity

    Low
    F-2023-1035Missing Zero Address Validation
    Status
    fixed
    Severity

    Low
    I-2023-0281EngagedAmount Collection Processing Lacks Consistency
    Status
    fixed
    Severity

    Observation
    I-2023-028State Variables In Upgradeable Contracts Should Be In Initializer
    Status
    mitigated
    Severity

    Observation
    I-2023-0279Missing Initialization Calls To Parent Contracts
    Status
    fixed
    Severity

    Observation
    I-2023-0278 Missing SPDX License Identifier
    Status
    fixed
    Severity

    Observation
    I-2023-027 Variable Shadowing as Improper Coding Standard
    Status
    fixed
    Severity

    Observation
    I-2023-0276Style Guide Violation: Order Of Layout
    Status
    fixed
    Severity

    Observation
    Code
    ―
    Title
    Status
    Severity
    F-2023-1034Highly Permissive Role Allows Access To Users Funds
    accepted

    High
    F-2023-1036Multiple Roles Can Be Set For A Single Address
    fixed

    Low
    F-2023-1035Missing Zero Address Validation
    fixed

    Low
    I-2023-0281EngagedAmount Collection Processing Lacks Consistency
    fixed

    Observation
    I-2023-028State Variables In Upgradeable Contracts Should Be In Initializer
    mitigated

    Observation
    I-2023-0279Missing Initialization Calls To Parent Contracts
    fixed

    Observation
    I-2023-0278 Missing SPDX License Identifier
    fixed

    Observation
    I-2023-027 Variable Shadowing as Improper Coding Standard
    fixed

    Observation
    I-2023-0276Style Guide Violation: Order Of Layout
    fixed

    Observation
    1-9 of 9 findings

    Identify vulnerabilities in your smart contracts.

    Appendix 1. Severity Definitions

    When auditing smart contracts, Hacken is using a risk-based approach that considers Likelihood, Impact, Exploitability and Complexity metrics to evaluate findings and score severities.

    Reference on how risk scoring is done is available through the repository in our Github organization:

    Severity

    Description

    Critical
    Critical vulnerabilities are usually straightforward to exploit and can lead to the loss of user funds or contract state manipulation.

    High
    High vulnerabilities are usually harder to exploit, requiring specific conditions, or have a more limited scope, but can still lead to the loss of user funds or contract state manipulation.

    Medium
    Medium vulnerabilities are usually limited to state manipulations and, in most cases, cannot lead to asset loss. Contradictions and requirements violations. Major deviations from best practices are also in this category.

    Low
    Major deviations from best practices or major Gas inefficiency. These issues will not have a significant impact on code execution, do not affect security score but can affect code quality score.
    • Severity

      Critical

      Description

      Critical vulnerabilities are usually straightforward to exploit and can lead to the loss of user funds or contract state manipulation.

      Severity

      High

      Description

      High vulnerabilities are usually harder to exploit, requiring specific conditions, or have a more limited scope, but can still lead to the loss of user funds or contract state manipulation.

      Severity

      Medium

      Description

      Medium vulnerabilities are usually limited to state manipulations and, in most cases, cannot lead to asset loss. Contradictions and requirements violations. Major deviations from best practices are also in this category.

      Severity

      Low

      Description

      Major deviations from best practices or major Gas inefficiency. These issues will not have a significant impact on code execution, do not affect security score but can affect code quality score.

    Appendix 2. Scope

    The scope of the project includes the following smart contracts from the provided repository:

    Scope Details

    RepositoryZip file
    Commitf34ba59
    WhitepaperProvided→
    RequirementsProvided→
    Technical RequirementsProvided
    • Scope Details

      Repository
      Zip file
      Commit
      f34ba59
      Whitepaper
      Provided→
      Requirements
      Provided→
      Technical Requirements
      Provided

    Contracts in Scope

    contracts
    libraries
    EncodingUtils.sol - contracts › libraries › EncodingUtils.sol
    smartCoin
    ISmartCoin.sol - contracts › smartCoin › ISmartCoin.sol
    IWhitelist.sol - contracts › smartCoin › IWhitelist.sol
    SmartCoin.sol - contracts › smartCoin › SmartCoin.sol
    SmartCoinDataLayout.sol - contracts › smartCoin › SmartCoinDataLayout.sol
    WhitelistDataLayout.sol - contracts › smartCoin › WhitelistDataLayout.sol
    WhitelistUpgradeable.sol - contracts › smartCoin › WhitelistUpgradeable.sol

    Disclaimer