Lx
Docs
GitHub

Security

Security Architecture

LiquitX implements defense-in-depth security across multiple layers:

Smart Contract Security

Access Control

RolePermissionsHolder
DEFAULT_ADMINGrant/revoke rolesTimelock
PAUSERPause/unpause contractsGuardian multisig
UPGRADERUpgrade proxy implementationsTimelock
RISK_ORACLESubmit risk ratingsRisk Committee
MANAGERCreate funds, originate assetsApproved managers

Reentrancy Protection

All external calls follow the CEI (Checks-Effects-Interactions) pattern:

Additional Protections

  • ReentrancyGuard on all state-changing functions
  • No callbacks during token transfers
  • Flash loan prevention via same-block checks

Integer Safety

  • Solidity 0.8.x with built-in overflow protection
  • Safe math libraries for complex calculations
  • Rounding direction always favors the protocol (defensive)

Oracle Security

TWAP Implementation

Time-Weighted Average Prices prevent flash loan manipulation:

OperationTWAP WindowRationale
Trading/SwapsSpot priceUser expects immediate execution
Collateral valuation30 minutesPrevent manipulation for borrows
Liquidation trigger1 hourPrevent flash crashes causing cascades
Insurance claims24 hoursMaximum manipulation resistance

Price Deviation Checks

Economic Security

Tranche-Based Protection

The Senior/Junior tranche system provides economic security:

Manager Alignment

  • Junior capital often from manager/affiliates
  • Management fees vest over fund lifetime
  • Performance tracked on-chain (reputation)

Liquidation Mechanics

  • Health factor monitoring: Continuous on-chain tracking
  • Gradual liquidation: Max 50% of position per liquidation
  • Dutch auction fallback: For illiquid positions
  • Insurance backstop: Protocol covers bad debt

Upgrade Security

Proxy Pattern

Storage Layout

  • ERC-7201 namespaced storage
  • No storage collisions possible
  • Append-only state variables

Upgrade Safeguards

  • Two-step upgrade: Initialize + upgrade separated
  • Storage gap in all base contracts
  • Automatic compatibility checks
  • Rollback capability (re-upgrade to previous)

Audit Status

ComponentAuditorStatus
Core ContractsTBDPlanned
AMM EngineTBDPlanned
Lending PoolTBDPlanned
Stablecoin ModuleTBDPlanned

Bug Bounty Program

SeverityDescriptionBounty
CriticalDirect fund loss, protocol insolvencyUp to $100,000
HighTheft of yield, oracle manipulationUp to $25,000
MediumGriefing, DoS, incorrect accountingUp to $5,000
LowInformational, best practicesUp to $1,000

Incident Response

LevelStatusActions
1MONITORUnusual activity detected, enhanced logging, team on standby
2INVESTIGATEPotential vulnerability, pause affected functions, forensic analysis
3MITIGATEActive exploit confirmed, full protocol pause, emergency governance
4RECOVERThreat neutralized, assess damage, compensation if needed, post-mortem

Communication Protocol

  1. Internal alert (immediate)
  2. Exchange notification (if relevant)
  3. Public disclosure (within 24h of mitigation)
  4. Detailed post-mortem (within 7 days)

Command Palette

Search for a command to run...