Multi-chain DeFi: intent-based swaps on Sui + ENS identity across multiple networks
This is a multi-chain DeFi platform combining intent-based swaps with decentralized identity management. The project consists of two integrated components: ResolverPay, a production-ready intent-based DEX on Sui that eliminates DeFi complexity through competitive off-chain execution, and a comprehensive ENS integration system for Ethereum-based identity management. Users express desired swap outcomes like "swap 100 SUI for at least 300 USDC" while maintaining consistent identity across chains through ENS profiles. ResolverPay leverages Sui's Programmable Transaction Blocks to bundle entire executions—withdrawing intents, swapping on DeepBook V3, delivering tokens, and capturing profit—into single atomic transactions. The ENS component implements direct smart contract interactions for name resolution, multi-chain address management (10+ networks including Bitcoin, Polygon, Arbitrum), profile management with social media integration, and sophisticated subdomain creation via NameWrapper. Together, the platform bridges CEX simplicity with DeFi self-custody while providing unified identity management across blockchain ecosystems, demonstrating deep protocol understanding through custom implementations without relying on third-party abstraction libraries.
The technical architecture spans two blockchain ecosystems with distinct but complementary implementations. On Sui, we built 300+ lines of Move smart contracts managing intent lifecycles with strict slippage protection, paired with an 800-line TypeScript solver engine that monitors intents via event subscriptions and queries DeepBook V3's CLOB for CEX-grade liquidity using get_level2_ticks_from_mid() for market impact simulation. The solver implements profitability calculations: Profit = (Output - MinOutput) - (GasCost + ProtocolFee), executing only when positive. Sui's object-centric parallelism enables concurrent processing without global-state bottlenecks. On Ethereum, we implemented custom namehash algorithms (ENSIP-1 compliant) using recursive keccak256 hashing, three-stage resolution (namehash calculation, Registry queries, Resolver calls), and reverse resolution with verification. The ENS subdomain system performs extensive validation—NameWrapper status checks, owner verification, intelligent fuse handling where CANNOT_UNWRAP parents enable PARENT_CANNOT_CONTROL subdomains for independence. Notable hacks include parallel text record fetching, exponential backoff with multiple fallback RPCs, automatic network switching with MetaMask configuration, and a marketplace architecture generalizable to DCA, limit orders, and cross-chain bridging. Both components use React with layered architecture separating UI, state management, and protocol logic, demonstrating production-ready reliability across Mainnet and testnets.

