A sophisticated liquid staking program for the Solana blockchain built using the Anchor framework. This project allows users to stake SOL tokens and receive liquid staking derivatives (mSOL) in return, providing immediate liquidity while earning staking rewards.
- Liquid Staking: Convert SOL to mSOL for immediate liquidity
- Validator Management: Dynamic validator list with scoring system
- Liquidity Pool: Automated market making for mSOL/SOL pairs
- Delayed Unstaking: Option for delayed SOL withdrawal
- Fee Management: Configurable fee structure for sustainability
- Automated Operations: Crank system for automated processing
├── programs/marinade-finance/ # Main Solana program
│ ├── src/
│ │ ├── lib.rs # Program entry point and instructions
│ │ ├── state/ # Program state structures
│ │ ├── instructions/ # Instruction implementations
│ │ ├── events/ # Event definitions
│ │ ├── error.rs # Custom error types
│ │ ├── checks.rs # Security validations
│ │ └── calc.rs # Mathematical calculations
│ └── Cargo.toml # Program dependencies
├── scripts/ # Build and deployment scripts
├── Cargo.toml # Workspace configuration
└── Anchor.toml # Anchor framework configuration
- Rust (v1.75.0 or later)
- Solana CLI (v1.17.0 or later)
- Anchor CLI (v0.29.0 or later)
-
Clone the repository
git clone <repository-url> cd <project-directory>
-
Install dependencies
cargo build
-
Build the program
anchor build
-
Run tests (when available)
anchor test
# Build the program
anchor build
# Build with specific features
cargo build --release
# Run tests (when integration tests are available)
anchor test
# Run specific test
anchor test <test-name>
# Deploy to localnet
anchor deploy
# Deploy to devnet
anchor deploy --provider.cluster devnet
# Deploy to mainnet
anchor deploy --provider.cluster mainnet
- Toolchain: Anchor v0.29.0, Solana v1.17.0
- Features: Seeds and linting enabled
- Provider: Mainnet cluster configuration
- Workspace: Multi-crate project structure
- Release Profile: Optimized for production with overflow checks
- Dependencies: Anchor v0.29.0, Solana SPL token programs
- Overflow Protection: Runtime overflow checks enabled
- Account Validation: Comprehensive account validation and security checks
- Security.txt: Transparent security contact information
- Audits: Multiple security audits from reputable firms
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the terms specified in the LICENSE.md file.
- Documentation: Project Index
- Issues: Report bugs and feature requests through GitHub issues
- Discussions: Join community discussions for questions and support
Note: Integration tests are not included in this repository and will be published later.