| Version | Supported |
|---|---|
| 1.0.x | β |
If you discover a security vulnerability, please report it to us privately:
- DO NOT open a public GitHub issue.
- Email: security@stacks-contracts.io
- Include a detailed description and steps to reproduce.
- Wait for confirmation before public disclosure.
Always use Post-Conditions when interacting with smart contracts. They are the most powerful security feature of Stacks, ensuring that a transaction can only transfer the exact amount of assets specified.
When using traits, ensure you are validating the contract identifier to prevent "Trait Substitution" attacks. Always verify that the passed contract implements the expected interface correctly.
- Use
is-eq tx-sender contract-owneror similar patterns for administrative functions. - Be aware of the difference between
tx-senderandcontract-caller.
Clarity 2 includes built-in overflow checks, but always be mindful of precision when performing divisions, especially in DeFi applications.
- Checks-Effects-Interactions: Always perform all checks, then update state, and finally interact with other contracts.
- Input Sanitization: Never trust user-provided data.
- Thorough Testing: Use
clarinet testto simulate edge cases and ensure 100% code coverage.
These contracts are provided for educational and template purposes. Always conduct your own professional security audit before deploying to Stacks Mainnet.