Medusa whitepaper

How the wallet credit score is calculated.

Medusa converts public Solana Devnet wallet behavior into a readable borrower reputation score. The current model is `trust-rpc-0.2` and produces a score from 8 to 98 points.

Data inputs

SOL balance

Native SOL held by the wallet at scoring time.

Token accounts

SPL token accounts, with stronger weight for non-zero balances.

Transaction sample

Recent signatures fetched from Solana RPC and checked for success or failure.

Wallet age

Observed days between the oldest sampled activity and the current score request.

Active days

Unique days with activity inside the sampled transaction window.

Protocol touches

Known DeFi or protocol interactions found in the sampled wallet activity.

Repayment behavior

35 pts

round(successRate x 35)

A higher successful transaction ratio increases the strongest score component.

Liquidity resilience

30 pts

round(min(SOL, 10) x 1.5) + min(nonZeroTokenAccounts x 3, 15)

Rewards available SOL and diversified non-zero token balances, capped to prevent oversized wallets from dominating.

Wallet age

25 pts

round(min(observedAgeDays, 365) / 14.6)

Older observed history improves confidence, with one year treated as the useful cap.

Protocol activity

18 pts

round(min(sampledTransactions, 50) / 3.2) + min(activeDays, 6)

Rewards steady, repeated wallet use across multiple days.

Protocol bonus

6 pts

round(protocolInteractions / 4)

Adds a small bonus for known protocol participation without overpowering core wallet behavior.

Risk flags

12 pts penalty pool

round((1 - successRate) x 8) + failedTxPenalty + lowSamplePenalty

Failed transactions and thin history create a penalty that is partially subtracted from the score.

Final score equation

score = clamp(repayment + liquidity + walletAge + activity + protocolBonus - floor(risk / 2), 8, 98)

The model intentionally caps the score at 98 because this version is based on public RPC observations, not a complete off-chain identity, underwriting, or repayment registry.

Score bands

Prime

82-98

Strong history, stronger liquidity, and low observed risk.

Reliable

68-81

Enough wallet evidence for risk-adjusted DeFi credit review.

Emerging

52-67

Some useful activity, but history or liquidity is still developing.

High Risk

8-51

Thin, failed, or uneven activity. Conservative review recommended.

Badge mapping

LV4

Prime

Minimum score: 82+

LV3

Reliable

Minimum score: 68+

LV2

Emerging

Minimum score: 52+

LV1

High Risk

Minimum score: 8+

Confidence and limitations

API confidence is calculated as `clamp(45 + sampledTransactions + activeDays x 2, 45, 92)`. The score can be limited by RPC availability, small transaction samples, test-wallet behavior, spam, failed transactions, or wallets with meaningful activity outside the sampled window. Medusa should be used as a transparent reputation signal, not as automatic loan approval.