SShortSingh.
Back to feed

Developer finds property test blind spot after tool wrongly flags legitimate crypto token

0
·77 views

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.

Read the full story at DEV Community

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

Related stories

0
ProgrammingHacker News ·

Tinfoil, a YC P25 startup, seeks an applied AI security engineer in San Francisco

Tinfoil, a startup from Y Combinator's P25 batch, has posted a job opening for an applied AI security engineer based in San Francisco. The listing was shared on Hacker News, where it has so far received no points or comments. The source material provides no details about the role's responsibilities, requirements, or compensation. It also offers no further information about the company's products or hiring plans.

0
ProgrammingDEV Community ·

osFoundry adds a prompt library with versioning and reusable skills for agents

osFoundry, a desktop app combining chat, agents, files and tools, now includes a Prompt Library that gathers prompts in one searchable place with favorites and usage counts. Users can save edits either by overwriting a prompt or as a new version, keeping earlier wording available for reuse. Prompts can contain placeholders such as {{product}} that the app fills in through a simple form before inserting the text into the chat. Proven prompts can also be converted into skills in Studio, which agents use automatically when a task matches their trigger and assigned tools.

0
ProgrammingDEV Community ·

Testing a pump underload detector before it controls a motor

A running pump may draw less current when it loses load, but a low current reading alone cannot confirm a dry pump, so the detector should report suspected underload with supporting context. Measurements should begin only after the motor is confirmed running and the startup window has passed, and mismatches between run commands and contactor feedback should be logged. Missing, stale, or invalid current data should be treated as a sensor fault rather than as zero current. The alert should use its own persistence timer and reset when readings return to normal, while latched alarms, motor-stop logic, and protection hardware remain independent of the telemetry. Validation should involve replaying simulated traces, comparing results against normal operation at several operating points, and logging timestamps, RMS current, motor state, thresholds, and fault reasons.

0
ProgrammingDEV Community ·

Solana token rules can be verified with a single RPC call, no SDK needed

A developer published a method for reading a Solana token's rules using one standard RPC request, requiring no SDK, wallet, or keys. The approach decodes the token's mint account to reveal its owner program, mint and freeze authorities, and Token-2022 extensions such as transfer fees, transfer hooks, and permanent delegates. The author applies the check weekly to one token and says it recently corrected earlier documentation that had misstated the token's technical setup. Using the method on the WEN mint, the author found it runs on the original SPL Token program with authorities revoked and no extensions. The post argues that repeatable, rerunnable checks provide stronger evidence than one-time snapshots.