Slashing Condition Test Harness
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
Slashing Condition Test Harness provides comprehensive testing for validator slashing conditions, enabling protocol developers, validators, and security auditors to verify that slashing logic correctly detects and penalizes misbehavior. It retrieves on-chain slashing contract bytecode via eth_getCode and fetches verified source code and ABI from block explorer APIs. The tool analyzes slashing condition parameters including double-voting, surround-voting, and inactivity penalties, and processes validator performance and misbehavior evidence data. It runs a suite of slashing tests including slashing contract validation, validator registry checks, double-voting detection, surround-voting detection, inactivity penalty checks, and evidence verification. The output includes a slashing status (Slashable, Not Slashable, or Pending), penalty amount, slashing type (e.g., double-voting, surround-voting, inactivity), a detailed check matrix showing each validation check's result, and actionable recommendations for resolving issues—such as submitting valid evidence, verifying validator identity, or reviewing slashing contract configuration. This enables validators, slashing contract developers, and security auditors to verify that slashing conditions are correctly enforced and that misbehavior is properly detected and penalized before deploying to production.
HOW TO USE
Connect your BGWallet to the target EVM chain. Paste the address of the slashing contract you wish to test. Provide the validator address you want to test for slashing conditions. Provide misbehavior evidence as a JSON object containing type (double-voting, surround-voting, etc.), epoch, block hashes, and signature data. Optionally supply a GitHub repository URL to pull slashing implementation details and test specifications for additional context. The tool fetches the slashing contract's bytecode and state, analyzes the evidence data, and runs a comprehensive slashing condition test suite. Review the slashing status, penalty amount, slashing type, check matrix, and recommendations. Use the results to verify that slashing logic correctly detects misbehavior and that evidence is valid before submitting to the slashing contract.
SLASHING CONDITION VALIDATION AND EVIDENCE VERIFICATION ENGINE
The real technical mechanism is the slashing condition validation and evidence verification engine that combines slashing contract analysis with consensus-layer misbehavior detection. The tool first retrieves the slashing contract's bytecode and analyzes the slashing logic—identifying key functions such as slash, verifyDoubleVoting, verifySurroundVoting, and verifyInactivity that handle the slashing workflow. It then processes the misbehavior evidence to determine which slashing condition applies and whether the evidence is sufficient. The engine validates double-voting by checking that the validator signed two distinct blocks at the same height; surround-voting by checking that the validator's votes surround a previous vote; and inactivity penalties by checking that the validator missed the required number of attestations over a period. The evidence verification ensures that the provided signatures are cryptographically valid and that the evidence matches the on-chain state. The penalty amount is calculated based on the slashing type and the validator's stake. The slashing type classification helps users understand which condition was triggered. This approach provides developers with a comprehensive, automated way to test slashing conditions, catching issues that would otherwise only surface during live operations and ensuring that misbehavior is correctly detected and penalized.
WHAT IT CANNOT SEE
This tool cannot generate a complete slashing condition test without access to slashing contract bytecode or misbehavior evidence. It is limited by your RPC provider's rate limits for data retrieval, which may delay analysis on congested networks. It cannot determine if slashing conditions are correctly enforced without executing the slashing logic—simulation provides insights but does not replace full on-chain slashing execution. The detection relies on the completeness of the ABI and source code verification; unverified contracts or incomplete verification data will produce incomplete or inaccurate results. Detection is based on bytecode pattern matching and may miss indirect or obfuscated slashing logic, such as slashing logic hidden in libraries or via delegate calls. The tool cannot assess runtime behavior or security implications of slashing, such as how slashing logic handles edge cases or adversarial evidence. It may produce false positives for data that appears similar to slashing evidence but is used for other purposes. The tool does not execute the contract to validate slashing, so it cannot confirm that the slashing transaction would succeed on-chain. It cannot account for network-specific slashing implementation differences or future upgrades—different consensus protocols may have different slashing conditions, evidence formats, or penalty calculations. Slashing condition mechanics may vary across networks and change over time as protocols evolve.
PLEASE NOTE
This tool works exclusively with EVM-compatible chains that support validator slashing and consensus-layer misbehavior detection. It requires active internet connectivity to access block explorer APIs and RPC endpoints. Some block explorers may require API keys for high-volume bytecode retrieval. The tool is read-only and does not execute any slashing transactions—it only produces test assessments. Slashing conditions are critical to consensus security; always verify test results against actual slashing contract behavior on testnet before submitting slashing evidence on mainnet. Different consensus protocols may have different slashing conditions, evidence requirements, and penalty structures.