Skip to content

Inexplicable Usage of Approve & Transfer #27

Description

@adradr

SME-04M: Inexplicable Usage of Approve & Transfer

Type Severity Location
Logical Fault SafetyModuleERC20.sol:L178, L214

Description:

The linked statements invoke a special function called approveAndTransfer that transfers the specified amount to the intended recipient and additionally increase their allowance. Both invocations have the contract itself as the target but the contract contains no logic that utilizes the set allowance via a transferFrom / safeTransferFrom instruction.

Example:

IRandToken(REGISTRY.getAddress("RND")).approveAndTransfer(
    _vc,
    address(this),
    amount
);

Recommendation:

We advise this trait of the system to be revised and the function as defined in RandToken to be revised as its allowance component currently serves no purpose.

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions