Skip to content

Latest commit

 

History

History
54 lines (39 loc) · 2.79 KB

Audit.md

File metadata and controls

54 lines (39 loc) · 2.79 KB

Installation

Echidna See Echidna Installation.

solc-select use 0.8.17
echidna . --contract CONTRACT_NAME --test-mode <ASSERTION/PROPERTY> --config CONFIG_FILE.yaml

Test if crytic-compile and slither are working properly in the contracts directory.

yarn compile-echidna

Test-mode set to ASSERTION(a) will run the assertions, while PROPERTY(p) will run the properties.

yarn fuzz-p
yarn fuzz-a

Properties

Echidna properties can be broadly divided in two categories: general properties of the contracts that states what user can and cannot do and specific properties based on unit tests.

To test a property, run echidna . CONTRACT_name --config CONFIG_FILE.yaml.

General Properties

Description Name Contract Finding Status
Swap count should be impossible to overflow. id_overflow TestSwaplace PASSED
Swap count is only 0 at initialization, then increments. id_never_zero_after_init TestSwaplace PASSED
Sender is always the owner of the swap and IDs always increment. create_swap TestSwaplace PASSED
Accepting swaps through allowances shouldn't mess the swap. accept_swap TestSwaplace PASSED
Invalid swap expiration should not be allowed to be created. revert_invalid_expiry TestSwapFactory PASSED
Empty asset class should not be allowed in the swap. revert_invalid_length TestSwapFactory PASSED

General Assertions

Description Name Contract Finding Status
Any inputs within the type should be considered valid. has_values TestSwapFactory PASSED
Should make an array with a single asset for the swap. make_asset_array TestSwapFactory PASSED
Should build a valid swap for the createSwap function. make_valid_swap TestSwapFactory PASSED