DiviMate Crypto
Real-time cryptocurrency arbitrage monitor tracking ETH/USDC price differences between Uniswap and Sushiswap on Polygon

Problem
Crypto arbitrage opportunities between Uniswap and Sushiswap on Polygon vanish in seconds. No mobile tool gave traders a real-time, gas-adjusted profit signal with push alerting — most dashboards were web-only, delayed by polling, and didn't account for EIP-1559 gas costs in the profit calculation.
Stack Decisions
WebSocket with custom Redux middleware
A custom Redux middleware intercepts SOCKET_CONNECT actions and manages the WebSocket lifecycle — reconnection, heartbeat, and message dispatch — so components never touch the socket directly and the connection state is always in the store.
ethers.js on Polygon
Direct contract reads via ethers.js against Uniswap V3 and SushiSwap V3 pool contracts gave sub-second price data without going through a REST intermediary that would add latency to time-sensitive signals.
Circuit breaker pattern
DEX APIs are unreliable under load. A circuit breaker with exponential backoff prevents the app from hammering a degraded endpoint and recovers gracefully — the UI shows a degraded state rather than crashing.
Challenges
Gas-adjusted profit calculation in real time
Every opportunity display needed to subtract estimated gas costs (base fee + priority fee from the EIP-1559 fee market) before showing a net profit figure. Getting this wrong by even a few dollars would send users into losing trades.
Rendering 30+ live prices without jank
Updating price cells for 30 token pairs every second without re-rendering the whole list required careful memoization of each row and dispatching granular store updates per token rather than replacing the full price map.
WebSocket reconnection without data gaps
When the socket drops mid-stream, the middleware replays the last known state from the store before resuming so the UI never shows a stale price while the connection is being re-established.
Outcome
Deployed on Google Play and the web — monitors ETH/USDC price spreads across two DEXes in real time with push notifications for high-profit windows. The 24-hour analytics dashboard surfaced patterns showing peak arbitrage windows clustered around high-volatility trading hours, a finding users reported using to time their manual trades.