SporeFi

SporeFi is a DeFi Aggregator Layer which specializes in Lending-Borrowing and Yield Maximization.

SporeFi

Created At

ETHGlobal New Delhi

Project Description

SporeFi is a next-generation DeFi yield optimizer combined with a lending protocol that helps users maximize yield and borrow limits simultaneously, inspired by the Pendle Finance model and the “Buy, Borrow, Die” wealth strategy.

It uses a 6-layered custom AI agent system, trained on extensive market data from DeFi Llama and CoinGecko, to automatically shift capital across multiple liquidity pools and maximize returns. We focus on optimizing YT (Yield Tokens) while maintaining exposure to PT (Principal Tokens) to ensure sustainable and predictable yields.

Key Features

AI-Powered Yield Optimization

Our 6-layered AI agent architecture continuously scans, analyzes, and reallocates assets across DeFi protocols.

The AI is trained on historical + real-time data from sources like DeFi Llama and CoinGecko to predict the most profitable pools and yield opportunities.

Focuses on maximizing YT Tokens (Yield-bearing) while maintaining safety with PT Tokens (Principal).

Pendle Finance-Inspired Tokenization

Users’ assets are tokenized into PT (Principal Tokens) and YT (Yield Tokens).

By separating principal from yield, our system can actively trade or shift yield exposure to the highest-performing pools without risking the original capital.

Integrated Lending Protocol with Buy-Borrow-Die Model

On top of yield optimization, we’ve built an integrated lending system where users can stake rBTC (Wrapped BTC on Rootstock) or RIF tokens.

We calculate a minimum appreciation rate for the loan period to ensure loans are self-repaying.

Users can borrow up to a safe limit, allowing them to unlock liquidity tax-efficiently (similar to “living tax-free on borrowed money”).

The system increases future borrowing limits by compounding optimized yields.

Self-Paying Loans

The yield generated by our AI-driven strategy helps automatically repay the borrowed amounts.

This reduces liquidation risks and allows users to maintain or grow their collateral base over time.

Strategic Partnerships

Built on Rootstock to leverage Bitcoin liquidity via rBTC.

Integrated with RIF tokens for additional collateral flexibility.

Potential support for stablecoins like PayPal USD to diversify yield and loan offerings.

How It Works for Users

Deposit rBTC, RIF, or supported tokens into the protocol.

Tokenization splits the deposit into PT & YT.

AI Optimization reallocates YT across liquidity pools for maximum yield.

Borrow against collateral with self-paying loans using our “Buy, Borrow, Die”-inspired lending model.

Grow your borrow limits and portfolio over time as yields auto-compound.

Impact

Maximized Yield: Users consistently earn higher returns with less effort.

Tax-Efficient Liquidity: Access to funds without triggering taxable events.

AI-Driven Safety: Our AI minimizes risk by automatically shifting positions and calculating safe loan-to-value ratios.

Future-Proof DeFi: Combines the best of Pendle Finance, yield aggregators, and lending protocols into one seamless platform.

How it's Made

SporeFi is a combination of smart contracts, AI agents, and partner technologies stitched together into a seamless DeFi protocol.

Core Smart Contract Layer (Solidity)

All the yield optimization, PT/YT tokenization, and lending logic are implemented in Solidity smart contracts deployed on Rootstock (RSK).

We designed two main contract modules:

Yield Module – Handles tokenization into PT and YT, liquidity pool interactions, and reallocation of yield.

Lending Module – Implements our “Buy, Borrow, Die”-style loan model, collateral checks, and self-paying loan logic.

We integrated RIF tokens and rBTC (wrapped BTC) as primary collaterals.

AI Agents (6-Layer Architecture)

Our AI agent system is built using LSTM (Long Short-Term Memory) networks for time-series predictions of yield rates and market shifts.

We use RAG (Retrieval-Augmented Generation) models to pull the latest DeFi market and protocol data (via DeFi Llama, CoinGecko, etc.) before making decisions.

These AI agents are run on MCP Servers (Multi-Core Parallel servers) for low-latency inference so they can continuously monitor, predict, and rebalance positions in real-time.

This setup gives us an “autonomous DeFi strategist” that reallocates liquidity and adjusts borrow limits automatically.

Partner Technologies

Rootstock (Main Partner): We built directly on Rootstock to access Bitcoin-level security and liquidity, with rBTC as the base collateral. Rootstock’s EVM-compatibility also made it straightforward to deploy our Solidity contracts. We have integrated staking through RIF Token as well.

PayPal USD (Stablecoin): Used for loan disbursements and liquidation settlements. Its biggest advantage for us is extremely smooth off-ramping — users can go from collateral to fiat quickly without leaving the protocol.

RIF Tokens: Provide additional collateral types and integration with Rootstock’s ecosystem services.

System Flow

User deposits rBTC/RIF → Smart contract tokenizes into PT & YT.

AI Agents (LSTM + RAG) analyze market data → Determine best yield pools.

Contracts shift YT exposure dynamically across pools to maximize yield.

User borrows PayPal USD stablecoin against collateral → Self-paying loan logic uses yield to repay debt automatically.

Smooth off-ramping with PayPal USD integration → Users can cash out or re-invest easily.

Hacky/Notable Stuff

We hacked together a custom RAG pipeline so our AI agents can fetch real-time DeFi rates from APIs like DeFi Llama and CoinGecko without clogging up on-chain calls. This hybrid off-chain/on-chain setup makes the predictions lightweight but effective.

Our LSTM models run on a rolling window of historical yield data we streamed during the hackathon, so the AI “learns” dynamically as it runs.

We created a safe-borrow-limit calculator that predicts appreciation rates of collateral during the loan period (instead of static LTV ratios) — this was crucial for making self-paying loans work.

The PayPal USD integration wasn’t trivial — we used a custom adapter to convert between our on-chain stablecoin representation and off-ramping mechanisms.

Tech Stack Summary

Smart Contracts: Solidity on Rootstock.

AI Models: LSTM + RAG for predictions and decision-making.

Infrastructure: MCP servers for AI agents, off-chain data fetching.

Tokens: rBTC, RIF, PayPal USD.

Architecture: Hybrid on-chain (contracts) + off-chain (AI + data) orchestrated via secure bridges/adapters.

background image mobile

Join the mailing list

Get the latest news and updates