nav.brand
DeFi

Staking dApp Template

Launch a staking program your holders will actually use: stake a token, accrue rewards continuously, and claim or compound — with a dashboard showing TVL, estimated APR, your stake and pending rewards. The rewards-per-second staking contract is included.

Next.js 16TypeScriptTailwindwagmi/viemSolidityHardhat

Features

  • Rewards-per-second accrual with live counter
  • Optional lock tiers with multipliers
  • TVL + APR display, claim / compound
  • Emergency withdraw
  • Single-token or token-pair staking

What's included

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

Smart contracts included

Audited-base Solidity (OpenZeppelin), verifiable on-chain after deploy. Full source in the repo.

StakingRewards.sol

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

Real-time rewards and APR

A battle-tested, Synthetix-style staking contract distributes rewards per second across all stakers. The dashboard shows TVL, an estimated APR, your staked balance and live pending rewards.

Stake, withdraw, claim — and fund

Approve and stake in two clicks, withdraw any time, and claim rewards. Owners fund the reward pool and can adjust the reward rate. Optional lock tiers are easy to add in the contract.

Configurable and production-ready

Point it at any ERC-20 staking and reward token, set the reward rate, and deploy with the included Hardhat scripts or the in-browser wizard. Ships with a Dockerfile.

Frequently asked questions

+What is a staking dApp template?

A ready-made staking website plus a rewards contract that lets users lock your token to earn rewards. This one includes the contract, a dashboard with APR/TVL, and claim/compound flows.

+How is APR calculated?

The contract emits a fixed number of reward tokens per second across all stakers; the UI derives an estimated APR from the reward rate and total staked. You control the rate.

+Can the staking and reward tokens be different?

Yes. You can stake one token and reward another, or use the same token for both — it's a configuration choice at deploy time.

Ready to ship Staking / Yield dApp?

Full source, lifetime license, instant download. Pay with crypto or card.

Get it for $159

Explore all web3 templates