Magpie Protocol
Litepaper v1.0 — April 2026
Memecoin-Collateralized Lending on Solana
Abstract
Magpie is a non-custodial lending protocol built on Solana that enables holders of memecoin assets to borrow SOL against their holdings without selling. The protocol operates entirely through a Telegram bot interface, removing the complexity of traditional DeFi dApps. Magpie introduces the first on-chain credit scoring system for memecoin lending, allowing borrowers to build reputation and unlock progressively better terms. With 64+ supported collateral tokens, sub-10-second funding, and deterministic on-chain liquidation, Magpie bridges the gap between memecoin culture and DeFi utility.
Problem Statement
Memecoins represent over $50B in market capitalization on Solana alone. Holders are emotionally and financially invested — selling is often psychologically impossible. Yet the existing DeFi ecosystem offers them almost nothing.
- Traditional DeFi lending protocols (Aave, Solend, Kamino) ignore memecoins entirely due to volatility risk
- Result: billions in dormant capital with no liquidity solution
- Current options for holders: sell (realize loss), margin trade (complex), or do nothing (miss opportunities)
- Most DeFi requires browser wallets, seed phrases, and complex multi-step UIs
- Memecoin communities live on Telegram — not in browser dApps
Solution Overview
Magpie is a Telegram-native lending protocol on Solana purpose-built for memecoin holders. The protocol accepts 64+ memecoin tokens as collateral and delivers SOL loans in under 10 seconds.
Protocol Architecture
Magpie's technical stack spans on-chain and off-chain layers, connected through a Telegram bot interface that abstracts all blockchain complexity from the end user.
Technical stack
| Layer | Technology | Purpose |
|---|---|---|
| On-chain program | Anchor (Rust) | Loan PDA creation, collateral custody, liquidation logic |
| State management | Program Derived Addresses | Loan-scoped state and collateral vaults |
| User interface | grammY (Telegram) | Chat-based loan management, notifications, wallet export |
| Off-chain indexing | PostgreSQL | User data, loan history, credit scores, points |
| Pricing oracle | Jupiter Price API v2 | Real-time aggregated token pricing across all Solana DEXes |
| Market data | DexScreener API | Market cap, volume, 24h change for display |
| Key encryption | AES-256-GCM | Wallet private key encryption at rest |
| Background jobs | Node.js watchers | Deposit detection, health monitoring, loan expiry |
Architecture diagram
User <-> Telegram <-> Magpie Bot <-> Solana Program
| |
PostgreSQL Token Vaults (PDAs)
|
Jupiter OracleData flow
All user interactions originate from Telegram. The bot validates input, queries pricing oracles, constructs and submits Solana transactions, then returns confirmations to the user — all within a single chat interface. Off-chain state (credit scores, points, user preferences) is indexed in PostgreSQL, while all financial state (loan terms, collateral custody) lives on-chain in PDAs.
Loan Mechanics
A Magpie loan moves through a deterministic lifecycle, from wallet creation to resolution. Every step is orchestrated from a Telegram chat.
Lifecycle
Core formulas
Loan Amount = Collateral Value (SOL) x LTV%
Fee = Loan Amount x 1.5%
Net Payout = Loan Amount - Fee
Health Ratio = Collateral Value / Loan Amount
Liquidation triggers when Health < 1.1Tier comparison
| Tier | LTV | Term | Use case |
|---|---|---|---|
| Express | 30% | 2 days | Maximum liquidity, short-term needs |
| Quick | 25% | 3 days | Balanced risk/reward |
| Standard | 20% | 7 days | Conservative, extended timeline |
Pricing & Risk Management
Accurate, manipulation-resistant pricing is critical for any lending protocol. Magpie uses aggregated DEX liquidity via Jupiter's Price API v2 as the primary oracle.
Oracle design
- Jupiter Price API v2 aggregates liquidity across all major Solana DEXes (Raydium, Orca, Meteora)
- Aggregation makes price manipulation economically infeasible — an attacker would need to move prices across multiple venues simultaneously
- 60-second quote expiry prevents stale pricing from impacting loan origination
- 2% maximum slippage tolerance between quote and execution price
- Real-time price re-verification at confirmation — if price moves beyond tolerance, the transaction reverts
Risk parameters
| Parameter | Value | Rationale |
|---|---|---|
| Max LTV (Express) | 30% | 70% buffer before liquidation |
| Max LTV (Quick) | 25% | 75% buffer before liquidation |
| Max LTV (Standard) | 20% | 80% buffer before liquidation |
| Liquidation threshold | 1.1x health | 10% buffer above underwater |
| Quote expiry | 60 seconds | Prevents stale price execution |
| Max slippage | 2% | Protects against flash moves |
Health alerts
The protocol sends progressive health alerts to borrowers via Telegram: a warning at 90% health ratio, and a critical alert 24 hours before the loan due date. Each alert includes the current health ratio, collateral value, and suggested actions (top-up, partial repay, or full repay).
Credit System
The Magpie Credit Score is the first DeFi credit system for memecoin lending. Scores range from 300 to 850 and update after every loan event — repayment, extension, or liquidation.
Scoring factors
| Factor | Weight | Description |
|---|---|---|
| Repayment history | 40% | On-time full repayments vs late or liquidated |
| Loan volume | 20% | Total SOL borrowed across all loans |
| Account age | 15% | Time since first loan originated |
| Collateral diversity | 15% | Number of unique token mints pledged |
| Liquidation history | 10% | Inverse of liquidation frequency |
Credit tiers
Benefits of higher credit
- Improved LTV ratios — borrow more against the same collateral
- Reduced origination fees — from 1.5% down to 1.0% at Platinum
- Extended loan terms available at higher tiers
- Priority support and early access to new features
Points & Incentives
The Magpie Points system incentivizes engagement, responsible borrowing, and protocol exploration. Points accrue on every loan and can be amplified through positive behavior.
Points calculation
Base Points = Loan SOL Amount x 100
Tier Multiplier = Express 1.5x | Quick 1.25x | Standard 1.0x
Early Repayment = +25% bonus
On-Time Repay = +10% bonus
Streak Bonus = Up to +50% (consecutive on-time repayments)
Diversity Bonus = +5% per unique token (max +25%)
First Loan = 500 flat bonusExample
100 base x 1.5 tier x 1.25 early x 1.3 streak = 243 pointsRedemption framework (future)
- Fee discounts on future loans
- Exclusive access to new features and higher tiers
- Governance weight in protocol decisions
- Details to be announced as the protocol matures
Security Model
Security is a core design constraint, not a feature bolted on after the fact. Every layer of the stack is built to minimize trust assumptions and attack surface.
Tokenomics (Future)
A governance token is under active consideration. The following framework represents current thinking and is subject to change based on community feedback and regulatory guidance.
- Governance token under consideration for protocol decision-making
- Points may convert to governance weight, rewarding early and active users
- Community-driven token listing governance — holders vote on new collateral types
- Fee sharing mechanism for token holders aligned with protocol health
- Detailed tokenomics to be announced in a dedicated publication
Roadmap
Conclusion
Magpie addresses a $50B+ gap in the Solana DeFi ecosystem by providing the first comprehensive lending solution for memecoin holders. Through Telegram-native UX, conservative risk management, on-chain enforcement, and novel credit/points systems, Magpie makes DeFi accessible to the largest and most active community in crypto — without asking them to leave their preferred platform.
The protocol is live, open source, and serving borrowers today. As the ecosystem matures, Magpie will expand to multi-chain support, governance, and institutional pools — always with the same principles: simplicity, safety, and speed.