nav.brand
docs.title/Staking / Yield dApp

Staking / Yield dApp

Stake a token, earn rewards, see your APR

docs.viewTemplate

docs.h.overview

A staking front end + rewards contract. Users stake your token, accrue rewards in real time, and claim or compound. APR, TVL and lock periods all configurable.

Staking dApp pairs a clean dashboard (TVL, APR, your stake, pending rewards, lock countdown) with a battle-tested rewards-per-second staking contract.

Supports optional lock periods with bonus multipliers and emergency withdraw. The wizard configures the staking + reward tokens, reward rate and lock tiers, then deploys.

docs.h.included

  • Next.js 16 app (App Router, TypeScript, Tailwind)
  • StakingRewards.sol + Hardhat
  • APR/TVL calculation helpers
  • Dockerfile + docker-compose
  • README + setup wizard

docs.h.contracts

  • StakingRewards.sol — Synthetix-style rewards-per-second staking: stake, withdraw, claim, owner-funded reward pool (OpenZeppelin SafeERC20 + ReentrancyGuard).

docs.h.stack

docs.stackLine

docs.chainsLine

docs.h.quickstart

docs.quickstartP

unzip staking-dapp.zip && cd staking-dapp
npm install
npm run dev

docs.quickstartUrl

docs.h.configure

docs.configureP

  1. docs.wizard.1
  2. docs.wizard.2
  3. docs.wizard.3
  4. docs.wizard.4
  5. docs.wizard.5
Tip · docs.configureTip

docs.configureP2

docs.h.customize

docs.h.branding

docs.brandingP

docs.brandingP2

docs.h.languages

docs.languagesP

docs.h.editing

docs.editingP

docs.h.configRef

docs.configRefP

  • docs.configRef.1
  • docs.configRef.2
Tip · docs.configRefTip

docs.h.deployContracts

docs.deployContractsP

# compile + copy artifacts the app/wizard use
npm run compile

# deploy to the network in your .env (RPC_URL + DEPLOYER_PRIVATE_KEY)
npm run deploy

docs.deployContractsP2

docs.h.deployApp

docs.h.vercel

  1. docs.vercel.1
  2. docs.vercel.2
  3. docs.vercel.3

docs.h.docker

docs.dockerP

# build + run; with no .env it opens the setup wizard
docker compose up --build

# once you have a .env, pass it in:
docker run --env-file .env -p 3004:3000 staking-dapp

docs.dockerP2

docs.h.vps

docs.vpsP

npm install
npm run build
npm run start   # serves the production build

docs.h.checklist

  • docs.checklist.1
  • docs.checklist.2
  • docs.checklist.3
  • docs.checklist.4
  • docs.checklist.5

docs.h.support

docs.supportP