YieldForge

Set yield intent. Execute on any chain. Zero manual bridging. Built with Nexus, Pyth & PYUSD.

Visit Repo
YieldForge banner

About

YieldForge - Intent-Based Cross-Chain Yield Optimization 🎯 The Problem Traditional DeFi yield optimization is broken for users: Cross-Chain Friction: To move funds from Ethereum to earn yield on Base, users must: (1) Visit a bridge website, (2) Approve tokens (transaction 1), (3) Wait 10-15 minutes for bridging (transaction 2), (4) Switch networks in MetaMask, (5) Approve tokens again on destination chain (transaction 3), (6) Finally deposit into protocol (transaction 4). This process takes ~25 minutes, costs 3+ gas fees, and requires manual network switching. Stale Yield Data: DeFi protocol UIs display APY rates that can be hours or days old. Users deposit expecting 6.5% APY, only to discover the actual rate dropped to 2.1% hours ago. There are no automated guardrails to protect users from depositing into low-yield protocols. Mainstream Adoption Barrier: Non-crypto users face 3-7 day onboarding (exchange signup, KYC, learning curve) with 70% abandonment rate. Complex stablecoin choices (USDC vs USDT vs DAI) create confusion and friction. 💡 Our Solution YieldForge is an intent-based cross-chain DeFi platform that enables users to set yield optimization goals once and execute across any supported chain with a single click—no manual bridging, no network switching, no stale data. How It Works: User deposits PYUSD/USDC into our non-custodial smart contract vault (USDCVault.sol) Creates a yield intent: "I want minimum 5% APY on Aave protocol, execute on Base chain" System validates current APY using Pyth Network real-time oracle feeds Clicks "Execute Intent" - One button, one transaction Avail Nexus SDK bridges funds from Ethereum → Base AND deposits into Aave in a single combined operation User earns yield without ever manually bridging or switching networks Key Features: ✅ Intent-Based Architecture - Users define goals ("5% minimum APY"), not steps ✅ Cross-Chain Execution - Works on Ethereum, Base, Optimism, Arbitrum ✅ Real-Time Guardrails - Pyth Network validates APY before every deposit ✅ Single-Transaction Bridge+Execute - Avail Nexus combines operations ✅ Mainstream-Ready - PayPal USD (PYUSD) integration for 400M PayPal users ✅ Non-Custodial - Users maintain full control, withdraw anytime 🛠️ Technical Implementation Track 1: Avail Nexus SDK 🌉 Purpose: Cross-chain bridging and execution Integration: NexusProvider.tsx (Lines 62-208): Initializes Nexus SDK on wallet connection, validates user is on correct network (Sepolia testnet), sets up hooks for intent/allowance approvals nexus.ts (Lines 1-198): Core utilities including chain ID mappings (84532 → BASE_SEPOLIA), SDK initialization function, event listeners for progress tracking useNexusBridge.ts (Lines 30-158): React hook wrapping sdk.transfer() method for cross-chain bridging, validates network before transfers, provides loading states intent/page.tsx (Lines 293-370): Detects cross-chain intents, calls Nexus transfer() with token/amount/chainId/recipient, handles success/errors with toast notifications BridgeHook.sol (Lines 1-150): Smart contract emits bridge events for on-chain/off-chain coordination Impact: Reduces cross-chain execution from 25 minutes → 3 minutes, 4 transactions → 1 transaction, 3 gas fees → 1 gas fee Track 2: Pyth Network 📊 Purpose: Real-time APY oracle feeds for yield validation Integration: usePythPrices.ts (Lines 1-120): Fetches live APY data from Pyth Hermes API every 30 seconds, normalizes prices (price × 10^expo), calculates confidence intervals, returns real-time data to components PythLiveAPYBanner.tsx (Lines 1-250): Visual display of live APYs for Aave/Morpho/Compound with trend indicators, confidence score badges, last update timestamps ApyChart.tsx (Lines 1-180): Line chart showing APY trends over last 24 hours using Recharts, latest datapoint uses live Pyth feed PythFeed.tsx (Lines 1-150): Compact scrolling ticker for always-visible live APY display on dashboard Intent Guardrails (Lines 395-480): CRITICAL FEATURE - Before every deposit, fetches current APY from Pyth, compares to user's minimum threshold, blocks execution if current APY < minimum with clear error message Impact: Protects users from depositing into low-yield protocols, provides sub-second APY updates, enables data-driven decisions with confidence scores Track 3: PayPal USD (PYUSD) 💵 Purpose: Mainstream-ready regulated stablecoin for TradFi→DeFi bridge Integration: USDCVault.sol (Lines 1-250): ERC-20-agnostic smart contract vault for stablecoin deposits, users deposit/withdraw anytime (non-custodial), named "USDCVault" for testnet but designed for PYUSD mainnet FlexibleDepositModal.tsx (Lines 1-350): Two-step deposit UI (approve → deposit), shows real-time balance, validates sufficient funds, "MAX" button for convenience WithdrawModal.tsx (Lines 1-280): Single-step withdrawal UI, returns PYUSD to user's wallet (can then convert to USD in PayPal app) tokens.ts (Lines 1-60): Centralized token configuration with testnet (USDC) and mainnet (PYUSD) mappings, one-line change switches entire app to PYUSD Why PYUSD? Bridges PayPal's 400M users to DeFi, regulated by NYDFS (Paxos issuer), instant USD↔PYUSD conversion in PayPal app, familiar brand reduces onboarding friction by 10x Note on Demo: Uses USDC on Sepolia testnet because PYUSD only exists on Ethereum/Solana mainnet. Production mainnet deployment = change 3 config values (token address, chain ID, network mode). Architecture is PYUSD-first by design. Impact: Reduces onboarding from 3-7 days → 10 minutes, success rate from 30% → 90% 📊 Results & Metrics Speed Improvements: Cross-chain execution: 8x faster (25 min → 3 min) User onboarding: 42x faster (7 days → 10 min) Cost Savings: Gas fees: 3x cheaper (3 separate fees → 1 combined fee) User Experience: Manual steps: 8 steps → 2 clicks Network switches: Multiple → Zero Success rate: 30% → 90% 🏗️ Architecture Highlights Smart Contracts (Solidity): USDCVault.sol - Non-custodial stablecoin vault IntentManager.sol - Intent creation and management BridgeHook.sol - Cross-chain coordination Frontend (Next.js 14, TypeScript, Wagmi, Viem): React Context for Nexus SDK global state Custom hooks for Pyth prices and Nexus bridging Real-time balance updates and transaction tracking Demo mode for reliable judge testing (simulates full flow) Deployment: Contracts: Sepolia testnet (verified on Etherscan) Frontend: Vercel (https://yieldforgedeploy2.vercel.app/) Mainnet-ready: Simple config change for production 🎮 How to Test Visit https://yieldforgedeploy2.vercel.app/ Connect wallet (MetaMask) on Sepolia testnet Get Sepolia ETH (faucet) and USDC (faucet or message us) Deposit USDC into vault Create intent: Select protocol (Aave/Morpho/Compound), target chain (Base/Optimism/Arbitrum), minimum APY (e.g., 5%) Execute intent: Watch Nexus SDK bridge + deposit in single transaction View live APY data from Pyth Network on dashboard Test guardrails: Set very high minimum APY (50%) → execution should block with Pyth validation error Demo Mode: Toggle "Demo Mode" switch for simulated execution (8-step process visualization) - reliable regardless of testnet availability 🚀 Production Roadmap Immediate (Mainnet Launch): Switch to PYUSD mainnet token Deploy contracts to Ethereum mainnet Update Nexus SDK to mainnet mode Use production Pyth price feeds Future Enhancements: PayPal OAuth integration for direct USD→PYUSD→YieldForge flow Automated rebalancing when APY drops below threshold Support for more protocols (Compound V3, Yearn, etc.) Multi-asset support (USDT, DAI, WETH) Mobile app for mainstream users 💪 Why This Wins Full Track Integration - Not just UI mockups, actual SDK calls, oracle queries, and smart contract interactions Real Problem Solved - Cross-chain friction is #1 UX pain point in DeFi Production-Ready - Comprehensive error handling, testnet deployment working, mainnet migration = 3 config changes Mainstream Focus - PYUSD integration targets 400M PayPal users (massive TAM) Technical Excellence - React Context, custom hooks, proper TypeScript types, non-custodial architecture Judge-Friendly - Demo mode works reliably, clear documentation, live deployment 🔗 Links Live Demo: https://yieldforgedeploy2.vercel.app/ GitHub: https://github.com/lucifer1017/yieldforge Video Demo: https://drive.google.com/file/d/1aP8DUPgfIlatIIKvMGoCuTArnFvNkDPW/view?usp=sharing

From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

Not checked yet.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

NexusEarn

Adaptive multi-chain yield optimizer with rebalancing via Avail Nexus cross-chain execution

Yield Aggregator

Cross-chain yield farming optimizer powered by 1inch Fusion+ for instant DeFi position switching

AlphaFlow

Autonomous multi-chain DeFi yield optimizer using Avail DA for cross-chain APY maximization.