What I Built
A staking program on Solana written completely in native Rust with property-based testing.
Why I Built It
Wanted to explore staking mechanics and property-based testing in Rust. This project combines:
- Native Solana program development
- Staking reward calculations
- Property-based testing with proptest
Features
- Stake tokens
- Unstake with rewards
- Reward calculation based on duration
Technical Stack
- Native Rust for the on-chain program
- Solana Program Library
- proptest 1.4 for property-based testing
What I Learned
- Staking mechanics and reward distribution
- Property-based testing in Rust
- Testing edge cases with random inputs
- Native Solana program patterns