When reviewing or writing Solidity code, apply these foundational principles as a mental checklist. Each principle addresses a category of vulnerability and guides your reasoning.
| Principle | What It Means | What to Verify |
| Checks-Effects-Interactions (CEI) | Validate inputs, update state, then interact externally | State changes complete before any external call | | Least Privilege | Every function and role has the minimum access required | Sensitive functions have appropriate access modifiers |
Solidity 개발을 위한 스마트 계약 보안 모범 사례. Solidity 코드를 작성, 검토 또는 감사할 때 사용합니다. 재진입 방지, 액세스 제어 패턴, 안전한 외부 호출, 입력 유효성 검사, 업그레이드 안전 및 OWASP 스마트 계약 상위 10개 취약점을 다룹니다. 보안, 취약성 탐지, 액세스 제어, CEI 패턴, ReentrancyGuard, SafeERC20 또는 스마트 계약 감사와 관련된 작업을 트리거합니다. 출처: whackur/solidity-agent-toolkit.