Liquidity Docs

EVM & Smart Contracts

LQDTY EVM L1 — chain details, precompiles, smart contracts, RPC endpoints, Web3 integration

The Liquidity.io exchange runs on LQDTY, a sovereign EVM L1 with native post-quantum precompiles and 1ms block finality. For the full chain overview, see LQDTY Blockchain. For post-quantum details, see Post-Quantum Security.

Chain Details

ParameterMainnetTestnet
Chain nameLQDTYLQDTY Testnet
Chain ID86753098675310
CurrencyLQDTY (18 decimals)LQDTY
Block time1ms (1,000 blocks/sec)1ms
Consensus finality1ms deterministic1ms
EVM versionShanghaiShanghai
Max block gas15M15M
Max txs/block10,00010,000

The LQDTY EVM is fully compatible with Solidity ^0.8.24 and supports all standard EVM opcodes plus 14 native precompiles for post-quantum crypto, threshold signatures, and DEX operations. Contracts compiled for Ethereum deploy without modification.

LQDTY (chain ID 8675309) is a sovereign L1 optimized for exchange operations with 1ms block time and native DEX precompiles.


RPC Endpoints

HTTP

EnvironmentURL
Mainnethttps://rpc.liquidity.io
Testnethttps://testnet-rpc.liquidity.io
Localhttp://127.0.0.1:8545

WebSocket

EnvironmentURL
Mainnetwss://rpc.liquidity.io/ws
Testnetwss://testnet-rpc.liquidity.io/ws
Localws://127.0.0.1:8546

Native Precompiles

LQDTY includes 14 precompile modules not available on standard EVM chains:

CategoryPrecompileAddressPurpose
Post-QuantumML-DSA0x0500FIPS 204 Dilithium signatures
ML-KEM0x0501FIPS 203 Kyber key encapsulation
SLH-DSA0x0502FIPS 205 SPHINCS+ signatures
ThresholdCGGMP210x0400Threshold ECDSA (BTC/ETH)
FROST0x0401Threshold EdDSA (SOL/DOT)
Ringtail0x0402Post-quantum lattice threshold
CurvesEd255190x0200EdDSA verification
secp256r10x0201NIST P-256 / WebAuthn
SR255190x0202Substrate migration
HashingBlake30x03003x faster than Keccak
DEXLiquidPool0x0600AMM concentrated liquidity
LiquidBook0x0601CLOB orderbook
LiquidVault0x0602Margin, clearinghouse

See Post-Quantum Security for algorithm details and LQDTY Blockchain for the full precompile reference.


Deployed Contracts

Core Tokens

ContractAddressTypeDescription
LQDTY0x68B1D87F95878fE05B998F19b66F4baba5De1aedUpgradeable ERC20Native governance token
USDL0x3Aa5ebB10DC797CAC828524e59A333d0A371443cERC20USD-pegged stablecoin for settlement
LBTC0x63413958C595Da9dBd0097eeBd5d4c288745aF0aLWrappedTokenWrapped BTC
LETH0x61E9a5Ee2595a5EA98fDC28FB0C32dF11c7bbCb6LWrappedTokenWrapped ETH
LSOL0x9A3B15BbaBfD4f9db148cBB01ca65D5D7E5E0AfALWrappedTokenWrapped SOL
LUSDC0x855545B50157a102b4ec14eC0A7B60B5Bbe3EBc1LWrappedTokenWrapped USDC

Infrastructure

ContractAddressDescription
LWrappedTokenFactory0x5FbDB2315678afecb367f032d93F642f64180aa3Factory for deploying wrapped asset tokens
SecurityToken0xc6e7DF5E7b4f2A278906862b61205850344D4e7dFactory for Reg D/S/A+/CF security tokens
LiquidityTeleporter0x0165878A594ca255338adfa4d48449f69242Eb8FCross-chain bridge/teleporter

DEX

ContractAddressDescription
FlashLoanPoolDeployedUncollateralized flash loans for arbitrage (0.09% fee / 9 bps)
OmnichainArbitrageDeployedCross-chain arbitrage via Warp messaging

Flash Loan Pool

The FlashLoanPool contract provides zero-collateral flash loans for capital-efficient arbitrage. Loans must be repaid within the same transaction or the entire transaction reverts.

Key parameters:

ParameterValue
Flash loan fee0.09% (9 basis points)
Multi-asset loansSupported
Cross-chain loansSupported via Warp
Permissionless modeConfigurable (starts permissioned)

Token Standards

The Liquidity Chain supports all standard token interfaces:

StandardDescription
ERC-20Fungible tokens (stablecoins, wrapped assets)
ERC-721Non-fungible tokens
ERC-1155Multi-token standard
ERC-4626Tokenized vaults

Gas and Fee Structure

Gas Pricing

Liquidity Chain uses a dynamic base fee model similar to EIP-1559:

ParameterValue
Minimum base fee25 nLQDTY (gwei)
Base fee adjustmentPer-block, based on utilization
Priority fee (tip)User-specified, minimum 0
Gas limit per transaction8M (default), up to 15M

Fee Estimation

For institutional workloads, use eth_maxPriorityFeePerGas and eth_feeHistory to estimate gas costs:

import { createPublicClient, http } from 'viem';
import { liquidEvm } from './chains';

const client = createPublicClient({
  chain: liquidEvm,
  transport: http('https://rpc.liquidity.io'),
});

const gasPrice = await client.getGasPrice();
const feeHistory = await client.getFeeHistory({
  blockCount: 10,
  rewardPercentiles: [25, 50, 75],
});

console.log(`Current gas price: ${gasPrice} wei`);
console.log(`Fee history (last 10 blocks):`, feeHistory);

Flash Loan Fee Calculation

The flash loan fee is calculated on-chain as:

fee = (amount * 9) / 10000
totalRepayment = amount + fee

For a 1,000 USDC flash loan, the fee is 0.09 USDC.


Web3 Integration

ethers.js

import { ethers } from 'ethers';

// Connect to Liquidity Chain
const provider = new ethers.JsonRpcProvider(
  'https://rpc.liquidity.io',
  { name: 'lqdty', chainId: 8675309 }
);

// Read contract state
const flashLoanPool = new ethers.Contract(
  FLASH_LOAN_POOL_ADDRESS,
  [
    'function getAvailableLiquidity(address asset) view returns (uint256)',
    'function calculateFee(uint256 amount) pure returns (uint256)',
    'function getSupportedAssets() view returns (address[])',
  ],
  provider
);

const liquidity = await flashLoanPool.getAvailableLiquidity(USDC_ADDRESS);
const fee = await flashLoanPool.calculateFee(ethers.parseUnits('1000', 6));
const assets = await flashLoanPool.getSupportedAssets();

console.log(`Available USDC liquidity: ${ethers.formatUnits(liquidity, 6)}`);
console.log(`Fee for 1000 USDC loan: ${ethers.formatUnits(fee, 6)} USDC`);
console.log(`Supported assets: ${assets.length}`);

// Execute a flash loan (requires a receiver contract)
const signer = new ethers.Wallet(PRIVATE_KEY, provider);
const poolWithSigner = flashLoanPool.connect(signer);

const tx = await poolWithSigner.flashLoan(
  RECEIVER_CONTRACT_ADDRESS,
  USDC_ADDRESS,
  ethers.parseUnits('1000', 6),
  '0x' // params passed to receiver's executeOperation
);

const receipt = await tx.wait();
console.log(`Flash loan tx: ${receipt.hash}`);

viem

import { createPublicClient, createWalletClient, http, parseAbi } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';

// Define the LQDTY chain
const liquidEvm = {
  id: 96369,
  name: 'LQDTY',
  nativeCurrency: { name: 'LQDTY', symbol: 'LQDTY', decimals: 18 },
  rpcUrls: {
    default: { http: ['https://rpc.liquidity.io'] },
  },
  blockExplorers: {
    default: { name: 'Liquidity Explorer', url: 'https://explorer.liquidity.io' },
  },
} as const;

const publicClient = createPublicClient({
  chain: liquidEvm,
  transport: http(),
});

// Read flash loan pool state
const flashLoanAbi = parseAbi([
  'function getAvailableLiquidity(address asset) view returns (uint256)',
  'function calculateFee(uint256 amount) pure returns (uint256)',
  'function flashLoan(address receiver, address asset, uint256 amount, bytes params) returns (bool)',
  'event FlashLoan(address indexed receiver, address indexed asset, uint256 amount, uint256 fee, bytes32 indexed executionId)',
]);

const liquidity = await publicClient.readContract({
  address: FLASH_LOAN_POOL_ADDRESS,
  abi: flashLoanAbi,
  functionName: 'getAvailableLiquidity',
  args: [USDC_ADDRESS],
});

console.log(`Available liquidity: ${liquidity}`);

// Watch for flash loan events
const unwatch = publicClient.watchContractEvent({
  address: FLASH_LOAN_POOL_ADDRESS,
  abi: flashLoanAbi,
  eventName: 'FlashLoan',
  onLogs: (logs) => {
    for (const log of logs) {
      console.log(`Flash loan: ${log.args.amount} of ${log.args.asset}, fee: ${log.args.fee}`);
    }
  },
});

// Execute a flash loan
const account = privateKeyToAccount(PRIVATE_KEY);

const walletClient = createWalletClient({
  account,
  chain: liquidEvm,
  transport: http(),
});

const hash = await walletClient.writeContract({
  address: FLASH_LOAN_POOL_ADDRESS,
  abi: flashLoanAbi,
  functionName: 'flashLoan',
  args: [RECEIVER_ADDRESS, USDC_ADDRESS, 1000000000n, '0x'],
});

const receipt = await publicClient.waitForTransactionReceipt({ hash });
console.log(`Transaction confirmed in block ${receipt.blockNumber}`);

Python (web3.py)

from web3 import Web3

w3 = Web3(Web3.HTTPProvider("https://rpc.liquidity.io"))

# Verify connection
assert w3.is_connected()
print(f"Chain ID: {w3.eth.chain_id}")  # 96369
print(f"Latest block: {w3.eth.block_number}")

# Read contract
flash_loan_abi = [
    {
        "inputs": [{"name": "asset", "type": "address"}],
        "name": "getAvailableLiquidity",
        "outputs": [{"name": "", "type": "uint256"}],
        "stateMutability": "view",
        "type": "function",
    },
    {
        "inputs": [{"name": "amount", "type": "uint256"}],
        "name": "calculateFee",
        "outputs": [{"name": "", "type": "uint256"}],
        "stateMutability": "pure",
        "type": "function",
    },
]

pool = w3.eth.contract(address=FLASH_LOAN_POOL_ADDRESS, abi=flash_loan_abi)
liquidity = pool.functions.getAvailableLiquidity(USDC_ADDRESS).call()
fee = pool.functions.calculateFee(1_000_000_000).call()  # 1000 USDC (6 decimals)

print(f"Available USDC: {liquidity / 1e6:.2f}")
print(f"Fee for 1000 USDC: {fee / 1e6:.4f} USDC")

Flash Loan Receiver Contract

To use flash loans, deploy a receiver contract that implements IFlashLoanReceiver:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

import "./interfaces/IFlashLoanReceiver.sol";
import "./interfaces/IERC20.sol";

contract MyArbitrageBot is IFlashLoanReceiver {
    address public immutable flashLoanPool;

    constructor(address _pool) {
        flashLoanPool = _pool;
    }

    function executeOperation(
        address asset,
        uint256 amount,
        uint256 fee,
        address initiator,
        bytes calldata params
    ) external override returns (bool) {
        require(msg.sender == flashLoanPool, "Only pool");

        // --- Your arbitrage logic here ---
        // Buy low on DEX A, sell high on DEX B, etc.

        // Repay loan + fee
        uint256 amountToRepay = amount + fee;
        IERC20(asset).approve(flashLoanPool, amountToRepay);

        return true;
    }

    // Multi-asset flash loan callback
    function executeOperationMulti(
        address[] calldata assets,
        uint256[] calldata amounts,
        uint256[] calldata fees,
        address initiator,
        bytes calldata params
    ) external override returns (bool) {
        require(msg.sender == flashLoanPool, "Only pool");

        // --- Multi-asset arbitrage logic ---

        // Repay all loans + fees
        for (uint256 i = 0; i < assets.length; i++) {
            IERC20(assets[i]).approve(flashLoanPool, amounts[i] + fees[i]);
        }

        return true;
    }
}

Cross-Chain via Warp

The Liquidity Network includes native cross-chain messaging via Warp. The OmnichainArbitrage contract uses Warp to execute arbitrage across multiple chains:

  • Simple arbitrage -- buy on Chain A, sell on Chain B
  • Triangular arbitrage -- A -> B -> C -> A with net profit
  • Multi-hop arbitrage -- complex routes across multiple DEXs and chains

Supported chains for cross-chain operations:

ChainBridge
Ethereum & EVM-compatibleWarp + bridge contracts
Cosmos ecosystemIBC via Warp relay
SolanaWarp bridge
BitcoinWrapped tokens
LQDTY subnetsNative Warp messaging

Network Configuration

MetaMask / Wallet Setup

Add Liquidity Network to MetaMask or any EVM wallet:

FieldMainnetTestnet
Network NameLQDTY MainnetLQDTY Testnet
RPC URLhttps://rpc.liquidity.iohttps://testnet-rpc.liquidity.io
Chain ID86753098675310
Currency SymbolLQDTYLQDTY
Block Explorerhttps://explorer.liquidity.iohttps://testnet-explorer.liquidity.io

SDK Chain Configuration

import { LiquidityClient } from '@liquidityio/sdk';

// Mainnet
const client = new LiquidityClient({
    chainId: 8675309,
    rpcUrl: 'https://rpc.liquidity.io',
    signer: wallet,
});

// Testnet
const testnetClient = new LiquidityClient({
    chainId: 8675310,
    rpcUrl: 'https://testnet-rpc.liquidity.io',
    signer: wallet,
});

Security

Cryptography

AlgorithmUsage
ML-DSA (Dilithium)FIPS 204 — Primary order signing (post-quantum)
ML-KEM (Kyber)FIPS 203 — Hybrid key exchange (post-quantum)
RingtailLattice threshold signatures for consensus (post-quantum)
BLSClassical aggregate signatures (hybrid mode)
Ed25519Classical digital signatures (hybrid mode)

See Post-Quantum Security for full details.

Smart Contract Security

  • All core contracts use reentrancy guards
  • Flash loan pool validates repayment before state updates
  • Cross-chain messages are verified through the Warp protocol
  • Access control via owner pattern and whitelisting

Network Security

LayerProtection
TransportTLS 1.3 on all RPC and WebSocket connections
DDoSRate limiting at the gateway layer
MempoolPrivate mempool integration for MEV protection
AuthenticationJWT + API key for authenticated endpoints

On this page