code-423n4 / 2022-06-notional-coop-findings

1 stars 1 forks source link

QA Report #218

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Low

[L-01] Unspecific Compiler Version Pragma

Impact

A known vulnerable compiler version may accidentally be selected or security tools might fall-back to an older compiler version ending up checking a different EVM compilation that is ultimately deployed on the blockchain.

Proof of Concept

  wfCashERC4626.sol::2 => pragma solidity ^0.8.0;

Recommendation

Avoid floating pragmas for non-library contracts. It is recommended to pin to a concrete compiler version.

[L-02] Do not use Deprecated Library Functions

Impact

The usage of deprecated library functions should be discouraged.

Proof of Concept

  wfCashBase.sol::68 => assetToken.safeApprove(address(NotionalV2), type(uint256).max);
  wfCashBase.sol::73 => underlyingToken.safeApprove(address(NotionalV2), type(uint256).max);

Recommendation

Use safeIncreaseAllowance / safeDecreaseAllowance instead of safeApprove.

Non-Critical

[N-01] Missing Natspec

Missing @return natspec throughout the codebase

Tools used

manual