randomness

Analyze Solidity smart contracts for insecure randomness vulnerabilities.

60|18|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/PurpleAILAB/Vigilo --skill randomness
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: randomness
Source: https://github.com/PurpleAILAB/Vigilo/tree/main/packages/opencode/skills/randomness
Command: npx skills add https://github.com/PurpleAILAB/Vigilo --skill randomness

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill identifies and mitigates vulnerabilities related to insecure or predictable randomness in smart contracts, preventing financial losses and manipulation.

Core Features & Use Cases

  • Vulnerability Detection: Pinpoints insecure uses of block.timestamp, blockhash, prevrandao, and other weak sources.
  • Secure Pattern Implementation: Provides examples and guidance on integrating secure randomness solutions like Chainlink VRF and commit-reveal schemes.
  • Use Case: An auditor can use this Skill to quickly scan a smart contract codebase for common randomness flaws, ensuring the integrity of lotteries, NFT mints, and other critical functions.

Quick Start

Analyze the provided Solidity code for insecure randomness vulnerabilities.

Frequently Asked Questions about randomness

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect insecure randomness vulnerabilities in Solidity smart contracts?

You can detect insecure randomness in Solidity smart contracts by scanning for block timestamp misuse, blockhash exploitation, and predictable PRNGs. This analysis identifies weak sources like prevrandao to prevent financial manipulation in critical functions.

What are secure alternatives to blockhash and block.timestamp for Web3 randomness?

Secure alternatives to blockhash and block.timestamp for Web3 randomness include integrating Chainlink VRF and commit-reveal schemes. These solutions provide cryptographically verifiable randomness, preventing miners or validators from manipulating predictable PRNG outputs.

Why does using blockhash for smart contract randomness create security exploits?

Using blockhash for smart contract randomness creates security exploits because it is predictable and can be manipulated by miners. Insecure randomness vulnerabilities allow attackers to precalculate outcomes, leading to financial losses in lotteries or NFT mints.

Can I audit smart contracts for predictable PRNG vulnerabilities automatically?

You can audit smart contracts for predictable PRNG vulnerabilities by analyzing the codebase against detection patterns for weak sources. This approach provides an audit checklist to quickly pinpoint insecure randomness and ensure the integrity of Web3 applications.