Compare what each lender would give you
One address, seven protocols, six networks: each one's limit and rate, ranked. Coverage varies by asset.
Paste an address to compare what Aave, Spark, Compound, Morpho, Fluid, Euler and Moonwell would lend against it: rate, limit and liquidation price.
Across all supported networks
Independent of the lenders. Rates and positions come from their contracts and public data.
One address, seven protocols, six networks: each one's limit and rate, ranked. Coverage varies by asset.
Each option shows its yearly cost and the collateral price at which it would be liquidated, from the protocol's own limits and oracle.
Open positions show each protocol's own health factor. Borrowing and repaying from your wallet is in testing.
Lookups sign nothing. See for yourself.
import { createPublicClient, http } from "viem";
import { mainnet } from "viem/chains";
import { POOL_ABI, UI_POOL_DATA_PROVIDER_ABI } from "./abis";
// A public client can only read: this lookup has no wallet, signer or sendTransaction.
const client = createPublicClient({ chain: mainnet, transport: http(process.env.RPC_URL_MAINNET) });
export async function quote(address: `0x${string}`) {
// 1. Account-level limits, straight from the Aave v3 Pool contract.
const [totalCollateralBase, totalDebtBase, availableBorrowsBase, currentLiquidationThreshold, ltv, healthFactor] =
await client.readContract({ address: AAVE_POOL, abi: POOL_ABI, functionName: "getUserAccountData", args: [address] });
// 2. Per-reserve balances and params in one multicall.
const [reserves] = await client.readContract({
address: UI_POOL_DATA_PROVIDER,
abi: UI_POOL_DATA_PROVIDER_ABI,
functionName: "getUserReservesData",
args: [POOL_ADDRESSES_PROVIDER, address],
});
return {
maxBorrowUsd: Number(availableBorrowsBase) / 1e8,
healthFactor: Number(healthFactor) / 1e18,
liquidationThreshold: Number(currentLiquidationThreshold) / 1e4,
reserves,
};
}