What's being tested?

ERCx runs property tests. The properties and the corresponding tests are described in the tables below. Each test has its own row, indicating the conformance level of that test (ABI, Minimal, Recommended, and Desirable) the name of that test (as displayed in the report) and an informal description of the property being tested. Test levels are understood as follows.

  • Tests of level ABI check the name, inputs, and outputs of the token functions.
  • Tests of level Minimal check the properties that MUST be respected.
  • Tests of level Recommended check the properties that SHOULD be respected.
  • Tests of level Desirable check properties we deem important to the sane functioning of a token and complement the standard specification. Some of these properties were violated in ERC-20 hacks. Examples of desirable properties include (i) self-transferring tokens is allowed but must not modify the balance (ii) increase of allowance should rely on an increaseAllowance function.
  • Tests of level Fingerprint check feature properties of the contract; these are neither desirable nor undesirable properties but indicate implementation choices of the contract. Examples of fingerprint properties include the infinite approval property; which holds if once the approval is set to type(uint256).max, it is not decreased by transferFrom operations.
  • Tests of level AddOn check for properties of add-on functions commonly created and used by developers, such as increase/decreaseAllowance. Test results in grey represent non-tested properties. Such properties were not tested because the token does not have the required function(s).

In the below description of properties, we use the following terminology:

  • tokenSender: address that sends tokens (usually in a transaction);
  • tokenReceiver: address that receives tokens (usually in a transaction);
  • tokenApprover: address that approves tokens (usually in an approval);
  • tokenApprovee: address that tokenApprover approves (usually in an approval).

Tests of level ABI check the name, inputs, and outputs of the token functions.

PropertyTest name