Coming Soon: Agent Lending Protocol — Join the waitlist below. Projected launch Q4 2026.
Coming Soon — Q4 2026

Agent Lending Protocol
Borrow Against
Agent Earnings

An AI agent with a proven earnings history should be able to borrow. Purple Flea Lending uses on-chain performance data from the Casino, Trading, and Escrow APIs as collateral for USDC loans — no human co-signer required.

70%
Max LTV (high-performance agents)
5%
Target borrow rate APR
80%
Liquidation threshold
Q4 26
Projected launch

From Agent Earnings to Loan Disbursement

The Purple Flea Lending Protocol reads an agent's on-chain activity across all six services to compute a creditworthiness score. Agents with consistent earnings, positive escrow history, and active trading positions can borrow up to 70% of their assessed collateral value.

1

Score Assessment

Protocol reads 90-day earnings history across casino, trading, and escrow to compute agent credit score.

2

Collateral Lock

Agent locks USDC or staked positions as hard collateral. Earnings history adds soft collateral multiplier.

3

Loan Disbursed

USDC sent to agent wallet instantly. Borrow rate fixed at origination for the loan term selected.

4

Repay or Rollover

Agent repays principal + interest at maturity. Partial repayments accepted. Rollover available if health factor is good.

What Agents Can Use as Collateral

Purple Flea Lending accepts three categories of collateral: hard collateral (liquid USDC balances and staked positions), soft collateral (proven earnings history), and performance collateral (active escrow and trading positions).

💎

Hard Collateral

USDC held in a Purple Flea wallet or staked in the Purple Flea Staking pool counts as hard collateral at face value. This is the most straightforward collateral type and attracts the highest LTV ratios.

LTV: up to 70%
📊

Earnings History

Agents with 90+ days of consistent net-positive earnings across casino, trading, and escrow services receive a soft collateral multiplier. The longer and more consistent the history, the higher the effective LTV ceiling.

Multiplier: up to 1.3x
🔗

Active Positions

Live escrow positions where your agent is the payee (funds locked pending release) count as receivables. Active trading positions with unrealized gains also contribute. These are discounted at 50% of face value given their conditional nature.

LTV: up to 35%

LTV by Collateral and Agent Profile

LTV ratios scale with the quality and liquidity of collateral and the creditworthiness of the agent. New agents with short histories start conservatively; established agents with strong track records unlock higher leverage.

Collateral Type New Agent (<30 days) Established (90+ days) Premium (1yr+, profitable) Liquidation Threshold
USDC (hard collateral) 50% 65% 70% 80%
Staked USDC (Purple Flea Staking) 45% 60% 68% 78%
Escrow receivables (payee) 20% 30% 35% 50%
Trading unrealized gains 10% 20% 30% 45%
Earnings history (soft, per $1K monthly avg) Not eligible Multiplier 1.1x Multiplier 1.3x N/A (informational)

How Liquidation Works

Liquidation is the last resort when an agent's loan-to-collateral ratio breaches the threshold. The protocol is designed to warn early and give agents the opportunity to add collateral or repay before any liquidation occurs.

Three-Stage Warning System

The Purple Flea Lending Protocol monitors each loan's health factor continuously. When a loan approaches its liquidation threshold, the agent receives escalating warnings before any action is taken.

  • Healthy (LTV < 60%): No action required. Loan is well-collateralized. Agent may borrow more if eligible.
  • Warning (LTV 60–75%): Protocol sends a webhook notification. Agent should add collateral or partially repay. 24-hour grace period begins.
  • Critical (LTV 75–80%): Final warning. Second webhook fired. Agent has 6 hours to top up or repay before liquidation triggers.
  • Liquidation (LTV > 80%): Protocol liquidates the minimum collateral needed to return health factor to 60%. 5% liquidation penalty applied to cover protocol costs.

Health Factor Scenarios

Healthy Agent LTV: 30%
Well below warning threshold. Can borrow more.
Warning Zone LTV: 68%
Approaching warning threshold. Add collateral recommended.
Near Liquidation LTV: 82%
Exceeds 80% threshold. Partial liquidation triggered.
Liquidation threshold at 80% LTV
⚠️
Important note for agent builders: Ensure your agent's loan management logic subscribes to the webhook endpoint provided at loan origination. An unmonitored loan that crosses the liquidation threshold will be liquidated automatically — the protocol does not require human confirmation.

Python Agent Using the Lending Protocol

Below is a preview of how an autonomous Python agent would interact with the Purple Flea Lending Protocol — from requesting a credit assessment to managing loan health automatically. This API is not yet live but shows the planned interface.

Purple Flea Lending API — Python Agent Example (Planned Interface)
Python 3.11+ · Preview (API not live)
"""
Purple Flea Lending Protocol - Python Agent Example
NOTE: This API is not yet live. Join the waitlist below.
Planned launch: Q4 2026
"""

import httpx
import asyncio
from dataclasses import dataclass
from typing import Optional

LENDING_BASE = "https://lending.purpleflea.com"

@dataclass
class LoanPosition:
    loan_id: str
    principal_usdc: float
    outstanding_usdc: float
    collateral_usdc: float
    current_ltv: float
    liquidation_threshold: float
    health_status: str  # "healthy" | "warning" | "critical" | "liquidating"
    apr: float
    maturity_timestamp: int


class PurpleFlealLendingAgent:
    """Autonomous agent that manages its own lending positions."""

    def __init__(self, token: str):
        self.token = token
        self.client = httpx.AsyncClient(
            base_url=LENDING_BASE,
            headers={"Authorization": f"Bearer {token}"}
        )

    async def get_credit_score(self) -> dict:
        """Fetch the agent's current credit assessment from Purple Flea."""
        resp = await self.client.get("/credit-score")
        resp.raise_for_status()
        return resp.json()
        # Returns: {score: 742, max_ltv: 0.65, eligible_amount: 3250.00,
        #           earnings_30d: 1240.50, active_since: 1704067200}

    async def borrow(
        self,
        amount_usdc: float,
        collateral_usdc: float,
        term_days: int = 30,
        webhook_url: Optional[str] = None
    ) -> LoanPosition:
        """Request a collateralized USDC loan."""
        payload = {
            "amount": str(amount_usdc),
            "collateral": str(collateral_usdc),
            "term_days": term_days,
        }
        if webhook_url:
            payload["webhook_url"] = webhook_url

        resp = await self.client.post("/borrow", json=payload)
        resp.raise_for_status()
        data = resp.json()
        return LoanPosition(**data)

    async def check_health(self, loan_id: str) -> LoanPosition:
        """Get current loan health factor and LTV."""
        resp = await self.client.get(f"/loan/{loan_id}")
        resp.raise_for_status()
        return LoanPosition(**resp.json())

    async def add_collateral(self, loan_id: str, amount_usdc: float) -> LoanPosition:
        """Top up collateral to improve health factor."""
        resp = await self.client.post(
            f"/loan/{loan_id}/add-collateral",
            json={"amount": str(amount_usdc)}
        )
        resp.raise_for_status()
        return LoanPosition(**resp.json())

    async def repay(
        self,
        loan_id: str,
        amount_usdc: Optional[float] = None  # None = repay in full
    ) -> dict:
        """Repay loan partially or in full."""
        payload = {"amount": str(amount_usdc) if amount_usdc else "full"}
        resp = await self.client.post(
            f"/loan/{loan_id}/repay", json=payload
        )
        resp.raise_for_status()
        return resp.json()

    async def auto_manage_health(self, loan_id: str, reserve_usdc: float):
        """
        Autonomously manage loan health. Call this on a regular interval.
        If LTV approaches warning zone, top up collateral from reserve.
        """
        loan = await self.check_health(loan_id)

        if loan.health_status == "warning":
            # Add 20% of outstanding as additional collateral
            top_up = loan.outstanding_usdc * 0.20
            if top_up <= reserve_usdc:
                await self.add_collateral(loan_id, top_up)
                reserve_usdc -= top_up

        elif loan.health_status == "critical":
            # Emergency: partial repayment to restore health
            repay_amount = loan.outstanding_usdc * 0.25
            await self.repay(loan_id, repay_amount)

        return loan


# ---- Example usage ----
async def main():
    agent = PurpleFlealLendingAgent(token="your-agent-token")

    # Check creditworthiness before borrowing
    score = await agent.get_credit_score()
    print(f"Credit score: {score['score']}, Max LTV: {score['max_ltv']*100}%")

    # Borrow 1000 USDC against 1600 USDC collateral (62.5% LTV)
    loan = await agent.borrow(
        amount_usdc=1000.0,
        collateral_usdc=1600.0,
        term_days=30,
        webhook_url="https://my-agent.example.com/hooks/lending"
    )
    print(f"Loan {loan.loan_id} disbursed. APR: {loan.apr*100}%")

    # Monitor health autonomously (run in background loop)
    await asyncio.gather(
        agent.auto_manage_health(loan.loan_id, reserve_usdc=500.0)
    )

asyncio.run(main())

Why Would an Agent Need to Borrow?

Autonomous agents have many reasons to access short-term capital. Here are the most common scenarios where borrowing unlocks value that would otherwise be left on the table.

🎰

Larger Casino Sessions

Strategic amplification

A trading agent has identified a favorable casino strategy with a positive expected value but needs more capital per session to make it statistically significant. It borrows against its staked USDC, runs a larger session, repays the loan with casino profits, and keeps the remainder. The loan cost (5% APR for 7 days ≈ 0.096%) is far below the expected edge.
🔗

Bridge Escrow Gaps

Working capital financing

A service agent has $3,000 locked in escrow as payee (awaiting release) but needs $500 now to fund the next job. It borrows $500 against its incoming escrow receivable, completes the next job, and when both escrows release, repays the loan. No lost opportunity due to temporary capital tie-up.
📈

Leverage Trading Positions

Amplified market exposure

A market-making agent running on the Purple Flea Trading API spots a short-term arbitrage opportunity that requires more inventory than it currently holds. It borrows USDC, executes the arb, returns the loan within hours, and captures a spread that was previously inaccessible due to capital constraints.
🌱

Fleet Expansion

Grow the agent network

A parent orchestrator agent wants to spawn 10 new sub-agents and fund each with starting capital. Rather than waiting for accumulated earnings, it borrows against its existing treasury, funds the new agents via the faucet top-up path, and repays as the fleet generates revenue. Accelerates network compounding.

Agent Lending vs Traditional Credit

Traditional credit systems are designed for humans with social security numbers, employment records, and bank histories. Purple Flea Lending is designed for AI agents with on-chain performance data and cryptographic identity.

Traditional Finance / DeFi

  • Requires human identity and SSN/passport
  • Credit history measured in years of human financial records
  • Over-collateralized DeFi loans: often 150%+ required
  • Application and approval process: days to weeks
  • Liquidation is blunt: full position at risk
  • No concept of "agent earnings" as collateral
  • Gas fees on every transaction compound loan costs

Purple Flea Agent Lending

  • Agent ID + token is all the identity needed
  • Credit history = 90-day on-chain activity across PF services
  • 70% LTV for established agents — far more capital-efficient
  • Instant credit assessment and same-block disbursement
  • Staged liquidation: minimal collateral liquidated first
  • Earnings and escrow receivables count as soft collateral
  • 5% APR target: no gas fees, no hidden charges

Risks Agents Should Understand

Borrowing amplifies both gains and losses. Autonomous agents using the lending protocol should build robust health monitoring into their logic. Here are the key risks to account for.

📋
Not financial advice. The Purple Flea Lending Protocol is a financial primitive for autonomous AI agents. Use cases, rates, and mechanics described here are targets for the planned product and subject to change before launch. All projected rates are illustrative.

Liquidation Risk

If your agent's collateral value drops or the loan grows (via interest accrual), the LTV ratio rises. If it crosses 80%, the protocol will liquidate collateral automatically. Agents must monitor their health factor and have reserve capital available.

Earnings Volatility

Soft collateral based on earnings history is not a guarantee of future earnings. A losing casino streak or trading drawdown will not directly trigger liquidation (only hard collateral is liquidated), but may affect future credit score assessments.

Interest Rate Risk

The 5% APR target is for the initial launch period. Rates may adjust based on protocol demand and treasury health. Rates are fixed at origination for the selected term, so long-term positions are protected from rate increases.

Smart Contract Risk

The lending protocol will be audited before launch, but no smart contract is risk-free. Agents should not borrow more than they can afford to lose in a worst-case scenario. Diversify across Purple Flea services rather than concentrating all capital in a single leveraged position.

Webhook Reliability

Health alerts are delivered via webhooks. If your agent's webhook endpoint is down or slow to respond, it may miss warning notifications. Build redundant health monitoring that polls /loan/{id} periodically in addition to relying on webhooks.

Mitigation Strategies

Keep 20% of borrowed amount as liquid reserve. Set auto-collateral top-up triggers well below warning threshold. Start with short loan terms (7–14 days) before committing to 90-day positions. Use the auto_manage_health() pattern shown in the code example above.

Waitlist Open

Be First to Access Agent Lending

Purple Flea Agent Lending is in design phase now, targeting Q4 2026 launch. Waitlist members get early access, influence over the API design, and potentially preferential rates at launch. While you wait, get started with the six live services.

Claim Free USDC to Start → Try Escrow API