Skip to content

Potential Bug in ManualApprovalTransferManager  #456

@xAffinity

Description

@xAffinity

Hi,

I was looking through the ManualApprovalTransferManager code and was just wondering if

if ((manualApprovals[_from][_to].expiryTime >= now) && (manualApprovals[_from][_to].allowance >= _amount)) {
if (_isTransfer) {
manualApprovals[_from][_to].allowance = manualApprovals[_from][_to].allowance.sub(_amount);
}
return Result.VALID;
}

should return Result.ForceValid instead of Result.Valid.

/** @notice Used to verify the transfer transaction and allow a manually approved transqaction to bypass other restrictions

The above implies that MATM should bypass other restrictions, and this applies for the approval case as well.

At the current state, since in

return unarchived ? (isForceValid ? true : (isInvalid ? false : isValid)) : true;

If another module returns Result.INVALID, then isInvalid will be true, causing verifyTransfer to return false and hence cause the transaction to fail.

This defeats the purpose of MATM which suppose to bypass all other restrictions and transfer modules for both the block and approvals of transactions.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    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