Introduction

November 26, 2025 ยท View on GitHub

This file lists all the currently implemented Echidna property tests for ERC20, ERC721, ERC4626 and ABDKMath64x64. For each property, there is a permalink to the file implementing it in the repository and a small description of the invariant tested.

Table of contents

ERC20

Basic properties for standard functions

IDNameInvariant tested
ERC20-BASE-001test_ERC20_constantSupplyTotal supply should be constant for non-mintable and non-burnable tokens.
ERC20-BASE-002test_ERC20_userBalanceNotHigherThanSupplyNo user balance should be greater than the token's total supply.
ERC20-BASE-003test_ERC20_usersBalancesNotHigherThanSupplyThe sum of users balances should not be greater than the token's total supply.
ERC20-BASE-004test_ERC20_zeroAddressBalanceToken balance for address zero should be zero.
ERC20-BASE-005test_ERC20_transferToZeroAddresstransfers to zero address should not be allowed.
ERC20-BASE-006test_ERC20_transferFromToZeroAddresstransferFroms to zero address should not be allowed.
ERC20-BASE-007test_ERC20_selfTransferSelf transfers should not break accounting.
ERC20-BASE-008test_ERC20_selfTransferFromSelf transferFroms should not break accounting.
ERC20-BASE-009test_ERC20_transferMoreThanBalancetransfers for more than account balance should not be allowed.
ERC20-BASE-010test_ERC20_transferFromMoreThanBalancetransferFroms for more than account balance should not be allowed.
ERC20-BASE-011test_ERC20_transferZeroAmounttransfers for zero amount should not break accounting.
ERC20-BASE-012test_ERC20_transferFromZeroAmounttransferFroms for zero amount should not break accounting.
ERC20-BASE-013test_ERC20_transferValid transfers should update accounting correctly.
ERC20-BASE-014test_ERC20_transferFromValid transferFroms should update accounting correctly.
ERC20-BASE-015test_ERC20_setAllowanceAllowances should be set correctly when approve is called.
ERC20-BASE-016test_ERC20_setAllowanceTwiceAllowances should be updated correctly when approve is called twice.
ERC20-BASE-017test_ERC20_spendAllowanceAfterTransferAfter transferFrom, allowances should be updated correctly.

Tests for burnable tokens

IDNameInvariant tested
ERC20-BURNABLE-001test_ERC20_burnUser balance and total supply should be updated correctly when burn is called.
ERC20-BURNABLE-002test_ERC20_burnFromUser balance and total supply should be updated correctly when burnFrom is called.
ERC20-BURNABLE-003test_ERC20_burnFromUpdateAllowanceAllowances should be updated correctly when burnFrom is called.

Tests for mintable tokens

IDNameInvariant tested
ERC20-MINTABLE-001test_ERC20_mintTokensUser balance and total supply should be updated correctly after minting.

Tests for pausable tokens

IDNameInvariant tested
ERC20-PAUSABLE-001test_ERC20_pausedTransferToken transfers should not be possible when paused state is enabled.
ERC20-PAUSABLE-002test_ERC20_pausedTransferFromToken transferFroms should not be possible when paused state is enabled.

Tests for tokens implementing increaseAllowance and decreaseAllowance

IDNameInvariant tested
ERC20-ALLOWANCE-001test_ERC20_setAndIncreaseAllowanceAllowance should be updated correctly when increaseAllowance is called.
ERC20-ALLOWANCE-002test_ERC20_setAndDecreaseAllowanceAllowance should be updated correctly when decreaseAllowance is called.

ERC721

Basic properties for standard functions

IDNameInvariant tested
ERC721-BASE-001test_ERC721_balanceOfZeroAddressMustRevertCalling balanceOf for the zero address should revert.
ERC721-BASE-002test_ERC721_ownerOfInvalidTokenMustRevertCalling ownerOf for an invalid token should revert.
ERC721-BASE-003test_ERC721_approvingInvalidTokenMustRevertapprove() should revert on invalid token.
ERC721-BASE-004test_ERC721_transferFromNotApprovedtransferFrom() should revert if caller is not operator.
ERC721-BASE-005test_ERC721_transferFromResetApprovaltransferFrom() should reset approvals.
ERC721-BASE-006test_ERC721_transferFromUpdatesOwnertransferFrom() should update the token owner.
ERC721-BASE-007test_ERC721_transferFromZeroAddresstransferFrom() should revert if from is the zero address.
ERC721-BASE-008test_ERC721_transferToZeroAddresstransferFrom() should revert if to is the zero address.
ERC721-BASE-009test_ERC721_transferFromSelftransferFrom() to self should not break accounting.
ERC721-BASE-010test_ERC721_transferFromSelfResetsApprovaltransferFrom() to self should reset approvals.
ERC721-BASE-011test_ERC721_safeTransferFromRevertsOnNoncontractReceiversafeTransferFrom() should revert if receiver is a contract that does not implement onERC721Received()

Tests for burnable tokens

IDNameInvariant tested
ERC721-BURNABLE-001test_ERC721_burnReducesTotalSupplyUser balance and total supply should be updated correctly when burn is called.
ERC721-BURNABLE-002test_ERC721_burnRevertOnTransferFromPreviousOwnerA token that has been burned cannot be transferred.
ERC721-BURNABLE-003test_ERC721_burnRevertOnTransferFromZeroAddressA token that has been burned cannot be transferred.
ERC721-BURNABLE-004test_ERC721_burnRevertOnApproveA burned token should have its approvals reset.
ERC721-BURNABLE-005test_ERC721_burnRevertOnGetApprovedgetApproved() should revert if the token is burned.
ERC721-BURNABLE-006test_ERC721_burnRevertOnOwnerOfownerOf() should revert if the token has been burned.

Tests for mintable tokens

IDNameInvariant tested
ERC721-MINTABLE-001test_ERC721_mintIncreasesSupplyUser balance and total supply should be updated correctly after minting.
ERC721-MINTABLE-002test_ERC721_mintCreatesFreshTokenUser balance and total supply should be updated correctly after minting.

ERC4626

IDNameInvariant tested
ERC4626-001verify_assetMustNotRevertasset must not revert.
ERC4626-002verify_totalAssetsMustNotReverttotalAssets must not revert.
ERC4626-003verify_convertToAssetsMustNotRevertconvertToAssets must not revert for reasonable values.
ERC4626-004verify_convertToSharesMustNotRevertconvertToShares must not revert for reasonable values.
ERC4626-005verify_maxDepositMustNotRevertmaxDeposit must not revert.
ERC4626-006verify_maxMintMustNotRevertmaxMint must not revert.
ERC4626-007verify_maxRedeemMustNotRevertmaxRedeem must not revert.
ERC4626-008verify_maxWithdrawMustNotRevertmaxWithdraw must not revert.
ERC4626-009verify_redeemViaApprovalProxyRedeem via approval proxy.
ERC4626-010verify_withdrawViaApprovalProxyWithdraw via approval proxy.
ERC4626-011verify_withdrawRequiresTokenApprovalWithdraw requires approval for third parties.
ERC4626-012verify_redeemRequiresTokenApprovalRedeem requires approval for third parties.
ERC4626-013verify_previewDepositRoundingDirectionchecks previewDeposit rounding direction
ERC4626-014verify_previewMintRoundingDirectionchecks previewMint rounding direction
ERC4626-015verify_convertToSharesRoundingDirectionchecks convertToShares rounding direction
ERC4626-016verify_previewRedeemRoundingDirectionchecks previewRedeem rounding direction
ERC4626-017verify_previewWithdrawRoundingDirectionchecks previewWithdraw rounding direction
ERC4626-018verify_convertToAssetsRoundingDirectionchecks convertToAssets rounding direction
ERC4626-019verify_depositRoundingDirectionchecks deposit rounding direction
ERC4626-020verify_mintRoundingDirectionchecks mint rounding direction
ERC4626-021verify_withdrawRoundingDirectionchecks withdraw rounding direction
ERC4626-022verify_redeemRoundingDirectionchecks redeem rounding direction
ERC4626-023verify_maxDepositIgnoresSenderAssetsmaxDeposit must assume the agent has infinite assets.
ERC4626-024verify_maxMintIgnoresSenderAssetsmaxMint must assume the agent has infinite assets.
ERC4626-025verify_previewMintIgnoresSenderpreviewMint must not be dependent on msg.sender.
ERC4626-026verify_previewDepositIgnoresSenderpreviewDeposit must not be dependent on msg.sender.
ERC4626-027verify_previewWithdrawIgnoresSenderpreviewWithdraw must not be dependent on msg.sender.
ERC4626-028verify_previewRedeemIgnoresSenderpreviewRedeem must not be dependent on msg.sender.
ERC4626-029verify_depositPropertiesdeposit assets and shares handling.
ERC4626-030verify_mintPropertiesmint assets and shares handling.
ERC4626-031verify_redeemPropertiesredeem assets and shares handling.
ERC4626-032verify_withdrawPropertieswithdraw assets and shares handling.
ERC4626-033verify_sharePriceInflationAttackChecks for share inflation attacks.
ERC4626-034verify_assetDecimalsLessThanVaultCompares vault decimals with asset decimals.
ERC4626-035verify_withdrawRequiresTokenApprovalVerifies that withdraw requires token approval.
ERC4626-036verify_redeemRequiresTokenApprovalVerifies that redeem requires token approval.
ERC4626-037verify_convertToSharesMustNotRevertconvertToShares must not revert for reasonable values.

ABDKMath64x64

IDNameInvariant tested
ABDKMATH-001add_test_commutativeCommutative property for addition.
ABDKMATH-002add_test_associativeAssociative property for addition.
ABDKMATH-003add_test_identityIdentity operation for addition.
ABDKMATH-004add_test_valuesAddition result should increase or decrease depending on operands signs.
ABDKMATH-005add_test_rangeAddition result should be in the valid 64x64-arithmetic range.
ABDKMATH-006add_test_maximum_valueAddition edge case: maximum value plus zero should be maximum value.
ABDKMATH-007add_test_maximum_value_plus_oneAddition edge case: maximum value plus one should revert (out of range).
ABDKMATH-008add_test_minimum_valueAddition edge case: minimum value plus zero should be minimum value.
ABDKMATH-009add_test_minimum_value_plus_negative_oneAddition edge case: minimum value plus minus one should revert (out of range).
ABDKMATH-010sub_test_equivalence_to_additionSubtraction should be equal to addition with opposite sign.
ABDKMATH-011sub_test_non_commutativeAnti-commutative property for subtraction.
ABDKMATH-012sub_test_identityIdentity operation for subtraction.
ABDKMATH-013sub_test_neutralityAdding and subtracting the same value should not affect original value.
ABDKMATH-014sub_test_valuesSubtraction result should increase or decrease depending on operands signs.
ABDKMATH-015sub_test_rangeSubtraction result should be in the valid 64x64-arithmetic range.
ABDKMATH-016sub_test_maximum_valueSubtraction edge case: maximum value minus zero should be maximum value.
ABDKMATH-017sub_test_maximum_value_minus_neg_oneSubtraction edge case: maximum value minus negative one should revert (out of range).
ABDKMATH-018sub_test_minimum_valueSubtraction edge case: minimum value minus zero should be minimum value.
ABDKMATH-019sub_test_minimum_value_minus_oneSubtraction edge case: minimum value minus one should revert (out of range).
ABDKMATH-020mul_test_commutativeCommutative property for multiplication.
ABDKMATH-021mul_test_associativeAssociative property for multiplication.
ABDKMATH-022mul_test_distributiveDistributive property for multiplication.
ABDKMATH-023mul_test_identityIdentity operation for multiplication.
ABDKMATH-024mul_test_valuesMultiplication result should increase or decrease depending on operands signs.
ABDKMATH-025mul_test_rangeMultiplication result should be in the valid 64x64-arithmetic range.
ABDKMATH-026mul_test_maximum_valueMultiplication edge case: maximum value times one should be maximum value
ABDKMATH-027mul_test_minimum_valueMultiplication edge case: minimum value times one should be minimum value
ABDKMATH-028div_test_division_identityIdentity operation for division.
ABDKMATH-029div_test_negative_divisorDivision result sign should change according to divisor sign.
ABDKMATH-030div_test_division_num_zeroDivision with zero numerator should be zero.
ABDKMATH-031div_test_valuesDivision result should increase or decrease (in absolute value) depending on divisor's absolute value.
ABDKMATH-032div_test_div_by_zeroDivision edge case: Divisor zero should revert.
ABDKMATH-033div_test_maximum_denominatorDivision edge case: Division result by a large number should be less than one.
ABDKMATH-034div_test_maximum_numeratorDivision edge case: Division result of maximum value should revert if divisor is less than one.
ABDKMATH-035div_test_rangeDivision result should be in the valid 64x64-arithmetic range.
ABDKMATH-036neg_test_double_negationDouble sign negation should be equal to the original operand.
ABDKMATH-037neg_test_identityIdentity operation for sign negation.
ABDKMATH-038neg_test_zeroNegation edge case: Negation of zero should be zero.
ABDKMATH-039neg_test_maximumNegation edge case: Negation of maximum value minus epsilon should not revert.
ABDKMATH-040neg_test_minimumNegation edge case: Negation of minimum value plus epsilon should not revert.
ABDKMATH-041abs_test_positiveAbsolute value should be always positive.
ABDKMATH-042abs_test_negativeAbsolute value of a number and its negation should be equal.
ABDKMATH-043abs_test_multiplicativenessMultiplicativeness property for absolute value.
ABDKMATH-044abs_test_subadditivitySubadditivity property for absolute value.
ABDKMATH-045abs_test_zeroAbsolute value edge case: absolute value of zero is zero.
ABDKMATH-046abs_test_maximumAbsolute value edge case: absolute value of maximum value is maximum value.
ABDKMATH-047abs_test_minimumAbsolute value edge case: absolute value of minimum value is the negation of minimum value.
ABDKMATH-048inv_test_double_inverseResult of double inverse should be close enough to the original operand.
ABDKMATH-049inv_test_divisionInverse should be equivalent to division.
ABDKMATH-050inv_test_division_noncommutativityAnticommutative property for inverse operation.
ABDKMATH-051inv_test_multiplicationMultiplication of inverses should be equal to inverse of multiplication.
ABDKMATH-052inv_test_identityIdentity property for inverse.
ABDKMATH-053inv_test_valuesInverse result should be in range (0, 1) if operand is greater than one.
ABDKMATH-054inv_test_signInverse result should keep operand's sign.
ABDKMATH-055inv_test_zeroInverse edge case: Inverse of zero should revert.
ABDKMATH-056inv_test_maximumInverse edge case: Inverse of maximum value should be close to zero.
ABDKMATH-057inv_test_minimumInverse edge case: Inverse of minimum value should be close to zero.
ABDKMATH-058avg_test_values_in_rangeAverage result should be between operands.
ABDKMATH-059avg_test_one_valueAverage of the same number twice is the number itself.
ABDKMATH-060avg_test_operand_orderAverage result does not depend on the order of operands.
ABDKMATH-061avg_test_maximumAverage edge case: Average of maximum value twice is the maximum value.
ABDKMATH-062avg_test_minimumAverage edge case: Average of minimum value twice is the minimum value.
ABDKMATH-063gavg_test_values_in_rangeGeometric average result should be between operands.
ABDKMATH-064gavg_test_one_valueGeometric average of the same number twice is the number itself.
ABDKMATH-065gavg_test_operand_orderGeometric average result does not depend on the order of operands.
ABDKMATH-066gavg_test_maximumGeometric average edge case: Average of maximum value twice is the maximum value.
ABDKMATH-067gavg_test_minimumGeometric average edge case: Average of minimum value twice is the minimum value.
ABDKMATH-068pow_test_zero_exponentPower of zero should be one.
ABDKMATH-069pow_test_zero_baseZero to the power of any number should be zero.
ABDKMATH-070pow_test_one_exponentPower of one should be equal to the operand.
ABDKMATH-071pow_test_base_oneOne to the power of any number should be one.
ABDKMATH-072pow_test_product_same_baseProduct of powers of the same base property
ABDKMATH-073pow_test_power_of_an_exponentiationPower of an exponentiation property
ABDKMATH-074pow_test_distributiveDistributive property for power of a product
ABDKMATH-075pow_test_valuesPower result should increase or decrease (in absolute value) depending on exponent's absolute value.
ABDKMATH-076pow_test_signPower result sign should change according to the exponent sign.
ABDKMATH-077pow_test_maximum_basePower edge case: Power of the maximum value should revert if exponent > 1.
ABDKMATH-078pow_test_high_exponentPower edge case: Result should be zero if base is small and exponent is large.
ABDKMATH-079sqrt_test_inverse_mulSquare root inverse as multiplication.
ABDKMATH-080sqrt_test_inverse_powSquare root inverse as power.
ABDKMATH-081sqrt_test_distributiveSquare root distributive property respect to multiplication.
ABDKMATH-082sqrt_test_zeroSquare root edge case: square root of zero should be zero.
ABDKMATH-083sqrt_test_maximumSquare root edge case: square root of maximum value should not revert.
ABDKMATH-084sqrt_test_minimumSquare root edge case: square root of minimum value should revert (negative).
ABDKMATH-085sqrt_test_negativeSquare root edge case: square root of a negative value should revert.
ABDKMATH-086log2_test_distributive_mulBase-2 logarithm distributive property respect to multiplication.
ABDKMATH-087log2_test_powerBase-2 logarithm of a power property.
ABDKMATH-088log2_test_zeroBase-2 logarithm edge case: Logarithm of zero should revert.
ABDKMATH-089log2_test_maximumBase-2 logarithm edge case: Logarithm of maximum value should not revert.
ABDKMATH-090log2_test_negativeBase-2 logarithm edge case: Logarithm of a negative value should revert.
ABDKMATH-091ln_test_distributive_mulNatural logarithm distributive property respect to multiplication.
ABDKMATH-092ln_test_powerNatural logarithm of a power property.
ABDKMATH-093ln_test_zeroNatural logarithm edge case: Logarithm of zero should revert.
ABDKMATH-094ln_test_maximumNatural logarithm edge case: Logarithm of maximum value should not revert.
ABDKMATH-095ln_test_negativeNatural logarithm edge case: Logarithm of a negative value should revert.
ABDKMATH-096exp2_test_equivalence_powBase-2 exponentiation should be equal to power.
ABDKMATH-097exp2_test_inverseBase-2 exponentiation inverse function.
ABDKMATH-098exp2_test_negative_exponentBase-2 exponentiation with negative exponent should equal the inverse.
ABDKMATH-099exp2_test_zeroBase-2 exponentiation edge case: exponent zero result should be one.
ABDKMATH-100exp2_test_maximumBase-2 exponentiation edge case: exponent maximum value should revert.
ABDKMATH-101exp2_test_minimumBase-2 exponentiation edge case: exponent minimum value result should be zero.
ABDKMATH-102exp_test_inverseNatural exponentiation inverse function.
ABDKMATH-103exp_test_negative_exponentNatural exponentiation with negative exponent should equal the inverse.
ABDKMATH-104exp_test_zeroNatural exponentiation edge case: exponent zero result should be one.
ABDKMATH-105exp_test_maximumNatural exponentiation edge case: exponent maximum value should revert.
ABDKMATH-106exp_test_minimumNatural exponentiation edge case: exponent minimum value result should be zero.