Biconomy - Smart Contract Wallet contest - pauliax's results

One-Stop solution to enable an effortless experience in your dApp to onboard new users and abstract away transaction complexities.

General Information

Platform: Code4rena

Start Date: 04/01/2023

Pot Size: $60,500 USDC

Total HM: 15

Participants: 105

Period: 5 days

Judge: gzeon

Total Solo HM: 1

Id: 200

League: ETH

Biconomy

Findings Distribution

Researcher Performance

Rank: 78/105

Findings: 1

Award: $36.50

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

  • ReentrancyGuardUpgradeable is not initialized by calling __ReentrancyGuard_init or __ReentrancyGuard_init_unchained:
contract SmartAccount is 
     ...
     ReentrancyGuardUpgradeable

https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/master/contracts/security/ReentrancyGuardUpgradeable.sol#L40-L46

  • Setting an owner could be separated into a 2-step process to prevent accidental mistakes:
  function setOwner(address _newOwner) external mixedAuth
  • No need for assembly, can use block.chainid:
function getChainId() public view returns (uint256) {
   uint256 id;
   // solhint-disable-next-line no-inline-assembly
   assembly {
       id := chainid()
   }
   return id;
}
  • Should be <=:
  require(stake < type(uint112).max, "stake overflow");
  • Should better use safe casting:
  info.deposit = uint112(info.deposit - withdrawAmount);
  • Probably you are aware that this is not a reliable way to check for EOA:
  function isContract(address account) internal view returns (bool) {
    uint256 csize;
    // solhint-disable-next-line no-inline-assembly
    assembly { csize := extcodesize(account) }
    return csize != 0;
  }

#0 - c4-judge

2023-01-22T15:53:23Z

gzeon-c4 marked the issue as grade-b

#1 - c4-sponsor

2023-02-09T11:17:18Z

livingrockrises marked the issue as sponsor confirmed

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter