Developer finds property test blind spot after tool wrongly flags legitimate crypto token
A developer built a tool called WhichOne to identify legitimate tokens among duplicates by querying Nansen's API for holder and trading data across blockchains. The tool's decision engine mistakenly crowned an impostor token, despite 50,000 property tests having passed without catching the bug. The root cause was a flawed test data generator that almost never produced the edge-case input of zero labelled wallets, meaning entire decision branches went untested. The developer also identified that the test invariant mirrored the implementation logic rather than asserting what the output should never do. Fixing the generator to deliberately include zero-value inputs caused fast-check to surface counterexamples within as few as 47 cases across multiple test runs.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in