Platform: Code4rena
Start Date: 07/06/2022
Pot Size: $75,000 USDC
Total HM: 11
Participants: 77
Period: 7 days
Judge: gzeon
Total Solo HM: 7
Id: 124
League: ETH
Rank: 54/77
Findings: 1
Award: $89.19
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: berndartmueller
Also found by: 0x1f8b, 0x29A, 0xDjango, 0xNazgul, 0xNineDec, 0xf15ers, 0xkatana, 0xmint, Bronicle, Chom, Cityscape, Deivitto, Funen, GimelSec, GreyArt, IllIllI, JC, Lambda, Meera, Nethermind, Picodes, PierrickGT, Ruhum, Sm4rty, Tadashi, TerrierLover, TomJ, Trumpero, Waze, _Adam, antonttc, ayeslick, c3phas, catchup, cccz, cloudjunky, cryptphi, csanuragjain, delfin454000, dipp, ellahi, fatherOfBlocks, hake, hansfriese, hyh, joestakey, jonah1005, kenzo, minhquanym, oyc_109, sach1r0, saian, simon135, slywaters, sorrynotsorry, sseefried, unforgiven, xiaoming90, z3s, zzzitron
89.1872 USDC - $89.19
Notional FCash
: Natspec and comments are missing for many functions.NotionalTradeModule
: The code uses solidity version 0.6.10, which is lacking recent version's security features, such as underflow, overflow check on arithmetic operations.symbol()
is optional for ERC20
wfCashBase.sol:53string memory _symbol = address(underlyingToken) == Constants.ETH_ADDRESS ? "ETH" : IERC20Metadata(address(underlyingToken)).symbol();
According to ERC20 standard symbol()
is optional.
symbol Returns the symbol of the token. E.g. “HIX”. OPTIONAL - This method can be used to improve usability, but interfaces and other contracts MUST NOT expect these values to be present.
For example, MKR stores symbol
as bytes32 which will revert if used in the above context.
NotionalTradeModule.sol
/** * @dev MANGER ONLY: Initialize given SetToken with initial list of registered fCash positions * Redeem all fCash positions that have reached maturity for their asset token (cToken) * @param _setToken Instance of the SetToken */ function initialize( ISetToken _setToken )
The comment, "Redeem all fCash positions...", on the line 216 above the function initialize
, does not match initialize function.
/** * @dev Redeem a given fCash position from the specified send token (either underlying or asset token) * @dev Alo adjust the components / position of the set token accordingly */ function _mintFCashPosition(
The comment, "Redeem a given fCash position...", on the line 415 above the function _mintFCashPosition
, does not match the _mintFCashPosition
function. Also the following line 416, as well as the line 455, contains a typo Alo
.