Thank you for your interest in contributing to Mainstay.
- Report bugs with clear reproduction steps.
- Request new features with motivation and acceptance criteria.
- Keep pull requests focused and linked to the relevant issue or task.
- Base PRs on
main. - Provide a concise summary of the change.
- Describe how the change was tested or validated.
- Include any relevant docs updates.
- Update CHANGELOG.md with your changes (see Changelog Updates below).
- Ensure secret scanning passes on PRs for
.envand other configuration files.
The main branch is protected:
- At least 1 approved review is required before merging.
- All CI checks must pass (build, test, Clippy, rustfmt, cargo audit).
- Force pushes and branch deletion are disabled to preserve history.
All changes under contracts/ — including new contracts, dependency bumps, and
logic changes — must be approved by a code owner listed in
.github/CODEOWNERS before merge. This rule is enforced
automatically by GitHub's CODEOWNERS mechanism.
If you are adding a new contract subdirectory, update .github/CODEOWNERS in
the same PR so the new path is covered from the first commit.
- The repository uses
gitleakson PRs to detect real secrets before merge. - The
.gitleaks.tomlconfiguration contains standard secret rules plus false-positive allowlists for placeholder values. - Do not commit real API keys, tokens, or credential files to any branch.
- If a false positive is detected, update
.gitleaks.tomlonly after verifying the content is safe.
All notable changes must be documented in CHANGELOG.md following the Keep a Changelog format.
Document changes in the following categories (when applicable):
- Added: New features or functionality
- Changed: Changes to existing functionality
- Deprecated: Features marked for removal
- Removed: Removed features or functionality
- Fixed: Bug fixes
- Security: Security-related changes
- Locate the
## [Unreleased]section at the top ofCHANGELOG.md - Add an entry under the appropriate category
- Use clear, user-facing language (not implementation details)
- Link to relevant issues or PRs when applicable
A CHANGELOG.md entry is required, not optional, for any PR that:
- Adds, removes, or renumbers a
ContractErrorvariant in any contract'serrors.rs - Adds or renames a persistent-storage key (e.g. anything returned from
lifecycle/src/storage.rskey helpers) - Adds, removes, or changes the default of a
Configfield
Reviewers should block merge on such PRs until the changelog entry is present. This keeps integrators
able to diff CHANGELOG.md between releases to find every wire-visible or storage-visible change without
having to read contract source diffs.
### Added
- New collateral scoring algorithm for improved asset valuation
- Support for multi-signature authorization on lending contracts- Maintain consistent formatting.
- Document new workflows, APIs, or UI changes.
- Keep changes minimal and reviewable.
Please refer to this file when creating issues or pull requests for the project.