Yield Empire is a DeFi game where players allocate USDC to real protocols represented as buildings
Yield Empire is a browser-based DeFi strategy game where players build a floating city and allocate USDC to real protocols represented as buildings. Gameplay happens off‑chain in Yellow Network state channels, so upgrades, deposits, compounding, and guild contributions feel instant and free. Players earn $EMPIRE tokens (ERC-20 on Sepolia) based on real protocol APY rates — the more USDC deposited and the higher the building level, the faster tokens accrue. Upgrades cost $EMPIRE tokens, not dollars. When a player settles, the app executes real transactions on testnets: Compound and Morpho supplies, Uniswap swaps on Sepolia, Aave supply on Base Sepolia via a treasury contract, and mints earned $EMPIRE tokens. ENS names and text records power player identity, guild profiles, and leaderboards, while Circle BridgeKit enables cross‑chain USDC deposits from Arc Testnet, Base Sepolia, or Sepolia. The result is a playable demo that turns multi‑chain DeFi into a fast, social, game-like experience.
Features
The frontend is a Next.js 16 app in yield-empire/ with a PixiJS isometric map and a React overlay UI. Wallet connection is handled by wagmi and RainbowKit. Yellow Network integration uses the @erc7824/nitrolite SDK to establish a WebSocket session, complete a 3‑step EIP‑712 auth flow, create an app session on NitroRPC/0.4, and submit gasless state updates for every action. Circle BridgeKit (@circle-fin/bridge-kit) powers CCTP transfers with a step‑by‑step progress UI and a viem adapter created from the user’s wallet. ENS integration reads names, avatars, and text records, and creates guild subdomains using the ENS registry and public resolver. On settlement, protocol adapters execute real testnet transactions: Compound V3 supply, Morpho Blue supply, Uniswap V3 swap, and Aave V3 supply on Base Sepolia via a treasury contract in contracts/ (Hardhat + OpenZeppelin). This “off‑chain game, on‑chain truth” architecture keeps the UX fast while still proving real DeFi execution.

