Documentation Index
Fetch the complete documentation index at: https://mintlify.com/reserve-protocol/reserve-index-dtf/llms.txt
Use this file to discover all available pages before exploring further.
Welcome Contributors
Thank you for your interest in contributing to Reserve Folio! This guide will help you understand our development process and how to make meaningful contributions.Reserve Folio is an open-source protocol. We welcome contributions from developers of all experience levels.
Code of Conduct
Be respectful, professional, and constructive in all interactions. We’re building a collaborative community focused on creating secure, reliable DeFi infrastructure.Getting Started
Fork the Repository
Fork the Reserve Folio repository to your GitHub account.
Set Up Development Environment
Follow the setup guide to configure your local environment.
Types of Contributions
Bug Fixes
Fix issues, resolve errors, and improve stability
Features
Add new functionality and capabilities
Documentation
Improve guides, add examples, fix typos
Tests
Expand test coverage and add edge cases
Optimizations
Reduce gas costs and improve performance
Security
Report vulnerabilities and security improvements
Development Workflow
1. Make Your Changes
Follow these best practices:Write Clean Code
Write Clean Code
- Follow existing code style and conventions
- Use clear, descriptive variable and function names
- Add comments for complex logic
- Keep functions focused and modular
Follow Solidity Best Practices
Follow Solidity Best Practices
- Use Solidity 0.8.28
- Leverage built-in overflow protection
- Follow Solidity Style Guide
- Use NatSpec documentation format
Maintain Documentation
Maintain Documentation
- Update inline comments and NatSpec
- Document complex algorithms and formulas
- Use units notation (
{tok},D27{tok/share}, etc.) - Update README.md if adding major features
2. Write Tests
All code contributions must include tests:test/YourFeature.t.sol
Aim for high test coverage. New features should have >95% coverage.
3. Run Quality Checks
Before committing, run all quality checks:4. Commit Your Changes
Use clear, descriptive commit messages following Conventional Commits:feat: New featurefix: Bug fixdocs: Documentation changestest: Test additions or modificationsrefactor: Code refactoringperf: Performance improvementschore: Maintenance tasks
5. Push and Create Pull Request
Descriptive Title
Use a clear, concise title summarizing the change:
- ✅ “Add progressive auction sizing for improved price discovery”
- ❌ “Update stuff”
Detailed Description
Include:
- What: What changes were made
- Why: Why these changes are needed
- How: How the implementation works
- Testing: What tests were added/modified
Pull Request Template
Code Review Process
Automated Checks
CI/CD pipeline runs:
- Code formatting verification
- Linting checks
- Full test suite
- Gas usage analysis
Peer Review
Core contributors review:
- Code quality and style
- Security considerations
- Gas optimization opportunities
- Test coverage
Code Style Guidelines
Solidity Conventions
Formatting Rules
- Indentation: 4 spaces (no tabs)
- Line length: Maximum 120 characters
- Naming:
- Contracts:
PascalCase - Functions:
camelCase - Variables:
camelCase - Constants:
UPPER_SNAKE_CASE - Internal/private:
_leadingUnderscore
- Contracts:
- Imports: Organized and grouped logically
- Comments: Use NatSpec for all public/external functions
Units Notation
Always document units in comments:{tok},{share},{reward}: Token balancesD18{1}: Percentage (18 decimals)D27{tok/share}: Exchange rate (27 decimals)D27{UoA/tok}: Price in nanoUSD (27 decimals){s}: Seconds
Security Considerations
Security Checklist
Reporting Security Vulnerabilities
If you discover a security vulnerability:- Email: security@reserve.org
- Include:
- Description of the vulnerability
- Steps to reproduce
- Potential impact
- Suggested fix (if any)
- Wait for confirmation before public disclosure
Gas Optimization
When optimizing for gas:Use Gas Profiling
Compare Before/After
Document gas savings in PRs
- Use
calldatainstead ofmemoryfor read-only parameters - Cache storage variables in memory
- Use
uint256instead of smaller types (unless packing) - Avoid unnecessary storage writes
- Use custom errors instead of string reverts
Documentation Guidelines
NatSpec Format
Inline Comments
Community
GitHub Discussions
Ask questions and share ideas
Discord
Join the Reserve Protocol community
Recognition
Valuable contributions are recognized through:- Attribution in release notes
- Contributor badges
- Potential bug bounty rewards
- Community acknowledgment
Questions?
If you have questions about contributing:- Check existing GitHub Discussions
- Review documentation
- Open a new discussion
- Reach out on Discord
Thank You!
Your contributions help make Reserve Folio more secure, efficient, and accessible. We appreciate your time and effort in improving the protocol.Start Contributing
Ready to contribute? Fork the repository and start building!