What Is solana-staking?
solana-staking is a Solana staking program and TypeScript CLI built by Harman Dhaliwal for the FLOWERS utility token (FLWR). It is one of the best Solana Staking Programs tools for Solana developers, token project operators, and DAO teams because it bundles an on-chain Anchor program, an operator CLI, and three staking tiers with 4, 6, and 12 month lockups. The repo keeps the Rust program, IDL, wallet config, and integration script in staking/ so the deployment surface stays explicit.
Quick Overview
| Attribute | Details |
|---|---|
| Type | Solana Staking Programs |
| Best For | Solana developers, token project operators, and DAO teams |
| Language/Stack | Rust, Anchor, TypeScript, Solana CLI |
| License | N/A in the repository snapshot |
| GitHub Stars | N/A in the repository snapshot |
| Pricing | Open-Source |
| Last Release | N/A in the repository snapshot |
Who Should Use solana-staking?
- Token teams launching utility staking who need fixed-duration lockups, reward tiers, and penalty math without starting from scratch.
- Solana engineers who already use Anchor and want a thin TypeScript operator layer instead of a separate backend service.
- DAO operators who need explicit owner flows for
initProject, reward funding, and reconfiguration after parameter changes. - Hackathon teams that need a devnet-ready baseline they can fork before mainnet hardening.
Not ideal for:
- Projects that want liquid staking or deposit shares instead of simple lock-and-reward logic.
- Teams that cannot fund a devnet wallet or manage Solana CLI keypairs.
- Protocols that need audited, permissionless mainnet staking on day one.
Key Features of solana-staking
- Anchor program boundary — The Rust program lives under
staking/programs/staking/, with the on-chain state and token flows separated from the CLI. That makes the core staking logic easier to reason about and easier to audit than an all-in-one script. - TypeScript operator CLI —
staking/cli/script.tsdrivesinitProject,stake_flwr,unstake, andunstakeFlwr, which is easier to automate than manualsolanaRPC calls. The CLI also makes owner actions reproducible across environments. - Tiered lockup math — Fixed 4, 6, and 12 month durations map to 103%, 106%, and 110% returns with 6%, 12%, and 24% early-exit penalties. That gives token teams a visible incentive curve instead of vague APR promises.
- IDL-backed client integration —
staking/cli/staking.jsongives the Anchor JS client a typed interface, so account names and instruction shapes stay consistent. This reduces drift between the Rust program and the script that calls it. - Explicit cluster and wallet config —
staking/Anchor.tomlandANCHOR_WALLETmake the deployment target and signing key visible instead of hiding them inside app code. That matters when you move from a devnet wallet to a production signer. - Reward vault wiring — The repo expects a funded
REWARD_TOKEN_MINTand reward vault, which makes the operator responsibilities obvious before staking starts. You know up front that reward liquidity is part of the system design, not an afterthought. - Devnet deployment target — The repo includes a recorded devnet program ID, which is useful for replaying the flow against a live cluster without guessing addresses. That shortens the path from local fork to working demo.
solana-staking vs Alternatives
| Tool | Best For | Key Differentiator | Pricing |
|---|---|---|---|
| solana-staking | Project-specific FLOWERS staking | Anchor program plus CLI plus tiered penalties in one repo | Open-Source |
| SPL Governance | Token voting and treasury control | Governance primitives rather than reward distribution | Open-Source |
| Marinade | Liquid staking and delegated stake exposure | Tradable staking position, not fixed lockups | Free |
| Custom Anchor staking program | Teams with unusual tokenomics | Total control over state, math, and authority checks | Open-Source |
Pick SPL Governance when the staking action is really vote weighting or treasury access rather than reward math. Pick Marinade when you want liquid stake exposure instead of a project-specific lockup schedule.
Pick a custom Anchor staking program when your token economics differ from FLOWERS and you can afford to write and audit the missing pieces yourself. For surrounding deployment hygiene, pair this repo with browse all CLI Tools or browse all DevOps Automation tools, and use djevops if you want environment-aware scripting around anchor deploy.
How solana-staking Works
The architecture is split between a Rust Anchor program and a TypeScript control plane. The program under staking/programs/staking/ owns staking state, tier rules, reward accounting, and account checks. The CLI in staking/cli/script.ts reads the generated IDL from staking/cli/staking.json, then sends signed instructions using the wallet path from staking/Anchor.toml or ANCHOR_WALLET.
The operator model is intentionally explicit. initProject initializes global state, and the owner must rerun it when on-chain constants change so threshold-style configuration stays in sync. That is a good fit for protocol teams that prefer visible admin steps over hidden automation, but it also means the reward vault and REWARD_TOKEN_MINT funding are part of the operational contract.
cd staking
anchor build
anchor deploy
yarn ts-node
This sequence compiles the Rust program, deploys it to the cluster configured in Anchor.toml, and then runs the TypeScript operator script. Expect the CLI to use the devnet program ID unless you edit the config, and expect to swap the sample wallet path for your own keypair before signing anything.
Pros and Cons of solana-staking
Pros:
- Clear split between on-chain logic and operator script, which keeps account handling and user flows easier to inspect.
- Documented devnet deployment target, which lowers the time needed to reproduce the repo locally.
- Fixed tier math and penalties, which makes token economics deterministic instead of leaving APR open-ended.
- Anchor IDL support, which gives the TypeScript client a typed contract surface.
- Easy to fork for a token-specific staking model, since the repo is compact and scoped.
- Operator steps are visible, which reduces accidental state changes when you manage the reward vault.
Cons:
- The wallet path in the docs and scripts is hard-coded for one Linux environment and must be changed before use.
- Mainnet readiness depends on your own audit, signer hygiene, and parameter review.
- Reward vault funding is manual, so token emissions are not managed by an external service.
- It does not solve liquid staking, governance voting, analytics, or user dashboards.
- The repo assumes some Solana CLI and Anchor familiarity, so beginners will spend time on setup.
Getting Started with solana-staking
A practical quickstart is to install the CLI dependencies, point the signer at your own keypair, and run the script against the configured cluster. If you plan to deploy or change the program, build the Anchor program first so the Rust side and the TypeScript side stay aligned.
cd staking
yarn install
export ANCHOR_WALLET="$HOME/.config/solana/id.json"
yarn ts-node
After that, edit staking/cli/script.ts if you need to change which function main calls, and update staking/Anchor.toml if your cluster or wallet path differs from the repository defaults. If you are deploying instead of just testing the script, run anchor build and anchor deploy after you confirm the devnet wallet is funded.
Verdict
solana-staking is the strongest option for FLOWERS-style tiered token staking when you want an Anchor program plus a TypeScript operator CLI in one repo. Its strength is clear reward and penalty plumbing; its caveat is that you still need production hardening, wallet cleanup, and audit work before mainnet. Use it as a concrete Solana staking baseline, not a managed protocol.



