This guide uses read-only APIs from the Liquidity module. No transactions, keypairs, or ATAs required.
@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
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).Convert Deposit to Base Units
Express your deposit in the token’s base units. For USDC (6 decimals), $100M =
100_000_000 * 10^6.Full code example
See Liquidity Data & Analytics for more on the Liquidity module and available methods.
