A modern Gatsby application built with TypeScript, React, and Tailwind CSS that compares the costs of running your own Ethereum validator versus delegating to staking pools, with real-time data integration.
- ETH Price: Live prices from CoinGecko API with 2-minute caching
- Staking APR: Real-time APR from Beaconcha.in API with 5-minute caching
- Automatic Refresh: Manual refresh button for latest data
- Hardware cost analysis ($1,000-$2,000)
- Annual operating expenses:
- Electricity costs (based on 15W power consumption)
- Internet connectivity costs
- Hardware depreciation (5-year lifespan)
- Maintenance expenses
- Time investment valuation
- Net annual returns calculation
- ROI percentage
- Support for multiple platforms:
- Lido (10% fee)
- Rocket Pool (14% commission)
- Stakely (4% fee)
- Coinbase (25% fee)
- Kraken (15% fee)
- Flexible stake amounts (from 0.01 ETH)
- Net APR after platform fees
- Liquidity token information
- Break-Even Analysis: Calculate when solo staking becomes more profitable
- 10-Year Projection: Visual chart showing cumulative returns
- Side-by-Side Comparison: Detailed cost breakdown comparison
- Intelligent Recommendations: Context-aware suggestions based on your inputs
- Obol Branding: Professional design using official Obol brand colors
- Dark Mode: Automatic dark mode support with manual toggle
- Responsive: Mobile-first design with Tailwind CSS
- Accessible: WCAG-compliant UI components
- Framework: Gatsby 5 (Static Site Generation)
- Language: TypeScript
- UI Library: React 18
- Styling: Tailwind CSS with custom Obol theme
- Font: DM Sans (Obol's official font)
- APIs:
- CoinGecko API (ETH price)
- Beaconcha.in API (staking APR)
validatorcosts/
├── src/
│ ├── components/
│ │ ├── Layout.tsx
│ │ ├── DataBanner.tsx
│ │ ├── InputGroup.tsx
│ │ ├── SoloValidatorInputs.tsx
│ │ ├── DelegationInputs.tsx
│ │ ├── ResultsComparison.tsx
│ │ ├── BreakEvenAnalysis.tsx
│ │ └── PlatformComparison.tsx
│ ├── pages/
│ │ └── index.tsx
│ ├── services/
│ │ ├── calculatorService.ts
│ │ ├── coinGeckoService.ts
│ │ └── beaconchainService.ts
│ ├── types/
│ │ └── calculator.ts
│ └── styles/
│ └── global.css
├── gatsby-config.ts
├── gatsby-browser.tsx
├── gatsby-ssr.tsx
├── tailwind.config.js
├── postcss.config.js
└── tsconfig.json
- Node.js 18+ or Node.js 20+
- npm or yarn
# Install dependencies
npm install
# Start development server
npm run develop
# Navigate to http://localhost:8000# Start development server
npm run develop
# Build for production
npm run build
# Serve production build locally
npm run serve
# Clean cache and build artifacts
npm run clean
# Type check
npm run type-checkThe calculator comes pre-configured with updated default values:
- Internet Cost: $10/month (updated from $50)
- Setup Time: 4 hours (updated from 12 hours)
- Monthly Maintenance: 1 hour (updated from 3 hours)
- Hardware Cost: $1,500
- Electricity Rate: $0.18/kWh
- Hourly Rate: $50
- Build the project:
npm run build- Deploy the
public/folder to your hosting provider
# Install Vercel CLI
npm i -g vercel
# Deploy
vercel# Install Netlify CLI
npm i -g netlify-cli
# Deploy
netlify deploy --prodEdit tailwind.config.js to customize the color scheme:
theme: {
extend: {
colors: {
obol: {
green: '#2FE4AB',
purple: '#9167E4',
// ... other colors
}
}
}
}Edit src/pages/index.tsx to change default calculator parameters:
const [soloParams, setSoloParams] = useState<SoloValidatorParams>({
hardwareCost: 1500,
internetCost: 10,
setupTime: 4,
// ... other params
});Edit src/services/calculatorService.ts to add more staking platforms:
export function getStakingPlatforms(): StakingPlatform[] {
return [
// ... existing platforms
{
name: 'New Platform',
feePercentage: 5,
minimumStake: 0.01,
hasLiquidityToken: true,
liquidityTokenName: 'nETH',
description: 'Description here',
},
];
}- Chrome/Edge 90+
- Firefox 88+
- Safari 14+
- Mobile browsers (iOS Safari, Chrome Mobile)
- Bundle Size: ~200KB (gzipped)
- Time to Interactive: <2 seconds on 4G
- Lighthouse Score: 95+ (Performance, Accessibility, Best Practices, SEO)
- API Response: <500ms average
MIT License - Open source and available for educational purposes.
This calculator is for educational and informational purposes only. It provides estimates based on current market data and typical scenarios. Actual costs and returns may vary significantly based on:
- ETH price volatility
- Network conditions and staking APR changes
- Hardware prices and availability
- Local electricity and internet costs
- Individual technical expertise and time investment
- Platform fee changes
- Regulatory changes
Always conduct thorough research and consider consulting with financial advisors before making staking decisions.
Contributions are welcome! Areas for improvement:
- Additional staking platforms
- More accurate cost models
- UI/UX enhancements
- Performance optimizations
- Localization/translations
For issues, questions, or suggestions:
- Review the FAQ section in the application
- Check the EthStaker community
- Consult official Ethereum staking documentation
Built with ❤️ for the Ethereum community Powered by Obol Network