Skip to main content
This guide uses read-only APIs from the Liquidity module. No transactions, keypairs, or ATAs required.
Use the Liquidity module from @jup-ag/lend-read to fetch real-time market data and compute how utilisation would change if you made a deposit. Formula: Utilisation is the ratio of borrowed assets to supplied assets: utilisation = totalBorrow / totalSupply. After a deposit, supply increases while borrow stays the same: newUtilisation = totalBorrow / (totalSupply + depositAmount). Example: If the Liquidity Layer has $500M supplied and $200M borrowed (40% utilisation), a $100M deposit would give new supply $600M and new utilisation 33.33% ($200M / $600M).

Utilisation After Deposit

1

Import Dependencies

2

Initialise Connection and Fetch Liquidity Data

Create the RPC connection and client. Use client.liquidity.getOverallTokenData(token) to get totalSupply, totalBorrow, and lastStoredUtilization for the target token (e.g. USDC).
3

Convert Deposit to Base Units

Express your deposit in the token’s base units. For USDC (6 decimals), $100M = 100_000_000 * 10^6.
4

Calculate New Utilisation

Add the deposit to supply and compute the new utilisation. Express as basis points (x 10,000) or percentage.

Full code example

See Liquidity Data & Analytics for more on the Liquidity module and available methods.