NandMala
A Simplified cross-chain Yield tokenization protocol with AI automation.
Problem Statement
NandMala allows users to transform yield-bearing assets locked on any chain into two fungible, tradable tokens: Principal Token (PT): redeemable 1:1 for the underlying principal at maturity. Yield Token (YT): represents the right to receive yield generated by the locked principal until maturity. By splitting principal and yield, NandMala enables users to: Sell forward yield by trading YT while retaining exposure to principal (via PT). Claim yield periodically. Trade or collateralize PT and YT on the settlement chain. Interact seamlessly via natural-language commands (through AgentVerse + ASI). Key Primitives Scaled balance + user index accounting: Yield accrues deterministically using the pool’s reserveNormalizedIncome (RNI). Each user’s yield is computed as: accruedYield=scaledBalance×(currentRNI−userIndex) This avoids per-block iteration and guarantees exact yield calculation. PT (ERC-20): fungible claim to principal, redeemable at maturity (1:1 with underlying). YT (ERC-20): fungible claim on yield generated until maturity. Claimable: accrued-but-unclaimed yield tracked per user until withdrawn. User Flows CreatePool User specifies: underlying asset (e.g., aUSDC) maturity timestamp protocol fee parameters bridging configuration Contract initializes pool state and metadata.Deposit User locks underlying (aUSDC) on the source chain vault. A cross-chain message via Layerzero validates the deposit on Hedera. Hedera Pool contract mints PT + YT to the user. User’s scaledBalance is set: scaledBalance=amount/currentRNI Transfer YT Before transfer, yield is settled for both sender and recipient. Claimable balances updated, ensuring no double-counting. Scaled units proportional to transferred YT are reassigned.Claim Yield User calls claim(). All accrued yield since last claim is added to their claimable. Yield is transferred out, and user’s index reset to current RNI. Redeem PT After maturity timestamp, user burns PT. Hedera contract instructs source vault (via Layerzero bridge) to release principal. YT stops generating yield at maturity.Cross-Chain Model Deposit Verification: A deposit message is sent via layerzero to Hedera. Upon receiving message, PT/YT are minted.Yield Synchronization: Periodic updates of reserveNormalizedIncome (or equivalent yield index) are pushed to Hedera by the oracle server. This ensures deterministic yield calculation without requiring Hedera to query the source chain.Settlement: At maturity or redemption, Hedera initiates cross-chain settlement via LayerZero/bridge messaging, ensuring assets are always backed 1:1 by the source vault.Agent Interface Powered by AgentVerse + ASI:One LLM Accepts natural-language commands like: “create pool for aUSDC with maturity 2026-09-18” “deposit 100 aUSDC into pool #3” “transfer 10 YT to 0xabc…” “claim my yield from pool”Agent responsibilities: Translate natural-language intent into on-chain transactions. Generate human-readable receipts.
Solution
I stitched together multiple pieces of infrastructure to make cross-chain yield tokenization (CCYT) possible:Aave Testnet Contracts I used Aave as the yield source, since its reserveNormalizedIncome (RNI) mechanism allows deterministic accounting of accrued yield without per-block iteration. I adapted this model so that our Hedera contracts could checkpoint users’ yield states and settle them precisely.LayerZero LayerZero served as the cross-chain messaging layer. Instead of bridging assets, I only bridge rights (principal + yield). Assets stay locked in a source-chain vault, while Hedera receives authenticated messages to mint or burn PT and YT. This allowed us to cleanly separate custody (source chain) from liquidity and trading (Hedera).Hedera Network I deployed the Pool contracts on Hedera to manage the lifecycle of PT and YT. Users can trade them, claim yield, or redeem at maturity. Hedera gave us fast finality and low-cost settlement for frequent yield accounting.ASI:One LLM + AgentVerse I integrated natural-language interaction through ASI. Instead of manually crafting transactions, users can type commands like:“create pool for aUSDC with maturity 2026-09-18”“deposit 100 aUSDC into pool #3” The agent parses intent, performs safety checks, and submits the correct transactions on the user’s behalf. This lowered the entry barrier for non-technical users.Notable HacksRNI Checkpointing: I dug into how Aave computes yield per account using scaledBalance and userIndex. By replicating that math inside our Pool contracts, I avoided expensive per-block updates while keeping yield accounting exact.Cross-Chain Yield Without Asset Transfer: Instead of wrapping/moving tokens across chains, I only bridge the message of ownership rights. This keeps the system lightweight and reduces trust in bridges to just message correctness.AI as UX Glue: The “hacky but elegant” part was letting an AI agent drive the contract interactions. By abstracting away calldata and cross-chain complexity, users only need to express intent — the AI does the rest.
Hackathon
ETHGlobal New Delhi
2025
Contributors
- iitianpushkar
12 contributions