Git Product home page Git Product logo

c4-common-issues's Introduction

c4-common-issues

This repository aims to provide a list of issues found regularly in Code4Rena contests.

Introduction

Code4Rena runs community-driven contests for smart contract audits in which wardens search for issues and judges allocate awards to wardens based on performance.

A problem currently in the community is how to handle commonly found issues as they increase the judge's workload.

This repo aims to identify common issues and provide background information.

The goal is, that wardens include the issue's identifier in a contest submission.

This would help judges mark the issues as duplicates and hopefully decrease their workload.

Gas Optimization Issues

Identifier Title
G001 Don't Initialize Variables with Default Value
G002 Cache Array Length Outside of Loop
G003 Use != 0 instead of > 0 for Unsigned Integer Comparison
G004 Remove Unused Variables
G005 Make Variable constant/immutable
G006 Use immutable for OpenZeppelin AccessControl's Roles Declarations
G007 Long Revert Strings
G008 Use Shift Right/Left instead of Division/Multiplication if possible
G009 Make Function external instead of public
G010 Make Function payable
G011 Unnecessary checked arithmetic in for loop
G012 Use Prefix Increment instead of Postfix Increment if possible

Non-Critical Issues

Identifier Title
NC001 Functions Mutating Storage Should Emit Events

Low Risk Issues

Identifier Title
L001 Unsafe ERC20 Operation(s)
L002 FeeOnTransfer Tokens not Supported
L003 Unspecific Compiler Version Pragma
L004 Use Two-Step Transfer Pattern for Access Controls
L005 Do not use Deprecated Library Functions
L006 Check that Contract Exists before using solmate's SafeTransferLib

Contribution

Any kind of contribution is highly welcome!

License

This work is licensed under a Creative Commons Attribution 4.0 International License.

c4-common-issues's People

Contributors

pmerkleplant avatar htadashi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.