solidity-security

Review Solidity smart contracts for common vulnerabilities and secure development patterns.

2.0k|1.4k|Updated Sep 19, 2022
One-click install
npx skills add https://github.com/scaffold-eth/scaffold-eth-2 --skill solidity-security-scaffold-eth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: solidity-security
Source: https://github.com/scaffold-eth/scaffold-eth-2/tree/main/.agents/skills/solidity-security
Command: npx skills add https://github.com/scaffold-eth/scaffold-eth-2 --skill solidity-security-scaffold-eth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers write more secure Solidity smart contracts by identifying and mitigating common vulnerabilities, ensuring the integrity and safety of blockchain applications.

Core Features & Use Cases

  • Vulnerability Prevention: Learn about and implement patterns to prevent reentrancy, integer overflow/underflow, access control issues, and front-running.
  • Secure Development Practices: Understand and apply best practices like Checks-Effects-Interactions, Pull Over Push, and input validation.
  • Audit Preparation: Get guidance on documenting contracts and common pitfalls to avoid before professional audits.
  • Use Case: When writing a new DeFi protocol, use this Skill to ensure your smart contracts are protected against known attack vectors.

Quick Start

Use the solidity-security skill to review the provided smart contract code for potential vulnerabilities.

Frequently Asked Questions about solidity-security

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

FAQPage Schema
How do I prevent reentrancy attacks in Solidity smart contracts?

To mitigate integer overflow and underflow in Solidity, implement safe math operations and input validation. This Skill guides secure development practices to protect blockchain applications from mathematical vulnerabilities.

What are the best practices for access control in DeFi protocols?

Best practices for access control in DeFi protocols involve input validation and limiting privileged roles. This Skill offers comprehensive guidance on Solidity smart contract security to ensure protocol integrity against unauthorized access.

How to prepare Solidity smart contracts for a security audit?

To prepare Solidity smart contracts for a security audit, document contracts and avoid common pitfalls. This Skill provides audit preparation checklists and identifies front-running vulnerabilities to fix before professional review.

Does the Pull Over Push pattern secure smart contracts against front-running?

The Pull Over Push pattern helps secure smart contracts by mitigating front-running and denial of service risks. This Skill explains secure development practices to ensure safe value transfer in blockchain applications.