> ## Documentation Index
> Fetch the complete documentation index at: https://docs.inkwell.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# Credit Line Overview

> Self-serve, revenue-backed borrowing facility powered by on-chain credit scoring, pooled lending, and automated repayment across Solana, Sui, and EVM.

> **CONFIDENTIAL & PROPRIETARY © 2026 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 a Leviathan Credit Line?

A Leviathan Credit Line is a **self-serve, revenue-backed borrowing facility**. Borrowers get scored by our ML credit engine, receive a credit line based on their on-chain activity and revenue, and draw down capital within policy-enforced limits. Repayment happens automatically — RevenueSplitter contracts capture a portion of the borrower's revenue at the source, routing it to lenders without manual transfers.

The core principle: **borrowed capital should only go where it's supposed to, and revenue should flow back to lenders without manual intervention.**

## Who Is It For?

<CardGroup cols={2}>
  <Card title="Protocols & DeFi Projects" icon="cubes">
    Need working capital to fund growth, hire, or expand to new chains — without selling tokens or diluting equity. Verifiable on-chain revenue qualifies you for a credit line.
  </Card>

  <Card title="Traders & Market Makers" icon="chart-candlestick">
    Seek leverage to deploy capital across approved venues. Your on-chain trading history and performance become your credit profile.
  </Card>

  <Card title="On-Chain Businesses" icon="building">
    Any entity with measurable, recurring on-chain revenue — protocol fees, royalties, LP income — can borrow against that revenue with a fixed repayment cap.
  </Card>

  <Card title="AI Agent Platforms" icon="robot">
    Autonomous agents and platforms with provable revenue streams can access credit lines programmatically through the SDK.
  </Card>
</CardGroup>

## How It Works

```mermaid theme={null}
graph LR
    A[Get Scored] --> B[Receive Credit Line]
    B --> C[Draw Down Funds]
    C --> D[Deploy Capital]
    D --> E[Generate Revenue]
    E --> F[Automated Repayment]
    F --> G{Cap Reached?}
    G -->|No| D
    G -->|Yes| H[Loan Complete]
```

<Steps>
  <Step title="Get Scored">
    Your on-chain history — trading performance, portfolio management, market experience, and any previous Leviathan repayment history — is analyzed by the ML credit scoring pipeline. You receive a score between 0 and 1000, published on-chain.
  </Step>

  <Step title="Receive a Credit Line">
    Your score maps to a risk tier that determines your borrowing capacity, interest rate, and term limits. Higher scores unlock better rates and higher limits.
  </Step>

  <Step title="Draw Down Funds">
    Capital is drawn from Leviathan lending pools into a policy-gated dWallet — a multi-chain smart wallet where you can operate freely within approved bounds, but cannot extract or redirect capital outside the policy sandbox.
  </Step>

  <Step title="Deploy and Operate">
    Use session keys to execute your strategy — trading, yield deployment, protocol operations — within your approved destinations. All actions are verified against your policy before co-signing.
  </Step>

  <Step title="Revenue Repays Automatically">
    As your operations generate revenue, RevenueSplitter contracts on EVM chains automatically route a portion to loan repayment. Revenue oracles report progress back to the Solana loan account. Once you hit the repayment cap, the loan completes and all restrictions are lifted.
  </Step>
</Steps>

## How It Differs from Other Leviathan Products

Unlike [Embedded Lending](/leviathan/embedded/overview) (where capital is caged to one partner protocol) or [Prime Brokerage](/leviathan/prime-brokerage/overview) (multi-protocol margin accounts for professional traders), a Credit Line gives you **flexible, self-directed access to capital**. You apply directly through Leviathan, choose your own strategy within policy bounds, and manage your own positions.

|                   | **Credit Line**                   | **Embedded**                      | **Prime Brokerage**           |
| ----------------- | --------------------------------- | --------------------------------- | ----------------------------- |
| **Access**        | Self-serve via Leviathan app      | Through partner protocol's UI     | Direct, managed onboarding    |
| **Capital scope** | Multi-protocol, borrower-directed | Caged to one integrating protocol | Multi-protocol margin account |
| **Target user**   | Protocols, businesses, traders    | Partner protocol's end-users      | Pro traders, hedge funds      |
| **Policy**        | Borrower-approved destinations    | Protocol-defined sandbox          | Portfolio-wide policy         |

## What Powers Your Credit Line

The Credit Line is built on a multi-chain infrastructure stack, with each chain handling what it does best:

### Solana — Core Lending Engine

Four Anchor programs form the backbone:

| Program                | What It Does for You                                                                                                                                         |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **leviathan-core**     | Manages your loan from application through completion — origination, policy enforcement, session keys, keeper automation, and InkPact agreement verification |
| **leviathan-pool**     | Where lenders deposit capital. You borrow from these pools. LP tokens track lender shares. Interest rate models balance supply and demand.                   |
| **leviathan-score**    | Your on-chain credit score (0–1000) lives here. Oracle integration bridges off-chain ML analysis to on-chain accounts that determine your terms.             |
| **leviathan-verifier** | Every action you take with borrowed capital is parsed and validated against your policy — both Solana and EVM transactions — before co-signing.              |

### Sui — Policy Enforcement

Sui hosts the cross-chain enforcement layer, built on Ika's 2PC-MPC dWallet infrastructure:

* **Policy-gated dWallets** — your borrowed capital sits in a dWallet where you can only sign transactions to whitelisted destinations. Neither you nor Leviathan alone controls the funds.
* **Destination registry** — an on-chain registry of your approved contracts, protocols, and addresses.
* **Signing gateway** — Ika's 2PC-MPC protocol ensures transaction signing requires both your intent and policy compliance.

### EVM — Revenue Capture

On EVM-compatible chains where you generate revenue:

* **RevenueSplitter contracts** receive your protocol revenue and automatically split it between your operations and loan repayment.
* **RevenueSplitterFactory** deploys a dedicated splitter for your loan with immutable split parameters.

Revenue capture is **automatic and tamper-proof** — the split happens at the contract level before funds reach your operational wallet.

## Key Concepts

| Concept            | What It Means for You                                                                                                                    |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- |
| **Policy sandbox** | You operate within defined bounds — whitelisted destinations, daily limits, function-level controls. Protects both you and your lenders. |
| **Session keys**   | Time-bounded, scope-limited keys so you can run automated strategies without signing every transaction manually.                         |
| **Keepers**        | Automated agents that handle drawdowns, health checks, and position monitoring on your behalf.                                           |
| **LP tokens**      | What lenders receive when they deposit into pools. Their value appreciates as you repay interest.                                        |
| **Credit tiers**   | Your score maps to a tier (Excellent, Good, Fair, Poor) that determines your rates and limits.                                           |
| **InkPact**        | Cryptographic link between your off-chain legal agreement and your on-chain loan terms.                                                  |

## Next Steps

<CardGroup cols={2}>
  <Card title="Loan Lifecycle" icon="arrows-spin" href="/leviathan/credit-line/loan-lifecycle">
    How loans move from application through completion or default
  </Card>

  <Card title="Pooled Lending" icon="water" href="/leviathan/credit-line/pooled-lending">
    How lenders supply capital and earn yield through LP tokens
  </Card>

  <Card title="Credit Scoring" icon="chart-line" href="/leviathan/credit-line/credit-scoring">
    How your on-chain history determines your borrowing terms
  </Card>

  <Card title="Revenue Enforcement" icon="money-bill-transfer" href="/leviathan/credit-line/revenue-enforcement">
    How automated revenue capture and repayment work
  </Card>

  <Card title="Session Keys" icon="key" href="/leviathan/credit-line/session-keys">
    How scoped, ephemeral keys enable automated execution
  </Card>

  <Card title="SDK" icon="code" href="/leviathan/credit-line/sdk-overview">
    TypeScript SDK for interacting with the credit line programmatically
  </Card>
</CardGroup>
