Skip to content

Instantly share code, notes, and snippets.

@Picodes
Picodes / KeeperRegistry.sol
Created September 9, 2022 12:09
KeeperRegistry
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.12;
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "../interfaces/ICoreBorrow.sol";
import "../interfaces/IKeeperRegistry.sol";

Report

Gas Optimizations

Issue Instances
[GAS-1] Cache array length outside of loop 14
[GAS-2] Use != 0 instead of > 0 for unsigned integer comparison 13

c4udit Report

Files analyzed

  • ../2022-10-3xcalibur/contracts/Core/SwapFactory.sol
  • ../2022-10-3xcalibur/contracts/Core/SwapPair.sol
  • ../2022-10-3xcalibur/contracts/periphery/Bribe.sol
  • ../2022-10-3xcalibur/contracts/periphery/Gauge.sol
  • ../2022-10-3xcalibur/contracts/periphery/Minter.sol
  • ../2022-10-3xcalibur/contracts/periphery/Multiswap.sol
  • ../2022-10-3xcalibur/contracts/periphery/Voter.sol

Report

Gas Optimizations

Issue Instances
[GAS-1] Cache array length outside of loop 10
[GAS-2] Use != 0 instead of > 0 for unsigned integer comparison 77

c4udit Report

Files analyzed

  • ../2022-10-holograph/contracts/HolographBridge.sol
  • ../2022-10-holograph/contracts/HolographFactory.sol
  • ../2022-10-holograph/contracts/HolographOperator.sol
  • ../2022-10-holograph/contracts/abstract/ERC20H.sol
  • ../2022-10-holograph/contracts/abstract/ERC721H.sol
  • ../2022-10-holograph/contracts/enforcer/HolographERC20.sol

c4udit Report

Files analyzed

  • ../2022-10-holograph/contracts/HolographBridge.sol
  • ../2022-10-holograph/contracts/HolographFactory.sol
  • ../2022-10-holograph/contracts/HolographOperator.sol
  • ../2022-10-holograph/contracts/abstract/ERC20H.sol
  • ../2022-10-holograph/contracts/abstract/ERC721H.sol
  • ../2022-10-holograph/contracts/enforcer/HolographERC20.sol

Report

Gas Optimizations

Issue Instances
[GAS-1] Cache array length outside of loop 6
[GAS-2] Use != 0 instead of > 0 for unsigned integer comparison 7

c4udit Report

Files analyzed

  • ../2022-10-juicebox/contracts/JB721GlobalGovernance.sol
  • ../2022-10-juicebox/contracts/JB721TieredGovernance.sol
  • ../2022-10-juicebox/contracts/JBTiered721Delegate.sol
  • ../2022-10-juicebox/contracts/JBTiered721DelegateDeployer.sol
  • ../2022-10-juicebox/contracts/JBTiered721DelegateProjectDeployer.sol
  • ../2022-10-juicebox/contracts/JBTiered721DelegateStore.sol
  • ../2022-10-juicebox/contracts/abstract/JB721Delegate.sol

Report

Gas Optimizations

Issue Instances
[GAS-1] Cache array length outside of loop 3
[GAS-2] Use != 0 instead of > 0 for unsigned integer comparison 4

Report

Gas Optimizations

Issue Instances
[GAS-1] Use != 0 instead of > 0 for unsigned integer comparison 20
[GAS-2] Using bools for storage incurs overhead 4