A staking protocol for ORE holders to receive a share of protocol revenues.
Consts– Program constants.Error– Custom program errors.Event– Custom program events.Instruction– Declared instructions and arguments.
Claim– Claims accrued staking rewards.Close– Closes a stake account and reclaims rent.Compound– Compounds accrued rewards back into the stake deposit.Deposit– Deposits ORE into a stake account.Distribute– Distributes ORE to the treasury for vesting to stakers.Init– Initializes the program (treasury, treasury token account, and vesting account).Log– Logs non-truncatable event data.Withdraw– Withdraws ORE from a stake account.
Stake– A user's staking position (balance, rewards, compound fee settings).Treasury– Singleton tracking the global rewards factor and total staked amount.Vesting– Singleton tracking the current reward vesting schedule.
To run the test suite, use the Solana toolchain:
cargo test-sbf
For line coverage, use llvm-cov:
cargo llvm-cov