All posts

Staking platform development: how to build one in 2026

How to build a staking platform in 2026: token staking contracts, native vs liquid staking vs restaking, ERC-4626 vaults, reward math bugs, slashing, regulation, cost and timeline.

By , CEO & Founder at 23studio

Published 11 min read

Staking platform development: how to build one in 2026

Staking platform development covers three very different products. The simplest is a token staking contract that pays rewards to users who lock your token, which costs $20,000 to $60,000 with an audit. Yield vaults sit in the middle. A liquid staking or restaking protocol, with its own receipt token, validator set and slashing logic, is a $150,000 to $400,000+ build that takes six months or more.

Below we explain which of the three you're actually building, how the contracts work, where the reward math goes wrong, how slashing and validator operations fit in, what regulators said in 2025 and 2026, and what each scope costs.

Three kinds of staking platforms

People say "staking platform" for all of these, and the scope differs by 10x.

TypeWhat users doWhat you buildMain risk
Token staking (rewards contract)Lock your project's token, earn more of it or a share of feesStaking contract, reward distribution, dashboardReward math bugs, emissions that dump the token
Yield vaultDeposit an asset, the vault runs a strategy and compoundsERC-4626 vault, strategy contracts, keepersStrategy losses, share price manipulation
Native or liquid stakingStake a chain's asset with validators, optionally get a liquid receipt tokenValidator infrastructure, deposit and withdrawal queues, oracle, LST contractSlashing, oracle errors, depeg, regulation
RestakingReuse staked assets to secure other servicesIntegration with EigenLayer or Symbiotic, operator selection, liquid restaking tokenStacked slashing risk, liquidity mismatch

Most projects that ask us for a "staking platform" need the first or the second. Liquid staking and restaking are protocol businesses with validator operations, and very few teams should start there.

Token staking contracts: how they work

The classic design is the Synthetix StakingRewards pattern (walkthrough on Solidity by Example), which nearly every farming and staking contract since 2020 descends from. Instead of looping over every staker to pay rewards (which runs out of gas), it keeps a global accumulator:

  • rewardPerTokenStored grows over time by rewardRate × elapsed / totalStaked.
  • Each user stores the accumulator value at their last action (userRewardPerTokenPaid).
  • A user's pending reward is balance × (rewardPerToken − userRewardPerTokenPaid).
  • Every stake, withdraw and claim first calls updateReward(user).

That gives you constant gas per user action regardless of how many stakers exist. Variants add lockups with boosted weights (veToken style), multiple reward tokens, or rewards paid from protocol fees instead of emissions.

Decide early where rewards come from. Rewards printed from your own token supply are a marketing cost, and they show up as sell pressure. Rewards from real revenue are sustainable but smaller. Our tokenomics guide covers how to size emissions so staking doesn't become a slow dump.

Yield vaults and ERC-4626

If users deposit an asset and the platform does something with it, build an ERC-4626 vault. It's the standard interface for tokenized vaults: deposit, withdraw, mint, redeem, and convertToShares / convertToAssets. Wallets, aggregators and lending markets already know how to integrate it.

Users receive vault shares. Rewards don't get "paid out". The vault's assets grow, so each share is worth more. Auto-compounding vaults harvest rewards, swap them back into the underlying asset and redeposit on a schedule run by a keeper.

This is the part of staking we know best. Our HyperBloom auto-compounding vaults on HyperEVM were audited by Pashov, and DeSwarm runs automated yield vaults on Berachain's Proof of Liquidity. The lessons from both are in the next section.

Reward math pitfalls that auditors keep finding

Most staking exploits and audit findings come from a short list:

  1. The ERC-4626 inflation attack. The first depositor deposits 1 wei, then donates a large amount of the asset directly to the vault. The share price jumps, and the next depositor's shares round down to zero. OpenZeppelin's ERC-4626 defends with virtual shares and a decimals offset, but the offset defaults to 0. Override _decimalsOffset(), seed the vault with a dead-address deposit at launch, or both.
  2. Rounding in the wrong direction. Always round in favour of the vault: down when giving shares or assets out, up when taking them in. One wrong direction compounds into a drain over many calls.
  3. Reward rate set with tokens that aren't there. If notifyRewardAmount sets a rate higher than the contract balance can cover, the last stakers can't claim. Check the balance when setting the rate.
  4. Precision loss with small totals or low-decimal tokens. rewardRate × elapsed / totalStaked can truncate to zero for 6-decimal tokens like USDC. Scale up by 1e18 and test with tiny and huge stakes.
  5. Flash-loan staking. If rewards or votes are based on a balance at a single moment, someone can borrow, stake, claim and repay in one transaction. Use time-weighted balances or checkpoints.
  6. Fee-on-transfer and rebasing tokens. Accounting by the amount requested instead of the amount received breaks the totals. Measure balance before and after, or refuse these tokens.
  7. Harvest sandwiching. A keeper's compound swap can be front-run. Set slippage limits and use private transaction routes for harvests.

Invariant tests catch most of these: total shares backed by total assets, sum of user rewards never above funded rewards, no user able to withdraw more than they put in plus earned. Our smart contract audit checklist lists the rest of the preparation.

Native staking vs liquid staking vs restaking

Native staking means running validators for a proof-of-stake chain (Ethereum, Solana, Cosmos chains and others) and delegating user funds to them. On Ethereum, a validator needs 32 ETH, and since the Pectra upgrade in May 2025 one validator can hold up to 2,048 ETH of effective balance. Users' stake is locked until the exit and withdrawal queue clears.

Liquid staking issues a receipt token (an LST, like Lido's stETH) that represents the staked position and can be traded or used in DeFi while the underlying stake keeps earning. It's the largest staking category: DefiLlama tracked about $54 billion across 266 liquid staking protocols at the end of October 2026, with Lido at about 42% of that. A new LST competes with that liquidity, so most new liquid staking work is chain-specific (newer L1s that lack a strong LST) or institutional.

Restaking reuses staked ETH or LSTs to secure additional services, called AVSs on EigenLayer. In return restakers earn extra rewards and accept extra slashing conditions. EigenLayer (now branded EigenCloud) turned on slashing on mainnet on April 17, 2025, completing the original design. Symbiotic offers a more modular, permissionless alternative where networks choose their own collateral and slashing rules.

Be honest with yourself about restaking demand. EigenCloud's TVL was about $5.8 billion at the end of October 2026, against a peak above $22 billion in August 2025, and the whole restaking category was around $9 billion. Building a liquid restaking token in 2026 means fighting for a shrinking pool. Building a service that uses restaked security (an AVS or a Symbiotic network) can still make sense if your product needs a decentralized operator set.

Slashing

Slashing is how proof-of-stake punishes validators for double-signing or long downtime by burning part of their stake. For a staking platform, it's the event that turns a yield product into a loss product. Plan for:

  • Who absorbs it. Socialized across all stakers, covered by an insurance fund, or charged to the operator's bond. Write it down in the spec and in user-facing docs.
  • How the LST reflects it. The exchange rate or rebase must drop when a slashing is reported, or early withdrawers escape the loss and late ones pay double.
  • Restaking adds layers. Each AVS can slash under its own rules. Your contracts need to cap exposure per service and react to slashing events from several sources.

Validator operations

If you run validators, you're running infrastructure with money on the line. You need:

  • Redundant nodes across providers and regions, with client diversity (not everyone on the same execution or consensus client)
  • Key management with remote signers, and protection against running the same key twice (that's how double-signing happens)
  • Monitoring and alerting for missed attestations, sync issues and upcoming exits
  • An oracle that reports validator balances on-chain for LST exchange rates, with sanity checks against sudden jumps

Many platforms skip this and work with professional node operators or a staking API provider, keeping only the contracts and the user product in-house. For most teams, that's the right call.

Regulation: SEC and MiCA

United States. In 2025 the SEC's Division of Corporation Finance published two staff statements. The May 2025 statement on protocol staking said solo staking, self-custodial staking with a third party, and certain custodial staking arrangements don't involve securities offerings. The August 2025 statement on liquid staking reached the same view for liquid staking and staking receipt tokens as described. Both are staff views with narrow fact patterns, and they don't cover restaking or programs that promise fixed returns. A token staking contract that pays your own token as "yield" is outside them. Talk to counsel before marketing APYs to US users.

European Union. ESMA's Q&As say MiCA doesn't prohibit staking and doesn't require authorization when holders stake their own assets. A firm that stakes on behalf of clients needs MiCA authorization for custody and administration of crypto-assets, with explicit client consent and clear cost disclosure. If your platform is self-custodial and users stake through contracts they control, the analysis is different. Our MiCA white paper guide covers the token side.

Neither is legal advice. The structure of your product (custodial or not, who sets the APY, who runs validators) decides the answer.

How to build a staking platform, step by step

  1. Pick the type. Token rewards, vault, native/liquid staking or restaking integration. This sets 80% of the cost.
  2. Write the economic spec. Reward source, rates, lockups, withdrawal delays, fee split, what happens on slashing or strategy loss.
  3. Write the contracts from audited bases. OpenZeppelin ERC-4626, Synthetix-style reward accumulators, existing LST designs. Avoid novel math unless you need it.
  4. Test with invariants and fuzzing. Especially rounding, first deposits, reward funding and withdrawal queues.
  5. Build the keepers and oracle if you compound, rebalance or report validator balances.
  6. Build the frontend. Stake, unstake, claim, position view, APY with an honest explanation of where it comes from, and withdrawal queue status.
  7. Audit, then launch with deposit caps. Raise caps as the contracts survive real usage.

How much does staking platform development cost?

Our ranges include design, contracts, frontend, keepers where needed and an external audit.

ScopeWhat's in itCostTimeline
Token staking PoCSingle-token staking with rewards, simple dashboard, testnet$8,000 to $20,0002 to 4 weeks
Token staking MVPLockups or boosts, multiple reward tokens, fee distribution, audit$20,000 to $60,0004 to 8 weeks
Yield vault platformERC-4626 vaults, one or more strategies, keepers, analytics, audit$60,000 to $180,0002 to 4 months
Liquid staking or restaking protocolLST contracts, withdrawal queues, oracle, validator or operator integration, slashing handling, two audits$150,000 to $400,000+6 to 12 months

For comparison, a 2026 smart contract cost breakdown by Beltsys Labs puts staking contracts with dynamic reward calculations at $15,000 to $100,000 for development plus $15,000 to $40,000 for the audit. Our blockchain app development cost guide sets these next to other DeFi products, and our cost calculator gives a ballpark for your scope.

What moves the number:

  • Strategy complexity. A vault that compounds one reward token is simple. A vault that swaps rewards through several DEXs or moves funds between protocols needs much more testing.
  • Validator operations if you run them yourself, plus their ongoing cost.
  • Number of chains and assets. Each one adds integrations, oracles and audit scope.
  • Audit depth. Anything holding user deposits should get at least one external audit. LSTs and restaking usually get two plus a contest.
  • Legal work for custodial models and marketing to US or EU users.

Frequently asked questions

How long does it take to build a staking platform?

A single-token staking contract with a dashboard takes 4 to 8 weeks including the audit. A vault platform takes 2 to 4 months. A liquid staking or restaking protocol takes 6 to 12 months, much of it testing, audits and validator setup.

What is the difference between staking and liquid staking?

With regular staking, your tokens are locked with a validator until you unstake and wait out the withdrawal period. Liquid staking gives you a receipt token for the staked position, which you can trade or use in DeFi while the stake keeps earning. The cost is extra smart contract risk and the chance the receipt token trades below its underlying value.

Should I fork an existing staking contract?

Forking a well-audited design such as Synthetix StakingRewards or OpenZeppelin's ERC-4626 is a good start. Most bugs come from the changes you make after the fork, so audit the diff and test the math under edge cases. Forking a whole LST protocol is a much bigger commitment, because you inherit its operational model too.

Where does staking yield come from?

In native staking, from the chain's issuance and transaction fees paid to validators. In token staking, from token emissions or a share of protocol revenue. In vaults, from the underlying strategy. If a platform can't say clearly where its yield comes from, treat it as a warning sign.

Is restaking worth building on in 2026?

Restaking TVL has fallen a long way from its 2025 peak, so a new liquid restaking token faces a hard market. Using restaked security for your own service can still make sense if you need a decentralized operator set. Check current TVL and operator numbers on DefiLlama and the protocols' dashboards before you commit.

Is a staking platform legal?

Self-custodial staking is generally allowed in the US and EU, and US SEC staff said in 2025 that protocol staking and certain liquid staking activities aren't securities offerings. Custodial staking for clients needs MiCA authorization in the EU. Fixed promised returns and staking of your own token are a different analysis, so get legal advice for your structure.

Build your staking platform with us

We've shipped audited auto-compounding vaults for HyperBloom and automated yield vaults for DeSwarm, and we write the contracts, keepers and frontends in-house. If you're planning token staking, a vault product or something closer to liquid staking, see our DeFi development services or contact us with your scope.

Keep reading

Ready when you are

Tell us what you are building and where you are stuck. You get a reply from an engineer and a scoped estimate for a PoC, MVP or full launch. We reply within 24 hours, usually the same business day.

23stud.ioWeb3 and blockchain development studio. Advice, development, team extension or complete project delivery.
Copyright © 2026 23stud.io. All rights reserved