UniPortfolio
Unified DeFi portfolio management across blockchains, enabling cross chain EVM/non-EVM swap.
Problem Statement
UniPortfolio is a decentralized finance (DeFi) application that empowers users to track their crypto portfolio across multiple blockchains, execute optimized swaps using the 1inch API, and seamlessly bridge assets to Sui for cross-chain interoperability (more non-EVM <> EVM swap up-coming).Built for the Unite DeFi hackathon, UniPortfolio addresses the challenge of fragmented DeFi ecosystems by providing a unified interface for portfolio management and cross-chain operations, with a focus on extending 1inch’s Fusion+ capabilities to Sui.
Solution
How UniPortfolio is Built UniPortfolio is a platform designed for cross-chain portfolio management and token swapping, built with innovative blockchain technology and a modern technical stack.Core Innovation: Cross-Chain Swaps ETH <> SUI UniPortfolio’s standout feature is its ability to facilitate cross-chain swaps between Ethereum (ETH) and Sui (SUI). This is achieved through:Cryptographic Security: sui::hash::keccak256 for secret verification and hashlock implementationData Structures:Timelock struct for recording time-based locksFactory struct storing src_escrows and dst_escrows tablesAccess Control:Resolver object for authorized operationsresolver_cap token representing resolver ownershipOnly resolver holders can execute create_dst_escrow() and create_src_escrow()Future Enhancements:Default timelock configuration during factory creationFactory owner-controlled resolver registrationcreate sui dst escrow: https://testnet.suivision.xyz/txblock/46Nom4YQk1eXMjyQQxRbV46AUzo4RR93wx56wjaR28AM sui dst escrow withdraw: https://testnet.suivision.xyz/txblock/fFtCBTnWKoMzaRRdEKPcMtbhdP54CBNTumMby7gi7YA?tab=Overview🏗️ Core Architecture & Technologies Frontend FrameworkNext.js 14 - React-based full-stack framework with App RouterTypeScript - Type safety throughout the applicationReact 18 - Component library for the UITailwind CSS - Utility-first CSS framework with custom design systemAuthentication & Wallet IntegrationPrivy (@privy-io/react-auth) - Primary wallet authentication system (NOT @statechannels)Wagmi - Ethereum wallet connection and blockchain interactionsMulti-chain support: Ethereum, Polygon, BNB Chain, Arbitrum, Optimism, Base, and their testnetsSui blockchain support - Custom integration with Suiet and Slush wallets via @mysten/sui.jsState ManagementZustand - Lightweight state managementTanStack React Query - Server state management and cachingReact Context - For wallet and chain stateBackend ArchitectureNext.js API Routes - Server-side functions (NOT separate Rust backend)Proxy architecture - All external API calls go through Next.js API routesNo separate backend service - Everything runs within the Next.js application🔗 API Integrations & Data Sources1inch API Ecosystem The project integrates with 5 different 1inch API services:Portfolio API (v5.0) - https://api.1inch.dev/portfolio/portfolio/v5.0Current portfolio value across chainsHistorical value chartsPortfolio holdings snapshotsSwap API (v6.1) - https://api.1inch.dev/swap/v6.1DEX aggregation and token swappingSwap quotes and executionToken allowance managementAvailable token listingsSpot Price API (v1.1) - https://api.1inch.dev/price/v1.1Real-time token price dataMulti-chain price supportBalance API (v1.2) - https://api.1inch.dev/balance/v1.2Token balances for wallet addressesMulti-chain balance trackingHistory API (v2.0) - https://api.1inch.dev/history/v2.0Transaction history and event trackingSwap transaction analysisEvent-based filteringAlternative Data SourcesCoinGecko API - Fallback price data sourceCustom RPC endpoints - Direct blockchain interaction
Hackathon
ETHGlobal Unite
2025
Contributors
- Chonwai
48 contributions
- 1997roylee
33 contributions
- johnku2011
12 contributions
- vercel[bot]
1 contributions