Real-time comparison tool to find the best way to acquire sAVAX (Staked AVAX) on Avalanche C-Chain.
Live App: https://avasnap.github.io/savax-compare/
Compares two methods of acquiring sAVAX:
- Buy on DEX: Swap AVAX for sAVAX on decentralized exchanges
- Mint via Protocol: Stake AVAX directly through BENQI to receive sAVAX
The app shows you which method gives you more sAVAX for your AVAX, identifying arbitrage opportunities in real-time.
- ✅ Real-time DEX prices from DexScreener API
- ✅ On-chain protocol rates from BENQI sAVAX contract
- ✅ Percentage-based arbitrage analysis
- ✅ No API keys or external dependencies required
- ✅ Fully client-side, works entirely in your browser
- DEX Prices: Fetched from DexScreener API (highest liquidity pool on Avalanche)
- Protocol Rate: Direct RPC call to BENQI sAVAX contract at
0x2b2C81e08f1Af8835a78Bb2A90AE924ACE0eA4bE
- React 19 + TypeScript
- Vite for build tooling
- TailwindCSS for styling
- GitHub Actions for CI/CD
- Deployed on GitHub Pages
- Node.js 20+
# Install dependencies
npm install
# Run dev server (http://localhost:3000)
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview├── App.tsx # Main app component
├── components/
│ ├── AIInsights.tsx # Market intelligence display
│ └── InputCard.tsx # Reusable input component
├── services/
│ ├── gemini.ts # DexScreener API integration
│ └── chainlink.ts # BENQI contract RPC calls
├── types.ts # TypeScript type definitions
└── vite.config.ts # Vite configuration
- Fetches DEX Price: Queries DexScreener for sAVAX/AVAX pairs on Avalanche, selects the pool with highest liquidity
- Fetches Protocol Rate: Calls
getPooledAvaxByShares(1e18)on BENQI sAVAX contract via Avalanche RPC - Calculates Arbitrage: Compares how much sAVAX you'd receive from each method
- Recommends Best Option: Shows which method gives you more sAVAX and by what percentage
For 1000 AVAX:
- DEX: 1000 / 1.2317 AVAX = 811.89 sAVAX
- Protocol: 1000 / 1.2368 AVAX = 808.56 sAVAX
- Result: Buy on DEX, receive 3.33 sAVAX (0.41%) more
Automatically deployed to GitHub Pages on every push to main:
- GitHub Actions runs
npm run build - Deploys
dist/folder togh-pagesbranch - GitHub Pages serves from
gh-pagesbranch - Changes go live in ~2-3 minutes
BENQI sAVAX Contract:
- Address:
0x2b2C81e08f1Af8835a78Bb2A90AE924ACE0eA4bE - Function:
getPooledAvaxByShares(uint256 shareAmount) - Selector:
0x4a36d6c1 - Returns: Amount of AVAX backing the given shares
This is a simple arbitrage finder. If you find bugs or have suggestions, open an issue.
MIT