crytic / roundme

GNU Affero General Public License v3.0
86 stars 6 forks source link

roundme

roundme is a human-assisted rounding analyzer. It helps its operator determine whether an arithmetic operation should round up or down.

Features

Rules

rounding() is the expected rounding direction for the result (up or down)

How to use

Running roundme analyze --output-format pdf on the default configuration will generate the following:

Example

Configuration

roundme relies on a configuration file:

formula: a * b / c 
round_up: true
less_than_one: ["a * b"] # optional
greater_than_one: ["c"] # optional

See the balancer V2 example.

Install

Install with

cargo install roundme

To install the latest GitHub version

git clone git@github.com:crytic/roundme.git
cd roundme
cargo install --path .