Stake once. Watch it grow.

Stake STAKE, earn REWARD at a fixed global rate pro-rated by your share β€” fair by construction with per-user checkpoints. Claim anytime, exit in one click, or emergency-withdraw your principal.

0x…
Total stakedβ€”
Reward rateβ€”
Period ends inβ€”
Your stakeβ€”
Your shareβ€”
your earned Β· live β€”
+0 REWARD

Manage your position

Deposit STAKE and start earning immediately. Approve once first.

Emissions

current period
start finish

β€”

reward rate β€”

Live Activity

loading…

Loading…

How to use this dApp

🧭 How to use

  1. Connect your wallet. Press Connect Wallet in the sidebar. This dApp is configured for Sepolia β€” switch your wallet to Sepolia and hold some STAKE (the chain badge shows the active network).
  2. Approve the vault β€” once. Open Manage β†’ 🌱 Stake and press Approve max so the StakeVault contract is allowed to move STAKE on your behalf.
  3. Stake your STAKE. Enter an amount in the Stake form and press Stake. Your position appears in the Overview stat strip and rewards start accruing immediately.
  4. Watch rewards grow. The your earned Β· live counter in Overview ticks up every second: you earn at the global rate pro-rated by your share of the pool.
  5. Claim anytime. Press Claim now (Overview or Manage β†’ πŸ† Claim) to harvest REWARD straight to your wallet.
  6. Leave whenever you want. Withdraw pulls principal back while rewards stay claimable, Exit all does withdraw + claim in one click, and Emergency withdraw returns principal only β€” pending rewards are forfeited.

Open vault on Sepolia β†—

β›“ The process β€” what happens on-chain

  1. STAKE approval on the STAKE token (ERC-20). Your wallet calls approve() on the STAKE token, recording how much the StakeVault contract may pull. Every stake is checked against this allowance before tokens move.
  2. StakeVault.stake(amount). The vault first settles the global rewardPerToken accumulator and your personal checkpoint so accounting stays fair for everyone, then pulls STAKE in via transferFrom and updates balanceOf and totalSupply.
  3. StakeVault.startRewards(amount, duration). The owner funds emissions: the vault pulls REWARD and sets rewardRate = amount / duration. Called mid-period, leftover rewards roll over into the new rate.
  4. Reward accrual inside StakeVault. rewardPerToken() grows by elapsed Γ— rewardRate / totalStaked; your earned() is your balance Γ— the delta since your last checkpoint, plus unclaimed rewards β€” O(1) math with no per-user timestamps.
  5. StakeVault.getReward() / exitAll(). Claiming zeroes your rewards entry and transfers REWARD out. exitAll() chains withdraw + claim in one call, while emergencyWithdraw() returns principal and leaves forfeited rewards in the vault as documented dust.

πŸ—Ί Flow graph

1. Approve STAKE STAKE token (ERC-20) approve() on STAKE 2. Stake StakeVault stake() 3. Accrue rewards StakeVault rewardPerToken() 4. Claim StakeVault getReward() 5. Exit / emergency StakeVault exitAll() Β· emergency() Stake STAKE β†’ earn REWARD β†’ claim anytime Β· everything settles on Sepolia

Static overview of one stake β†’ claim round trip. Rewards accrue per second via the global rewardPerToken accumulator while your STAKE sits in the vault.