security

Reviews Solidity contracts for vulnerabilities and enforces a pre-deploy security checklist.

1|Updated Sep 4, 2025
One-click install
npx skills add https://github.com/FuzzysTodd/The-Nexus-Protocol-Token-DAO --skill security-fuzzystodd
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: security
Source: https://github.com/FuzzysTodd/The-Nexus-Protocol-Token-DAO/tree/main/skills/security
Command: npx skills add https://github.com/FuzzysTodd/The-Nexus-Protocol-Token-DAO --skill security-fuzzystodd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Smart contract bugs cause irreversible financial losses, and most exploits stem from well-known patterns like reentrancy, oracle manipulation, and decimal mishandling that developers overlook before deployment. ## Core Features & Use Cases - Vulnerability Patterns with Defensive Code: Covers reentrancy, token decimal mismatches, SafeERC20 usage, vault inflation attacks, infinite approvals, and access control with concrete vulnerable-vs-safe Solidity examples. - MEV, Proxy, and Signature Safety: Explains sandwich attack protection, UUPS upgradeability rules, EIP-712 replay prevention, and delegatecall hazards. - Pre-Deploy Audit Checklist: A 20+ item checklist covering access control, oracle safety, storage layout, and automated analysis with Slither and Foundry fuzzing. - Use Case: Before deploying an ERC-4626 vault, run the checklist to confirm virtual offset inflation protection, Chainlink oracle staleness checks, and multisig upgrade authority. ## Quick Start Review my Solidity contract for security vulnerabilities and check it against the pre-deploy audit checklist.

Frequently Asked Questions about security

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

FAQPage Schema
How do I prevent reentrancy attacks in Solidity?▼

Prevent reentrancy by following the Checks-Effects-Interactions pattern: validate inputs, update all state, then make external calls last. Add OpenZeppelin's ReentrancyGuard with the nonReentrant modifier on external-calling functions as a safety net.

What is the best way to get token prices onchain?▼

Use Chainlink price feeds with staleness and validity checks rather than DEX spot prices, which flash loans can manipulate in one transaction. If onchain data is required, use Uniswap V3 TWAP over 30+ minutes.

Should I use UUPS or Transparent proxy for upgradeable contracts?▼

UUPS is recommended by OpenZeppelin because it costs less gas per call and places upgrade logic in the implementation. Always use initializer functions instead of constructors, disable initializers on the implementation, and transfer upgrade authority to a multisig.

Why does my token transfer fail with USDT?▼

USDT does not return a bool on transfer and approve, so standard IERC20 calls revert even on success. Use OpenZeppelin's SafeERC20 library with safeTransfer and safeApprove to handle non-standard token implementations.

When should I avoid using infinite token approvals?▼

Never approve type(uint256).max, because an exploited contract with infinite approval can drain your entire token balance. Approve only the exact amount needed or a small bounded multiple for repeated interactions.