Documentation

Eopay Protocol

Eopay is a permissionless credit & lending protocol on Solana. Borrow SOL against the assets you already hold — memecoins, tokenized stocks and other Solana assets — without selling your positions, and build an on-chain credit reputation as you do.

Introduction

Most lending forces a choice: sell your assets for liquidity, or keep your exposure and stay illiquid. Eopay removes that trade-off. Deposit Solana assets as collateral, borrow SOL against them instantly, and keep every bit of your upside. Repay whenever you want to unlock your collateral.

Beyond borrowing, Eopay turns wallet history into financial reputation. Every repayment, loan and unit of borrowing volume contributes to an on-chain credit score that unlocks better LTVs and lower rates over time — a portable, verifiable identity that no centralized lender can take away.

Permissionless
No KYC, no gatekeepers
Non-custodial
Your keys, your assets
On-chain
Fully verifiable

How it works

The protocol is composed of four cooperating systems:

Collateral Vault

Non-custodial program that escrows deposited assets and tracks per-user balances.

Loan Engine

Prices collateral, issues SOL loans, accrues interest and manages repayments.

Risk Layer

Oracle feeds, per-asset LTV, liquidation thresholds and health-factor monitoring.

Liquidation Flow

Permissionless keepers unwind unhealthy positions to keep the pool solvent.

A borrow flows top to bottom: you lock collateral in the Vault, the Loan Engine issues SOL against it, the Risk Layer continuously monitors solvency, and if a position becomes unhealthy the Liquidation Flow unwinds it automatically.

Quickstart

Install the SDK:

bash
pnpm add @eopay/sdk @solana/web3.js

Connect a wallet and borrow SOL against collateral in one transaction:

ts
import { Eopay } from '@eopay/sdk'

const eopay = new Eopay({
  cluster: 'mainnet-beta',
  wallet: phantom.publicKey,
})

const loan = await eopay.borrow({
  collateral: 'BONK',
  deposit: 2_500_000,   // amount of collateral to lock
  borrow: 'SOL',
  amount: 18.4,         // ~62% LTV
})

console.log(loan.signature, loan.healthFactor)

Collateral Vault

The Vault is a non-custodial Solana program that escrows your deposited assets. Funds are never held by a company — only by on-chain program-derived accounts that you can always withdraw from once any outstanding loan is repaid.

  • Supports memecoins, SPL tokens, LSTs, LP positions and tokenized stocks.
  • Each asset has isolated risk parameters set by the Risk Layer.
  • Deposits keep your market exposure intact — you still hold the upside.

Loan Engine

The Loan Engine prices your locked collateral using live oracle feeds, applies the asset's maximum loan-to-value (LTV) ratio, and issues SOL to your wallet. Interest accrues per second and is set algorithmically by pool utilization.

ts
// Health factor = (collateralValue × liquidationThreshold) / debtValue
// A position is liquidatable when healthFactor < 1.0

const hf = (collateralUsd * liquidationThreshold) / borrowedUsd

Repay any portion of the loan at any time to raise your health factor and reduce interest.

Risk Layer

The Risk Layer keeps the protocol solvent. It ingests real-time prices from Pyth and Switchboard, assigns per-asset LTV and liquidation thresholds, and enforces supply caps so that a single volatile asset can never threaten the lending pool.

Asset classMax LTVLiq. threshold
Memecoins50–55%63%
DeFi / SPL65%73%
Tokenized stocks68–70%78%
LSTs / LP80%85%

Liquidations

When a position's health factor drops below 1.0, it becomes eligible for liquidation. Permissionless keepers repay a portion of the debt in exchange for discounted collateral, restoring the position to a healthy state. The process is fully automated and predictable — there are no surprise margin calls.

  • Partial liquidations minimize borrower losses where possible.
  • A liquidation penalty is split between keepers and the protocol reserve.
  • Liquidation events are recorded and factored into your credit score.

On-chain Credit Score

Eopay reads your verifiable on-chain activity and distills it into a single score from 0 to 850. It is portable, owned by your wallet, and improves as you demonstrate responsible borrowing. A higher score unlocks higher LTVs, lower borrow APRs and larger credit lines.

ts
const score = await eopay.creditScore(wallet)
// { value: 742, tier: 'EXCELLENT', maxLtvBonus: 0.08, aprDiscount: 0.014 }

Scoring factors

35%
Repayment history

On-time repayments and zero-liquidation history are the strongest positive signals.

20%
Borrowing volume

Cumulative value borrowed and successfully repaid across the wallet's lifetime.

20%
Loan activity

Number, recency and consistency of healthy loan positions.

15%
Wallet age

Older, continuously active wallets carry a longer verifiable track record.

10%
Collateral diversity

A wider spread of collateral types reduces concentration risk.

Interest rates

Borrow and supply rates are dynamic and driven by pool utilization (the ratio of borrowed to supplied liquidity). As utilization rises, borrow APR increases to incentivize repayment and new supply; lender APY rises in tandem.

ts
borrowApr = baseRate + utilization * slope
lenderApy = borrowApr * utilization * (1 - reserveFactor)

SDK reference

Core methods exposed by @eopay/sdk:

ts
eopay.deposit({ asset, amount })        // lock collateral
eopay.borrow({ collateral, borrow, amount })  // open a loan
eopay.repay({ loan, amount })           // repay (use 'max' to close)
eopay.withdraw({ vault, amount })       // unlock collateral
eopay.supply({ amount })                // provide SOL liquidity
eopay.creditScore(wallet)               // read on-chain score

FAQ

Do I have to sell my tokens to get liquidity?

No. That is the entire point of Eopay — you keep your assets and your upside while borrowing SOL against them.

Is Eopay custodial?

No. Collateral is held by on-chain programs, not a company. You retain control and can withdraw once loans are repaid.

What happens if my collateral drops in value?

Your health factor falls. If it drops below 1.0, the position is partially liquidated to restore solvency. Repaying or adding collateral raises your health factor.

Can lenders earn yield?

Yes. Supply SOL liquidity and earn APY generated by real borrowing demand in the Solana ecosystem.

Ready to borrow?

Launch the app and connect your wallet.

Launch App