Developer Integration Guide
LiquitX provides a typed TypeScript package (@liquitx/contracts) with ABIs and deployed addresses for all protocol contracts. This guide covers setup, contract reference, and code examples for integrating with the protocol on Base Sepolia.
Installation & Setup
The @liquitx/contracts package exports typed ABIs, deployed addresses per network, and a chain ID resolver. Use it with viem, ethers.js, or any EVM library.
Import Example (TypeScript + viem)
import {
fundRegistryAbi,
assetRegistryAbi,
riskVaultAbi,
assetMarketAbi,
getAddressesForChain,
} from "@liquitx/contracts";
const addresses = getAddressesForChain(84532); // Base Sepolia
console.log(addresses?.fundRegistry); // "0x380F..."
Deployed Contracts (Base Sepolia)
All contracts are deployed on Base Sepolia (Chain ID: 84532). Mainnet deployment pending. Addresses are abbreviated — use getAddressesForChain(84532) for full values.
Governance
| Contract | Address | Purpose |
|---|
| Timelock | 0x5247...0AB9 | 48h minimum delay on governance actions |
| Governance | 0x4916...E097 | Central parameter coordinator with Admin/Guardian/Emergency roles |
Core Registries
| Contract | Address | Purpose |
|---|
| ManagerRegistry | 0x3B79...c5E0 | Allowlist of authorized asset originators |
| FundRegistry | 0x380F...2CB8 | Investment funds with Senior/Junior tranches |
| AssetRegistry | 0xe6A9...9F39 | Lifecycle management for tokenized RWA containers |
| TrancheTokenFactory | 0x712b...C512 | Deploys sr/jr token pairs via EIP-1167 proxies |
Stablecoin
| Contract | Address | Purpose |
|---|
| lxUSD (LXToken) | 0xC1eC...4ac1 | Jurisdiction-native stablecoin, 1:1 USDC backed (18 decimals) |
| CollateralVault | 0xDC98...9993 | Holds USDC collateral backing lxUSD |
Oracles
| Contract | Address | Purpose |
|---|
| RiskOracle | 0xc3d0...1E76 | M-of-N threshold signatures for risk ratings |
| TWAPOracle | 0x8A45...3820 | Manipulation-resistant time-weighted average prices |
Two-Layer Liquidity
| Contract | Address | Purpose |
|---|
| RiskVault AAA | 0xEd50...8D4 | ERC-4626-like vault per risk tier holding lxUSD |
| RiskVault AA | 0xE324...322b | ERC-4626-like vault per risk tier holding lxUSD |
| RiskVault A | 0xAec8...40F6 | ERC-4626-like vault per risk tier holding lxUSD |
| LiquidityRouter | 0xB3B9...4490 | Coordinates capital between vaults and markets |
| AssetMarketFactory | 0x1535...58d7 | Deploys per-asset secondary trading markets |
AMM & Trading
| Contract | Address | Purpose |
|---|
| PoolFactory | 0xEeFB...653e | Deploys risk-bucketed WeightedPools (EIP-1167) |
| LPStaking | 0x87a3...3b7f | MasterChef-style staking with time-locked tiers |
| JuniorMarketplace | 0x52A1...B595 | P2P orderbook for junior tranche tokens |
Safety & Yield
| Contract | Address | Purpose |
|---|
| YieldRouter | 0x275F...E74 | Priority waterfall: Insurance → Treasury → PegDefense → LPs |
| InsuranceFund | 0xA662...2636 | Per-jurisdiction loss absorption reserves |
| CircuitBreaker | 0x76df...0051 | Emergency halt with 4 severity levels |
| PegDefenseModule | 0xe08b...565E | Graduated buy-side intervention for sr-token pegs |
Code Examples
Mint lxUSD (deposit USDC collateral)
import { lxTokenAbi, getAddressesForChain } from "@liquitx/contracts";
import { createPublicClient, createWalletClient, http, parseEther } from "viem";
import { baseSepolia } from "viem/chains";
const addresses = getAddressesForChain(84532)!;
// Approve USDC, then mint lxUSD (1:1, auto-scaled 6→18 decimals)
await walletClient.writeContract({
address: addresses.lxUsd as `0x${string}`,
abi: lxTokenAbi,
functionName: "mint",
args: [1000_000000n], // 1000 USDC
});
Deposit to Risk Vault
import { riskVaultAbi, getAddressesForChain } from "@liquitx/contracts";
const addresses = getAddressesForChain(84532)!;
// Deposit lxUSD into AAA Risk Vault, receive shares
await walletClient.writeContract({
address: addresses.riskVaultAAA as `0x${string}`,
abi: riskVaultAbi,
functionName: "deposit",
args: [parseEther("1000")], // 1000 lxUSD
});
// Check share price
const price = await publicClient.readContract({
address: addresses.riskVaultAAA as `0x${string}`,
abi: riskVaultAbi,
functionName: "sharePrice",
});
Swap on Asset Market
import { assetMarketAbi } from "@liquitx/contracts";
// Buy sr-tokens with lxUSD on an Asset Market
await walletClient.writeContract({
address: marketAddress,
abi: assetMarketAbi,
functionName: "swap",
args: [
lxUsdAddress, // assetIn
srTokenAddress, // assetOut
parseEther("100"), // 100 lxUSD in
parseEther("95"), // min 95 sr-tokens out (slippage)
],
});
Place Junior Marketplace Order
import { juniorMarketplaceAbi, getAddressesForChain } from "@liquitx/contracts";
const addresses = getAddressesForChain(84532)!;
// Create a sell order for junior tokens
await walletClient.writeContract({
address: addresses.juniorMarketplace as `0x${string}`,
abi: juniorMarketplaceAbi,
functionName: "createSellOrder",
args: [jrTokenAddress, parseEther("100"), parseEther("0.80")],
// Sell 100 jr-tokens at 0.80 lxUSD each
});
Supported Networks
| Network | Chain ID | Status |
|---|
| Base Sepolia | 84532 | Live (testnet) |
| Base Mainnet | 8453 | Pending deployment |
Resources