Enju

Swap cross-chain, earn rewards, unlock NFTs, and grow your 3D island with Enju + Fusion+.

Enju

Created At

Unite Defi

Winner of

1inch

1inch - Extend Fusion+ to Tron 3rd place

ETHGlobal

ETHGlobal - 🏆 Unite DeFi 2025 Finalist

Project Description

Enju is a playable DeFi hub that turns serious cross-chain operations into a game. • Bridge gameplay. Atomic HTLC bridges between Ethereum, NEAR and TRON pay out ENJU-RWD reward tokens each time you move liquidity. • Swap gardening. One-click swaps between ETH, USDC, USDT, DAI, WBTC and more via the 1inch API grant XP and plant trees on your floating island. • Evolving island. Every XP point visibly expands your procedurally generated Three.js world—more trees, new terrain and hidden chests. • Token-gated collectibles. Chain-mascot animal NFTs—Elephant (ETH), Tiger (TRON), Fox (NEAR)—and other décor are bought in an in-game shop exclusively with the ENJU-RWD tokens you earned by bridging. • Progression & achievements. Level-ups unlock larger islands, cosmetic slots and future questlines.

How it's Made

Short PPT explication : https://drive.google.com/file/d/1NG_QVKbdm_RcoRfLYYhUS9v9aXW8pK2hsPMwUWR0jVI/view?pli=1

On-chain layer • HTLC contracts — Solidity (Ethereum & TRON TVM) + Rust (NEAR), forked from 1inch Fusion+ and sharing a single SHA-256 hash-lock plus synchronised timelocks across all three VMs. • CrossChainCore.sol — Ethereum entry-point that instantiates the official 1inch EscrowFactory and stores the NEAR/TRON destination inside the escrow immutables. • TronFusionBridge.sol — first TVM port of Fusion+; opcode-mapped by hand to respect TRON’s 3 s blocks and Base58 addresses. • ENJU-RWD (ERC-20) — reward token minted/burned by the Bridge Resolver • Animal & décor NFTs (ERC-721) — purchasable only with ENJU-RWD inside the in-game marketplace; metadata and island snapshots pinned to IPFS for permanence.

Off-chain services • Bridge Resolver (Nest.Js) — monitors Init events on Ethereum, NEAR and TRON simultaneously, fetches FX rates (CoinGecko primary, Binance fallback, 30 s cache), signs the opposite leg, mints reward tokens and pushes XP / tree-growth events over WebSockets. • Swap Router — slim wrapper around the 1inch Swap API for six tokens (ETH, USDC, USDT, DAI, WBTC, NEAR); triggers the same real-time island updates but skips reward-token minting. • Timelock-normaliser — micro-lib that offsets expiries so an ETH→NEAR→TRON round-trip always leaves a 30-minute rescue margin whatever the chain cadence. • Price-oracle service

Front-end • React 18 + TypeScript — component model with strict types; URL routing mirrors bridge state machines. • @react-three/fiber + Three.js — renders procedurally generated islands (Perlin noise, GLTF assets exported from Blender). • Zustand + IndexedDB — stores wallet connections, XP and island state locally, with periodic IPFS uploads so progress follows the user across devices. • Wallet SDK layer — MetaMask, TronLink and NEAR Wallet Selector wrapped behind a single useWallet() hook for uniform signing UX.

Database & API • PostgreSQL + Prisma ORM — durable storage for user profiles, transaction logs and island diffs (event-sourced). • NestJS REST & WS — modular services (/bridges, /rewards, /islands, /1inch) documented via Swagger; real-time channels broadcast bridge lifecycle, XP gains and NFT drops. • Redis — low-latency cache for price quotes, WebSocket fan-out and session data.

background image mobile

Join the mailing list

Get the latest news and updates