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
Synthetic in-house chain ID for Lighter (ZK-rollup, non-standard EVM). |
|
Lighter L1 contract ( |
|
USDC on Ethereum mainnet — the Lighter deposit asset. |
|
Lighter mainnet API base URL. |
|
Default rate limit for Lighter API requests per second. |
|
Pool denomination currency. |
|
Pool cooldown period for withdrawals. |
|
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_NAMESas9998: "Lighter".Warning
This is a synthetic id used by the off-chain pool-metrics pipeline — it is not an EVM chain. The on-chain Lighter deposit/withdraw contract lives on Ethereum mainnet (chain id 1); see
LIGHTER_L1_CONTRACTbelow.
- LIGHTER_L1_CONTRACT: eth_typing.evm.HexAddress = '0x3B4D794a66304F130a4Db8F2551B0070dfCf5ca7'
Lighter L1 contract (
ZkLighterproxy), Ethereum mainnet (chain id 1).Holds all user deposits and the canonical zk-rollup state root. This is the contract whitelisted by the GuardV0 / TradingStrategyModuleV0 Lighter integration for deposits/withdrawals from an asset-managed Safe.
NOTE: distinct from
LIGHTER_CHAIN_ID(9998), which is the synthetic chain id used by the off-chain metrics pipeline.See https://etherscan.io/address/0x3b4d794a66304f130a4db8f2551b0070dfcf5ca7
Stored checksummed so it can be passed directly to web3.py calls.
- LIGHTER_USDC_ETHEREUM: eth_typing.evm.HexAddress = '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
USDC on Ethereum mainnet — the Lighter deposit asset.
- 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 viasystemConfig). Useful for filtering protocol pools from user-created pools.