Top Related Projects
Examples of Solidity security issues
Comprehensive list of known attack vectors and common anti-patterns
OpenZeppelin Contracts is a library for secure smart contract development.
The Ethereum Wiki
node of the decentralized oracle network, bridging on and off-chain computation
Quick Overview
Awesome Ethereum Security is a curated list of resources, tools, and best practices for Ethereum and smart contract security. It serves as a comprehensive guide for developers, auditors, and security researchers working in the Ethereum ecosystem, providing links to various tools, articles, and resources related to blockchain security.
Pros
- Extensive collection of security-related resources for Ethereum
- Regularly updated with new tools and information
- Well-organized into categories for easy navigation
- Maintained by Crytic, a reputable blockchain security company
Cons
- May be overwhelming for beginners due to the large amount of information
- Some linked resources might become outdated over time
- Lacks detailed explanations or tutorials for each tool or resource
- Primarily focused on Ethereum, with limited coverage of other blockchain platforms
Competitor Comparisons
Examples of Solidity security issues
Pros of not-so-smart-contracts
- Focuses on practical examples of vulnerable smart contracts
- Provides detailed explanations of vulnerabilities and their fixes
- Includes Solidity code snippets for each vulnerability
Cons of not-so-smart-contracts
- Limited scope compared to the comprehensive resource list in awesome-ethereum-security
- May not cover the latest security trends and tools
- Lacks links to external resources and tools
Code Comparison
not-so-smart-contracts:
function withdraw() public {
uint256 amount = balances[msg.sender];
(bool success, ) = msg.sender.call.value(amount)("");
require(success);
balances[msg.sender] = 0;
}
awesome-ethereum-security:
No direct code examples available in the repository.
The project primarily consists of curated links to external resources.
Summary
not-so-smart-contracts provides hands-on examples of vulnerable smart contracts with explanations and fixes, making it valuable for developers looking to understand common security issues. However, it has a narrower focus compared to awesome-ethereum-security, which offers a comprehensive list of resources covering various aspects of Ethereum security.
awesome-ethereum-security serves as an extensive collection of links to tools, articles, and best practices, making it an excellent starting point for researchers and developers seeking a broad overview of Ethereum security resources. However, it lacks the practical code examples found in not-so-smart-contracts.
Comprehensive list of known attack vectors and common anti-patterns
Pros of solidity-security-blog
- Focuses specifically on Solidity security, providing in-depth analysis
- Offers practical examples and case studies of vulnerabilities
- Regularly updated with new security findings and best practices
Cons of solidity-security-blog
- Narrower scope, primarily covering Solidity-specific issues
- Less comprehensive in terms of overall Ethereum security resources
- May require more technical knowledge to fully understand the content
Code Comparison
solidity-security-blog:
function withdraw() public {
uint256 amount = balances[msg.sender];
require(amount > 0);
balances[msg.sender] = 0;
msg.sender.transfer(amount);
}
awesome-ethereum-security:
function transfer(address to, uint256 amount) public returns (bool) {
require(balanceOf[msg.sender] >= amount, "Insufficient balance");
balanceOf[msg.sender] -= amount;
balanceOf[to] += amount;
emit Transfer(msg.sender, to, amount);
return true;
}
The solidity-security-blog example demonstrates a common vulnerability (reentrancy), while awesome-ethereum-security provides a standard implementation of a transfer function, highlighting the different focus areas of each repository.
OpenZeppelin Contracts is a library for secure smart contract development.
Pros of openzeppelin-contracts
- Provides a comprehensive library of secure, tested, and community-audited smart contracts
- Regularly updated and maintained by a dedicated team of experts
- Offers a wide range of reusable components for common use cases in Ethereum development
Cons of openzeppelin-contracts
- Focuses primarily on contract implementations rather than educational resources
- May require more in-depth knowledge to utilize effectively compared to a curated list of resources
- Limited to Solidity contracts, whereas awesome-ethereum-security covers a broader range of topics
Code Comparison
openzeppelin-contracts (ERC20 implementation):
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
awesome-ethereum-security (no direct code, but example of a linked resource):
contract Vulnerable {
mapping(address => uint) public balances;
function withdraw() public {
uint bal = balances[msg.sender];
require(bal > 0);
(bool sent, ) = msg.sender.call{value: bal}("");
require(sent, "Failed to send Ether");
balances[msg.sender] = 0;
}
}
Note: awesome-ethereum-security doesn't contain code directly but links to various resources, including code examples like the one shown above.
The Ethereum Wiki
Pros of ethereum/wiki
- Comprehensive coverage of Ethereum ecosystem, including non-security topics
- Official Ethereum Foundation resource, potentially more authoritative
- Collaborative wiki format allows for community contributions and updates
Cons of ethereum/wiki
- Less focused on security-specific content
- May contain outdated information due to the rapidly evolving nature of Ethereum
- Larger scope can make it harder to find specific security-related information
Code comparison
While both repositories don't primarily focus on code, here's a comparison of how they might present a simple smart contract example:
ethereum/wiki:
pragma solidity ^0.8.0;
contract SimpleStorage {
uint256 storedData;
function set(uint256 x) public {
storedData = x;
}
function get() public view returns (uint256) {
return storedData;
}
}
awesome-ethereum-security:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract SimpleStorage {
uint256 private storedData;
function set(uint256 x) public {
storedData = x;
}
function get() public view returns (uint256) {
return storedData;
}
}
The awesome-ethereum-security example might include additional security considerations or best practices, such as the SPDX license identifier and explicitly declaring the visibility of state variables.
node of the decentralized oracle network, bridging on and off-chain computation
Pros of Chainlink
- Actively maintained and developed project with frequent updates
- Comprehensive documentation and extensive examples for integrating oracles
- Large community and ecosystem support for real-world blockchain applications
Cons of Chainlink
- Focused specifically on oracle solutions, less broad in scope for Ethereum security
- Steeper learning curve for developers new to blockchain technology
- Requires more resources to run and integrate compared to a curated list
Code Comparison
Chainlink (Smart Contract):
pragma solidity ^0.8.7;
import "@chainlink/contracts/src/v0.8/ChainlinkClient.sol";
contract PriceConsumerV3 is ChainlinkClient {
using Chainlink for Chainlink.Request;
// ... (contract implementation)
}
Awesome Ethereum Security (README.md):
# Awesome Ethereum Security
A curated list of awesome Ethereum security resources
## Contents
- [Smart Contract Security](#smart-contract-security)
- [Tools](#tools)
Summary
Chainlink is a comprehensive oracle solution for blockchain networks, offering robust infrastructure and tools for connecting smart contracts with real-world data. Awesome Ethereum Security, on the other hand, is a curated list of resources focusing on Ethereum security best practices, tools, and vulnerabilities. While Chainlink provides practical implementation and integration capabilities, Awesome Ethereum Security serves as a valuable reference for developers looking to enhance their understanding of Ethereum security concepts and tools.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Awesome Ethereum Security 
A curated list of awesome Ethereum security references, guidance, tools, and more.
Join Trail of Bits for a free Ethereum Office Hours session by reserving a slot on Calendly. An engineer from Trail of Bits will assist you in applying advanced security (tools)[#tools] and practices to your smart contract code.
Contents
Learning
Security references
- Comprehensive list of known attack vectors for Solidity
- Consensys Best Practices
- Decentralized Application Security Project
- Solidity Security Considerations
- Solidity v0.5.0 Breaking Changes
Insecurity references
Capture the Flag and Wargames
Writeups
- Hands on the Ethernaut CTF - Writeups for various Ethernaut CTF challenge contracts.
- Ethernaut - Naught Coin (ERC20) Exploitation - Writeup for a vulnerable ERC20 from the Ethernaut CTF.
- EtherHack CTF Writeup - Writeup for EtherHack CTF challenges.
- PolySwarm Smart Contract Hacking Challenge Writeup - Demonstrates advanced use of Manticore
Coordinated disclosure
- Blockchain Security Contacts - Security contact info for blockchain projects
Blogs
- Hacking Distributed - Emin Gün Sirer, professor in Cornell Techâs IC3 lab focused on blockchain security.
- Phil Does Security - Phil Daian, grad student behind KEVM, Hydra, and other Ethereum academic projects
- Trail of Bits - Cybersecurity R&D firm with a blockchain security practice
- Martin Holst Swende - Martin Swende, programmer and appsec consultant
- SmartDec blog - Company blog about security issues and practices within blockchain ecosystem
Notable blog posts
- Contract upgrade anti-patterns
- How the winner got Fomo3D prizeâââA Detailed Explanation
- How to debug Solidity Smart Contracts with Tenderly and Truffle
- Lashing out at a Spank Channel
- Malicious GasToken Minting
- Missing return value bug in ERC20 tokens
- Not A Fair Game â Fairness Analysis of Dice2win
- Initial Formal Verification of Ethereum Casper Protocol
- Security considerations for Shamir's secret sharing
- SmartDec smart contract audit beginner's guide
- The Anatomy of a Block Stuffing Attack
- The phenomenon of smart contract honeypots
- Use our suite of Ethereum security tools
- Vertcoin (VTC) was successfully 51% attacked
Conference talks
Title | Conference | Year |
---|---|---|
Predicting Random Numbers in Ethereum Smart Contracts | OWASP AppSec | 2018 |
Blockchain Autopsies - Analyzing Smart Contract Deaths | Blackhat USA | 2018 |
Rattle - an EVM binary analysis framework | reCON | 2018 |
Blackhat Ethereum | CanSecWest | 2018 |
Smashing Ethereum Smart Contracts for Fun and Profit | HITB Amsterdam | 2018 |
Automatic Bug Finding for the Blockchain | EkoParty | 2017 |
Podcasts and Episodes
Podcasts
Episodes
- The Smartest Contract #15 - Trail of Bitsâ Outlook on Security w/ JP Smith
- The Smartest Contract #8 - Smart Contract Security and Honeypots w/ Gerhard Wagner
- Zero Knowledge #29 - The DAO, the White Hat Hacker Group & Giveth w/ Griff Green
- Zero Knowledge #16 - Talking security with JP Smith from Trail of Bits
- Risky Business #488 - JP Smith about all things blockchain
Tools
Visualization
- ethereum-graph-debugger - A graphical EVM debugger. Displays the entire program control flow graph.
- Slither - Slither can map method visibility and modifiers, state variables that are read and written, calls, and can print the inheritance graph of a smart contract
- Solgraph - Generates DOT graphs with function control flow of a solidity contract
- Surya - Generates various visual outputs of function call graphs
- sol-function-profiler - Solidity contract function profiler
Linters
- Remix - Browser-based Solidity IDE with linting features
- SmarrtCheck - A linter for Solidity and Vyper that checks code for security issues and bad practices.
- Solhint - Linter for both security and style-guide validations. It strictly adheres to the Solidity Style Guide.
- Solium - Linter for both security and style-guide validations. Does not strictly adhere to the Solidity Style Guide.
Bug finding tools
- Echidna - Fuzzer for Ethereum smart contracts. Uses property testing to generate malicious inputs that break smart contracts.
- Manticore - Symbolic execution tool for Ethereum smart contracts that includes detectors for common security flaws
- Mythril OSS - Open-source security analysis tool for Ethereum smart contracts built around detector modules
- Securify - Static analysis tool from ChainSecurity
- Slither - Static analysis framework, written in Python, with detectors for many common Solidity issues
Verification tools
- KEVM - K Semantics of the Ethereum Virtual Machine (EVM)
- Manticore - Symbolic execution tool for EVM
Reversing tools
- abi-decompiler - EVM reverse engineering helper utility
- ethereum-dasm - EVM disassembler with static and dynamic analysis abilities, including function signature lookup
- Ethersplay - Visual disassembler for EVM bytecode built on Binary Ninja
- evmlab - Utilities for interacting with the Ethereum virtual machine
- IDA-EVM - IDA plugin to view EVM instructions
- Panoramix
- pyevmasm - EVM assembler and disassembler with a CLI and a Python API
- Rattle - EVM binary static analysis framework. Produces SSA representations of EVM code.
Custody
- Subzero - Subzero is an HSM-backed method for cold storage of Bitcoin developed by Square
Communities
Other Awesome Lists
- Awesome AppSec
- Awesome Ethereum Virtual Machine
- Awesome Solidity
- Crypto projects that might not suck
Contributing
We welcome contributions that help curate this awesome list. Please refer to the contributing guidelines when submitting PRs. Thanks!
Top Related Projects
Examples of Solidity security issues
Comprehensive list of known attack vectors and common anti-patterns
OpenZeppelin Contracts is a library for secure smart contract development.
The Ethereum Wiki
node of the decentralized oracle network, bridging on and off-chain computation
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot