cute

Feed your cat with your DeFi yield 🐱💰 — stake ETH, watch Mochi grow happier as it compounds.

Project Description

Cute DeFi is a gamified DeFi savings app built for ETHGlobal NYC 2026, designed to make saving in crypto feel rewarding instead of abstract.

The core mechanic: users deposit ETH into a smart contract (CatVault.sol) on the Sepolia testnet. That deposit earns yield over time at a 10% APR, calculated on-chain based on elapsed time since the last interaction — no external protocol dependency, so the math is fully transparent and demoable.

The twist: instead of staring at a number, users see a cat named Mochi whose mood reflects their financial activity. Mochi sleeps (zzZ) if nothing's deposited, looks alert once funds are staked and yield is accruing, and lights up with sparkles when yield is ready to claim. Clicking "Feed the cat" calls feedCat(), which claims the accrued yield and automatically restakes it into the principal — compounding the user's savings while leveling up Mochi (cosmetic level counter). A "Withdraw" button returns principal plus any unclaimed yield at any time.

Tech stack: Solidity contract (deposit/feedCat/withdraw + view functions for status), Hardhat for compiling/testing/deploying to Sepolia, and a single-file HTML/JS frontend using ethers.js v6 to connect MetaMask, read contract state, and trigger transactions. The frontend's design uses a warm cream palette, Fredoka for friendly headings, and JetBrains Mono for on-chain numbers — pairing a "pet game" feel with legible financial data.

How it's Made

We built Cute DeFi as a focused, two-layer stack: a Solidity smart contract for the on-chain logic, and a single-file HTML/JS frontend for the experience layer — kept deliberately simple to be fully demoable within the hackathon timeframe.

Smart contract (CatVault.sol): Written in Solidity 0.8.20, deployed to Ethereum Sepolia via Hardhat. It tracks each user's principal, last-interaction timestamp, and a cosmetic "cat level." Yield is calculated with a time-based formula (principal × APR_BPS × elapsedSeconds / (10000 × secondsPerYear)) at a flat 10% APR — computed lazily in view functions rather than via continuous state updates, which keeps gas costs low since nothing needs to be written every block. deposit() settles any pending yield into principal before adding new funds, feedCat() claims pending yield and folds it back into principal (compounding) while incrementing the cat level, and withdraw() pays out principal + yield in one transaction.

Frontend: A single index.html using ethers.js v6 (via CDN, no build step) to connect MetaMask, detect the Sepolia network, and call the three contract functions. The UI renders an inline SVG cat (Mochi) whose state — sleeping, alert, or sparkly-happy — is driven directly by getCatStatus()'s return values (principal and pendingYield), so the pet's mood is a direct visual representation of on-chain state, not a separate game layer.

The hacky part, worth flagging honestly: the "yield" is mock — a fixed-APR time formula rather than funds actually deployed into a lending protocol like Aave. This was a deliberate scope decision: it let us demo the full deposit → accrue → claim/compound → withdraw loop end-to-end, with real transactions and real ETH on testnet, without depending on external protocol integrations or liquidity. The architecture is modular enough that the yield source could be swapped for a real protocol post-hackathon without touching the user-facing mechanics.

We also skipped a build pipeline entirely for the frontend — everything (including ethers.js) loads via CDN into one HTML file, which made iteration fast and meant zero deployment friction (it's just a static file).

background image mobile

Join the mailing list

Get the latest news and updates

cute | ETHGlobal