ASyncVolt

Multi-chain ERC-7540 vault powered by Avail Nexus - deposit USDC from any chain with one click

ASyncVolt

Created At

ETHOnline 2025

Project Description

AsyncVault is a production-ready ERC-7540 asynchronous vault that leverages Avail Nexus SDK to enable seamless cross-chain deposits and withdrawals from any EVM chain. Users can deposit USDC from Ethereum Sepolia, Base Sepolia, or Arbitrum Sepolia into a single unified vault - no manual bridging required.

The Problem: Liquidity Fragmentation

Traditional DeFi vaults force users to manually bridge assets to the vault's chain, pay multiple transaction fees, wait for bridge confirmation, and switch networks multiple times. This creates poor UX, high friction, and fragmented liquidity across chains.

Our Solution: Three Key Innovations

  1. Avail Nexus Integration - Unified Cross-Chain Access

    • Deposit USDC from ANY supported chain (Ethereum, Base, Arbitrum, Optimism)
    • Single-click cross-chain deposits via Avail's intent-based bridging
    • Users never leave the app - Nexus handles bridging automatically
    • No manual bridging - seamless cross-chain UX
  2. ERC-7540 Asynchronous Pattern - Perfect for Cross-Chain

    • Two-step deposit/redeem flow (request → claim) naturally fits cross-chain delays
    • Reserve mechanism guarantees settlement even during market volatility
    • Fair share pricing based on real-time vault value
    • Safe for asynchronous operations (bridges, oracle updates, etc.)
  3. Operator Pattern - Automated Claiming

    • Saves users a click - operator bot auto-claims deposits/redeems
    • No waiting for manual confirmation
    • Backend polling ensures timely execution
    • Opt-in: users can self-claim if they prefer control

Result: Bundle fragmented liquidity across chains into a single vault with zero-friction UX.

Why This Matters

Traditional approach: 8 steps, 2 tools, 10+ minutes (manual bridge, switch networks, approve, deposit, manually claim)

AsyncVault with Avail Nexus: 3 steps, 1 tool, 2-3 minutes (click bridge button, sign intent, auto-claimed by bot)

Proof of Success

Intent #1379: https://explorer.nexus-folly.availproject.org/intent/1379

  • Successfully bridged 0.25 USDC from Ethereum Sepolia → Arbitrum Sepolia
  • Completed in ~28 seconds
  • Proof of working Avail Nexus integration in production

Deployed Contracts

AsyncVault (Arbitrum Sepolia): 0x604737c0Ae78cE6C8391eDfEA08f1D8077677d09

  • Verified on Blockscout: https://arbitrum-sepolia.blockscout.com/address/0x604737c0Ae78cE6C8391eDfEA08f1D8077677d09
  • Share Token: asUSDC (Async USDC Vault Shares)
  • 25+ comprehensive Foundry tests passing
  • Forked chain testing completed

How it's Made

Technologies & Partners

Avail Nexus SDK (Primary Integration):

  • Used @avail-project/nexus-widgets package for cross-chain bridging
  • Integrated BridgeButton component in Next.js frontend
  • Implemented state management to keep widget mounted during chain switches (critical fix!)
  • Successfully created Intent #1379 proving working integration
  • Leveraged Avail's decentralized solver network for optimal bridge routing

Smart Contracts (Foundry):

  • Solidity ^0.8.20 with OpenZeppelin ERC-4626 base
  • Novel ERC-7540 implementation extending ERC-4626 for async operations
  • Inspired by Centrifuge's implementation pattern
  • 25+ tests covering deposits, redeems, profit/loss, reserves, operator access control
  • Forked chain testing on both Ethereum and Arbitrum Sepolia

Frontend (Next.js 14):

  • TypeScript + React + Tailwind CSS
  • Server-side components for operator and market simulator bots
  • QuickNode RPC integration to bypass MetaMask caching (critical for fresh vault state)
  • Dynamic chain switching and multi-chain USDC support
  • Real-time vault balance updates

Circle USDC:

  • Primary asset across all chains (Ethereum, Arbitrum, Base, Optimism Sepolia)
  • Used official Circle USDC contracts
  • Integrated Circle testnet faucet for easy testing

Blockscout:

  • Contract verification on Arbitrum Sepolia
  • Used Blockscout MCP for development and debugging
  • Explorer integration for transaction tracking

Technical Highlights

1. Cross-Chain Architecture:

User on Base → Avail Nexus Widget → Intent Created → 
Solver Fulfills → USDC on Arbitrum → Operator Auto-Claims → Shares Minted

2. Operator Pattern Implementation:

  • Hybrid detection: event listeners + polling loop
  • Transaction queueing to prevent nonce collisions
  • Saves users from manual claim transactions (better UX)

3. Market Simulator Bot:

  • Geometric Brownian Motion model (10% APY, 80% volatility)
  • Directly transfers USDC to/from vault for realistic profit/loss
  • Emits events for indexer tracking
  • Demonstrates robust vault accounting in async mode

4. ERC-7540 Reserve Mechanism:

  • Assets immediately reserved on redeem request
  • Prevents underfunding even if vault suffers losses before claim
  • Critical for async vaults where time elapses between request and claim

Challenges & Solutions

Challenge 1: Avail widget was disappearing after user interaction

  • Root Cause: React conditional rendering unmounted the BridgeButton when state changed from 'idle' → 'bridging' → 'bridge_complete'
  • Solution: Modified rendering condition to keep button mounted through all states while Avail handles internal chain switching
  • Impact: Widget now stays open throughout entire bridge flow

Challenge 2: MetaMask aggressively cached contract state

  • Root Cause: eth_call responses were cached, causing stale vault balances in UI
  • Solution: Bypassed MetaMask by using direct QuickNode RPC calls via fetch() for all state reads
  • Impact: UI now shows fresh vault state in real-time, critical for bot mode

Challenge 3: Testing cross-chain deposits without mainnet funds

  • Root Cause: Needed to test Avail intents on testnets with limited solver activity
  • Solution: Used Circle faucets, carefully selected stable chains (Base Sepolia), and documented timing expectations
  • Impact: Successfully created Intent #1379 proving integration works

Challenge 4: ERC-7540 implementation guidance was limited

  • Root Cause: ERC-7540 is a new standard with few production implementations
  • Solution: Studied Centrifuge's pattern, implemented reserve mechanism, added comprehensive tests
  • Impact: Robust async vault that handles profit/loss events between request and claim phases

Hacky/Notable Elements

  1. Dynamic Chain Detection: Auto-detects vault chain from .env and selects correct USDC contract addresses across 4+ chains
  2. Operator Bot as Next.js API Route: Runs as serverless function instead of separate process - unique architecture for hackathon context
  3. QuickNode RPC Bypass: Direct fetch() calls to QuickNode instead of using ethers providers - unconventional but necessary for fresh state
  4. Fork Testing Strategy: Mirrors deployment script logic to ensure tests match production configuration exactly

What Makes This Special

  • First ERC-7540 vault with native Avail Nexus integration
  • Perfect synergy: Async vault pattern + intent-based bridging naturally complement each other
  • Production-quality: Not just a demo - deployed, tested, verified, and working
  • Real problem solved: Multi-chain liquidity fragmentation with measurable UX improvement (8 steps → 3 steps)

GitHub Repository

Primary Repository: hamiha70/OpenSecret (Monorepo)

Repository Description: Repo for ETHOnline 2025

Repository Structure:

  • /contracts-foundry - Solidity contracts with Foundry
  • /frontend - Next.js 14 dApp with Avail Nexus integration
  • /docs - Comprehensive documentation + screenshots
  • /docs/screenshots - Demo images for README

Additional Information

Prize Tracks

Primary: Avail Nexus - Best DeFi or Payments app ($5,000 pool)

  • README clearly explains how Avail Nexus SDK is used (code examples, architecture diagrams)
  • Meaningful integration: cross-chain user onboarding, not just token bridging
  • Live demo with successful Intent #1379 on Avail Explorer
  • DeFi-focused: yield-generating USDC vault

Secondary:

  • Circle - USDC Adoption (using official USDC contracts across all chains)
  • Blockscout - Development & Verification (contract verified, MCP integration)

Demo Assets

  • Screenshots: Available in /docs/screenshots/

    • Cross-chain deposit UI
    • Avail Nexus widget in action
    • Bridge complete confirmation
    • Intent Explorer showing Intent #1379
  • Live Contract: https://arbitrum-sepolia.blockscout.com/address/0x604737c0Ae78cE6C8391eDfEA08f1D8077677d09

  • Successful Intent: https://explorer.nexus-folly.availproject.org/intent/1379

Testing Instructions

  1. Connect MetaMask to any supported testnet (Ethereum, Base, Arbitrum, Optimism Sepolia)
  2. Get testnet USDC from Circle faucet: https://faucet.circle.com/
  3. Visit deployed app (or run locally: cd frontend && npm run dev)
  4. Click "Bridge from [Your Chain]" to test cross-chain deposit via Avail Nexus
  5. Watch operator bot auto-claim your shares after bridge completes!

Future Roadmap

  • Implement "Bridge & Execute" for one-click bridge + deposit
  • Add Envio indexer for event history dashboard
  • Deploy to AWS with stable URLs
  • Support more chains (Polygon, Avalanche)
  • Decentralize operator with keeper network (Gelato/Chainlink)
  • Multi-asset support (USDT, DAI)

Built with ❤️ for a multi-chain future

Powered by: Avail Nexus | ERC-7540 | Foundry | Next.js | Circle USDC | Blockscout

background image mobile

Join the mailing list

Get the latest news and updates