All Projects → byterocket → c4-common-issues

byterocket / c4-common-issues

Licence: other
A collection of common security issues and possible gas optimizations in solidity smart contracts

Projects that are alternatives of or similar to c4-common-issues

revm
Revolutionary Machine (revm) is a fast Ethereum virtual machine written in rust.
Stars: ✭ 383 (+350.59%)
Mutual labels:  evm
freeaudit
Packaging audit toolkit using vulners.com vulnerability database
Stars: ✭ 19 (-77.65%)
Mutual labels:  audit
ZYX-20
A Zyx Network client based on the go-ethereum fork
Stars: ✭ 0 (-100%)
Mutual labels:  evm
intercept
INTERCEPT / Policy as Code Static Analysis Auditing / SAST
Stars: ✭ 54 (-36.47%)
Mutual labels:  audit
Metrix
Decentralized, Anonymous, Fast & Secure Cryptocurrency
Stars: ✭ 41 (-51.76%)
Mutual labels:  evm
grails-audit-logging-plugin
The Grails Audit Logging Plugin
Stars: ✭ 49 (-42.35%)
Mutual labels:  audit
Generic-SQL-Audit-Trail
A generic audit trail based on triggers and dynamic SQL.
Stars: ✭ 15 (-82.35%)
Mutual labels:  audit
site-audit-seo
Web service and CLI tool for SEO site audit: crawl site, lighthouse all pages, view public reports in browser. Also output to console, json, csv, xlsx, Google Drive.
Stars: ✭ 91 (+7.06%)
Mutual labels:  audit
democracy
Tools for peer-to-peer privacy with Ethereum and AZTEC
Stars: ✭ 36 (-57.65%)
Mutual labels:  evm
DolphinChain
DolphinChain is the first Vulnerable Blockchain Application in the world!
Stars: ✭ 17 (-80%)
Mutual labels:  audit
vandal
Static program analysis framework for Ethereum smart contract bytecode.
Stars: ✭ 121 (+42.35%)
Mutual labels:  evm
ethereum-evm-illustrated
Ethereum EVM illustrated
Stars: ✭ 170 (+100%)
Mutual labels:  evm
cis-benchmark-centOS-8
Auditing Script based on CIS-BENCHMARK CENTOS 8
Stars: ✭ 34 (-60%)
Mutual labels:  audit
prb-math
Solidity library for advanced fixed-point math
Stars: ✭ 404 (+375.29%)
Mutual labels:  evm
intx
intx – extended precision integer library
Stars: ✭ 83 (-2.35%)
Mutual labels:  evm
lxd-probe
Open Source runtime scanner for Linux containers (LXD / LXC), It performs security audit checks based on CIS Linux containers Benchmark specification
Stars: ✭ 14 (-83.53%)
Mutual labels:  audit
bitprices
command-line tool that generates a report of transactions with the USD (fiat) value at the time of each transaction.
Stars: ✭ 17 (-80%)
Mutual labels:  audit
evaluatory
Web page evaluation with a focus on accessibility
Stars: ✭ 57 (-32.94%)
Mutual labels:  audit
verdaccio-audit
🛡🔬verdaccio plugin for npm audit support
Stars: ✭ 13 (-84.71%)
Mutual labels:  audit
cis-dil-benchmark
CIS Distribution Independent Linux Benchmark - InSpec Profile
Stars: ✭ 120 (+41.18%)
Mutual labels:  audit

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 submittion.

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].