FluxStake - Ethereum ERC-20 Token Staking DApp with Multiple Fixed-APR Packages & Rewards
FluxStake - Ethereum ERC-20 Token Staking DApp with Multiple
Description
FluxStake — Production-Ready Fixed-APR Staking for ERC-20 Tokens
Contract Reference: FluxStaking.sol
License: MIT
Solidity Version: ^0.8.x
Frontend Stack: React + Vite + TypeScript + Tailwind CSS
Wallet Integration: WalletConnect, Wagmi, Viem
Deployment: Remix (flattened), Hardhat (optional)
FluxStake is a complete, production-ready staking solution for ERC-20 tokens on Ethereum and EVM-compatible networks.
Launch fixed-APR staking in hours — not weeks.
Token holders stake, lock for a chosen period, and withdraw principal + rewards at maturity.
Admins manage packages, adjust APRs, and fund rewards — all on-chain.
Who Is It For?
| User | Use Case |
|---|---|
| Token Projects | Reward loyal holders with predictable yields |
| DeFi Teams & DAOs | Bootstrap TVL with transparent lock-up mechanics |
| Launchpads & Protocols | Offer staking as a post-IDO utility |
| NFT / Gaming Projects | Incentivize long-term token holding |
| Agencies & Freelancers | Deliver client-ready staking UIs fast |
How It Works — User Flow
- Connect Wallet
→ MetaMask, WalletConnect, or any injected provider - Enter Stake Amount
→ Approve token (if first time) - Choose Lock Package
→ e.g.,7 days @ 8%,30 days @ 12%,90 days @ 18% - Confirm & Stake
→ Tokens transferred to contract, stake recorded - Track Progress
→ Real-time dashboard: TVL, your stakes, countdowns - Withdraw at Maturity
→ Claim principal + fixed reward in one click
No early withdrawal — rewards are guaranteed only at maturity
How It Works — Admin Flow
- Deploy Token (or use existing)
- Deploy
FluxStakingvia Remix (flattened file included) - Initialize Packages via
addPackage() - Fund Rewards with your ERC-20 token
- Configure Frontend (
config.ts) - Build & Host — static
dist/folder
Key Features
| Feature | Benefit |
|---|---|
| Multiple Lock Packages | 7/30/60/90+ day options with custom APRs |
| Fixed APR (Basis Points) | Predictable yields — no floating rates |
| Deferred APR Reductions | Decreases delayed by min 24h to protect stakers |
| Real-Time Dashboard | TVL, recent stakes, top stakers, 14-day chart |
| Auto-Refresh UI | Updates on every stake/withdraw (no reload) |
| Responsive & Accessible | Mobile-first, keyboard-navigable |
| Live Event Indexing | Events emitted for TheGraph / frontend sync |
What You Can Configure
| Setting | Options |
|---|---|
| Packages | Lock period (seconds), APR (bps), active/inactive |
| APR Changes | Increases = immediateDecreases = 24h+ delay |
| Global Switches | Enable/disable staking & withdrawals |
| Reward Pool | Fund/withdraw (owner only) |
| Frontend | Network, RPC, contract addresses, branding, themes |
Technology Stack
Frontend
- Framework: React + Vite
- Language: TypeScript
- Styling: Tailwind CSS
- Wallet: Wagmi + Viem + WalletConnect
- Charts: Recharts (14-day activity)
- Build Output: Static
dist/folder (any host)
Smart Contracts
- Language: Solidity
^0.8.x - Libraries: OpenZeppelin (Ownable, ReentrancyGuard, SafeERC20)
- Deployment:
→ Remix (flattened file included)
→ Hardhat (full imports version optional)
What’s Included
- Frontend Source – Full React/Vite app with dashboard & charts
- Flattened Contract – Ready for Remix deployment
- Hardhat Version – For advanced workflows
- Documentation – Step-by-step deployment & config
- Config File –
src/config.tsfor easy customization - Theme Variables – Tailwind + CSS vars for branding
Requirements
| Requirement | Details |
|---|---|
| Node.js | LTS version (18+) |
| ERC-20 Token | Deployed on target network |
| RPC Provider | Public or private (e.g., Infura, Alchemy) |
| WalletConnect ID | Free from walletconnect.com |
Security Notes
- Uses battle-tested OpenZeppelin patterns
- ReentrancyGuard on all state changes
- SafeERC20 for token transfers
- No upgradeability — immutable after deploy
- Reward pool isolated — no user funds at risk
For production:
→ Conduct independent smart contract audit
→ Test on forked mainnet or testnet first
Limitations & Compatibility
| Aspect | Detail |
|---|---|
| Token Type | ERC-20 only |
| Reward Funding | Owner must pre-fund rewards |
| Early Withdrawal | Not supported (by design) |
| APR Model | Fixed per package — no dynamic yield |
| Chain Support | Ethereum + all EVM chains (Polygon, BSC, Arbitrum, etc.) |
Who Owns the Funds?
| Party | Control |
|---|---|
| Users | Approve & stake → tokens held in contract |
| Contract | Custodies principal until maturity |
| Owner | Funds & withdraws rewards only |
| No Risk | User principal never used for rewards |
Why Choose FluxStake?
| Benefit | Why It Matters |
|---|---|
| Transparent Mechanics | Users see exact rewards upfront |
| Fast Deployment | Live in < 2 hours |
| Full Branding | Match your project’s look & feel |
| Developer-Friendly | Clean code, comments, config-driven |
| Trust & Clarity | No hidden fees, no yield farming complexity |
Support & Customization
- Documentation: Full setup, config, and extension guide
- Code Comments: Every function and component explained
- Modular Design: Easy to add vesting, tiers, or referrals
- Community Ready: Events for Subgraph indexing
FluxStake = Simple. Secure. Staking.
Stake. Lock. Earn. Withdraw. Done.
Built for clarity. Designed for trust. Ready for your token.
Disclaimer: Web3.Market is a marketplace platform that facilitates the sale of digital products between independent sellers and buyers. We do not develop, endorse, or guarantee any product listed on this platform. All products are provided by third-party sellers and are sold "as is." Web3.Market assumes no responsibility or liability for the functionality, security, legality, or any use or misuse of products purchased through this platform. Buyers are solely responsible for evaluating the suitability of any product for their intended purpose and for ensuring compliance with all applicable laws and regulations. By purchasing, you acknowledge that Web3.Market shall not be held liable for any direct, indirect, incidental, or consequential damages arising from the use of any product.
One-time payment • Lifetime access
Product Info
RPC Providers
Need a reliable RPC endpoint for your dApp? Get started with these trusted providers: