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
| Parameter | Mainnet | Testnet |
|---|---|---|
| Chain name | LQDTY | LQDTY Testnet |
| Chain ID | 8675309 | 8675310 |
| Currency | LQDTY (18 decimals) | LQDTY |
| Block time | 1ms (1,000 blocks/sec) | 1ms |
| Consensus finality | 1ms deterministic | 1ms |
| EVM version | Shanghai | Shanghai |
| Max block gas | 15M | 15M |
| Max txs/block | 10,000 | 10,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
| Environment | URL |
|---|---|
| Mainnet | https://rpc.liquidity.io |
| Testnet | https://testnet-rpc.liquidity.io |
| Local | http://127.0.0.1:8545 |
WebSocket
| Environment | URL |
|---|---|
| Mainnet | wss://rpc.liquidity.io/ws |
| Testnet | wss://testnet-rpc.liquidity.io/ws |
| Local | ws://127.0.0.1:8546 |
Native Precompiles
LQDTY includes 14 precompile modules not available on standard EVM chains:
| Category | Precompile | Address | Purpose |
|---|---|---|---|
| Post-Quantum | ML-DSA | 0x0500 | FIPS 204 Dilithium signatures |
| ML-KEM | 0x0501 | FIPS 203 Kyber key encapsulation | |
| SLH-DSA | 0x0502 | FIPS 205 SPHINCS+ signatures | |
| Threshold | CGGMP21 | 0x0400 | Threshold ECDSA (BTC/ETH) |
| FROST | 0x0401 | Threshold EdDSA (SOL/DOT) | |
| Ringtail | 0x0402 | Post-quantum lattice threshold | |
| Curves | Ed25519 | 0x0200 | EdDSA verification |
| secp256r1 | 0x0201 | NIST P-256 / WebAuthn | |
| SR25519 | 0x0202 | Substrate migration | |
| Hashing | Blake3 | 0x0300 | 3x faster than Keccak |
| DEX | LiquidPool | 0x0600 | AMM concentrated liquidity |
| LiquidBook | 0x0601 | CLOB orderbook | |
| LiquidVault | 0x0602 | Margin, clearinghouse |
See Post-Quantum Security for algorithm details and LQDTY Blockchain for the full precompile reference.
Deployed Contracts
Core Tokens
| Contract | Address | Type | Description |
|---|---|---|---|
| LQDTY | 0x68B1D87F95878fE05B998F19b66F4baba5De1aed | Upgradeable ERC20 | Native governance token |
| USDL | 0x3Aa5ebB10DC797CAC828524e59A333d0A371443c | ERC20 | USD-pegged stablecoin for settlement |
| LBTC | 0x63413958C595Da9dBd0097eeBd5d4c288745aF0a | LWrappedToken | Wrapped BTC |
| LETH | 0x61E9a5Ee2595a5EA98fDC28FB0C32dF11c7bbCb6 | LWrappedToken | Wrapped ETH |
| LSOL | 0x9A3B15BbaBfD4f9db148cBB01ca65D5D7E5E0AfA | LWrappedToken | Wrapped SOL |
| LUSDC | 0x855545B50157a102b4ec14eC0A7B60B5Bbe3EBc1 | LWrappedToken | Wrapped USDC |
Infrastructure
| Contract | Address | Description |
|---|---|---|
| LWrappedTokenFactory | 0x5FbDB2315678afecb367f032d93F642f64180aa3 | Factory for deploying wrapped asset tokens |
| SecurityToken | 0xc6e7DF5E7b4f2A278906862b61205850344D4e7d | Factory for Reg D/S/A+/CF security tokens |
| LiquidityTeleporter | 0x0165878A594ca255338adfa4d48449f69242Eb8F | Cross-chain bridge/teleporter |
DEX
| Contract | Address | Description |
|---|---|---|
| FlashLoanPool | Deployed | Uncollateralized flash loans for arbitrage (0.09% fee / 9 bps) |
| OmnichainArbitrage | Deployed | Cross-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:
| Parameter | Value |
|---|---|
| Flash loan fee | 0.09% (9 basis points) |
| Multi-asset loans | Supported |
| Cross-chain loans | Supported via Warp |
| Permissionless mode | Configurable (starts permissioned) |
Token Standards
The Liquidity Chain supports all standard token interfaces:
| Standard | Description |
|---|---|
| ERC-20 | Fungible tokens (stablecoins, wrapped assets) |
| ERC-721 | Non-fungible tokens |
| ERC-1155 | Multi-token standard |
| ERC-4626 | Tokenized vaults |
Gas and Fee Structure
Gas Pricing
Liquidity Chain uses a dynamic base fee model similar to EIP-1559:
| Parameter | Value |
|---|---|
| Minimum base fee | 25 nLQDTY (gwei) |
| Base fee adjustment | Per-block, based on utilization |
| Priority fee (tip) | User-specified, minimum 0 |
| Gas limit per transaction | 8M (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 + feeFor 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:
| Chain | Bridge |
|---|---|
| Ethereum & EVM-compatible | Warp + bridge contracts |
| Cosmos ecosystem | IBC via Warp relay |
| Solana | Warp bridge |
| Bitcoin | Wrapped tokens |
| LQDTY subnets | Native Warp messaging |
Network Configuration
MetaMask / Wallet Setup
Add Liquidity Network to MetaMask or any EVM wallet:
| Field | Mainnet | Testnet |
|---|---|---|
| Network Name | LQDTY Mainnet | LQDTY Testnet |
| RPC URL | https://rpc.liquidity.io | https://testnet-rpc.liquidity.io |
| Chain ID | 8675309 | 8675310 |
| Currency Symbol | LQDTY | LQDTY |
| Block Explorer | https://explorer.liquidity.io | https://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
| Algorithm | Usage |
|---|---|
| ML-DSA (Dilithium) | FIPS 204 — Primary order signing (post-quantum) |
| ML-KEM (Kyber) | FIPS 203 — Hybrid key exchange (post-quantum) |
| Ringtail | Lattice threshold signatures for consensus (post-quantum) |
| BLS | Classical aggregate signatures (hybrid mode) |
| Ed25519 | Classical 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
| Layer | Protection |
|---|---|
| Transport | TLS 1.3 on all RPC and WebSocket connections |
| DDoS | Rate limiting at the gateway layer |
| Mempool | Private mempool integration for MEV protection |
| Authentication | JWT + API key for authenticated endpoints |