lighter.constants

Documentation for eth_defi.lighter.constants Python module.

Constants for the Lighter integration.

Shared constants used across the Lighter modules (daily_metrics, vault_data_export, etc.).

Module Attributes

LIGHTER_CHAIN_ID

Synthetic in-house chain ID for Lighter (ZK-rollup, non-standard EVM).

LIGHTER_API_URL

Lighter mainnet API base URL.

LIGHTER_DEFAULT_REQUESTS_PER_SECOND

Default rate limit for Lighter API requests per second.

LIGHTER_DENOMINATION

Pool denomination currency.

LIGHTER_POOL_LOCKUP

Pool cooldown period for withdrawals.

LIGHTER_SYSTEM_POOL_ADDRESSES

Set of Lighter system pool addresses (protocol-curated).

LIGHTER_CHAIN_ID: int = 9998

Synthetic in-house chain ID for Lighter (ZK-rollup, non-standard EVM).

Added to eth_defi.chain.CHAIN_NAMES as 9998: "Lighter".

LIGHTER_API_URL: str = 'https://mainnet.zklighter.elliot.ai'

Lighter mainnet API base URL.

LIGHTER_DAILY_METRICS_DATABASE: pathlib.Path = PosixPath('/home/runner/.tradingstrategy/vaults/lighter-pools.duckdb')

Default path for Lighter daily metrics DuckDB database.

LIGHTER_DEFAULT_REQUESTS_PER_SECOND: float = 2.0

Default rate limit for Lighter API requests per second.

Conservative estimate based on observed API behaviour.

LIGHTER_POOL_FEE_MODE: eth_defi.vault.fee.VaultFeeMode = VaultFeeMode.internalised_skimming

Fee mode for Lighter native pools.

Pool operators can set an operator_fee (0-100%). The share prices from the API already reflect the operator’s fee deduction, so the pipeline sees net-of-fees prices. This matches internalised skimming.

LIGHTER_DENOMINATION: str = 'USDC'

Pool denomination currency.

Lighter uses USDC as the exchange base currency.

LIGHTER_POOL_LOCKUP: datetime.timedelta = datetime.timedelta(seconds=300)

Pool cooldown period for withdrawals.

From systemConfig.liquidity_pool_cooldown_period (300000ms = 5 minutes).

LIGHTER_SYSTEM_POOL_ADDRESSES: set[str] = {'lighter-pool-281474976680784', 'lighter-pool-281474976710654'}

Set of Lighter system pool addresses (protocol-curated).

The LLP (Lighter Liquidity Pool) is the protocol’s own liquidity pool; the XLP (Experimental Liquidity Provider) is the protocol-run pool for experimental markets. Both are community-owned and protocol-operated. Uses the synthetic address format lighter-pool-{account_index}.

These are protocol-operated pools with special properties (no operator fee, not listed in publicPoolsMetadata, fetched separately via systemConfig). Useful for filtering protocol pools from user-created pools.