Platform: Code4rena
Start Date: 14/03/2024
Pot Size: $49,000 USDC
Total HM: 3
Participants: 51
Period: 7 days
Judge: 3docSec
Id: 350
League: ETH
Rank: 23/51
Findings: 1
Award: $36.34
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: 0xmystery
Also found by: 0xbrett8571, 0xhacksmithh, 7ashraf, Bigsam, Circolors, IceBear, Jorgect, Koala, Limbooo, SBSecurity, Tigerfrake, ZanyBonzy, aycozynfada, cheatc0d3, cryptphi, d3e4, doublespending, foxb868, gpersoon, imare, jesjupyter, lsaudit, robriks, shealtielanz, y4y
36.3397 USDC - $36.34
Issue Number | Issue Title | Number of Instances |
---|---|---|
L-01 | Check if msg.value is the same as the passed amount | 2 |
L-02 | Avoid hardcoded strings and addresses | 3 |
L-04 | More safety is advised when removing owners | 1 |
N-01 | Remove un-necessary checks | 1 |
N-02 | Consider emitting an event for the following functions | 2 |
N-03 | Add comments to explain assembly code | 3 |
N-04 | Inaccurate variable emission | 1 |
msg.value
is the same as the passed amount
function entryPointDeposit(uint256 amount) external payable onlyOwner { SafeTransferLib.safeTransferETH(entryPoint(), amount); }
(bool success, bytes memory result) = target.call{value: value}(data);
Using hardcoded addresses or strings should be avoidable and may overcomplicate things in case of a contract upgrade, rather store contract addresses in a variable and add a setter to change the address in case of an upgrade
function entryPoint() public pure returns (address) { return 0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789; }
function entryPoint() public view virtual returns (address) { return 0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789; }
return ("Coinbase Smart Wallet", "1");
function removeOwnerAtIndex(uint256 index) public virtual onlyOwner { bytes memory owner = ownerAtIndex(index); if (owner.length == 0) revert NoOwnerAtIndex(index); delete _getMultiOwnableStorage().isOwner[owner]; delete _getMultiOwnableStorage().ownerAtIndex[index]; emit RemoveOwner(index, owner); }
assert(mode != PostOpMode.postOpReverted);
function withdrawGasExcess() external
function ownerWithdraw(address asset, address to, uint256 amount) external onlyOwner
assembly ("memory-safe") { if missingAccountFunds { // Ignore failure (it's EntryPoint's job to verify, not the account's). pop(call(gas(), caller(), missingAccountFunds, codesize(), 0x00, codesize(), 0x00)) } }
assembly ("memory-safe") { revert(add(result, 32), mload(result)) }
assembly ("memory-safe") { owner := mload(add(ownerBytes, 32)) }
revert InvalidOwnerBytesLength(ownerBytes);
Change to ownerBytes.length
#0 - raymondfam
2024-03-23T01:07:11Z
L4 to #22
L1: It's pre-checked and post-checked respectively by the source/destination function. N4: It's going to cause type mismatch from bytes to unit256
2L and 3 NC.
#1 - c4-pre-sort
2024-03-23T01:07:17Z
raymondfam marked the issue as sufficient quality report
#2 - c4-judge
2024-03-27T13:10:18Z
3docSec marked the issue as grade-a