Skip to main content
CONFIDENTIAL & PROPRIETARY © 2025 Inkwell Finance, Inc. All Rights Reserved. This document is for informational purposes only and does not constitute legal, tax, or investment advice, nor an offer to sell or a solicitation to buy any security or other financial instrument. Any examples, structures, or flows described here are design intent only and may change.

What Is Embedded Lending?

Embedded Lending lets protocols integrate Leviathan’s credit infrastructure directly into their own UI. Instead of sending users to a separate lending platform, protocols offer borrowing as a native feature — users get access to leverage without leaving the app they’re already using. From the user’s perspective, it feels like a built-in feature of the protocol. Under the hood, Leviathan handles credit assessment, policy enforcement, and revenue-based repayment.

How It Works

┌─────────────────────────────────────────────┐
│              Protocol Frontend              │
│                                             │
│   User clicks "Enable Leverage" ───────┐    │
│                                        │    │
│   ┌────────────────────────────────┐   │    │
│   │    Leviathan Embedded SDK      │◄──┘    │
│   │    (@leviathan/sdk/embedded)   │        │
│   └──────────┬─────────────────────┘        │
└──────────────┼──────────────────────────────┘

    ┌──────────▼──────────────┐
    │   Leviathan On-Chain    │
    │   Programs (Solana)     │
    │                         │
    │   • Credit scoring      │
    │   • Loan origination    │
    │   • Policy enforcement  │
    │   • Revenue splitting   │
    └─────────────────────────┘
  1. A protocol integrates the Leviathan Embedded SDK into their frontend
  2. Users interact with lending features natively within the protocol’s interface
  3. The SDK communicates with Leviathan’s on-chain programs for credit checks, loan origination, and policy enforcement
  4. Borrowed capital is caged to the integrating protocol — it can only be used within that protocol’s whitelisted destinations
  5. Revenue from the user’s activity flows through automated splitters for repayment

Value Proposition

For Protocols

New revenue stream and deeper engagement
  • Earn revenue share on lending fees generated through your platform
  • Increase TVL as users deploy leveraged capital within your protocol
  • Improve user retention — borrowers have an ongoing relationship with your platform
  • No balance sheet risk — Leviathan handles the credit infrastructure

For Users

Seamless leverage within your existing workflow
  • Access credit without leaving the protocol you already use
  • No separate onboarding or platform switching
  • Credit eligibility based on your on-chain track record
  • Repayment tied to your activity — automated and flexible

How Embedded Differs from Credit Line

The Credit Line product is Leviathan’s direct lending platform — borrowers apply through Leviathan’s own interface, receive capital, and deploy it across approved destinations on multiple protocols. Embedded Lending is different in several key ways:
Credit LineEmbedded
DistributionLeviathan’s own appPartner protocol’s UI
Capital scopeMulti-protocol (whitelisted set)Single protocol (caged)
User relationshipBorrower ↔ LeviathanBorrower ↔ Protocol
Revenue modelLeviathan collects feesRevenue share with protocol
Policy scopeBroad destination whitelistNarrow, protocol-specific functions
The capital caging is the critical distinction: in Embedded, borrowed funds can only be used within the integrating protocol’s approved contract set. This tighter scope simplifies policy enforcement and aligns incentives — the protocol benefits from increased activity, and lenders benefit from reduced risk surface.

How Embedded Differs from Prime Brokerage

Prime Brokerage offers multi-protocol margin accounts where sophisticated traders deploy capital across many venues simultaneously. It’s designed for professional participants who need cross-protocol flexibility. Embedded is single-protocol scope — capital stays within the integrating protocol. It’s designed for the protocol’s existing user base, not external traders. The integration is lighter, the policy enforcement is simpler, and the user experience is seamless within one product.

Use Cases

DEXs — Margin Trading

A decentralized exchange integrates Embedded Lending to offer margin trading. Users can open leveraged positions directly in the DEX interface, with borrowed capital restricted to trading on that exchange. Revenue from trading fees flows through automated splitters to service the loan.

Yield Protocols — Leveraged Positions

A yield aggregator offers leveraged yield farming. Users deposit collateral and borrow additional capital that can only be deployed into the protocol’s approved yield strategies. Higher yields accelerate loan repayment through the revenue split.

NFT Marketplaces — Working Capital

An NFT marketplace provides working capital to active traders. Borrowed capital can only be used to purchase NFTs on that marketplace, and a portion of future sale proceeds is automatically directed to loan repayment.

AI Agent Platforms — Treasury Credit

An AI agent platform offers credit lines to agents with proven revenue track records. Borrowed capital is caged to the platform’s approved operations, and agent earnings are split for automated repayment.

Next Steps