CertiK Prover
Login

CertiK Prover user guide

Quick start

CertiK Prover checks Solidity code against specifications—precise statements of what the code must do—for every allowed input, not only the cases a test happens to try. Use it from the command line on your own machine, or through the web app for projects CertiK verifies with you.

You will learn
How to install the command-line tools, run a first check, and sign in to the web app.

Choose how to start

Command line

Install csol and csol-project, and check contracts on your own machine while you write them. Your code stays local.

Set up the command line

Web app

Sign in with your CertiK Account to review verification results for the projects CertiK shares with your organization.

Set up the web app

Command line

The CertiK Prover package installs two commands: csol checks one Solidity entry file, and csol-project checks every entry file listed in a project file.

  1. Check the prerequisites

    You need Node.js 22.12 or newer with npm, on macOS, Linux (x64 or ARM64), or Windows x64.

    Terminal
    node --version
  2. Install the package

    CertiK provides the package as a file named certikproject-csol-verifier-<version>.tgz. From the folder that contains it, install it globally with npm:

    Terminal
    npm install -g ./certikproject-csol-verifier-<version>.tgz

    If you installed the older standalone csol-project package, uninstall it first, or npm stops with an EEXIST error. Do not use --force.

    Terminal
    npm uninstall -g csol-project
  3. Confirm the installation

    Terminal
    csol --version
    csol-project --version

    Both commands print the package version. The first csol run may download and cache a Java runtime and the Z3 solver, so it needs network access once.

  4. Write a contract with a specification

    Save this as Counter.sol. The lines that start with //@ are its specification: after a successful call, value has grown by exactly one, the function returns the new value, and nothing else changes. Basics explains where specifications go.

    Counter.sol
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8.20;
    
    contract Counter {
        uint256 public value;
    
        //@ ensures value == \old(value) + 1;
        //@ ensures \result == value;
        //@ assignable value;
        function increment() external returns (uint256) {
            value += 1;
            return value;
        }
    }
  5. Check it with csol

    Run csol on the file. CertiK Prover checks every specification and ends with a summary:

    Terminal
    csol Counter.sol
    Output
    … Function 'Counter.increment' verification success. (703ms)
    … === Verification Summary: 1 total, 1 passed, 0 failed, 0 errors ===
    … Verification success.

    Give csol one entry file. It follows that file's imports, so you never list every file:

    Terminal
    # Wrong: a directory or a list of files
    csol contracts/ Counter.sol Helper.sol
    
    # Right: one entry file; CertiK Prover follows its imports
    csol Counter.sol
  6. Read the exit code

    Scripts and CI can rely on the exit code of csol and csol-project:

    Exit codeMeaning
    0Every checked specification passed.
    1CertiK Prover found a counterexample: a specification can be violated.
    2The command, the source, or its compilation failed, so nothing was checked.
    3A check was inconclusive, or the verifier hit an internal error.
  7. Check a whole project with csol-project

    When a project has several entry files, list them in csol-project.yaml at the project root. Each entry has an id and the path of its entry file:

    csol-project.yaml
    schema_version: 1
    entrypoints:
      - id: counter
        path: src/Counter.sol

    Run csol-project from the project root. It checks each entry with csol and shows live progress:

    Terminal
    csol-project
    Output
    Project: ./csol-project.yaml
    Entrypoints: 1 | Prover jobs: 1
    
    Running counter (src/Counter.sol)
    ✓ counter [1/1]: █ (1.7s, pass: 1, fail: 0, timeout: 0)
    
    No failures or errors.
    
    Exit: 0

    Each run saves its results in a new folder under verification-runs/, with one subfolder per entry. Add --jobs 4 to check up to four entries in parallel; csol-project --help lists every option.

    verification-runs/csol-project-<timestamp>-<pid>/
    ├── summary.json
    └── 0001-counter/
        ├── result.json
        ├── events.jsonl
        └── stderr.log

csol and csol-project run CertiK Prover on your machine. They do not sign in or upload your code.

Web app

In the web app, CertiK Prover runs on CertiK's servers against the project revisions CertiK has set up with you. You can review every result, counterexamples included.

  1. Accept your CertiK Account invitation

    CertiK invites you to CertiK Account by email. Follow the link to create your account, or sign in if you already have one. The invitation adds you to your organization, and your organization is what CertiK grants access to.

  2. Sign in to CertiK Prover

    Open CertiK Prover, select Login, then Continue with CertiK Account. If you belong to several organizations, choose the one CertiK invited you to.

    Signing out of CertiK Prover leaves your CertiK Account signed in.

  3. Open your project

    After sign-in, the Projects page lists each verified project with its latest outcome. If it shows No accessible projects, ask your CertiK contact to grant your organization access.

  4. Review the results

    On the project page, open Results for a finished task to see every entry and its outcome. Each failed specification comes with its counterexample.

A running task shows progress, not a result. Read the outcome only after the task finishes.

Run the full examples

Every code sample and playground on this page is a complete contract in the CertiK Prover Server Tutorial project, where CertiK Prover runs it on the server. Sign in and open an entry's results to see the real run behind each simulated one.