Litepaper v1.0

Magpie Protocol

Litepaper v1.0 — April 2026

Memecoin-Collateralized Lending on Solana

1.

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.

2.

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
The core problem is clear: the largest and most active community in crypto has billions in assets and zero access to lending infrastructure built for them.
3.

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.

Three risk tiers
Express (30% LTV, 2d), Quick (25% LTV, 3d), Standard (20% LTV, 7d)
Flat 1.5% origination fee
No hidden rates, no dynamic APR, no variable haircuts
Non-custodial wallet model
Exportable keys — import into Phantom, Solflare, any Solana wallet
On-chain program (Anchor)
Deterministic loan execution, collateral custody, and liquidation
Credit system
Build reputation across loans, unlock better LTV and reduced fees
Points system
Earn points through engagement, early repayment, and diversity
4.

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

LayerTechnologyPurpose
On-chain programAnchor (Rust)Loan PDA creation, collateral custody, liquidation logic
State managementProgram Derived AddressesLoan-scoped state and collateral vaults
User interfacegrammY (Telegram)Chat-based loan management, notifications, wallet export
Off-chain indexingPostgreSQLUser data, loan history, credit scores, points
Pricing oracleJupiter Price API v2Real-time aggregated token pricing across all Solana DEXes
Market dataDexScreener APIMarket cap, volume, 24h change for display
Key encryptionAES-256-GCMWallet private key encryption at rest
Background jobsNode.js watchersDeposit detection, health monitoring, loan expiry

Architecture diagram

User <-> Telegram <-> Magpie Bot <-> Solana Program
                            |               |
                        PostgreSQL    Token Vaults (PDAs)
                            |
                       Jupiter Oracle

Data 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.

5.

Loan Mechanics

A Magpie loan moves through a deterministic lifecycle, from wallet creation to resolution. Every step is orchestrated from a Telegram chat.

Lifecycle

1
Wallet creation
User opens the bot and sends /start. A fresh Ed25519 keypair is generated, encrypted with AES-256-GCM, and stored. The wallet is non-custodial and exportable at any time.
2
Collateral deposit
User receives a unique deposit address scoped to the loan. Memecoin collateral is sent to this address. A background watcher confirms receipt on-chain within 8-12 seconds.
3
Price oracle & LTV calculation
Jupiter Price API v2 values the collateral in SOL. The user selects a tier (Express, Quick, or Standard), and the protocol calculates the maximum loan amount.
4
SOL disbursement
SOL is sent to the user's wallet minus the 1.5% origination fee. The loan PDA is created on-chain with all parameters immutably recorded.
5
Active management
While active, the user can: top-up collateral, partial-repay to reduce principal, extend the term (1.5% fee), or repay in full to reclaim collateral.
6
Health monitoring
Continuous repricing of collateral. Alerts fire at 90% health and 24 hours before the due date. Users receive Telegram messages with current health ratio.
7
Resolution
The loan ends one of two ways: the user repays in full (collateral returned) or health drops below 1.1x and on-chain liquidation executes automatically.

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.1

Tier comparison

TierLTVTermUse case
Express30%2 daysMaximum liquidity, short-term needs
Quick25%3 daysBalanced risk/reward
Standard20%7 daysConservative, extended timeline
6.

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

ParameterValueRationale
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 threshold1.1x health10% buffer above underwater
Quote expiry60 secondsPrevents stale price execution
Max slippage2%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).

7.

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

FactorWeightDescription
Repayment history40%On-time full repayments vs late or liquidated
Loan volume20%Total SOL borrowed across all loans
Account age15%Time since first loan originated
Collateral diversity15%Number of unique token mints pledged
Liquidation history10%Inverse of liquidation frequency

Credit tiers

Bronze
300 - 499
Standard rates, standard terms
Silver
500 - 649
+2% LTV bonus, priority support
Gold
650 - 749
+5% LTV bonus, reduced fees (1.25%)
Platinum
750 - 850
+8% LTV bonus, 1% fee, custom terms

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
8.

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 bonus

Example

A 1 SOL Express loan repaid early with a 3-loan streak:

100 base x 1.5 tier x 1.25 early x 1.3 streak = 243 points

Redemption 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
9.

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.

Non-custodial architecture
Users can export private keys anytime. Magpie never controls assets outside of pledged collateral held in loan-scoped PDAs.
AES-256-GCM encryption
Private keys are encrypted at rest using AES-256-GCM before storage. Keys are never stored in plaintext, never logged, never transmitted unencrypted.
On-chain liquidation
Liquidation is deterministic, auditable, and has no admin override. The Anchor program logic is the final authority — no multisig, no emergency pause.
Open source
Both the bot and site repositories are publicly available on GitHub. Anyone can audit the protocol logic, verify on-chain programs, and inspect off-chain code.
Input sanitization & rate limiting
All API endpoints are rate-limited. All user inputs are sanitized to prevent injection, overflow, and replay attacks.
Internal audit
Internal security audit completed April 2026. Zero secrets in public codebase. SSL/TLS on all external communications.
10.

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
Note: No token has been announced or launched. This section reflects directional thinking only. Any token launch will be accompanied by a full tokenomics paper, audit, and community review period.
11.

Roadmap

Q1 '26
Done
Q1 2026
Protocol launch, 64 token support, Telegram bot live
Q2 '26
Done
Q2 2026
Credit system, points, public API, open source
Q3 '26
Soon
Q3 2026
Multi-chain expansion, governance token, mobile app
Q4 '26
Soon
Q4 2026
Institutional pools, DAO governance, cross-chain lending
12.

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.

Questions? Reach out on Telegram.
← Back to home