Platform: Code4rena
Start Date: 09/12/2022
Pot Size: $36,500 USDC
Total HM: 9
Participants: 69
Period: 3 days
Judge: Picodes
Total Solo HM: 2
Id: 190
League: ETH
Rank: 55/69
Findings: 1
Award: $28.12
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: 0xSmartContract
Also found by: 0Kage, 0x52, 0xAgro, 0xNazgul, 0xTraub, 0xhacksmithh, Awesome, Aymen0909, Bnke0x0, Englave, Janio, Mukund, Parth, RaymondFam, Rolezn, SmartSek, Tointer, UdarTeam, Udsen, Zarf, caventa, chaduke, csanuragjain, deliriusz, gz627, idkwhatimdoing, izhelyazkov, joestakey, neumo, obront, oyc_109, rvierdiiev, shark, trustindistrust, wait, yongskiws
28.124 USDC - $28.12
No need to check for the equal condition in the both require functions below:
File: apps/smart-contracts/core/contracts/PrePOMarket.sol require(_finalLongPayout >= floorLongPayout, "Payout cannot be below floor"); require(_finalLongPayout <= ceilingLongPayout, "Payout cannot exceed ceiling");
floorLongPayout is anyway smaller than ceilingLongPayout since it is checked in the constructor.
So it is enough to check for the _finalLongPayout < ceilingLongPayout
condition in the second require, since equal condition is already checked in the first require.
require(_finalLongPayout >= floorLongPayout, "Payout cannot be below floor");
Even though ReentrancyGuard.sol is imported, it is not used in the scope of the contract.
File: apps/smart-contracts/core/contracts/LongShortToken.sol import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
Can use a solidity version of at least 0.8.12 to get string.concat()
instead of abi.encodePacked()
string memory _longTokenName = string(abi.encodePacked("LONG", " ", _tokenNameSuffix)); string memory _shortTokenName = string(abi.encodePacked("SHORT", " ", _tokenNameSuffix)); string memory _longTokenSymbol = string(abi.encodePacked("L", "_", _tokenSymbolSuffix)); string memory _shortTokenSymbol = string(abi.encodePacked("S", "_", _tokenSymbolSuffix));
#0 - c4-judge
2022-12-19T13:46:16Z
Picodes marked the issue as grade-b