KING OF PERPS - The Universal Perpetual Aggregator. Trade any perpetual, anywhere, with one click. A revolutionary cross-chain DeFi platform powered by Avail Nexus SDK, enabling seamless perpetual trading, gas refueling, and unified USDC/USDT deposits to the highest yield generating markets.
Traders face significant barriers when trying to access the best perpetual trading opportunities across different blockchains and DEXs:
- Capital Inefficiency: Assets scattered across chains, manual bridging required
- Operational Complexity: Multiple wallet connections, chain switching friction
- Market Inefficiency: Missed arbitrage opportunities, fragmented access
NexusFinance provides a unified platform that eliminates these barriers:
- Unified Access: One-click deposits to any DEX from any chain
- Optimized Routing: Automated gas optimization, minimal costs
- Real-Time Intelligence: Live funding rate comparison across DEXs
- Multi-DEX Integration: Seamlessly trade on Hyperliquid, Aster, Reya, and Lighter
- Cross-Chain Native: Deposit from Ethereum, Arbitrum, BNB Smart Chain, and Solana
- Unified Trading Interface: Single dashboard for all perpetual DEXes
- Real-Time Market Data: Live funding rates, liquidity, and volume across all platforms
- One-Click Position Opening: Bridge USDC and open positions in a single transaction
- Smart Execution: Automatic routing to best liquidity and rates
- Universal Token Support: Use ETH, USDC, USDT from any network to refuel gas on any chain
- Multi-Chain Support: Ethereum, Arbitrum, BNB Smart Chain, Solana
- Unified Balance Display: See your total balance across all chains
- Lightning-Fast Settlement: Powered by Avail Nexus SDK for cross-chain execution
- Smart Routing: Automatically finds the most efficient path for your transactions
- Unified Balance Integration: Real-time balance fetching from Nexus SDK across all chains
- Multi-Protocol Support: Aave, Morpho, Compound, Euler integration
- Auto Rebalancing: AI-powered yield optimization every 7 days
- Cross-Chain Yield Farming: Automatically move assets to highest-yielding protocols
- Smart Execution: Bridge and deposit to optimal protocols in single transaction
- Nexus SDK Integration: Seamless cross-chain bridging with
bridgeAndExecute - Position Management: Open long/short positions with leverage on any supported DEX
- Unified Deposits: Deposit unified USDC/USDT to the highest yield generating markets
- Market Data Integration: Real-time funding rates and best execution
- Wallet Integration: Support for all major wallets via Reown AppKit
- Responsive Design: Modern UI with Tailwind CSS and smooth animations
- Frontend: React 18, TypeScript, Vite
- Styling: Tailwind CSS with custom animations
- Blockchain: Wagmi, Viem, Ethers.js
- Cross-Chain: Avail Nexus SDK
- Wallet Integration: Reown AppKit (WalletConnect)
- State Management: TanStack Query
- UI Components: Lucide React icons
-
Clone the repository
git clone https://github.com/mxber2022/nexusfinance.git cd nexusfinance -
Install dependencies
npm install
-
Environment Setup
cp env.example .env.local
Update the environment variables in
.env.local: -
Start development server
npm run dev
-
Build for production
npm run build
src/
βββ components/ # Reusable UI components
β βββ layout/ # Header, Footer
β βββ sections/ # Page sections (HeroSection)
β βββ ui/ # UI components (Button, Card, etc.)
β βββ PositionDialog.tsx # Position opening dialog with leverage slider
β βββ PositionsDisplay.tsx # User positions display with DEX info
β βββ MarketDataDialog.tsx # Market data display
β βββ OpenPositionButton.tsx # Position opening button
βββ constants/ # Chain and token configurations
β βββ chains.ts # Supported blockchain networks
β βββ tokens.ts # Supported tokens
β βββ dexes.ts # DEX configurations
β βββ marketData.ts # Market data constants
βββ hooks/ # Custom React hooks
β βββ useHyperliquid.ts # Hyperliquid integration
β βββ useHyperliquidData.ts # Hyperliquid market data
β βββ useHyperliquidPosition.ts # Position management and balance fetching
β βββ useAster.ts # Aster integration
β βββ useAsterData.ts # Aster market data
β βββ useReyaData.ts # Reya market data
β βββ useTokenBalances.ts # Unified token balance management
βββ pages/ # Main application pages
β βββ HomePage.tsx # Landing page with problem/solution section
β βββ GasRefuelPage.tsx # Gas refueling interface
β βββ FlowFiPage.tsx # Auto yield optimization with Nexus balance integration
β βββ PerpPortPage.tsx # Perpetual trading interface with position management
βββ providers/ # React context providers
β βββ AppKitProvider.tsx # Wallet connection provider
βββ services/ # External service integrations
β βββ hyperliquid.ts # Hyperliquid SDK integration
β βββ hyperliquidApi.ts # Hyperliquid API client
β βββ hyperliquidPosition.ts # Position management
β βββ aster.ts # Aster integration
β βββ asterApi.ts # Aster API client
β βββ reyaApi.ts # Reya API client
βββ types/ # TypeScript type definitions
βββ index.ts # Shared type definitions
- Ethereum (1) - Mainnet
- Arbitrum (42161) - Layer 2 scaling
- BNB Smart Chain (56) - Binance ecosystem
- Solana (1399811149) - High-performance blockchain
- ETH - Ethereum native token
- USDC - USD Coin (6 decimals)
- USDT - Tether (6 decimals)
- SOL - Solana native token (9 decimals)
- Hyperliquid - Decentralized perpetual exchange
- Aster - Cross-chain perpetual protocol
- Reya - Cross-chain perpetual protocol
- Lighter - Coming soon
- Connect your wallet using any supported wallet provider
- Select your DEX - Choose from Hyperliquid, Aster, Reya, or Lighter
- Choose your token - Select ETH, USDC, USDT, or SOL
- Enter deposit amount - Specify how much you want to deposit
- Click "Deposit" - The platform will automatically bridge and deposit to your chosen DEX
- Open positions - Use the unified interface to open long/short positions with leverage
- Connect your wallet to access your balances
- Select destination chain - Choose where you need gas (Ethereum, Arbitrum, BNB, Solana)
- Choose your token - Use ETH, USDC, or USDT to refuel
- Enter refuel amount - Specify how much gas you need
- Click "Refuel" - Execute cross-chain transaction to refuel your destination chain
- Connect your wallet to access unified balances across all chains
- Select your asset - Choose from USDC, USDT, or ETH
- Choose target protocol - Select from Aave, Morpho, Compound, or Euler
- Enter amount - Specify how much to optimize
- Enable auto-rebalancing - Set up automatic yield optimization every 7 days
- Click "Move Now" - Execute cross-chain bridge and deposit to optimal protocol
- Unified Balance Display: See your total balance across all chains
- One-Click Operations: Bridge and deposit in a single transaction
- Real-Time Data: Live funding rates and market data
- Cross-Chain Native: No manual bridging required
- Audited Smart Contracts: All integrations use battle-tested, audited protocols
- Non-Custodial: Users maintain full control of their assets
- Transparent: All transactions are verifiable on-chain
- Secure Wallets: Supports all major wallet providers
- Ethereum - Mainnet with full USDC/USDT support
- Arbitrum - Layer 2 scaling with optimized gas costs
- BNB Smart Chain - Binance ecosystem integration
- Solana - High-performance blockchain support
- Hyperliquid - Full integration with position opening
- Aster - Cross-chain perpetual protocol
- Reya - Cross-chain perpetual protocol
- Lighter - Coming soon
- Avail Nexus SDK - Seamless cross-chain bridging
- Bridge and Execute - Single transaction for bridge + deposit
- Unified Balances - Cross-chain balance aggregation
- Smart Routing - Optimal path selection
- Hyperliquid Integration: Full SDK integration with position opening, market data, and balance management
- Aster Integration: Cross-chain deposit functionality with Nexus SDK bridge and execute
- Reya Integration: Market data and funding rate aggregation
- Gas Refuel Service: Cross-chain gas refueling with unified balance display
- Nexus SDK Integration:
bridgeAndExecutefor seamless cross-chain operations - Position Management: Open long/short positions with leverage on Hyperliquid (up to 40x)
- Unified Deposits: Deposit unified USDC/USDT to highest yield markets
- Market Data: Real-time funding rates, liquidity, and volume data
- Unified UI: Single interface for all perpetual DEXes
- Cross-Chain Balances: Aggregate balances across all supported chains
- Position Display: View all positions with DEX info and asset icons
- PnL Tracking: Real-time PnL indicators with floating values
- Auto Yield Optimization: AI-powered yield farming across protocols
- Problem/Solution Section: Clear explanation of blockchain fragmentation issues
- Frontend: React 18 + TypeScript + Vite
- Styling: Tailwind CSS with custom animations
- Blockchain: Wagmi + Viem + Ethers.js
- Cross-Chain: Avail Nexus SDK
- Wallet: Reown AppKit (WalletConnect)
- State: TanStack Query for data fetching
- Real-time Balance Tracking: Monitor your assets across all chains
- Transaction History: Complete record of all cross-chain operations
- Market Data: Live funding rates and liquidity across all DEXes
- Position Tracking: Monitor your perpetual positions across platforms
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation: docs.nexusfinance.com
- Discord: discord.gg/nexusfinance
- Twitter: @NexusFinance
- Email: support@nexusfinance.com
- Avail Nexus SDK for cross-chain infrastructure
- Reown AppKit for wallet connectivity
- Wagmi for Ethereum integration
- Tailwind CSS for styling
Built with β€οΈ by the NexusFinance team
Revolutionizing cross-chain DeFi, one transaction at a time.