-
Notifications
You must be signed in to change notification settings - Fork 77
Open
Labels
Description
Background
The Solana Foundation maintains a templates repo with both official and community templates. Developers use these templates with create-solana-dapp to quickly scaffold projects.
Token staking is a fundamental feature in many Solana projects. This task proposes adding a comprehensive Staking template that demonstrates how to build a full-featured staking application with both on-chain program and frontend.
Goal
Add a community template at community/staking that includes:
- A Next.js + Tailwind + TypeScript frontend application
- Stake/unstake operations with reward calculations
- User dashboard for monitoring stakes
- Security considerations and best practices documentation
Deliverables
community/staking/directory with working template codeREADME.mdexplaining:- Architecture overview of the staking system
- Links to relevant Anchor and Solana documentation
- Frontend components:
- Stake input form with balance checks
- Unstake interface
- Rewards display and claim button
- User dashboard showing active stakes and earned rewards
- Pool statistics overview
- Example features:
- Time-based reward calculations
- Lock period handling
- Transaction confirmation and error handling
package.jsonwith acreate-solana-dappblock for post-install guidance- Registration in
templates.jsonso template is discoverable under Community Templates
Acceptance Criteria
- A new directory
community/stakingexists with both smart contract and frontend code - Frontend demonstrates stake, unstake, and claim operations
- Reward calculation is implemented and documented
- User dashboard displays relevant staking information
-
README.mdincludes security considerations - Template is registered in
templates.json -
pnpm create solana-dapp --template stakingworks end-to-end
Reactions are currently unavailable