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.
Overview
Every Leviathan loan follows a defined lifecycle managed by theleviathan-core Solana program. Each stage has explicit entry and exit conditions enforced on-chain — loans cannot skip stages or transition without meeting the required criteria.
Lifecycle Stages
1. Application
The borrower submits a loan application specifying:- Requested capital amount and term
- Intended use of funds (which protocols, chains, and strategies)
- Revenue sources that will service the debt
PENDING state.
2. Underwriting
The protocol’s credit scoring system (leviathan-score) evaluates the borrower:
- On-chain credit score is queried or computed
- Risk tier determines eligible terms, rates, and limits
- Off-chain ML models may contribute additional analysis via oracle feeds
3. Approval
If the borrower meets the credit criteria, the loan transitions toAPPROVED state:
- Loan terms are finalized (principal, rate, term, repayment cap)
- Policy parameters are set (whitelisted destinations, daily limits, allowed functions)
- InkPact agreement hash is recorded on-chain (see below)
4. Funding
Capital is drawn from the lending pool (leviathan-pool) and deployed:
- Pool reserves are checked for available liquidity
- Funds are transferred to a policy-gated dWallet on Sui
- The borrower’s policy sandbox is activated with the approved destination set
5. Active
The borrower operates within their policy sandbox:- Session keys enable trading and operations without per-transaction lender approval
- Keepers monitor positions and enforce health checks
- All borrower transactions are verified against policy by
leviathan-verifier
6. Repayment
As revenue accumulates:- Revenue oracles report repayment progress back to Solana
- The loan’s outstanding balance decreases
- Borrowers may also make voluntary additional repayments
7. Completion
When the repayment cap is reached or the term expires with full repayment:- The loan transitions to
COMPLETEDstate - Policy restrictions on the dWallet are released
- Remaining capital returns to the borrower’s full control
- Pool depositors’ share of returned capital (principal + interest) is reflected in LP token value
Default Path
If a borrower fails to meet repayment obligations:- Health checks detect the shortfall
- The loan transitions to
DEFAULTEDstate - The protocol can initiate enforcement actions through the dWallet
- Non-performing loans may proceed to NPL auction
Policy Enforcement
Throughout the active phase, the borrower’s capital operates within a policy sandbox:- Whitelisted destinations — only pre-approved contracts and addresses can receive transactions. Attempts to interact with non-whitelisted targets are rejected before signing.
- Daily limits — time-bounded caps on transaction volume prevent rapid capital extraction, even to approved destinations.
- Function-level controls — policies restrict not just which contracts are callable, but which specific functions. A borrower approved for trading may be blocked from withdrawal functions on the same protocol.
Keeper Automation
Keepers are automated agents that perform time-sensitive protocol operations:| Keeper | Role |
|---|---|
| Drawdown keepers | Execute scheduled capital deployments after loan activation |
| Position monitors | Track borrower positions across chains and flag policy violations |
| Health check keepers | Compute health factors and trigger warnings or enforcement actions |
InkPact Agreements
InkPact provides on-chain agreement verification:- A cryptographic hash of the loan agreement document is stored on-chain at approval
- Both parties can independently verify that the on-chain terms match the signed agreement
- The hash is immutable once recorded — neither party can claim different terms after the fact
NPL Auctions
When a loan enters default and cannot be recovered through standard enforcement:- The non-performing loan position is listed for auction
- Qualified participants can bid on the distressed position
- The winning bidder assumes the loan’s rights and enforcement capabilities
- Proceeds from the auction are distributed to affected pool depositors