Platform: Code4rena
Start Date: 02/08/2022
Pot Size: $50,000 USDC
Total HM: 12
Participants: 69
Period: 5 days
Judge: gzeon
Total Solo HM: 5
Id: 150
League: ETH
Rank: 48/69
Findings: 1
Award: $74.55
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: IllIllI
Also found by: 0x1f8b, 0xDjango, 0xNazgul, 0xc0ffEE, 8olidity, Bnke0x0, Chom, CodingNameKiki, Deivitto, Dravee, Funen, JC, JohnSmith, NoamYakov, ReyAdmirado, Rohan16, Rolezn, Sm4rty, SooYa, TomFrenchBlockchain, TomJ, Waze, __141345__, ajtra, ak1, aysha, bin2chen, bobirichman, brgltd, bulej93, c3phas, delfin454000, durianSausage, erictee, fatherOfBlocks, gogo, horsefacts, hyh, ladboy233, mics, natzuu, nxrblsrpr, oyc_109, rbserver, samruna, sikorico, simon135, tofunmi, wagmi
74.5523 USDC - $74.55
Using the exact solidity version is recommended instead of using like this pragma solidity >=0.8.4;
Use this way pragma solidity 0.8.4
minGasReserve = 5_000;
- Hardcoding minmum gas fee will not be safe always. in future gas fee range can vary.
It is recommended to set gas using the variable while initializing.
function execute(address target, bytes calldata data) public payable override returns (bytes memory response)
It could be safe always to include Non-ReEntrancy modifier
in above function.
if (target.code.length == 0) { revert CustomErrors.TARGET_INVALID(target); }
Checking contract code length may not be safe.
Its best practice to check both array length matches before start looping.
if (msg.sender != owner) { revert CustomErrors.NOT_OWNER(owner, msg.sender); } bytes[] memory results = new bytes[](data.length); for (uint256 i = 0; i < targets.length; i++) {``` If `targets` and `data` array length are equal then continue further operation.
Instead of using Errors
CustomErrors
, it is recommended to use all erros in single place which might be useful for future reference.