Socket
Book a DemoInstallSign in
Socket

eth-wake

Package Overview
Dependencies
Maintainers
2
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eth-wake

Wake is a Python-based Solidity development and testing framework with built-in vulnerability detectors.

pipPyPI
Version
4.21.0
Maintainers
2

Wake cover

Wake

The fuzzing and testing framework for Solidity, written in Python. Wake helps you write safer smart contracts, faster.

Built by Ackee Blockchain Security — trusted auditors of Lido, Safe, and Axelar.

Why Wake?

  • Built-in fuzzing — automatically generate diverse inputs and edge cases to uncover hidden vulnerabilities
  • Vulnerability detectors — catch reentrancy, overflows, and logic flaws early
  • Seamless developer experience — VS Code extension, GitHub Actions, solc manager
  • Cross-chain testing — works with Anvil, Hardhat, and Ganache

Features and benefits

  • Testing framework based on pytest — write clean, simple tests with familiar tooling
  • Manually-guided fuzzing (MGF) — combine automated fuzzing with human insights to target specific contract behaviors and edge cases
  • Property-based fuzzer — automatically generate diverse inputs to uncover hidden bugs faster
  • Deployments & mainnet interactions — test contracts in realistic environments before going live
  • Vulnerability and code quality detectors — detect reentrancy, overflows, and bad patterns early in development
  • Printers for extracting useful information from Solidity code — gain insights into contract structures and flows
  • Static analysis framework for custom detectors and printers — extend Wake with project-specific rules
  • GitHub actions for setting up Wake and running detectors — integrate seamlessly into CI/CD pipelines
  • Language server (LSP) — get autocompletion, hints, and references inside your IDE
  • VS Code extension (Solidity (Wake)) — instant feedback while writing Solidity code
  • Solc version manager — manage compiler versions with ease for consistent builds

Wake vs other tools

SlitherApeWorxBrownieHardhatFoundryWake
LanguagePythonPythonPythonTypescriptRustPython
Maintained
Testing
Fuzzing✅*✅**
Detectors
Language server

* available with Hypothesis plugin ** only in Solidity

Dependencies

  • Python (version 3.8 or higher)
  • Rosetta must be enabled on Apple Silicon Macs

Installation

via pip

pip3 install eth-wake

Discovered vulnerabilities

VulnerabilitySeverityProjectMethodDiscovered byResources
Profit & loss accounted twiceCriticalIPORFuzz testAckee BlockchainReport, Wake tests
Loan refinancing reentrancyCriticalPWNDetectorAckee BlockchainReport
Incorrect optimization in loan refinancingCriticalPWNFuzz testAckee BlockchainReport, Wake tests
Incorrect enqueued keys accountingHighLidoFuzz testAckee BlockchainReport, Wake tests
Console permanent denial of serviceHighBrahmaFuzz testAckee BlockchainReport
Swap unwinding formula errorHighIPORFuzz testAckee BlockchainReport, Wake tests
Swap unwinding fee accounted twiceHighIPORFuzz testAckee BlockchainReport, Wake tests
Incorrect event dataHighSoladyIntegration testAckee BlockchainReport, Wake tests
INTEREST_FROM_STRATEGY_BELOW_ZERO reverts DoSMediumIPORFuzz testAckee BlockchainReport, Wake tests
Inaccurate hypothetical interest formulaMediumIPORFuzz testAckee BlockchainReport, Wake tests
Swap unwinding fee normalization errorMediumIPORFuzz testAckee BlockchainReport, Wake tests
Liquidation deposits accounted into LP balanceMediumIPORFuzz testAckee BlockchainReport, Wake tests
Missing receive functionMediumAxelarFuzz testAckee BlockchainWake tests
SafeERC20 not used for approveMediumLidoFuzz testAckee BlockchainWake tests
Non-optimistic vetting & unbonded keys bad accountingMediumLidoFuzz testAckee BlockchainReport, Wake tests
Chainlink common denominator bad logicMediumPWNFuzz testAckee BlockchainReport, Wake tests
Outdated/reverting Chainlink feed causes DoSMediumPWNFuzz testAckee BlockchainReport, Wake tests
Incorrect EIP-712 typehashMediumPWNDetectorAckee BlockchainReport
Incorrect EIP-712 data encodingMediumPWNFuzz testAckee BlockchainReport, Wake tests

Features in-depth

Fuzzer

Wake’s fuzzer builds on top of the testing framework and allows efficient fuzz testing of Solidity smart contracts.

from wake.testing import *
from wake.testing.fuzzing import *
from pytypes.contracts.Counter import Counter

class CounterTest(FuzzTest):
    def pre_sequence(self) -> None:
        self.counter = Counter.deploy()
        self.count = 0

    @flow()
    def increment(self) -> None:
        self.counter.increment()
        self.count += 1

    @flow()
    def decrement(self) -> None:
        with may_revert(PanicCodeEnum.UNDERFLOW_OVERFLOW) as e:
            self.counter.decrement()

        if e.value is not None:
            assert self.count == 0
        else:
            self.count -= 1

    @invariant(period=10)
    def count(self) -> None:
        assert self.counter.count() == self.count

@chain.connect()
def test_counter():
    CounterTest().run(sequences_count=30, flows_count=100)

Detectors and printers

All vulnerability & code quality detectors can be run using:

wake detect all

Run a specific detector:

wake detect <detector-name>

See the documentation for a full list of detectors.

Run a printer:

wake print <printer-name>

See the documentation for a full list of printers.

For custom detectors & printers, check the getting started guide and repos for wake_detectors and wake_printers.

LSP Server

Wake implements an LSP server for Solidity. Run it with:

wake lsp

Or specify a port (default 65432):

wake lsp --port 1234

See all features in the documentation.

Documentation, contribution and community

License

This project is licensed under the ISC license.

Partners

RockawayXCoinbase

Keywords

ethereum

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts