Skip to content

Latest commit

 

History

History
843 lines (456 loc) · 30.2 KB

v2.3.1-slither-report.md

File metadata and controls

843 lines (456 loc) · 30.2 KB

Slither report

This report was generated with Slither

THIS CHECKLIST IS NOT COMPLETE. Use --show-ignored-findings to show all the results. Summary

uninitialized-local

The concerned variable local mostRecent is initialized in the loop

Impact: Medium Confidence: Medium

contracts/modules/internal/ERC20SnapshotModuleInternal.sol#L476

calls-loop

Remark:

  • The RuleEngine is a trusted contract deployed by the issuer.

It is not a problem to perform external call to this contract

  • When a ruleEngine is created, the issuer has indeed to keep in mind to limit the number of rules.

Impact: Low Confidence: Medium

contracts/mocks/RuleEngine/RuleEngineMock.sol#L74-L88

contracts/mocks/RuleEngine/RuleEngineMock.sol#L74-L88

contracts/modules/internal/ValidationModuleInternal.sol#L47-L53

contracts/mocks/RuleEngine/RuleEngineMock.sol#L40-L60

timestamp

Remark:

With the Proof of Work, it was possible for a miner to modify the timestamp in a range of about 15 seconds

With the Proof Of Stake, a new block is created every 12 seconds

In all cases, we are not looking for such precision

Impact: Low Confidence: Medium

contracts/modules/internal/ERC20SnapshotModuleInternal.sol#L153-L194

contracts/modules/internal/ERC20SnapshotModuleInternal.sol#L221-L236

contracts/modules/internal/ERC20SnapshotModuleInternal.sol#L199-L213

contracts/modules/internal/ERC20SnapshotModuleInternal.sol#L89-L115

contracts/modules/internal/ERC20SnapshotModuleInternal.sol#L120-L148

contracts/modules/internal/ERC20SnapshotModuleInternal.sol#L464-L494

costly-loop

Inside the function, these two operations are not performed inside a loop.

It seems that the only loops which callssetCurrentSnapshotare inside the batch functions(mintBatch, burnBatch, ...) through a call to the function update. At the moment, There is no trivial solution to resolve this.

Impact: Informational Confidence: Medium

contracts/modules/internal/ERC20SnapshotModuleInternal.sol#L410-L419

contracts/modules/internal/ERC20SnapshotModuleInternal.sol#L410-L419

dead-code

Remark:

function init:

We have theses dead codes because we follow the same architecture and principle as OpenZeppelin,

For example: https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/eb67bf72abb459f9f22fd2a67e8eb87781486042/contracts/access/AccessControlUpgradeable.sol#L82

ID-16- msgData:

  • Implemented to be gasless compatible (see MetaTxModule)

  • If we remove this function, we will have the following error:

    "Derived contract must override function "_msgData". Two or more base classes define function with same name and parameter types."

Impact: Informational Confidence: Medium

contracts/modules/wrapper/extensions/MetaTxModule.sol#L33-L41

contracts/modules/wrapper/core/PauseModule.sol#L25-L40

contracts/modules/wrapper/controller/ValidationModule.sol#L27-L54

contracts/modules/wrapper/core/ERC20MintModule.sol#L16-L36

contracts/modules/CMTAT_BASE.sol#L216-L223

contracts/modules/wrapper/extensions/DebtModule/DebtBaseModule.sol#L58-L75

contracts/modules/wrapper/core/ERC20BaseModule.sol#L27-L38

contracts/modules/wrapper/extensions/DebtModule/CreditEventsModule.sol#L25-L42

contracts/modules/wrapper/core/ERC20BurnModule.sol#L15-L35

contracts/modules/internal/ValidationModuleInternal.sol#L28-L33

contracts/modules/internal/EnforcementModuleInternal.sol#L43-L46

contracts/modules/wrapper/extensions/ERC20SnapshotModule.sol#L19-L43

contracts/modules/wrapper/core/BaseModule.sol#L39-L59

contracts/modules/internal/ERC20SnapshotModuleInternal.sol#L71-L78

contracts/modules/wrapper/core/EnforcementModule.sol#L25-L42

contracts/modules/security/AuthorizationModule.sol#L29-L42

solc-version

Remark:

The use of the version 0.8.20 is a requirement to update the OpenZeppelin library to the version 5.0.0

Impact: Informational Confidence: High

  • ID-28 Pragma version^0.8.20 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

contracts/modules/internal/ValidationModuleInternal.sol#L3

  • ID-29 Pragma version^0.8.20 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

contracts/modules/wrapper/core/ERC20BurnModule.sol#L3

  • ID-30 Pragma version^0.8.20 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

contracts/CMTAT_PROXY.sol#L3

  • ID-31 Pragma version^0.8.20 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

contracts/modules/CMTAT_BASE.sol#L3

  • ID-32 Pragma version^0.8.20 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

contracts/libraries/Errors.sol#L3

  • ID-33 Pragma version^0.8.20 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

contracts/mocks/MinimalForwarderMock.sol#L3

  • ID-34 Pragma version^0.8.20 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

contracts/modules/security/AuthorizationModule.sol#L3

  • ID-35 Pragma version^0.8.20 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

contracts/modules/internal/ERC20SnapshotModuleInternal.sol#L3

  • ID-36 solc-0.8.20 is not recommended for deployment

  • ID-37 Pragma version^0.8.0 allows old versions

contracts/mocks/RuleEngine/interfaces/IRuleEngine.sol#L3

  • ID-38 Pragma version^0.8.0 allows old versions

contracts/interfaces/IEIP1404/IEIP1404.sol#L3

  • ID-39 Pragma version^0.8.0 allows old versions

contracts/mocks/RuleEngine/interfaces/IRule.sol#L3

  • ID-40 Pragma version^0.8.20 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

contracts/modules/internal/EnforcementModuleInternal.sol#L3

  • ID-41 Pragma version^0.8.20 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

contracts/modules/wrapper/core/BaseModule.sol#L3

  • ID-42 Pragma version^0.8.20 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

contracts/modules/wrapper/extensions/DebtModule/DebtBaseModule.sol#L3

  • ID-43 Pragma version^0.8.0 allows old versions

contracts/interfaces/IDebtGlobal.sol#L3

  • ID-44 Pragma version^0.8.20 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

contracts/mocks/RuleEngine/RuleMock.sol#L3

  • ID-45 Pragma version^0.8.20 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

contracts/modules/wrapper/core/ERC20MintModule.sol#L3

  • ID-46 Pragma version^0.8.20 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

contracts/modules/wrapper/extensions/ERC20SnapshotModule.sol#L3

  • ID-47 Pragma version^0.8.20 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

contracts/modules/wrapper/controller/ValidationModule.sol#L3

  • ID-48 Pragma version^0.8.20 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

contracts/mocks/RuleEngine/CodeList.sol#L3

  • ID-49 Pragma version^0.8.0 allows old versions

contracts/interfaces/IEIP1404/IEIP1404Wrapper.sol#L3

  • ID-50 Pragma version^0.8.20 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

contracts/modules/wrapper/extensions/DebtModule/CreditEventsModule.sol#L3

  • ID-51 Pragma version^0.8.20 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

contracts/modules/wrapper/core/ERC20BaseModule.sol#L3

  • ID-52 Pragma version^0.8.20 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

contracts/modules/wrapper/core/PauseModule.sol#L3

  • ID-53 Pragma version^0.8.20 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

contracts/mocks/RuleEngine/RuleEngineMock.sol#L3

  • ID-54 Pragma version^0.8.20 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

contracts/modules/wrapper/extensions/MetaTxModule.sol#L3

  • ID-55 Pragma version^0.8.20 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

contracts/CMTAT_STANDALONE.sol#L3

  • ID-56 Pragma version^0.8.20 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

contracts/modules/wrapper/core/EnforcementModule.sol#L3

naming-convention

Remark:

It is not really necessary to rename all the variables. It will generate a lot of work for a minor improvement.

Impact: Informational Confidence: High

contracts/mocks/RuleEngine/RuleEngineMock.sol#L14

contracts/modules/wrapper/core/ERC20BurnModule.sol#L15-L35

contracts/modules/wrapper/extensions/DebtModule/CreditEventsModule.sol#L99

contracts/modules/internal/EnforcementModuleInternal.sol#L43-L46

contracts/modules/security/AuthorizationModule.sol#L29-L42

contracts/modules/wrapper/core/BaseModule.sol#L39-L59

contracts/interfaces/IEIP1404/IEIP1404Wrapper.sol#L11-L16

contracts/mocks/RuleEngine/RuleEngineMock.sol#L43

contracts/modules/internal/ValidationModuleInternal.sol#L28-L33

contracts/modules/wrapper/extensions/DebtModule/DebtBaseModule.sol#L58-L75

contracts/CMTAT_PROXY.sol#L7-L21

contracts/modules/internal/ERC20SnapshotModuleInternal.sol#L71-L78

contracts/modules/wrapper/core/PauseModule.sol#L42-L44

contracts/modules/wrapper/extensions/DebtModule/CreditEventsModule.sol#L44-L46

contracts/modules/CMTAT_BASE.sol#L225

contracts/modules/internal/EnforcementModuleInternal.sol#L48-L50

contracts/modules/internal/ValidationModuleInternal.sol#L75

contracts/modules/wrapper/core/ERC20BurnModule.sol#L37-L39

contracts/modules/wrapper/extensions/DebtModule/CreditEventsModule.sol#L25-L42

contracts/modules/wrapper/core/BaseModule.sol#L115

contracts/modules/wrapper/controller/ValidationModule.sol#L144

contracts/modules/wrapper/controller/ValidationModule.sol#L27-L54

contracts/modules/wrapper/core/EnforcementModule.sol#L74

contracts/CMTAT_STANDALONE.sol#L7-L52

contracts/modules/wrapper/extensions/DebtModule/DebtBaseModule.sol#L265

contracts/modules/wrapper/core/PauseModule.sol#L25-L40

contracts/modules/wrapper/core/EnforcementModule.sol#L25-L42

contracts/modules/security/AuthorizationModule.sol#L80

contracts/mocks/RuleEngine/RuleEngineMock.sol#L65

contracts/mocks/RuleEngine/RuleMock.sol#L14

contracts/modules/wrapper/core/ERC20BaseModule.sol#L40-L44

contracts/modules/internal/EnforcementModuleInternal.sol#L91

contracts/mocks/RuleEngine/RuleMock.sol#L35

contracts/mocks/RuleEngine/RuleEngineMock.sol#L64

contracts/modules/wrapper/core/BaseModule.sol#L61-L71

contracts/mocks/RuleEngine/RuleEngineMock.sol#L63

contracts/mocks/RuleEngine/RuleMock.sol#L15

contracts/modules/security/AuthorizationModule.sol#L51-L53

contracts/modules/wrapper/core/PauseModule.sol#L100

contracts/modules/CMTAT_BASE.sol#L147-L149

contracts/modules/wrapper/extensions/ERC20SnapshotModule.sol#L103

contracts/mocks/RuleEngine/RuleMock.sol#L26

contracts/mocks/RuleEngine/RuleMock.sol#L41

contracts/modules/wrapper/core/ERC20MintModule.sol#L38-L40

contracts/mocks/RuleEngine/RuleEngineMock.sol#L42

contracts/modules/wrapper/extensions/MetaTxModule.sol#L43

contracts/modules/wrapper/core/ERC20BaseModule.sol#L27-L38

contracts/modules/wrapper/extensions/ERC20SnapshotModule.sol#L19-L43

contracts/modules/wrapper/core/ERC20BurnModule.sol#L96

contracts/modules/wrapper/core/ERC20BaseModule.sol#L138

contracts/modules/wrapper/core/ERC20MintModule.sol#L16-L36

contracts/modules/CMTAT_BASE.sol#L30-L226

contracts/mocks/RuleEngine/RuleEngineMock.sol#L75

contracts/modules/wrapper/core/ERC20MintModule.sol#L95

contracts/modules/CMTAT_BASE.sol#L88-L145

contracts/modules/wrapper/controller/ValidationModule.sol#L56-L58

contracts/modules/wrapper/extensions/DebtModule/DebtBaseModule.sol#L77-L79

contracts/mocks/RuleEngine/RuleEngineMock.sol#L41

contracts/modules/wrapper/extensions/ERC20SnapshotModule.sol#L45-L47

contracts/modules/internal/ValidationModuleInternal.sol#L35-L42

contracts/modules/internal/ERC20SnapshotModuleInternal.sol#L496

contracts/modules/wrapper/core/EnforcementModule.sol#L44-L46

contracts/modules/internal/ERC20SnapshotModuleInternal.sol#L80-L83

contracts/mocks/RuleEngine/RuleMock.sol#L13

contracts/CMTAT_PROXY.sol#L20