Deepsentinel

AI arbitrage for Sui DeepBook v3 with real-time monitoring and safe autonomous execution.

Deepsentinel

Created At

HackMoney 2026

Project Description

DeepSentinel is an AI-powered arbitrage intelligence platform built specifically for Sui's DeepBook v3 DEX. It solves a critical problem in DeFi: detecting and executing profitable arbitrage opportunities before they disappear, while managing risk intelligently. The platform continuously monitors multiple DeepBook v3 pools (SUI/USDC, SUI/USDT, USDC/USDT) to detect triangular arbitrage loops. Unlike simple price scanners, DeepSentinel uses a multi-factor AI scoring system (0-100) that evaluates opportunities based on spread percentage, liquidity depth, slippage estimates, gas efficiency, and historical performance patterns. Key innovations include:

AI Decision Engine: Scores opportunities using 6+ factors with weighted algorithms, providing confidence ratings (low/medium/high) Intelligent Filtering: Customizable thresholds ensure only profitable trades pass through (min profit %, liquidity scores, max slippage) PnL Forecasting: Built-in simulator lets users test capital deployment with realistic fee and slippage calculations Autonomous Execution: Smart contract vault on Sui testnet with programmable transaction blocks for atomic arbitrage Risk Management: Circuit breakers, daily loss limits, position sizing controls, and real-time safety checks

The dashboard provides professional-grade visualization with live price feeds, real-time opportunity detection, and detailed breakdowns of each arbitrage path including gross profit, fees (0.3% per swap), slippage buffers, and net returns. DeepSentinel transforms arbitrage from a manual, high-risk activity requiring constant attention into an intelligent, automated system that trades only when conditions are optimal. Perfect for traders, market makers, and DeFi protocols looking to capture inefficiencies in Sui's growing ecosystem.

How it's Made

DeepSentinel is built as a full-stack application leveraging Sui's native capabilities and modern web technologies. Smart Contracts (Move): Deployed an arbitrage vault contract on Sui testnet using Move language. The vault manages deposits/withdrawals and records arbitrage executions. We use Programmable Transaction Blocks (PTBs) to chain multiple DeepBook swaps atomically - crucial for arbitrage where failure at any step should revert the entire transaction. Backend (Node.js + TypeScript): The core intelligence runs on an Express server with WebSocket support for real-time updates. We implemented several sophisticated services:

Pool Monitor: Polls DeepBook v3 pools every 3 seconds via Sui RPC, parsing CLOB (Central Limit Order Book) data to extract best bid/ask prices and liquidity depth Arbitrage Engine: Detects triangular loops (e.g., SUI→USDC→USDT→SUI) and calculates profitability accounting for 0.3% trading fees and estimated slippage AI Decision Engine: Multi-factor scoring algorithm with weighted parameters that self-optimizes based on historical execution data stored in SQLite Execution Engine: Builds and dry-runs PTBs before submission, with comprehensive safety checks (circuit breakers, position limits, loss caps) Strategy Advisor: Adapts trading parameters based on market volatility and recent success rates

Frontend (React + TypeScript): Professional trading dashboard built with React, TailwindCSS, and shadcn/ui components. Uses custom hooks (useArbitrage) for state management and polling. The UI implements glassmorphism effects and real-time WebSocket connections for sub-second updates. Sui Integration: We leveraged @mysten/sui.js SDK v2.3.1 for all blockchain interactions. The Sui RPC endpoint provides access to DeepBook v3 pool objects, which we query for dynamic field data containing order book states. We found Sui's object model particularly elegant for tracking pool states.

Notable Hacks:

Synthetic Pool Generation: When real DeepBook pools weren't available, we created a hybrid approach pulling actual SUI prices from CoinGecko and generating realistic order books with proper bid/ask spreads (0.1-0.4%) PTB Gas Estimation: Implemented dry-run simulation before every trade to estimate gas costs and verify profitability post-fees Adaptive Thresholds: The AI dynamically adjusts profit thresholds based on recent trade performance - if success rate drops, it becomes more conservative Database-Driven Learning: Every execution (successful or failed) is logged with full context, allowing the decision engine to learn optimal trade sizes and risk parameters over time

Partner Tech: While we built the scoring algorithms from scratch, the project heavily relies on Sui's fast finality (sub-second) and DeepBook v3's CLOB architecture for efficient price discovery. The transaction composability via PTBs was essential - without atomic execution, arbitrage would be too risky. Challenges: Testnet DeepBook pools had limited liquidity, so we supplemented with market price APIs. Production version will use mainnet pools with real depth. Also, Move's strict ownership model required creative vault design patterns. The entire stack is TypeScript for type safety, with comprehensive error handling and graceful degradation. Uses modern React patterns (hooks, context) and responsive design principles for mobile trading.

background image mobile

Join the mailing list

Get the latest news and updates