Platform: Code4rena
Start Date: 17/03/2022
Pot Size: $30,000 USDC
Total HM: 8
Participants: 43
Period: 3 days
Judge: gzeon
Total Solo HM: 5
Id: 100
League: ETH
Rank: 35/43
Findings: 1
Award: $51.88
π Selected for report: 0
π Solo Findings: 0
π Selected for report: defsec
Also found by: 0x1f8b, 0xDjango, 0xNazgul, 0xkatana, 0xwags, CertoraInc, Funen, GeekyLumberjack, GreyArt, IllIllI, Kenshin, Ruhum, TerrierLover, WatchPug, berndartmueller, bugwriter001, cccz, cmichel, csanuragjain, hake, kenta, kirk-baird, leastwood, minhquanym, oyc_109, peritoflores, rayn, remora, rfa, robee, saian, samruna, sorrynotsorry, wuwe1
51.8842 USDC - $51.88
In #DepositHook.sol hook()
function takes 3 parameters ( _sender, _initialAmount, _finalAmount). Here _initialAmount
is unused
In #PrePOMarketFactory.sol createMarket()
type casting of ILongShortToken(address(_longToken)
looks redundant.
function createMarket( // .... ) external override onlyOwner nonReentrant { require(_validCollateral[_collateral], "Invalid collateral"); ( LongShortToken _longToken, LongShortToken _shortToken ) = _createPairTokens(_tokenNameSuffix, _tokenSymbolSuffix); bytes32 _salt = keccak256(abi.encodePacked(_longToken, _shortToken)); PrePOMarket _newMarket = new PrePOMarket{salt: _salt}( _governance, _collateral, ILongShortToken(address(_longToken)), //@audit redundant type casting ILongShortToken(address(_shortToken)), _floorLongPrice, _ceilingLongPrice, _floorValuation, _ceilingValuation, _mintingFee, _redemptionFee, _expiryTime, false ); .................... }
#0 - ramenforbreakfast
2022-03-24T02:55:41Z
Unused parameters: duplicate of #4. Redundant casting: good catch, but I would consider this a gas optimization, will request a recategorization.