🌱
Dev Compendium
  • Ethereum
    • Solidity
      • EVM
      • Architecture
      • Execution Context
      • Transactions
      • Gas
      • Calldata, Memory & Storage
      • Gas Optimisation
      • Function Declarations
      • receive() & fallback()
      • CALL vs. DELEGATE CALL
    • Yul
      • Introduction
      • Types
      • Basic Operations
      • Storage
      • Memory
        • Arrays
        • Structs
        • Tuples, revert, keccak256
        • Logs and Events
        • Gotchas
        • abi.encode
      • Calldata
        • External Calls
        • Dynamic Length Inputs
        • Transferring Value
        • Receiving Contract Calls
      • Contracts in Yul
      • Other Yul Functions
    • Foundry
    • Security
      • Common Vulnerabilities
      • Best Practices
      • Development Workflow
      • Contract Migration
    • Auditing Tools
      • Slither
      • Mythril
      • Fuzzing
    • Upgradable Contracts
      • Upgrade Patterns
      • ERC-1967 Implementation
      • Deployment
    • MEV
    • Tooling
      • Chainlink
      • IPFS
      • Radicle
    • Frontend
      • Contract Hooks
      • Wallet Connection
        • wagmi.sh
        • Rainbow Kit
      • thirdweb
    • Protocol Research
      • Uniswap v2
      • Uniswap v3
      • Curve
      • GMX
  • Starkware
    • Fundamentals
    • Account Abstraction
    • Universal Deployer
    • Cairo 1.0
    • starknet.js
    • Security Model
  • Zero Knowledge
    • Group Theory
    • ECDSA
  • Rust
    • Basic Operations
    • Set up
    • Primitives
    • Control Flow
    • Mutability & Shadowing
    • Adding Behavior
    • Lifetimes
    • Std Library
  • SUI
    • Architecture
    • Consensus Mechanism
    • Local Node Setup
    • Sui Client CLI
    • Move Contracts
      • Move
      • Move.toml
      • Move.lock
      • Accessing Time in Sui Move
      • Set up Development Framework
      • Debug & Publish
      • Package Upgrades
      • Sui Move Library
      • Difference from Core Move
    • Object Programming
      • Object Basics
      • Using Objects
      • Immutable Objects
      • Object Wrapping
      • Dynamic Fields
      • Collections
      • Unit Testing
      • Deployment with CLI
  • NEAR
    • Architecture
    • Contract Standards
      • Fungible Token (NEP-141)
      • Non-Fungible Token (NEP-171)
      • Storage Management (NEP-145)
      • Events (NEP-297)
      • Meta-Transactions
    • Rust Contracts
      • Development Workflow
      • Smart Contract Layout
      • Storage Management
      • Events & Meta-transactions
      • Method Types
      • Upgrading Contracts
      • Unit Testing
    • NEAR Libraries
    • Environment Variables
    • Serialisation
    • Security Concepts
    • Collections
    • JS SDK
Powered by GitBook
On this page
  1. Ethereum
  2. Security

Development Workflow

PreviousBest PracticesNextContract Migration

Last updated 1 year ago

Check for known security issues:

  • Review your contracts with . It has more than 70 built-in detectors for common vulnerabilities. Run it on every check-in with new code and ensure it gets a clean report (or use triage mode to silence certain issues).

Consider special features of your contract:

  • Are your contracts upgradeable? Review your upgradeability code for flaws with or . We've documented 17 ways upgrades can go sideways.

  • Do your contracts purport to conform to ERCs? Check them with . This tool instantly identifies deviations from six common specs.

  • Do you have unit tests in Truffle? Enrich them with . It automatically generates a robust suite of security properties for features of ERC20 based on your specific code.

  • Do you integrate with 3rd party tokens? Review our before relying on external contracts.

Visually inspect critical security features of your code:

  • Review Slither's printer. Avoid inadvertent shadowing and C3 linearization issues.

  • Review Slither's printer. It reports function visibility and access controls.

  • Review Slither's printer. It reports access controls on state variables.

Document critical security properties and use automated test generators to evaluate them:

  • Learn to . It's tough as first, but it's the single most important activity for achieving a good outcome. It's also a prerequisite for using any of the advanced techniques in this tutorial.

  • Define security properties in Solidity, for use with and . Focus on your state machine, access controls, arithmetic operations, external interactions, and standards conformance.

  • Define security properties with . Focus on inheritance, variable dependencies, access controls, and other structural issues.

Finally, be mindful of issues that automated tools cannot easily find:

  • Lack of privacy: everyone else can see your transactions while they're queued in the pool

  • Front running transactions

  • Cryptographic operations

  • Risky interactions with external DeFi components

Slither
slither-check-upgradeability
Crytic
slither-check-erc
slither-prop
token integration checklist
inheritance-graph
function-summary
vars-and-auth
document security properties for your code
Echidna
Manticore
Slither's Python API