code-423n4 / 2022-07-swivel-findings

0 stars 1 forks source link

QA Report #76

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Low

Wrong boolean logic

incorrect boolean logic in ERC20.sol permit function

if (recoveredAddress != address(0) && recoveredAddress != owner) {
    revert Invalid(msg.sender, owner);
}

Impact:

Affected:

Recommendations:

QA

Interface and Contract mismatch

In MarketPlace.sol:

ISwivel(swivel).authRedeem(p, u, market.cTokenAddr, t, a);

ISwivel in Interfaces.sol contains the interface:

interface ISwivel {
  function authRedeem(uint8 p, address u, address c, address t, uint256 a) external returns (bool);
}

But Swivel.sol does not have such a function. (Closest to it) Only authRedeemZcToken().

Affected Code:

robrobbins commented 2 years ago

demorgan's and interface issues addressed via other tickets