Skip to content

Latest commit

 

History

History
643 lines (379 loc) · 28.5 KB

slither-report.md

File metadata and controls

643 lines (379 loc) · 28.5 KB

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

incorrect-equality

Strict equality is required to check the request status

Impact: Medium Confidence: High

src/rules/operation/RuleConditionalTransfer.sol#L177-L206

src/rules/operation/RuleConditionalTransfer.sol#L329-L349

src/rules/operation/abstract/RuleConditionalTransferOperator.sol#L383-L388

src/rules/operation/RuleConditionalTransfer.sol#L177-L206

calls-loop

Acknowledge

Impact: Low Confidence: Medium

src/rules/validation/RuleWhitelistWrapper.sol#L39-L74

src/modules/RuleEngineValidation.sol#L29-L44

src/RuleEngine.sol#L100-L128

src/RuleEngine.sol#L100-L128

src/RuleEngine.sol#L100-L128

src/rules/operation/abstract/RuleConditionalTransferOperator.sol#L390-L449

src/RuleEngine.sol#L100-L128

src/RuleEngine.sol#L50-L76

timestamp

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

btw, ID-13 and ID-15 don't use timestamp in their comparison

Impact: Low Confidence: Medium

src/rules/operation/RuleConditionalTransfer.sol#L329-L349

src/rules/operation/abstract/RuleConditionalTransferOperator.sol#L383-L388

src/rules/operation/RuleConditionalTransfer.sol#L177-L206

src/rules/operation/RuleConditionalTransfer.sol#L281-L298

src/rules/operation/abstract/RuleConditionalTransferOperator.sol#L390-L449

costly-loop

Acknowledge

Impact: Informational Confidence: Medium

src/rules/operation/RuleConditionalTransfer.sol#L79-L118

src/rules/operation/abstract/RuleConditionalTransferOperator.sol#L325-L370

dead-code

  • 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

src/rules/validation/RuleSanctionList.sol#L145-L152

src/rules/validation/abstract/RuleAddressList/RuleAddressList.sol#L156-L163

src/rules/validation/RuleWhitelistWrapper.sol#L110-L117

src/rules/operation/RuleConditionalTransfer.sol#L370-L377

src/RuleEngine.sol#L182-L189

solc-version

The version set in the config file is 0.8.27

Impact: Informational Confidence: High

  • ID-24 Version constraint ^0.8.20 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html)
    • VerbatimInvalidDeduplication
    • FullInlinerNonExpressionSplitArgumentEvaluationOrder
    • MissingSideEffectsOnSelectorAccess. It is used by:
    • lib/CMTAT/contracts/interfaces/draft-IERC1404/draft-IERC1404.sol#3
    • lib/CMTAT/contracts/interfaces/draft-IERC1404/draft-IERC1404EnumCode.sol#3
    • lib/CMTAT/contracts/interfaces/draft-IERC1404/draft-IERC1404Wrapper.sol#3
    • lib/CMTAT/contracts/interfaces/engine/IRuleEngine.sol#3
    • lib/openzeppelin-contracts/contracts/access/AccessControl.sol#4
    • lib/openzeppelin-contracts/contracts/access/IAccessControl.sol#4
    • lib/openzeppelin-contracts/contracts/metatx/ERC2771Context.sol#4
    • lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol#4
    • lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Permit.sol#4
    • lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol#4
    • lib/openzeppelin-contracts/contracts/utils/Address.sol#4
    • lib/openzeppelin-contracts/contracts/utils/Context.sol#4
    • lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol#4
    • lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol#4
    • src/RuleEngine.sol#3
    • src/interfaces/IRuleEngineOperation.sol#3
    • src/interfaces/IRuleEngineValidation.sol#3
    • src/interfaces/IRuleOperation.sol#3
    • src/interfaces/IRuleValidation.sol#3
    • src/modules/MetaTxModuleStandalone.sol#3
    • src/modules/RuleEngineInvariantStorage.sol#3
    • src/modules/RuleEngineOperation.sol#3
    • src/modules/RuleEngineValidation.sol#3
    • src/modules/RuleEngineValidationCommon.sol#3
    • src/modules/RuleInternal.sol#3
    • src/rules/operation/RuleConditionalTransfer.sol#3
    • src/rules/operation/abstract/RuleConditionalTransferInvariantStorage.sol#3
    • src/rules/operation/abstract/RuleConditionalTransferOperator.sol#3
    • src/rules/validation/RuleBlacklist.sol#3
    • src/rules/validation/RuleSanctionList.sol#3
    • src/rules/validation/RuleWhitelist.sol#3
    • src/rules/validation/RuleWhitelistWrapper.sol#3
    • src/rules/validation/abstract/RuleAddressList/RuleAddressList.sol#3
    • src/rules/validation/abstract/RuleAddressList/RuleAddressListInternal.sol#3
    • src/rules/validation/abstract/RuleAddressList/invariantStorage/RuleAddressListInvariantStorage.sol#3
    • src/rules/validation/abstract/RuleAddressList/invariantStorage/RuleBlacklistInvariantStorage.sol#3
    • src/rules/validation/abstract/RuleAddressList/invariantStorage/RuleWhitelistInvariantStorage.sol#3
    • src/rules/validation/abstract/RuleCommonInvariantStorage.sol#2
    • src/rules/validation/abstract/RuleSanctionListInvariantStorage.sol#3
    • src/rules/validation/abstract/RuleValidateTransfer.sol#3
    • src/rules/validation/abstract/RuleWhitelistCommon.sol#3

naming-convention

Acknowledge

Impact: Informational Confidence: High

src/rules/operation/abstract/RuleConditionalTransferInvariantStorage.sol#L124-L130

src/rules/operation/RuleConditionalTransfer.sol#L54

src/rules/validation/abstract/RuleWhitelistCommon.sol#L18

src/rules/validation/abstract/RuleValidateTransfer.sol#L16

src/RuleEngine.sol#L53

src/rules/operation/abstract/RuleConditionalTransferInvariantStorage.sol#L131-L137

src/modules/RuleEngineValidation.sol#L32

src/rules/validation/RuleBlacklist.sol#L53

src/rules/validation/abstract/RuleWhitelistCommon.sol#L31

src/rules/operation/abstract/RuleConditionalTransferOperator.sol#L21

src/rules/validation/RuleSanctionList.sol#L59

src/rules/validation/RuleBlacklist.sol#L35

src/RuleEngine.sol#L52

src/rules/operation/RuleConditionalTransfer.sol#L217

src/rules/operation/RuleConditionalTransfer.sol#L178

src/RuleEngine.sol#L51

src/rules/validation/RuleWhitelistWrapper.sol#L41

src/rules/operation/RuleConditionalTransfer.sol#L52

src/rules/validation/RuleBlacklist.sol#L66

src/RuleEngine.sol#L101

src/rules/validation/RuleSanctionList.sol#L78

src/rules/validation/abstract/RuleAddressList/RuleAddressList.sol#L103

src/modules/RuleEngineValidation.sol#L55

src/rules/operation/abstract/RuleConditionalTransferInvariantStorage.sol#L110-L116

src/rules/operation/abstract/RuleConditionalTransferInvariantStorage.sol#L30-L35

src/rules/operation/RuleConditionalTransfer.sol#L237

src/RuleEngine.sol#L88

src/rules/operation/abstract/RuleConditionalTransferInvariantStorage.sol#L37-L44

src/modules/RuleEngineValidation.sol#L54

src/rules/validation/RuleSanctionList.sol#L58

src/rules/operation/RuleConditionalTransfer.sol#L216

src/modules/RuleEngineValidation.sol#L30

src/modules/RuleEngineValidation.sol#L56

src/rules/validation/RuleWhitelistWrapper.sol#L40

src/rules/validation/RuleWhitelist.sol#L29

src/rules/operation/abstract/RuleConditionalTransferInvariantStorage.sol#L18-L21

src/rules/validation/abstract/RuleValidateTransfer.sol#L17

src/rules/operation/abstract/RuleConditionalTransferInvariantStorage.sol#L103-L109

src/rules/validation/RuleWhitelist.sol#L28

src/rules/validation/abstract/RuleValidateTransfer.sol#L18

src/RuleEngine.sol#L86

src/rules/operation/RuleConditionalTransfer.sol#L53

src/rules/operation/RuleConditionalTransfer.sol#L215

src/modules/RuleEngineValidation.sol#L31

src/rules/validation/RuleBlacklist.sol#L34

src/rules/operation/RuleConditionalTransfer.sol#L248

src/rules/validation/RuleSanctionList.sol#L91

src/rules/validation/abstract/RuleAddressList/RuleAddressList.sol#L113

src/RuleEngine.sol#L87

src/rules/operation/abstract/RuleConditionalTransferInvariantStorage.sol#L117-L123

similar-names

Acknowlege

Impact: Informational Confidence: Medium

src/rules/validation/abstract/RuleSanctionListInvariantStorage.sol#L27

src/rules/operation/abstract/RuleConditionalTransferOperator.sol#L326

src/rules/operation/abstract/RuleConditionalTransferOperator.sol#L326

src/rules/operation/abstract/RuleConditionalTransferInvariantStorage.sol#L87

src/rules/validation/abstract/RuleAddressList/invariantStorage/RuleBlacklistInvariantStorage.sol#L16

src/rules/validation/abstract/RuleAddressList/invariantStorage/RuleWhitelistInvariantStorage.sol#L17

src/rules/validation/abstract/RuleAddressList/invariantStorage/RuleWhitelistInvariantStorage.sol#L16

unused-import

Concerns OpenZeppelin library

Impact: Informational Confidence: High

  • ID-82 The following unused import(s) in lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol should be removed: -import {IERC20Permit} from "../extensions/IERC20Permit.sol"; (lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol#7)

var-read-using-this

Don't manage to find a better solution

Impact: Optimization Confidence: High

src/rules/validation/abstract/RuleValidateTransfer.sol#L15-L24