StableOp

The missing credit layer of the Finternet, built on PYUSD. An agentic lending protocol.

StableOp

Created At

ETHGlobal New Delhi

Project Description

We built a lending protocol powered by PYUSD, designed to be the missing credit primitive of the Finternet. Today, stablecoins are excellent for moving money, but payments need more than transfer, they need credit. Our protocol allows users to deposit PYUSD to earn yield, while borrowers can access PYUSD loans instantly, making credit as simple as sending stablecoins.

The system is deployed on-chain with a clean, open-source repo. Borrow → spend → repay flows are live, with balances updating transparently. What makes this unique is its focus on PYUSD as the backbone for payments: the same infrastructure can power buy-now-pay-later, micro-lending for creators, remittances, and short-term merchant credit.

While this is a hackathon build, we’ve focused on real-world viability: conservative lending parameters, transparent repayment logic, and a user experience that hides DeFi complexity. Our vision is to extend this foundation with agents that automate borrowing and repayment, turning PYUSD credit into a seamless part of everyday payments.

How it's Made

We built a lending protocol natively around PYUSD to demonstrate its role as the credit primitive of the Finternet. The system has three key parts:

Smart Contracts – We wrote Solidity contracts handling deposits, lending pools, loan issuance, and repayment in PYUSD. Contracts are deployed on Ethereum testnet and integrate directly with PYUSD’s ERC-20 interface. We used OpenZeppelin libraries for security patterns (reentrancy guards, SafeERC20, Ownable).

Frontend – The UI was built with React and Next.js. It allows users to connect via MetaMask, lend PYUSD, borrow instantly, and view balances. We prioritized clean UX: a few clicks, clear terms, and real-time updates from the blockchain.

Backend & Agents (prototype) – A lightweight Node.js backend manages agent logic: automating reminders and (mock) repayments. In future iterations, these agents will provide natural language interactions, but for the hackathon we focused on core repayment automation.

Infrastructure – We used Hardhat for local development, testing, and deployment. PYUSD test tokens were integrated from PayPal’s dev resources. To make debugging easier, we wired in Ethers.js for contract calls and leveraged The Graph for real-time lending pool stats.

Hacky Bits –

To keep the demo safe, we enforced strict loan caps and collateralization ratios in code.

For speed, we seeded test liquidity pools ourselves but designed the pool logic to be extensible.

We set up a simple “agent log” dashboard so every automated action (loan issued, repayment scheduled) is visible, a hacky but effective way to give transparency to an AI-driven system.

Overall, this stack let us show end-to-end borrowing and lending in PYUSD with live on-chain flows, while keeping the system modular for future expansion into BNPL, remittances, and micro-credit.

background image mobile

Join the mailing list

Get the latest news and updates