Some private functions in notional-wrapped-fcash return values which are never used when the functions are called. Such returns can be avoided.
for eg.
In notional-wrapped-fcash/contracts/wfCashLogic.sol
The private function _sellfCash() returns tokensTransferred. This function is only called from _burn() function in notional-wrapped-fcash/contracts/wfCashLogic.sol:250 where the return value is ignored.
Similar issue is also found for function _withdrawCashToAccount() on the same file.
1. Use of pragma experimental ABIEncoderV2 is not necessary in later version (since 0.7.4) in
wfCashLogic.sol
Consider replacing
pragma experimental ABIEncoderV2
withpragma abicoder v2
https://github.com/code-423n4/2022-06-notional-coop/blob/6f8c325f604e2576e2fe257b6b57892ca181509a/notional-wrapped-fcash/contracts/wfCashLogic.sol#L3
More details: https://docs.soliditylang.org/en/v0.8.14/layout-of-source-files.html#abiencoderv2
2. Check for address(0) while setting new roles in constructor
3. Use consistent solidity version in version pragma across different files
notional-wrapped-fcash
for eg:
0.8.11
^0.8.0
4. Revert string missing in require statements
5. Remove unused constants
The constant variable
ERC1155_BATCH_ACCEPTED
inwfCashLogic.sol
is not used anywhere hence can be removed.6. Unused Private function
_safeNegInt88()
is defined insidewfCashERC4626.sol
but not called anywhere.7. Unused return value from functions
Some private functions in
notional-wrapped-fcash
return values which are never used when the functions are called. Such returns can be avoided.for eg.
In notional-wrapped-fcash/contracts/wfCashLogic.sol The private function
_sellfCash()
returnstokensTransferred
. This function is only called from_burn()
function innotional-wrapped-fcash/contracts/wfCashLogic.sol:250
where the return value is ignored.Similar issue is also found for function
_withdrawCashToAccount()
on the same file.