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
Leviathan’s credit scoring system, managed by theleviathan-score Solana program, provides on-chain credit assessments for borrowers. Every borrower has a score between 0 and 1000 that determines their borrowing terms, limits, and eligibility across the protocol.
The system is designed around a key principle: scores live on-chain for transparency and composability, while the raw data and models that produce them remain off-chain for privacy and flexibility.
How Scoring Works
1. Data Collection
The scoring pipeline analyzes a borrower’s on-chain footprint:- Trading history and portfolio composition
- Historical performance across markets and protocols
- Position sizing patterns and risk management behavior
- Repayment history on previous Leviathan loans
2. ML Analysis
An ensemble of machine learning models evaluates the collected data:- Multiple models analyze different aspects of borrower behavior
- Model outputs are combined to produce a robust, well-calibrated score
- The ensemble approach reduces the impact of any single model’s weaknesses
3. Score Publication
Computed scores are published on-chain through oracle integration:- Scores are written to per-borrower credit registry accounts on Solana
- Each score update includes a timestamp for freshness tracking
- Historical score data is preserved, enabling trend analysis
4. Term Determination
On-chain scores directly affect borrowing parameters:- Higher scores unlock better rates, higher limits, and longer terms
- Lower scores result in more conservative terms or ineligibility
- Score thresholds are enforced programmatically — there is no manual override
Score Range and Tiers
Scores map to risk tiers that the protocol uses for term determination:| Range | Tier | Implication |
|---|---|---|
| 800–1000 | Excellent | Best available terms, highest borrowing limits |
| 600–799 | Good | Competitive terms with standard limits |
| 400–599 | Fair | Conservative terms, reduced limits |
| 200–399 | Poor | Limited eligibility, restrictive terms |
| 0–199 | Very Poor | May not qualify for lending |
Tier boundaries and their associated terms are configurable per lending pool. Different pools may interpret the same score differently based on their risk appetite.
Privacy Model
The credit scoring system balances transparency with privacy: On-chain (public):- Credit score (0–1000)
- Risk tier classification
- Score timestamps and update history
- Loan performance history (repayments, defaults)
- Raw trading data and transaction history
- ML model inputs and feature vectors
- Model architectures, weights, and training data
- Intermediate scoring calculations
Oracle Integration
Scores are bridged from the off-chain ML pipeline to on-chain accounts through oracle feeds:- Oracle operators submit score updates with cryptographic attestations
- The
leviathan-scoreprogram validates attestations before accepting updates - Stale scores (beyond a configurable age threshold) can be flagged or excluded from lending decisions
Composability
Because credit scores live on-chain as standard Solana accounts, they are composable:- Other programs can read a borrower’s score to make their own lending or risk decisions
- Scores can be used as inputs to automated strategies or governance mechanisms
- Third-party protocols can integrate Leviathan credit data without permission