This is a Solana stake program developed using the Anchor framework. This program allows users to stake SOL tokens to earn rewards over time. The Anchor framework provides a robust environment for developing and testing Solana programs with Rust.
- Overview
- Program Features
- Prerequisites
- Installation
- Directory Structure
- Running Tests
- Deploying the Program
- Usage
- Contributing
- License
This staking program enables users to:
- Stake SOL and earn rewards based on the staking duration.
- Unstake SOL to retrieve their initial deposit along with any earned rewards.
- View staking balance and status.
The program leverages Anchor's features for account management, instruction handling, and testing capabilities.
- Stake SOL: Users can deposit SOL into the staking program.
- Earn Rewards: Users earn rewards for keeping their SOL staked.
- Unstake and Withdraw: Users can unstake and withdraw their SOL along with any accrued rewards.
- Account Management: The program manages user accounts using Program Derived Addresses (PDA) for security and ownership verification.
To run and deploy this program, you will need:
- Solana CLI
- Anchor CLI
- Rust
- Node.js and Yarn (for running tests with Anchor's TypeScript testing framework)
Ensure Solana CLI and Anchor CLI are configured to connect to the appropriate Solana network (e.g., devnet, testnet, or mainnet-beta).
Clone the repository and navigate into the project directory:
git clone <repository_url>
cd <repository_directory>