# Table of Contents - [Introduction | Lighter Docs](#introduction-lighter-docs) - [Technical Architecture: Lighter Core | Lighter Docs](#technical-architecture-lighter-core-lighter-docs) - [LIT Utility | Lighter Docs](#lit-utility-lighter-docs) - [LIT Fee Credits | Lighter Docs](#lit-fee-credits-lighter-docs) - [Trading Fees | Lighter Docs](#trading-fees-lighter-docs) - [Real World Assets (RWAs) | Lighter Docs](#real-world-assets-rwas-lighter-docs) - [Futures Contract Price Rolling Mechanism | Lighter Docs](#futures-contract-price-rolling-mechanism-lighter-docs) - [Order Types & Matching | Lighter Docs](#order-types-matching-lighter-docs) - [Unified Trading Accounts | Lighter Docs](#unified-trading-accounts-lighter-docs) - [Public Pools | Lighter Docs](#public-pools-lighter-docs) - [Prelaunch Markets | Lighter Docs](#prelaunch-markets-lighter-docs) - [RWA Pricing Mechanism | Lighter Docs](#rwa-pricing-mechanism-lighter-docs) - [API | Lighter Docs](#api-lighter-docs) - [Self-Trade Prevention | Lighter Docs](#self-trade-prevention-lighter-docs) - [LLP Strategies | Lighter Docs](#llp-strategies-lighter-docs) - [Funding Rate Rebates | Lighter Docs](#funding-rate-rebates-lighter-docs) - [Funding | Lighter Docs](#funding-lighter-docs) - [Fair Price Marking | Lighter Docs](#fair-price-marking-lighter-docs) - [Points Program | Lighter Docs](#points-program-lighter-docs) - [Security Audits | Lighter Docs](#security-audits-lighter-docs) - [Bug Bounty Program | Lighter Docs](#bug-bounty-program-lighter-docs) - [PnL And Total Account Value | Lighter Docs](#pnl-and-total-account-value-lighter-docs) - [Liquidations & LLP (Insurance Fund) | Lighter Docs](#liquidations-llp-insurance-fund-lighter-docs) - [Retail | Lighter Docs](#retail-lighter-docs) - [Market Specifications | Lighter Docs](#market-specifications-lighter-docs) - [Partner Attribution | Lighter Docs](#partner-attribution-lighter-docs) - [Market Makers | Lighter Docs](#market-makers-lighter-docs) - [Contract Specifications | Lighter Docs](#contract-specifications-lighter-docs) - [Liquidations & LLP (Insurance Fund) | Lighter Docs](#liquidations-llp-insurance-fund-lighter-docs) - [Introduction | Lighter Docs](#introduction-lighter-docs) - [LIT Utility | Lighter Docs](#lit-utility-lighter-docs) - [Security Audits | Lighter Docs](#security-audits-lighter-docs) - [Bug Bounty Program | Lighter Docs](#bug-bounty-program-lighter-docs) - [PnL And Total Account Value | Lighter Docs](#pnl-and-total-account-value-lighter-docs) - [Points Program | Lighter Docs](#points-program-lighter-docs) - [Unified Trading Accounts | Lighter Docs](#unified-trading-accounts-lighter-docs) - [Prelaunch Markets | Lighter Docs](#prelaunch-markets-lighter-docs) - [Trading Fees | Lighter Docs](#trading-fees-lighter-docs) - [Self-Trade Prevention | Lighter Docs](#self-trade-prevention-lighter-docs) - [Technical Architecture: Lighter Core | Lighter Docs](#technical-architecture-lighter-core-lighter-docs) - [Fair Price Marking | Lighter Docs](#fair-price-marking-lighter-docs) - [Real World Assets (RWA) | Lighter Docs](#real-world-assets-rwa-lighter-docs) - [API | Lighter Docs](#api-lighter-docs) - [Order Types & Matching | Lighter Docs](#order-types-matching-lighter-docs) - [Public Pools | Lighter Docs](#public-pools-lighter-docs) - [Contract Specifications | Lighter Docs](#contract-specifications-lighter-docs) - [Funding | Lighter Docs](#funding-lighter-docs) - [Market Makers | Lighter Docs](#market-makers-lighter-docs) - [Retail | Lighter Docs](#retail-lighter-docs) --- # Introduction | Lighter Docs ![Page cover](https://docs.lighter.xyz/~gitbook/image?url=https%3A%2F%2F1186887628-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FXuISSHTfjHCg60BNss6v%252Fuploads%252FJA1wPuNsUVyGMfK5eoft%252FzklighterHeaderBlue.png%3Falt%3Dmedia%26token%3Df84e1eb0-2343-4f61-b20e-dc495f684a71&width=1248&dpr=3&quality=100&sign=763e1532&sv=2)![Page cover](https://docs.lighter.xyz/~gitbook/image?url=https%3A%2F%2F1186887628-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FXuISSHTfjHCg60BNss6v%252Fuploads%252F5AGP4r3Q4zBjjmRh6xzD%252FzklighterHeaderBlue.png%3Falt%3Dmedia%26token%3D99472e90-481c-48e1-8b68-9fe8564ff283&width=1248&dpr=3&quality=100&sign=376eca0f&sv=2) Lighter is a decentralized trading platform designed for security, scale, and performance in a zero-fee trading environment. It is the first exchange to offer verifiable order matching and liquidations while delivering performance comparable to traditional exchanges. The Lighter platform is available at: * [https://app.lighter.xyz/arrow-up-right](https://app.lighter.xyz/) * [https://lighter.exchange/arrow-up-right](https://lighter.exchange/trade/ETH) [NextTechnical Architecture: Lighter Corechevron-right](https://docs.lighter.xyz/about-lighter/technical-architecture-lighter-core) Last updated 2 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Technical Architecture: Lighter Core | Lighter Docs Read the Whitepaper: [https://assets.lighter.xyz/whitepaper.pdfarrow-up-right](https://assets.lighter.xyz/whitepaper.pdf) ### [hashtag](https://docs.lighter.xyz/about-lighter/technical-architecture-lighter-core#background) Background Lighter Core is built on the following principles: * Users always maintain custody of their assets. * Operations must be verifiable and strictly adhere to a publicly predefined set of rules. * The system must scale seamlessly in both latency and throughput. * Users must always be able to exit securely and independently. Achieving this requires a **publicly verifiable compute engine** that prevents operator misbehavior and guarantees execution strictly according to publicly defined rules. A few existing solutions for verifiable computation exist, each with trade-offs: * **Blockchains with Decentralized Consensus**: Achieve verifiability via redundant execution across network nodes. While secure, they face latency and throughput limitations due to consensus mechanisms and network coordination. Additionally, common approaches lack flexibility around data privacy since data must be public to provide redundancy. The Ethereum blockchain is an example of a blockchain with decentralized consensus. * **Trusted Execution Environments (TEEs)**: Provide hardware-level verification but depend on vendor trust and are vulnerable to side-channel attacks. They require some level of trust since users cannot independently verify execution. * **Succinct Proofs (ZK-Proofs)**: Historically costly and challenging to develop, succinct proofs offer strong security and scale both horizontally and vertically. They also provide modularity for data privacy, unlike consensus-based systems. Additionally, secure exits require asset storage in a robust non-custodial environment. However, the security of the environment users exit to is equally critical. Isolated blockchains connected via bridges offer no non-custodial fallback if compromised. Despite inherent scalability limitations, Ethereum is the most battle-tested verifiable execution platform, providing a neutral, secure settlement layer ideal for user exits. ### [hashtag](https://docs.lighter.xyz/about-lighter/technical-architecture-lighter-core#lighter-core) Lighter Core Lighter Core combines succinct execution proofs with Ethereum as the anchoring layer for both proofs and system state. Users can securely enter or exit directly through Ethereum, with all proofs verified publicly before any state updates occur. Scalability is achieved through Lighter Core’s novel proving engine, purpose-built from scratch for exchange-specific workloads. It leverages new algorithms and optimized data structures for efficient exchange-operation proof generation. All exchange operations are executed deterministically via user-signed transactions. A batch of these transactions produces a new post-execution state along with a succinct cryptographic proof. ![](https://docs.lighter.xyz/~gitbook/image?url=https%3A%2F%2F1186887628-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FXuISSHTfjHCg60BNss6v%252Fuploads%252FKpB5ZGDlaQH6k213BQwz%252Fimage%2520%285%29.png%3Falt%3Dmedia%26token%3D786ede76-0295-4389-9197-0495edf70b6c&width=768&dpr=3&quality=100&sign=a283ade&sv=2) Simplified diagram of the described architecture Smart contracts on Ethereum hold deposited assets and the canonical Lighter state root, which encapsulates user assets and positions, public pools, order books, and other critical system components. While processing exchange operations, Lighter Core periodically publishes state update proposals to Ethereum. Each proposal transaction is accompanied by data blobs containing the details of the state transition (e.g., per-account changes), allowing users to independently reconstruct and verify their state. The posted data is highly compressed, enabling Lighter Core to publish state data directly to Ethereum at high scale without relying on third parties. A Sequencer coordinates first-in–first-out transaction ordering and provides soft finality, executing exchange operations and generating data consumed by other system components. This data is fed to API servers, which provide ultra-low-latency data to end users, and to horizontally and vertically scalable Witness Generator services, which transform it into circuit-friendly inputs for the Lighter Prover. The Prover generates proofs in parallel across Lighter transactions. Hundreds of thousands of these execution proofs are then fed into a multi-layer aggregation engine, where they are combined into a single batch proof. This enables efficient and cost-effective verification on Ethereum. Once the proof for a state-update proposal is verified on Ethereum, the contracts update the exchange state. These proofs also attest to the validity and sufficiency of the data posted in Ethereum’s data blobs—demonstrating that the posted data alone is enough to reconstruct all user states using only censorship-resistant and immutable on-chain data. #### [hashtag](https://docs.lighter.xyz/about-lighter/technical-architecture-lighter-core#escape-hatch) Escape Hatch To guarantee liveness and censorship resistance, Lighter Core introduces a **priority request queue** directly on Ethereum. Users can submit critical exit operations—such as withdrawals, public pool exits, or reduce-only IOC orders—on-chain, ensuring that the Sequencer must process them within a predefined timeframe. If the Sequencer fails to process these priority requests in time, the system automatically triggers **Escape Hatch mode**. In this state, the Lighter Core smart contract freezes entirely. Users can then leverage Ethereum-posted data blobs to reconstruct their account state and generate succinct proofs of ownership (balances, positions, pool shares). These proofs allow users to withdraw the full value of their assets directly on Ethereum, with no reliance on off-chain coordination—ensuring complete asset security and independence. [PreviousIntroductionchevron-left](https://docs.lighter.xyz/) [NextLIT Utilitychevron-right](https://docs.lighter.xyz/about-lighter/lit-utility) Last updated 2 months ago * [Background](https://docs.lighter.xyz/about-lighter/technical-architecture-lighter-core#background) * [Lighter Core](https://docs.lighter.xyz/about-lighter/technical-architecture-lighter-core#lighter-core) sun-brightdesktopmoon sun-brightdesktopmoon --- # LIT Utility | Lighter Docs ### [hashtag](https://docs.lighter.xyz/about-lighter/lit-utility#staking) Staking The **LIT Staking Pool** ([https://app.lighter.xyz/stakingarrow-up-right](https://app.lighter.xyz/staking) ) is designed to align long-term participants with the core economics of the protocol. By staking LIT, participants gain access to platform benefits aligned with how they interact with the exchange. Unstaking is subject to a 3-day lockup period. Active Staking Programs: * LLP Access * Staking APR #### [hashtag](https://docs.lighter.xyz/about-lighter/lit-utility#llp-access) LLP Access As part of our approach to offering access to niche financial products, the Lighter Liquidity Pool (LLP) is now exclusively accessible to LIT stakers. For every 1 LIT staked, participants may deposit up to 10 USDC into the LLP. #### [hashtag](https://docs.lighter.xyz/about-lighter/lit-utility#staking-apr) Staking APR Staking participants currently earn APR through staking rewards. In the short term, Lighter is bootstrapping this yield using company funds and pre-TGE revenue. LIT is bought from `0x5E52363E65C99fefC0E356F0DC6c37b75bf8FC91` for these rewards. Soon staking yield will be funded by dedicated staking programs. One example currently in development will allow participants who do not use certain staking benefits ([such as trading fee discountsarrow-up-right](https://app.gitbook.com/o/UL2QKgoUbvRiSpqVpgNb/s/XuISSHTfjHCg60BNss6v/~/edit/~/changes/61/trading/trading-fees#fee-discounts-for-premium-accounts-via-staking-coming-soon) ) to transfer those benefits to others. Participants seeking access to specific fee tiers will pay upfront for these rights, and that revenue will be distributed to LIT stakers as yield. ### [hashtag](https://docs.lighter.xyz/about-lighter/lit-utility#buybacks) Buybacks LIT is bought back by the protocol using trading fee revenue. Buybacks are executed via daily 24-hour TWAPs, with the flexibility to use shorter timeframes depending on market conditions. The treasury account that conducts these is `0x0000000000000000000000000000000000000000` [PreviousTechnical Architecture: Lighter Corechevron-left](https://docs.lighter.xyz/about-lighter/technical-architecture-lighter-core) [NextTrading Feeschevron-right](https://docs.lighter.xyz/trading/trading-fees) Last updated 2 months ago * [Staking](https://docs.lighter.xyz/about-lighter/lit-utility#staking) * [Buybacks](https://docs.lighter.xyz/about-lighter/lit-utility#buybacks) sun-brightdesktopmoon sun-brightdesktopmoon --- # LIT Fee Credits | Lighter Docs The LIT Fee Credits program is designed to support market participants making use of Premium Accounts that have not yet committed to staking. Instead of staking the full amount required for a higher discount tier, users will be able to buy Credits, which will count toward a desired fee and latency tier. For example, a participant with 100,000 LIT staked may use an additional 200,000 staked LIT via LIT Fee Credits to qualify for the next staking tier. #### [hashtag](https://docs.lighter.xyz/trading/trading-fees/lit-fee-credits#how-it-works) How it Works Participants must acquire LIT if they do not already hold it and navigate to the LIT Fee Credits section on the Staking page. There, they can select the desired credit amount and duration, which determine the applicable trading tier. Upon confirming an L1 signature and completing the upfront LIT payment, the selected tier is activated. All proceeds from the LIT Fee Credits program are distributed to LIT stakers. The upfront fee is streamed as daily rewards over the full duration of the access period. [PreviousTrading Feeschevron-left](https://docs.lighter.xyz/trading/trading-fees) [NextUnified Trading Accountschevron-right](https://docs.lighter.xyz/trading/unified-trading-accounts) Last updated 1 month ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Trading Fees | Lighter Docs For both perpetual futures and spot markets, Lighter currently charges no maker or taker fees for Standard Accounts, allowing all participants to trade across all markets free of charge. Premium Accounts are subject to maker and taker fees, with the option to receive fee discounts by staking LIT. ### [hashtag](https://docs.lighter.xyz/trading/trading-fees#account-types) Account Types #### [hashtag](https://docs.lighter.xyz/trading/trading-fees#standard-account-default-trade-for-free) Standard Account (Default) — Trade for free. * Fees: 0 maker / 0 taker * Taker latency: 300ms * Maker latency: 200ms * Cancel latency: 200ms #### [hashtag](https://docs.lighter.xyz/trading/trading-fees#premium-accounts-opt-in-subject-to-staking-based-fee-tiers) Premium Accounts (Opt-In) — **Subject to Staking-based Fee Tiers** For Premium Accounts, all order cancelations & Post Only order placements not subject to any additional latency. For this account type, please consider the [volume quota programarrow-up-right](https://apidocs.lighter.xyz/docs/volume-quota-program) . Staked LIT Maker/Taker Fee Discount Maker Fee Taker Fee Taker Latency Latency Improvement 0 0.0040% 0.0280% 200 ms 1,000 2.5% 0.0039% 0.0273% 195 ms 2.5% 3,000 5% 0.0038% 0.0266% 190 ms 5% 10,000 10% 0.0036% 0.0252% 180 ms 10% 30,000 15% 0.0034% 0.0238% 170 ms 15% 100,000 20% 0.0032% 0.0224% 160 ms 20% 300,000 25% 0.0030% 0.0210% 150 ms 25% 500,000 30% 0.0028% 0.0196% 140 ms 30% * * * ### [hashtag](https://docs.lighter.xyz/trading/trading-fees#fee-discounts-for-premium-accounts-via-staking) Fee Discounts for Premium Accounts via Staking All Premium Account fees and latency will be eligible for staking discounts. Staking discounts will be applied at the L1 address level, where the total staked LIT is calculated as the combined stake across the main account and all associated sub-accounts. As a result, the main account and its sub-accounts will share the same staking tier, determined by the aggregated LIT stake. #### [hashtag](https://docs.lighter.xyz/trading/trading-fees#rate-limits-considerations) Rate Limits Considerations We recognize that many participants distribute trading activity across multiple addresses due to operational or rate-limit considerations. To avoid disrupting existing workflows, rate limits will be adjusted to allow users to consolidate activity through sub-accounts without any downside. In addition, participants may provide a list of addresses to the Lighter team, enabling all associated accounts to share a single tier based on the total staked LIT across those addresses. We also plan to introduce in-app wallet linking for fee-discount purposes soon. [PreviousLIT Utilitychevron-left](https://docs.lighter.xyz/about-lighter/lit-utility) [NextLIT Fee Creditschevron-right](https://docs.lighter.xyz/trading/trading-fees/lit-fee-credits) Last updated 1 month ago * [Account Types](https://docs.lighter.xyz/trading/trading-fees#account-types) * [Fee Discounts for Premium Accounts via Staking](https://docs.lighter.xyz/trading/trading-fees#fee-discounts-for-premium-accounts-via-staking) sun-brightdesktopmoon sun-brightdesktopmoon --- # Real World Assets (RWAs) | Lighter Docs RWAs are tradeable 24/7 and include commodities, equities, and fixed income markets. The Experimental Liquidity Provider (XLP) previously served as the primary liquidity provider for these markets. The Lighter Liquidity Provider (LLP) now manages liquidity and handles liquidations. RWAs are subject to liquidations in the same manner as all other markets on the exchange. #### [hashtag](https://docs.lighter.xyz/trading/real-world-assets-rwas#leverage) Leverage Leverage does not change outside trading hours. A 10× long position on Gold (XAU) remains unchanged, and there is no requirement to reduce exposure. However, price volatility may increase at market open. #### [hashtag](https://docs.lighter.xyz/trading/real-world-assets-rwas#market-structure) Market structure All RWA markets support both Isolated and Cross Margin modes. However, opening RWA positions under Cross Margin is currently restricted due to the experimental and volatile nature of these markets. [PreviousOrder Types & Matchingchevron-left](https://docs.lighter.xyz/trading/order-types-and-matching) [NextRWA Pricing Mechanismchevron-right](https://docs.lighter.xyz/trading/real-world-assets-rwas/rwa-pricing-mechanism) Last updated 1 month ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Futures Contract Price Rolling Mechanism | Lighter Docs Some markets (WTI, NATGAS, BRENTOIL) use futures contracts as their underlying prices. To handle contract expirations, prices are gradually transitioned from the current month’s contract to the next month’s contract between the 5th and 10th business day. Each day at 5:30 PM ET for WTI and NATGAS and at 7:00 PM ET for BRENTOIL, 20% of the price shifts from the current month to the next month. This means the price moves progressively, starting at 100% current month and ending at 100% next month over the five-day window. Note: the underlying markets for WTI and NATGAS are closed between 5:00 PM ET and 6:00 PM ET, while for BRENTOIL they are closed between 6:00 PM ET and 8:00 PM ET (11PM London time - 1AM London time). #### [hashtag](https://docs.lighter.xyz/trading/real-world-assets-rwas/futures-contract-price-rolling-mechanism#wti-and-natgas-roll-schedule) WTI & NATGAS roll schedule Date Time Front-Month Next-Month 2026-04-07 5:30 PM ET 100% 0% 2026-04-08 5:30 PM ET 80% 20% 2026-04-09 5:30 PM ET 60% 40% 2026-04-10 5:30 PM ET 40% 60% 2026-04-13 5:30 PM ET 20% 80% 2026-04-14 5:30 PM ET 0% 100% #### [hashtag](https://docs.lighter.xyz/trading/real-world-assets-rwas/futures-contract-price-rolling-mechanism#brentoil-roll-schedule) BRENTOIL roll schedule Date Time Front-Month Next-Month 2026-04-07 7:00PM ET 100% 0% 2026-04-08 7:00PM ET 80% 20% 2026-04-09 7:00PM ET 60% 40% 2026-04-10 7:00PM ET 40% 60% 2026-04-13 7:00PM ET 20% 80% 2026-04-14 7:00PM ET 0% 100% [PreviousRWA Pricing Mechanismchevron-left](https://docs.lighter.xyz/trading/real-world-assets-rwas/rwa-pricing-mechanism) [NextMarket Specificationschevron-right](https://docs.lighter.xyz/trading/real-world-assets-rwas/market-specifications) Last updated 1 day ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Order Types & Matching | Lighter Docs ### [hashtag](https://docs.lighter.xyz/trading/order-types-and-matching#market-orders) **Market Orders** A market order is an order that executes immediately at the current market price for a given position size. Users can set an average execution price to limit how much their execution price can deviate from the mid-price of the order book. If there is insufficient liquidity in the market, or if subsequent fills would cause the average execution price to exceed the set limit, the market order will be partially filled. #### [hashtag](https://docs.lighter.xyz/trading/order-types-and-matching#execution-options) Execution options * The **Reduce-Only** execution option ensures that changes to the position only move it closer to zero, regardless of whether the position is positive or negative. ### [hashtag](https://docs.lighter.xyz/trading/order-types-and-matching#limit-orders) **Limit Orders** A limit order is a buy or sell order that executes at the limit price user sets or better. Limit orders also support enhanced order options like expiration and execution instructions. #### [hashtag](https://docs.lighter.xyz/trading/order-types-and-matching#execution-options-1) Execution options * The **Post-Only** execution option ensures that a limit order is placed only as a maker order. If there are crossing orders on the opposite side of the order book at the time of placement, the exchange automatically cancels the post-only order to prevent it from becoming a taker order. If no crossing orders are present, the order is inserted into the order book. This guarantees that the order acts only as a maker and will pay maker fees for any trades. * The **Reduce-Only** limit order reduces the position size towards zero, executing partially if the order size exceeds the position, with any remaining portion canceled once the position reaches zero. #### [hashtag](https://docs.lighter.xyz/trading/order-types-and-matching#time-in-force) Time in Force Time-in-force options allow users specify the lifetime of an order. * **Good ‘Til Time** option allows users to specify a time until which the order remains valid. If the expiry time of an active order in the order book passes, the exchange automatically cancels the order. * **The Immediate or Cancel** option automatically cancels an order if it is not immediately filled. These orders are not placed into the order book as maker orders. ### [hashtag](https://docs.lighter.xyz/trading/order-types-and-matching#stop-loss-and-take-profit-orders) Stop-loss and Take-profit Orders A stop-loss (SL) order is an instruction to sell (or buy) an asset when its price hits a **trigger price**, with the goal of limiting potential losses. On the other hand, a take-profit (TP) order specifies a trigger price at which an asset will be sold (or bought) to lock in gains. Both orders are automatically triggered. In addition, there are **stop-loss limit orders** and **take-profit limit orders**. A **stop-loss limit order** combines the stop-loss trigger with a limit order, ensuring the asset will be sold (or bought) only at the specified price or better once the mark price reaches the trigger price. Similarly, a **take-profit limit order** sets a price at which the asset will be sold (or bought) to secure profits, but only if the market price meets or exceeds the trigger price. These limit orders offer more control over the execution price compared to standard stop-loss or take-profit orders. #### [hashtag](https://docs.lighter.xyz/trading/order-types-and-matching#trigger-conditions) Trigger Conditions Stop-Loss Sell Order & Take-Profit Buy Order: markPrice≤triggerPrice\\text{markPrice} \\le \\text{triggerPrice}markPrice≤triggerPrice Stop-Loss Buy Order & Take-Profit Sell Order: markPrice≥triggerPrice\\text{markPrice} \\ge \\text{triggerPrice}markPrice≥triggerPrice #### [hashtag](https://docs.lighter.xyz/trading/order-types-and-matching#time-in-force-1) Time in Force * The **Good ‘Til Time** option is available for SL/TP limit orders and it allows users to set an expiration time, after which the order is automatically canceled if not triggered. #### [hashtag](https://docs.lighter.xyz/trading/order-types-and-matching#execution-options-2) Execution options * The **Reduce-Only** option works the same way as for Limit Orders, ensuring the position size decreases towards zero and canceling the order if further fills would cause the position to exceed zero. ### [hashtag](https://docs.lighter.xyz/trading/order-types-and-matching#twap) TWAP TWAP (Time-Weighted Average Price) Orders are a type of order designed to execute a large order over a specified time period at an average price, aiming to minimize the market impact of the order. The goal is to match the average price of the asset over the execution period, rather than executing all at once at a specific price. #### [hashtag](https://docs.lighter.xyz/trading/order-types-and-matching#running-time) Running Time The running time option for a TWAP order defines the total time over which the order will be filled. Every 30 seconds, a new market order will be placed with a size of: order size\=total amount#orders\\text{order size} = \\frac{\\text{total amount}}{\\text{\\#orders}}order size\=#orderstotal amount​ where **#orders** is calculated as: #orders\=execution duration30s+1\\text{\\#orders} = \\frac{\\text{execution duration}}{30\\text{s}} + 1#orders\=30sexecution duration​+1 #### [hashtag](https://docs.lighter.xyz/trading/order-types-and-matching#execution-options-3) Execution options * The **Reduce-Only** option ensures that a trade is executed only if it reduces the position towards 0. The TWAP order will not be canceled when the position reaches 0; it will continue attempting to execute until it expires, but a trade will only happen if the position moves closer to 0. Partial fills may occur during this process. * * * ### [hashtag](https://docs.lighter.xyz/trading/order-types-and-matching#order-margin) Order Margin The Matching Engine performs risk checks after every trade to ensure that the health of trading accounts is maintained: 1. Healthy Accounts: A trade must not cause a currently healthy account to become unhealthy. 2. Unhealthy Accounts: If an account is unhealthy prior to a trade, the trade must improve the account's health. If a trade violates these rules, the Matching Engine auto-cancels the corresponding order(s) that violates the risk checks. To ensure the order book accurately reflects orders that are likely to be executable (i.e., orders that wouldn't trigger an auto-cancellation upon trade execution), the Risk Engine employs a margining system for limit orders placed onto the book. Each limit order consumes a certain amount of Order Margin. Margin consumed by these orders does not affect the position margin; it is merely a checking mechanism used only when placing new orders. Order margin usage does not affect liquidations, etc. Available order margin is calculated as follows: orderValueask/bid\=∑i∈activeLimitOrdersask/bid(limitPricei×orderSizei)orderMarginsameSide\=orderValueask/bidleverageorderMarginoppositeSide\={orderValueask/bid−2×(∣position∣×markPrice)leverageif Cross MarginorderValueask/bidleverage−TAVisolated−IMRisolatedif Isolated MarginavailableOrderMarginmi\=TAVcross−IMRcross−Mother−McurrentwhereMother\=∑i≠mi\[max⁡(orderMargini,sameSide,orderMargini,oppositeSide)\]Mcurrent\={orderMarginmi,sameSideif New Order Side\=Position SideorderMarginmi,oppositeSideif New Order Side≠Position Side\\begin{align\*} \\text{orderValue}\_{\\text{ask/bid}} &= \\sum\_{i \\in \\text{activeLimitOrders}\_{\\text{ask/bid}}} (\\text{limitPrice}\_i \\times \\text{orderSize}\_i) \\\\\[1em\] \\text{orderMargin}\_{\\text{sameSide}} &= \\frac{\\text{orderValue}\_{\\text{ask/bid}}}{\\text{leverage}} \\\\\[1em\] \\text{orderMargin}\_{\\text{oppositeSide}} &= \\begin{cases} \\frac{ \\text{orderValue}\_{\\text{ask/bid}} - 2 \\times (|\\text{position}| \\times \\text{markPrice} ) } {\\text{leverage}} & \\text{if Cross Margin} \\\\\[1.5ex\] \\frac{ \\text{orderValue}\_{\\text{ask/bid}}}{\\text{leverage}} - \\text{TAV}\_{\\text{isolated}} - \\text{IMR}\_{\\text{isolated}} & \\text{if Isolated Margin} \\end{cases} \\\\\[1.5em\] \\text{availableOrderMargin}\_{\\text{mi}} &= \\text{TAV}\_{\\text{cross}} - \\text{IMR}\_{\\text{cross}} - \\mathbf{M}\_{\\text{other}} - \\mathbf{M}\_{\\text{current}} \\end{align\*} \\\\\[0.5em\] \\text{where} \\\\ \\begin{align\*} \\mathbf{M}\_{\\text{other}} &= \\sum\_{i \\neq \\text{mi}} \\left\[ \\max\\left( \\text{orderMargin}\_{i,\\text{sameSide}}, \\text{orderMargin}\_{i,\\text{oppositeSide}} \\right) \\right\] \\\\\[0.5em\] \\mathbf{M}\_{\\text{current}} &= \\begin{cases} \\text{orderMargin}\_{\\text{mi},\\text{sameSide}} & \\text{if New Order Side} = \\text{Position Side} \\\\ \\text{orderMargin}\_{\\text{mi},\\text{oppositeSide}} & \\text{if New Order Side} \\neq \\text{Position Side} \\end{cases} \\end{align\*}orderValueask/bid​orderMarginsameSide​orderMarginoppositeSide​availableOrderMarginmi​​\=i∈activeLimitOrdersask/bid​∑​(limitPricei​×orderSizei​)\=leverageorderValueask/bid​​\=⎩⎨⎧​leverageorderValueask/bid​−2×(∣position∣×markPrice)​leverageorderValueask/bid​​−TAVisolated​−IMRisolated​​if Cross Marginif Isolated Margin​\=TAVcross​−IMRcross​−Mother​−Mcurrent​​whereMother​Mcurrent​​\=i\=mi∑​\[max(orderMargini,sameSide​,orderMargini,oppositeSide​)\]\={orderMarginmi,sameSide​orderMarginmi,oppositeSide​​if New Order Side\=Position Sideif New Order Side\=Position Side​​ * * * ### [hashtag](https://docs.lighter.xyz/trading/order-types-and-matching#price-checks) Price Checks Price checks are used to guarantee that order prices remain within acceptable and realistic ranges, helping to prevent erroneous or extreme values. **Fat Finger Prevention Check** This check ensures that the price of a limit order is within a reasonable range to prevent errors. * For an **ask** order, the price must be at least: max(MarkPrice,bestBid)×0.95max(MarkPrice, bestBid)×0.95max(MarkPrice,bestBid)×0.95 * For a **bid** order, the price must be at most: min(MarkPrice,bestAsk)×1.05 min(MarkPrice, bestAsk)×1.05min(MarkPrice,bestAsk)×1.05 If the **bestBid** or **bestAsk** does not exist, only the **markPrice** is used for validation. The same check applies to SL/TP limit orders, but in this case, the _TriggerPrice_ set in the order is used instead of the _MarkPrice_. * * * ### [hashtag](https://docs.lighter.xyz/trading/order-types-and-matching#order-matching) Order Matching When matching orders, Lighter uses a price-time priority system. When a new order is placed as the taker, the Lighter Matching Engine finds the highest-priority order on the opposite side of the order book, meaning the order with the best price. If there are multiple orders with the same best price, the oldest one is selected. The matching engine then executes the trade at the maker’s price. If the taker order is not fully filled, this process continues until the taker order is completely filled or until there are no more crossing orders. If the taker order is a limit order that needs to be placed in the order book, the Lighter Matching Engine inserts it on the corresponding side. circle-info The Lighter Matching Engine ensures that price-time priority is always respected by utilizing SNARKs to generate cryptographic proofs for fair order book matching execution. As a result, the Lighter Matching Engine operates as a trustless service, bound to function in a predefined way, making it mathematically impossible for it to act maliciously. [PreviousUnified Trading Accountschevron-left](https://docs.lighter.xyz/trading/unified-trading-accounts) [NextReal World Assets (RWAs)chevron-right](https://docs.lighter.xyz/trading/real-world-assets-rwas) Last updated 1 month ago * [Market Orders](https://docs.lighter.xyz/trading/order-types-and-matching#market-orders) * [Limit Orders](https://docs.lighter.xyz/trading/order-types-and-matching#limit-orders) * [Stop-loss and Take-profit Orders](https://docs.lighter.xyz/trading/order-types-and-matching#stop-loss-and-take-profit-orders) * [TWAP](https://docs.lighter.xyz/trading/order-types-and-matching#twap) * [Order Margin](https://docs.lighter.xyz/trading/order-types-and-matching#order-margin) * [Price Checks](https://docs.lighter.xyz/trading/order-types-and-matching#price-checks) * [Order Matching](https://docs.lighter.xyz/trading/order-types-and-matching#order-matching) sun-brightdesktopmoon sun-brightdesktopmoon --- # Unified Trading Accounts | Lighter Docs ![](https://docs.lighter.xyz/~gitbook/image?url=https%3A%2F%2F1186887628-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FXuISSHTfjHCg60BNss6v%252Fuploads%252FivSDmtDOvErQNQ2kTXGl%252Fcollateral-docs-header.png%3Falt%3Dmedia%26token%3D36147d68-0707-4b82-9121-8d472885b2da&width=768&dpr=3&quality=100&sign=125ea154&sv=2) #### [hashtag](https://docs.lighter.xyz/trading/unified-trading-accounts#unified-trading-account-uta) Unified Trading Account (UTA) Unified Trading Accounts (UTA) enables unified margin on Spot and Perpetuals USDC balances. This functionality represents the first step toward supporting additional Spot assets as collateral in perpetual markets. #### [hashtag](https://docs.lighter.xyz/trading/unified-trading-accounts#simple-trading-account) Simple Trading Account Simple Trading Accounts**,** perpetual and spot balances are maintained separately. Perpetual positions may only use settlement assets as collateral. Cross-margining applies exclusively within perpetual markets and does not extend to spot balances. [PreviousLIT Fee Creditschevron-left](https://docs.lighter.xyz/trading/trading-fees/lit-fee-credits) [NextOrder Types & Matchingchevron-right](https://docs.lighter.xyz/trading/order-types-and-matching) Last updated 1 month ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Public Pools | Lighter Docs Public Pools allow participants to combine funds under a designated operator who trades on their behalf. Whitelisted users can create a Public Pools to attract participants and manage pooled capital. Profits are distributed to participants after deducting the operator’s fee. #### [hashtag](https://docs.lighter.xyz/trading/public-pools#pool-operators) Pool Operators Operators are, currently, whitelisted by the protocol to run strategies. Trading is conducted via a Sub Account in the Operator's account. Considerations: * **Operator Fee:** The percentage of profits allocated to the operator upon participant withdrawals as compensation for managing the pool. * **Minimum Operator Share:** The minimum ownership percentage the operator must maintain in the pool to remain aligned with its performance. For example, if the minimum operator share is set at 10% and the operator deposits 10,000 USDC, participants may deposit up to 90,000 USDC. * **Isolated Margin:** Public Pools do not support isolated positions. #### [hashtag](https://docs.lighter.xyz/trading/public-pools#pool-depositors) Pool Depositors Depositors allocate capital to pools running strategies they are interested in. When depositing into a Public Pool, depositors receive pool shares, which are redeemed upon withdrawal. Unlike many DeFi vaults, Public Pools do not impose lockup periods, and funds can be withdrawn at any time. [PreviousMarket Specificationschevron-left](https://docs.lighter.xyz/trading/real-world-assets-rwas/market-specifications) [NextContract Specificationschevron-right](https://docs.lighter.xyz/trading/contract-specifications) Last updated 1 month ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Prelaunch Markets | Lighter Docs ### [hashtag](https://docs.lighter.xyz/trading/prelaunch-markets#market-structure) Market structure All prelaunch markets will operate in **isolated mode only**. It is not possible to open positions in cross-margin mode due to the experimental and volatile nature of these markets. ### [hashtag](https://docs.lighter.xyz/trading/prelaunch-markets#xlp) XLP Because prelaunch markets are volatile, we are taking precautions in deploying them. LLP will not act as a market maker on these markets. Instead, a new pool called **XLP** (Experimental Liquidity Provider) will offer liquidity for these markets. LLP will have no exposure to prelaunch markets. XLP will act solely as a liquidity provider for these markets, without a special role in the liquidation flow. More details on liquidations can be found below. ### [hashtag](https://docs.lighter.xyz/trading/prelaunch-markets#liquidations) Liquidations Due to the nature of prelaunch markets and the addition of XLP, the liquidation flow is different. **Prelaunch markets have no liquidation fee.** If a user needs to be liquidated — that is, when their margin falls below the **Maintenance Margin** but remains above the **Close-Out Margin** — the exchange will send an **Immediate-or-Cancel (IoC)** order on behalf of the user to close the position. This will not have a fee associated with it. If the user falls below the **Close-Out Margin**, they will be directly **Auto-Deleveraged (ADL)**. This flow differs from crypto markets, where the entire account would typically be transferred to LLP. In normal cases, ADL is used only when LLP does not have sufficient funds to cover the losses of a bankrupt account. **Note:** ADL occurs when a user is below the Close-Out Margin. This does not imply that the user is bankrupt. Because of this, the counterparty (the trader on the other side of the ADL) receives a more favorable execution price. [PreviousContract Specificationschevron-left](https://docs.lighter.xyz/trading/contract-specifications) [NextLiquidations & LLP (Insurance Fund)chevron-right](https://docs.lighter.xyz/trading/liquidations-and-llp-insurance-fund) Last updated 5 months ago * [Market structure](https://docs.lighter.xyz/trading/prelaunch-markets#market-structure) * [XLP](https://docs.lighter.xyz/trading/prelaunch-markets#xlp) * [Liquidations](https://docs.lighter.xyz/trading/prelaunch-markets#liquidations) sun-brightdesktopmoon sun-brightdesktopmoon --- # RWA Pricing Mechanism | Lighter Docs RWA pricing is derived from two primary sources: external oracle feeds (e.g., Chainlink, Pyth, Stork, and other exchanges) and internal pricing. * The index price is calculated according to the pricing methodology defined below. * The only change is that the `cexPrices` component is replaced with the pricing methodology defined below. ### [hashtag](https://docs.lighter.xyz/trading/real-world-assets-rwas/rwa-pricing-mechanism#pricing-transition) **Pricing Transition** External oracle feeds are the primary price source. When oracle data becomes stale, the pricing mechanism gradually shifts from oracle-based pricing to internal pricing. As soon as an external price is available, the internal price is going to instantly converge to it. Weights are normalized across sources. On each tick where an external price is not available: 1. Apply exponential decay to the oracle source 2. Allocate the remaining weight to the internal source #### [hashtag](https://docs.lighter.xyz/trading/real-world-assets-rwas/rwa-pricing-mechanism#reweighing-formula-stale-oracle-prices) **Reweighing Formula (stale oracle prices):** woracle(t)\=woracle(t−1)⋅e−Δtτoraclew\_{\\text{oracle}}(t) = w\_{\\text{oracle}}(t - 1)\\cdot e^{-\\frac{\\Delta t}{\\tau\_{\\text{oracle}}}}woracle​(t)\=woracle​(t−1)⋅e−τoracle​Δt​ winternal(t)\=1−winternal(t)w\_{\\text{internal}}(t) = 1 - w\_{\\text{internal}}(t)winternal​(t)\=1−winternal​(t) Where: * Δt: time elapsed since the last update * τ\_active: source-specific time constant #### [hashtag](https://docs.lighter.xyz/trading/real-world-assets-rwas/rwa-pricing-mechanism#time-constants) Time Constants The time constant varies by price type (index vs. mark). * τmark\=4 minutes\\tau\_{\\text{mark}} = 4 \\text{ minutes}τmark​\=4 minutes * τindex\=1 hours\\tau\_{\\text{index}} = 1 \\text{ hours}τindex​\=1 hours Note that the transition from internal to external is instant. * * * ### [hashtag](https://docs.lighter.xyz/trading/real-world-assets-rwas/rwa-pricing-mechanism#internal-pricing) Internal Pricing Internal pricing is derived from order book impact prices, smoothed using a time-weighted Exponential Moving Average (EMA). #### [hashtag](https://docs.lighter.xyz/trading/real-world-assets-rwas/rwa-pricing-mechanism#time-weighted-ema) Time-Weighted EMA EMAt\=α⋅Pt+(1−α)⋅EMAt−1EMA\_t = \\alpha \\cdot P\_t + (1 - \\alpha) \\cdot EMA\_{t-1}EMAt​\=α⋅Pt​+(1−α)⋅EMAt−1​ α\=1−e−Δt/τ\\alpha = 1 - e^{- \\Delta t / \\tau}α\=1−e−Δt/τ * **Pₜ** — current impact price * **τ** — smoothing time constant * **Δt** — time since last update * * * ### [hashtag](https://docs.lighter.xyz/trading/real-world-assets-rwas/rwa-pricing-mechanism#index-price) Index Price For index price we set: * **τ = 1 hours** The internal index price is capped relative to the last oracle price and the leverage of the market: * **Indexᵢₙₜₑᵣₙₐₗ ∈ \[ P\_oracle · (1 − 1/L\*0.75 + 0.5%), P\_oracle · (1 + 1/L\*0.75 − 0.5%) \]** * Where **L** is leverage. * * * ### [hashtag](https://docs.lighter.xyz/trading/real-world-assets-rwas/rwa-pricing-mechanism#mark-price-component) Mark Price Component For mark price we set: * **τ = 8 minutes** The mark price is capped relative to the last oracle price and the leverage of the market: * **Markᵢₙₜₑᵣₙₐₗ ∈ \[ P\_oracle · (1 − 1/L\*0.75), P\_oracle · (1 + 1/L\*0.75) \]** A simulation: ![](https://docs.lighter.xyz/~gitbook/image?url=https%3A%2F%2F1186887628-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FXuISSHTfjHCg60BNss6v%252Fuploads%252F2WyZ6cI7PiskdMA8AKUo%252Fimage.png%3Falt%3Dmedia%26token%3Dc845ccbe-203f-40a0-9d72-8e0a9ba464c8&width=768&dpr=3&quality=100&sign=ecef2d34&sv=2) * * * ### [hashtag](https://docs.lighter.xyz/trading/real-world-assets-rwas/rwa-pricing-mechanism#non-usd-quoted-perpetual-contracts) Non-USD\* Quoted Perpetual Contracts **Korean equities:** Contracts are settled in USDC, while the reference price of the underlying is quoted in KRW. The contract tracks the performance of the underlying asset in KRW, but each full contract is priced and settled in USDC. In practice, this means you pay the displayed contract price in USDC, even though the market follows the underlying’s KRW price movements. [PreviousReal World Assets (RWAs)chevron-left](https://docs.lighter.xyz/trading/real-world-assets-rwas) [NextFutures Contract Price Rolling Mechanismchevron-right](https://docs.lighter.xyz/trading/real-world-assets-rwas/futures-contract-price-rolling-mechanism) Last updated 8 days ago * [Pricing Transition](https://docs.lighter.xyz/trading/real-world-assets-rwas/rwa-pricing-mechanism#pricing-transition) * [Internal Pricing](https://docs.lighter.xyz/trading/real-world-assets-rwas/rwa-pricing-mechanism#internal-pricing) * [Index Price](https://docs.lighter.xyz/trading/real-world-assets-rwas/rwa-pricing-mechanism#index-price) * [Mark Price Component](https://docs.lighter.xyz/trading/real-world-assets-rwas/rwa-pricing-mechanism#mark-price-component) * [Non-USD\* Quoted Perpetual Contracts](https://docs.lighter.xyz/trading/real-world-assets-rwas/rwa-pricing-mechanism#non-usd-quoted-perpetual-contracts) sun-brightdesktopmoon sun-brightdesktopmoon --- # API | Lighter Docs You can find the Lighter API Documentation here: [https://apidocs.lighter.xyz/docs/get-startedarrow-up-right](https://apidocs.lighter.xyz/docs/get-started) You can join the Telegram API Channel for updates here: [https://t.me/lighter\_api\_updatesarrow-up-right](https://t.me/lighter_api_updates) ### [hashtag](https://docs.lighter.xyz/trading/api#api-keys) API Keys Each account and sub-account on Lighter may interact with the exchange using Lighter API keys. These API keys are owned by the account and are used to sign requests when interacting with the exchange. Signed requests are verified by the exchange to confirm authorization by the API key holder and the associated account. Each account or sub-account may register up to 256 API keys. ### [hashtag](https://docs.lighter.xyz/trading/api#sub-accounts) Sub-Accounts To create a Lighter account, users must have an Ethereum wallet. Using this wallet, users register a main account by signing a message that associates their Ethereum address with Lighter. Assets can then be deposited by sending a transaction from the wallet to Lighter’s smart contracts. In addition to the main account, users may create multiple sub-accounts linked to the same Ethereum wallet. [PreviousSelf-Trade Preventionchevron-left](https://docs.lighter.xyz/trading/self-trade-prevention) [NextPoints Programchevron-right](https://docs.lighter.xyz/points-program) Last updated 15 days ago * [API Keys](https://docs.lighter.xyz/trading/api#api-keys) * [Sub-Accounts](https://docs.lighter.xyz/trading/api#sub-accounts) sun-brightdesktopmoon sun-brightdesktopmoon --- # Self-Trade Prevention | Lighter Docs Lighter imposes a self-trade prevention mechanism. Trades between the same account cancel the resting order (maker) instead of executing the respective trade. Without this mechanism, self-trades would result in no position change and fees being paid unnecessarily. [PreviousFair Price Markingchevron-left](https://docs.lighter.xyz/trading/fair-price-marking) [NextAPIchevron-right](https://docs.lighter.xyz/trading/api) Last updated 1 month ago sun-brightdesktopmoon sun-brightdesktopmoon --- # LLP Strategies | Lighter Docs LLP funds are held within a single account, which acts as the counterparty to all LLP trading and liquidations. For additional details on Liquidations and ADL, please refer to the [relevant sectionarrow-up-right](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/liquidations-and-llp-insurance-fund) of the documentation. Under the existing structure, **Auto-Deleverage (ADL) events are fully backstopped by LLP,** meaning that liquidity providers absorb the associated risk. LLP Strategies allow collateral to be allocated across distinct strategy buckets (that now includes RWAs, too). Each market is assigned to a specific strategy. From a system perspective, each strategy behaves similarly to a segregated collateral shard (comparable to a sub-account for risk purposes). However, strategies are not separate accounts — all positions remain under the LLP — but risk and losses are isolated at the strategy level. For example, LLP may allocate: * One strategy for Crypto Perpetuals * One strategy for FX * One strategy for Equities / RWAs The exact market-to-strategy mappings will be communicated separately. Under this framework, if a given strategy has $1M in allocated collateral, its maximum loss exposure is limited to that $1M. If the allocated collateral is fully depleted, the strategy would be subject to ADL, while collateral allocated to other strategies remains unaffected. ### [hashtag](https://docs.lighter.xyz/trading/liquidations-and-llp-insurance-fund/llp-strategies#rwas-and-llp-strategies) RWAs & LLP Strategies The Real World Assets (RWA) perpetual markets are now subject to standard liquidation fees, consistent with all other markets, as LLP serves as the primary protocol liquidity provider. [PreviousLiquidations & LLP (Insurance Fund)chevron-left](https://docs.lighter.xyz/trading/liquidations-and-llp-insurance-fund) [NextFundingchevron-right](https://docs.lighter.xyz/trading/funding) Last updated 1 month ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Funding Rate Rebates | Lighter Docs The Funding Rate Rebates program enables traders to receive up to a 15% rebate on funding payments incurred on positions paying funding. This program applies to all RWA markets listed on Lighter. The position receiving funding remains unaffected by this program. ### [hashtag](https://docs.lighter.xyz/trading/funding/funding-rate-rebates#how-it-works) How it works Funding Fee Rebates are based on two components: having a [Premium Account](https://docs.lighter.xyz/trading/trading-fees#premium-fee-tiers) and staking. Premium Account traders automatically receive a 6% discount per hourly funding. A trader can earn an additional 9% discount through staking, for a total discount of 15%. The staking bonus scales with the amount of LIT staked and is capped at 9% when staking 50,000 LIT. **While funding rates remain market-driven, the rebate benefit a trader receives will not exceed the rebate benefit given in case the funding rate would be equal to the** [**interest rate component.**](https://docs.lighter.xyz/trading/funding#funding-rate-calculation) Examples: Assume the following: * Position value: **$1,000** * Discount percentage: **15%** * Interest rate component: **0.01%** The funding amount eligible for rebate is calculated as: > **min(Funding Rate, Interest Rate Component) × Position Value** The rebate is then: > **Eligible Funding × Discount Percentage** Rewards scale based on the amount of LIT staked. The scaling is controlled by an exponent parameter, currently set to 1, meaning rewards increase linearly up to the 50,000 LIT cap. This parameter may be adjusted in the future to refine the reward curve. #### [hashtag](https://docs.lighter.xyz/trading/funding/funding-rate-rebates#sub-accounts-and-staked-lit) Sub Accounts and Staked LIT Effective staked LIT is calculated on a consolidated basis. Staking across the main account and all associated sub-accounts is aggregated, and funding rate rebates are applied accordingly, subject to the 10% annualized cap. #### [hashtag](https://docs.lighter.xyz/trading/funding/funding-rate-rebates#rebates-distribution) Rebates Distribution Rebates are distributed daily at 00:00 UTC as an L2 transfer to the trader’s account from the Lighter Rebates Fund (`0xc4535ceeA637b3B1bcdf5932603A4DbC00Ad2772`). The Funding History section displays all paid and pending rebates. A payment will be processed only if the amount exceeds $1. [PreviousFundingchevron-left](https://docs.lighter.xyz/trading/funding) [NextPnL And Total Account Valuechevron-right](https://docs.lighter.xyz/trading/pnl-and-total-account-value) Last updated 6 hours ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Funding | Lighter Docs ### [hashtag](https://docs.lighter.xyz/trading/funding#overview) Overview The funding mechanism is a crucial component of perpetual futures trading. It ensures that the price of the perpetual contract closely tracks the underlying asset’s spot price. Unlike traditional futures contracts, perpetual futures do not have an expiration date. To maintain price stability and avoid significant deviations from the spot price, a periodic funding mechanism is implemented. Funding payments occur at each hour mark. Traders holding long and short positions pay or receive a funding fee based on the difference between the contract price and the spot price. These payments are fully peer-to-peer with no fees taken by the exchange. The funding payment for an account position depends on the size and side of the position, as well as the funding rate. The funding rate represents the difference between the mark price of the perpetual futures market and the index price, which is equivalent to the spot market price of the underlying asset. When the funding rate is positive, users with long positions pay a funding fee to users with short positions. When the funding rate is negative, users with short positions pay a fee to users with long positions. ### [hashtag](https://docs.lighter.xyz/trading/funding#funding-rate-calculation) Funding Rate Calculation For each minute at a random time, Lighter calculates the premium of each market, which represents the differentiation of the mark price from the index price for the corresponding market with the following formula: premiumt\=Max(0,Impact Bid Pricet−indext)−Max(0,indext−Impact Ask Pricet)indext\\small premium\_{t} = \\frac{Max(0, \\text{Impact Bid Price}\_{t} - index\_{t}) - Max(0, index\_{t} - \\text{Impact Ask Price}\_{t})}{ index\_{t}}premiumt​\=indext​Max(0,Impact Bid Pricet​−indext​)−Max(0,indext​−Impact Ask Pricet​)​ _Note: For the premium to be positive, i/e: for the funding to be positive and long positions to pay more funding to short positions, the impact bid price needs to be higher then the index price. In the case where_ Impact Bid Pricet≤indext≤Impact Ask Pricet\\text{Impact Bid Price}\_{t} \\leq index\_{t} \\leq \\text{Impact Ask Price}\_{t}Impact Bid Pricet​≤indext​≤Impact Ask Pricet​ _the_ premiumtpremium\_tpremiumt​ _will be 0_ At the end of each hour, a 1-hour premium is calculated as the time-weighted average of the 60 premiums calculated over the course of the last hour. In addition to the premium component, each market has a fixed interest rate component that accounts for the difference in interest rates of the base and quote currencies. The funding rate is then calculated as: premium:\=Average of premiumt since the latest fundingsmallClampedPremium\=InterestRate+premium+clamp⁡(−premium,−SmallClamp,+SmallClamp)fundingRate\=clamp⁡(smallClampedPremium,−BigClamp,+BigClamp)/8whereclamp⁡(x,a,b)\=max⁡(a,  min⁡(b,x))the values used for the majority of the markets are the following:SmallClamp\=0.05% BigClamp\=4% InterestRate\=0.01%\\small premium := \\text{Average of } premium\_{t} \\text{ since the latest funding} \\\\ smallClampedPremium = InterestRate + premium + \\operatorname{clamp}(-premium, -SmallClamp, +SmallClamp) \\\\ fundingRate = \\operatorname{clamp}(smallClampedPremium, -BigClamp, +BigClamp) / 8 \\\\ \\text{where} \\operatorname{clamp}(x,a,b) = \\max\\bigl(a,\\;\\min(b,x)\\bigr) \\\\ \\\\ \\\\ \\text{the values used for the majority of the markets are the following:} \\\\ SmallClamp = 0.05\\%\\ BigClamp = 4\\%\\ InterestRate = 0.01\\%premium:=Average of premiumt​ since the latest fundingsmallClampedPremium\=InterestRate+premium+clamp(−premium,−SmallClamp,+SmallClamp)fundingRate\=clamp(smallClampedPremium,−BigClamp,+BigClamp)/8whereclamp(x,a,b)\=max(a,min(b,x))the values used for the majority of the markets are the following:SmallClamp\=0.05% BigClamp\=4% InterestRate\=0.01% _Note: The_ SmallClampSmallClampSmallClamp _is used to bring the_ premiumpremiumpremium _closer to 0. For example, if the premium would be_ 0.1%0.1\\%0.1%_, the_ smallClampedPremium\=0.01% +0.1% −0.05%\=0.06%smallClampedPremium = 0.01\\% \\ + 0.1\\%\\ - 0.05\\% = 0.06\\%smallClampedPremium\=0.01% +0.1% −0.05%\=0.06%_._ _Note: If_ −SmallClamp≤premium≤+SmallClamp\- SmallClamp \\leq premium \\leq +SmallClamp−SmallClamp≤premium≤+SmallClamp_, then_ fundingRate\=InterestRate/8fundingRate = InterestRate / 8fundingRate\=InterestRate/8_What this mean, is that if the premium is less than 5 basis points, the funding will default to the normal value of 1 basis point per 8 hours._ _Note: The_ BigClampBigClampBigClamp _limits funding payments to_ 4%4\\%4% _per 8 hours, or_ 0.5%0.5\\%0.5% _per hour._ Dividing the 1-hour premium by 8 ensures that funding payments for the premium are distributed over 8 hours, closely aligning with the approach adopted by centralized perpetual exchanges. Funding round payment for account _**i**_ and market _**j**_ is calculated as follows: fundingaccounti,j:\=(−1)×positionaccounti,j×markj×fundingRatej\\small funding\_{{account\_i},j} := (-1) \\times position\_{{account\_i},j} \\times mark\_{j} \\times fundingRate\_{j}fundingaccounti​,j​:=(−1)×positionaccounti​,j​×markj​×fundingRatej​ [PreviousLLP Strategieschevron-left](https://docs.lighter.xyz/trading/liquidations-and-llp-insurance-fund/llp-strategies) [NextFunding Rate Rebateschevron-right](https://docs.lighter.xyz/trading/funding/funding-rate-rebates) Last updated 1 month ago * [Overview](https://docs.lighter.xyz/trading/funding#overview) * [Funding Rate Calculation](https://docs.lighter.xyz/trading/funding#funding-rate-calculation) sun-brightdesktopmoon sun-brightdesktopmoon --- # Fair Price Marking | Lighter Docs _**Mark price**_ is the fair price of a perpetual contract. Mark price is calculated using the liquidity in the perpetual market order book and the _**index price**_ (spot price of the underlying market). At any point in time, mark price is defined as follows: Impact Notional Amount\=500 USDC/Initial Margin FractionImpact Bid Pricet\=Avg execution price for a market sell of the impact notional valueImpact Ask Pricet\=Avg execution price for a market buy of the impact notional valueImpact Pricet\=(Impact Bid Pricet+Impact Ask Pricet)/2 price1t\=indext+EMA⁡8 min(clamp(Impact Pricet−indext,−indext/200,+indext/200))whereclamp⁡(x,a,b)\=max⁡(a,  min⁡(b,x))andEMA⁡8 minrefers to the Exponential Moving Average of the value over 8 minutes price2t\=median(cexPricest)where cexPricest are mark prices from different centralized exchanges Mark Price\=Median(Impact Pricet,price1t,price2t)\\small \\text{Impact Notional Amount} = 500 \\text{ USDC} / \\text{Initial Margin Fraction} \\\\ \\text{Impact Bid Price}\_t = \\text{Avg execution price for a market sell of the impact notional value} \\\\ \\text{Impact Ask Price}\_t = \\text{Avg execution price for a market buy of the impact notional value} \\\\ \\text{Impact Price}\_t = (\\text{Impact Bid Price}\_t + \\text{Impact Ask Price}\_t) / 2 \\\\ \\\\~\\\\ \\text{price1}\_t = index\_t + \\operatorname{EMA}\_{8\\ \\mathrm{min}}( \\text{clamp}( \\text{Impact Price}\_t - index\_t, -index\_t/200,+index\_t/200 )) \\\\ \\text{where} \\operatorname{clamp}(x,a,b) = \\max\\bigl(a,\\;\\min(b,x)\\bigr) \\\\ \\text{and} \\operatorname{EMA}\_{8\\ \\mathrm{min}} \\text{refers to the Exponential Moving Average of the value over 8 minutes} \\\\~\\\\ \\text{price2}\_t = median(\\text{cexPrices}\_t) \\\\ \\text{where cexPrices}\_t \\text{ are mark prices from different centralized exchanges} \\\\~\\\\ \\text{Mark Price} = Median(\\text{Impact Price}\_t, price1\_t, price2\_t) Impact Notional Amount\=500 USDC/Initial Margin FractionImpact Bid Pricet​\=Avg execution price for a market sell of the impact notional valueImpact Ask Pricet​\=Avg execution price for a market buy of the impact notional valueImpact Pricet​\=(Impact Bid Pricet​+Impact Ask Pricet​)/2 price1t​\=indext​+EMA8 min​(clamp(Impact Pricet​−indext​,−indext​/200,+indext​/200))whereclamp(x,a,b)\=max(a,min(b,x))andEMA8 min​refers to the Exponential Moving Average of the value over 8 minutes price2t​\=median(cexPricest​)where cexPricest​ are mark prices from different centralized exchanges Mark Price\=Median(Impact Pricet​,price1t​,price2t​) Lighter uses a combination of oracles (Chainlink, Stork, Pyth) to determine the index price. **Note**: because the mark price is used when deciding if liquidations should be happening, the mark price should reflect as much as possible the impact price, so that the execution of liquidations should happen close to mark price. Because of this, we chose to incorporate the impact price directly in the mark price formula. Price 1 can be summarised as Index Price + Lighter Perpetual Premium, where the premium is capped at 0.5% of the Index Price. The usage of the EMA makes it so if someone tries to manipulate the order book, they'd need to do so for a prolonged period of time. The cap of 0.5% ensures that the mark price on Lighter will not be bigger than the other external components by more than 0.5%. In summary, the EMA component should yield better results than just using the funding rate due to the shorter time span, while also being resilient to manipulation. [PreviousPnL And Total Account Valuechevron-left](https://docs.lighter.xyz/trading/pnl-and-total-account-value) [NextSelf-Trade Preventionchevron-right](https://docs.lighter.xyz/trading/self-trade-prevention) Last updated 2 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Points Program | Lighter Docs Lighter’s Season 1 Points Program ended with the final Private Beta distribution on September 30, 2025. Season 2 points will be distributed every Friday. The Lighter team may adjust distributions at its discretion. Earn points by running organic trading strategies via UI and API. Sybil, self-trading, and similar activities will not earn points. [PreviousAPIchevron-left](https://docs.lighter.xyz/trading/api) [NextMarket Makerschevron-right](https://docs.lighter.xyz/points-program/market-makers) Last updated 2 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Security Audits | Lighter Docs Access the latest security audits for our smart contracts and circuits below. file-pdf 363KB [22-09-2025\_Nethermind\_LighterCore.pdf](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2FpbieGJkDU9ReEfZC3bUC%2F22-09-2025_Nethermind_LighterCore.pdf?alt=media&token=b271defe-c541-4d6f-90f9-a43ad39b51da) PDF downloadDownload[arrow-up-right-from-squareOpen](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2FpbieGJkDU9ReEfZC3bUC%2F22-09-2025_Nethermind_LighterCore.pdf?alt=media&token=b271defe-c541-4d6f-90f9-a43ad39b51da) file-pdf 319KB [22-09-2025\_Nethermind\_LighterEvmDepositBridge.pdf](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2F68Lh9cMxEbCwll1TE7Wx%2F22-09-2025_Nethermind_LighterEvmDepositBridge.pdf?alt=media&token=382202e7-4667-4d1b-b19c-fef62b581f5c) PDF downloadDownload[arrow-up-right-from-squareOpen](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2F68Lh9cMxEbCwll1TE7Wx%2F22-09-2025_Nethermind_LighterEvmDepositBridge.pdf?alt=media&token=382202e7-4667-4d1b-b19c-fef62b581f5c) file-pdf 1MB [08-04-2025\_Block\_audit.pdf](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2Fx29oIB5HInlZotXSFFdK%2F08-04-2025_Block_audit.pdf?alt=media&token=ec2a4514-a8c6-45d5-bc24-70a4e01fe05f) PDF downloadDownload[arrow-up-right-from-squareOpen](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2Fx29oIB5HInlZotXSFFdK%2F08-04-2025_Block_audit.pdf?alt=media&token=ec2a4514-a8c6-45d5-bc24-70a4e01fe05f) file-pdf 695KB [09-08-2025\_Block\_and\_delta\_audit.pdf](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2FDLNwTsuvoIdTmdemt0NC%2F09-08-2025_Block_and_delta_audit.pdf?alt=media&token=6d917ddf-6546-42d9-8b9e-e983c13b5f97) PDF downloadDownload[arrow-up-right-from-squareOpen](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2FDLNwTsuvoIdTmdemt0NC%2F09-08-2025_Block_and_delta_audit.pdf?alt=media&token=6d917ddf-6546-42d9-8b9e-e983c13b5f97) file-pdf 640KB [10-10-2025\_Wrapper\_audit.pdf](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2FP5Vou5dAIWFzkyW9TL31%2F10-10-2025_Wrapper_audit.pdf?alt=media&token=4a69175c-3600-401a-b653-be23fad1eb95) PDF downloadDownload[arrow-up-right-from-squareOpen](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2FP5Vou5dAIWFzkyW9TL31%2F10-10-2025_Wrapper_audit.pdf?alt=media&token=4a69175c-3600-401a-b653-be23fad1eb95) file-pdf 516KB [11-05-2025\_Desert\_exit\_audit.pdf](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2FMDoggTx3YDmFtrSB4Ckx%2F11-05-2025_Desert_exit_audit.pdf?alt=media&token=16b89739-ec70-461d-9fbd-79ce81209f44) PDF downloadDownload[arrow-up-right-from-squareOpen](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2FMDoggTx3YDmFtrSB4Ckx%2F11-05-2025_Desert_exit_audit.pdf?alt=media&token=16b89739-ec70-461d-9fbd-79ce81209f44) file-pdf 322KB [11-24-2025\_Spot\_audit.pdf](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2FDhCeHhKLv6I0TAJWhbIi%2F11-24-2025_Spot_audit.pdf?alt=media&token=bd0f625e-3019-4c81-b6bb-8be84dc2812e) PDF downloadDownload[arrow-up-right-from-squareOpen](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2FDhCeHhKLv6I0TAJWhbIi%2F11-24-2025_Spot_audit.pdf?alt=media&token=bd0f625e-3019-4c81-b6bb-8be84dc2812e) [PreviousBug Bounty Programchevron-left](https://docs.lighter.xyz/security/bug-bounty-program) Last updated 3 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Bug Bounty Program | Lighter Docs Coming soon. [PreviousPartner Attributionchevron-left](https://docs.lighter.xyz/integrations/partner-attribution) [NextSecurity Auditschevron-right](https://docs.lighter.xyz/security/security-audits) Last updated 1 month ago sun-brightdesktopmoon sun-brightdesktopmoon --- # PnL And Total Account Value | Lighter Docs ### [hashtag](https://docs.lighter.xyz/trading/pnl-and-total-account-value#perps-trading) **Perps Trading** _**Unrealized PnL**_ shows how much you would gain or lose if you closed your positions at the current [mark price](https://docs.lighter.xyz/trading/fair-price-marking) . Let posipos\_iposi​ be the current position size of an account. posipos\_iposi​ is positive if the account position is long and negative if it is short. The unrealized PnL of the account can be calculated as: Unrealized PnL:\=∑(markPricei−avgEntryPricei)×positioni \\text{Unrealized PnL} := \\sum(\\text{markPrice}\_i - \\text{avgEntryPrice}\_i) \\times position\_i Unrealized PnL:=∑(markPricei​−avgEntryPricei​)×positioni​ **Realized PnL** is the gain / loss that has already been captured from the position after closing or due to funding payments. It is calculated based on the difference in USDC value between your average entry price and exit price. Additionally, all funding payments for the position are immediately applied to its realized PNL. * When the user is closing a portion of an existing long or short position, average entry price stays the same and exchange realizes the difference in average exit and entry prices. ΔCollateral:\=(exitPricei−avgEntryPricei)×Δpositioni\\Delta Collateral := (\\text{exitPrice}\_i - \\text{avgEntryPrice}\_i) \\times \\Delta position\_i ΔCollateral:=(exitPricei​−avgEntryPricei​)×Δpositioni​ * When the user is increasing the size of their open position, no PnL is realized. Exchange updates the average entry price according to the following formula avgEntryPricei,new:\=avgEntryPricei,old×positioni,old+tradePrice×tradeSizepositioni,new \\text{avgEntryPrice}\_{i, new} := \\frac{{avgEntryPrice}\_{i, old }\\times {position\_{i, old}} + {tradePrice\\times tradeSize}}{position\_{i, new}}avgEntryPricei,new​:=positioni,new​avgEntryPricei,old​×positioni,old​+tradePrice×tradeSize​ ### [hashtag](https://docs.lighter.xyz/trading/pnl-and-total-account-value#spot-trading) **Spot Trading** ### [hashtag](https://docs.lighter.xyz/trading/pnl-and-total-account-value#total-account-value) Total Account Value _**Total Account Value**_ represents the total USDC value of an account in Lighter, including all open positions and collateral. It is calculated as follows: Total Account Value\=Collateral+Unrealized PnL\\text{Total Account Value} = \\text{Collateral} + \\text{Unrealized PnL}Total Account Value\=Collateral+Unrealized PnL Note: Isolated positions use a separate collateral balance (Allocated Margin) dedicated solely to that specific position. It functions the same as collateral but applies only to the relevant position and should be treated as collateral in the calculations above. [PreviousFunding Rate Rebateschevron-left](https://docs.lighter.xyz/trading/funding/funding-rate-rebates) [NextFair Price Markingchevron-right](https://docs.lighter.xyz/trading/fair-price-marking) Last updated 1 month ago * [Perps Trading](https://docs.lighter.xyz/trading/pnl-and-total-account-value#perps-trading) * [Spot Trading](https://docs.lighter.xyz/trading/pnl-and-total-account-value#spot-trading) * [Total Account Value](https://docs.lighter.xyz/trading/pnl-and-total-account-value#total-account-value) sun-brightdesktopmoon sun-brightdesktopmoon --- # Liquidations & LLP (Insurance Fund) | Lighter Docs ### [hashtag](https://docs.lighter.xyz/trading/liquidations-and-llp-insurance-fund#overview) Overview Each market in Lighter has different margin requirement configurations, which essentially define how much leverage an account can have in its positions without getting liquidated. When the value of an account falls below the margin requirements, liquidation occurs. Lighter has three different levels of margin requirements, each triggering different actions by the exchange. For a specific account, the margin requirements are defined as follows: Si:\=∣posi∣Ii:\=initial margin fraction for the marketMi:\=maintenance margin fraction for the marketCi:\=close out margin fraction for the market Initial Margin Req:\=∑Si×marki×IiMaintenance Margin Req:\=∑Si×marki×MiClose Out Margin Req:\=∑Si×marki×Ci Account Value\=Collateral+∑(markPricei−avgEntryPricei)×positioni S\_i:= |pos\_i| \\\\ I\_i := \\text{initial margin fraction for the market} \\\\ M\_i := \\text{maintenance margin fraction for the market} \\\\ C\_i := \\text{close out margin fraction for the market} \\\\~\\\\ \\text{Initial Margin Req} := \\sum S\_i × mark\_i × I\_i \\\\ \\text{Maintenance Margin Req} := \\sum S\_i × mark\_i × M\_i \\\\ \\text{Close Out Margin Req} := \\sum S\_i × mark\_i × C\_i \\\\~\\\\ \\text{Account Value} = Collateral + \\sum (markPrice\_i - \\text{avgEntryPrice}\_i) \\times position\_i Si​:=∣posi​∣Ii​:=initial margin fraction for the marketMi​:=maintenance margin fraction for the marketCi​:=close out margin fraction for the market Initial Margin Req:=∑Si​×marki​×Ii​Maintenance Margin Req:=∑Si​×marki​×Mi​Close Out Margin Req:=∑Si​×marki​×Ci​ Account Value\=Collateral+∑(markPricei​−avgEntryPricei​)×positioni​ Margin requirement fractions are defined so that CiMaintenance Margin Req\\small \\text{Account Value} \\geq \\text{Initial Margin Req} > \\text{Maintenance Margin Req}Account Value≥Initial Margin Req\>Maintenance Margin Req An account is considered healthy when its account value is greater than all the margin requirements. It can execute any type of exchange operation as long as its position remains healthy after the execution of the transaction. 2. _**Pre-Liquidation**_**:** Initial Margin Req\>Account Value≥Maintenance Margin Req\\small \\text{Initial Margin Req} > \\text{Account Value} \\geq \\text{Maintenance Margin Req}Initial Margin Req\>Account Value≥Maintenance Margin Req An account is in pre-liquidation mode when its account value is below the initial margin requirements but above the maintenance margin requirements. In pre-liquidation mode, only exchange operations that do not decrease the account value to the maintenance margin requirement ratio and do not increase the size of any position can be executed. More formally:∙ For all market i, ∣posiold∣≥∣posinew∣ ∙ Account ValueoldInitial Margin Reqold≤Account ValuenewInitial Margin Reqnew\\bullet \\text{ \\small For all market i, } |{pos\_i}\_{old}| \\geq|{pos\_i}\_{new}| \\\\~\\\\ \\bullet \\text{ }\\frac{\\text{Account Value}\_{old}}{\\text{Initial Margin Req}\_{old}} \\leq \\frac{\\text{Account Value}\_{new}}{\\text{Initial Margin Req}\_{new}} ∙ For all market i, ∣posi​old​∣≥∣posi​new​∣ ∙ Initial Margin Reqold​Account Valueold​​≤Initial Margin Reqnew​Account Valuenew​​ 3. _**Partial Liquidation**_ Maintenance Margin Req\>Account Value\>Close-out Margin Req\\small \\text{Maintenance Margin Req} > \\text{Account Value} > \\text{Close-out Margin Req}Maintenance Margin Req\>Account Value\>Close-out Margin Req In the case of partial liquidation, liquidation engine first cancels all of the open orders of the user. If the account value is still below the maintenance margin, liquidation engine orders open positions of the underwater account by a heuristic, then sends IoC limit orders on behalf of the margin called user with corresponding zero price one by one **for the full amount of the position**. If the user goes above the maintenance margin requirement after **fully executing** a trade, then the liquidation engine stops the liquidations. If the user gets filled at a better price than the zero price, liquidation engine takes up to 1% liquidation fee and sends it to LLP (insurance fund). One important aspect of the zero price is, when a trade gets executed at the zero price, total account value to maintenance margin ratio stays the same. Thus any trade that happens in partial liquidation phase only increases the account health, since the trade price is at least as good as the zero price. If all of the account positions are closed (i.e. maintenance margin requirement is 0) at the zero price, account value also becomes zero. zeroPricei(short)\=markPricei×(1+Mi×Account ValueMaintenance Margin Req)zeroPricei(long)\=markPricei×(1−Mi×Account ValueMaintenance Margin Req)\\small zeroPrice\_i(short) = markPrice\_i \\times (1 + \\frac{{M}\_i\\times \\text{Account Value}}{\\text{Maintenance Margin Req}}) \\\\ zeroPrice\_i(long) = markPrice\_i \\times (1 − \\frac{{M}\_i \\times \\text{Account Value}}{{\\text{Maintenance Margin Req}}}) zeroPricei​(short)\=markPricei​×(1+Maintenance Margin ReqMi​×Account Value​)zeroPricei​(long)\=markPricei​×(1−Maintenance Margin ReqMi​×Account Value​) Deriving Zero Price For a Long Position TAV′\=TAV+(ZP−MP)×TSMMR′\=MMR−TS×MP×MiTAV′MMR′\=TAV+ZP×TS−MP×TSMMR−MP×TS×Mi\=TAVMMR(TAV+ZP×TS−MP×TS)×MMR\=TAV×(MMR−MP×TS×Mi)TAV×MMR+ZP×TS×MMR−MP×TS×MMR\=TAV×MMR−MP×TS×TAV×MiZP×TS×MMR−MP×TS×MMR\=−MP×TS×TAV×MiZP×MMR−MP×MMR\=−MP×TAV×MiZP×MMR\=MP×MMR−MP×TAV×MiZP×MMR\=MP×(MMR−TAV×Mi)ZP\=MP×(1−TAV×MiMMR)Where:TAV\=Total Account ValueMMR\=Maintenance Margin RequirementZP\=Zero PriceMP\=Mark PriceTS\=Trade Size\\text{Deriving Zero Price For a Long Position} \\\\~\\\\ \\\\ \\tiny \\begin{aligned} \\text{TAV}' &= \\text{TAV} + (\\text{ZP} - \\text{MP}) \\times \\text{TS} \\\\ \\text{MMR}' &= \\text{MMR} - \\text{TS} \\times \\text{MP} \\times M\_i \\\\ \\frac{\\text{TAV}'}{\\text{MMR}'} &= \\frac{\\text{TAV} + \\text{ZP} \\times \\text{TS} - \\text{MP} \\times \\text{TS}}{\\text{MMR} - \\text{MP} \\times \\text{TS} \\times M\_i} \\\\ &= \\frac{\\text{TAV}}{\\text{MMR}} \\\\ (\\text{TAV} + \\text{ZP} \\times \\text{TS} - \\text{MP} \\times \\text{TS}) \\times \\text{MMR} &= \\text{TAV} \\times (\\text{MMR} - \\text{MP} \\times \\text{TS} \\times M\_i) \\\\ \\text{TAV} \\times \\text{MMR} + \\text{ZP} \\times \\text{TS} \\times \\text{MMR} - \\text{MP} \\times \\text{TS} \\times \\text{MMR} &= \\text{TAV} \\times \\text{MMR} - \\text{MP} \\times \\text{TS} \\times \\text{TAV} \\times M\_i \\\\ \\text{ZP} \\times \\text{TS} \\times \\text{MMR} - \\text{MP} \\times \\text{TS} \\times \\text{MMR} &= - \\text{MP} \\times \\text{TS} \\times \\text{TAV} \\times M\_i \\\\ \\text{ZP} \\times \\text{MMR} - \\text{MP} \\times \\text{MMR} &= - \\text{MP} \\times \\text{TAV} \\times M\_i \\\\ \\text{ZP} \\times \\text{MMR} &= \\text{MP} \\times \\text{MMR} - \\text{MP} \\times \\text{TAV} \\times M\_i \\\\ \\text{ZP} \\times \\text{MMR} &= \\text{MP} \\times (\\text{MMR} - \\text{TAV} \\times M\_i) \\\\ \\text{ZP} &= \\text{MP} \\times \\left(1 - \\frac{\\text{TAV} \\times M\_i}{\\text{MMR}}\\right) \\end{aligned} \\quad \\begin{aligned} &\\text{Where:} \\\\ &\\text{TAV} = \\text{Total Account Value} \\\\ &\\text{MMR} = \\text{Maintenance Margin Requirement} \\\\ &\\text{ZP} = \\text{Zero Price} \\\\ &\\text{MP} = \\text{Mark Price} \\\\ &\\text{TS} = \\text{Trade Size} \\end{aligned}Deriving Zero Price For a Long Position TAV′MMR′MMR′TAV′​(TAV+ZP×TS−MP×TS)×MMRTAV×MMR+ZP×TS×MMR−MP×TS×MMRZP×TS×MMR−MP×TS×MMRZP×MMR−MP×MMRZP×MMRZP×MMRZP​\=TAV+(ZP−MP)×TS\=MMR−TS×MP×Mi​\=MMR−MP×TS×Mi​TAV+ZP×TS−MP×TS​\=MMRTAV​\=TAV×(MMR−MP×TS×Mi​)\=TAV×MMR−MP×TS×TAV×Mi​\=−MP×TS×TAV×Mi​\=−MP×TAV×Mi​\=MP×MMR−MP×TAV×Mi​\=MP×(MMR−TAV×Mi​)\=MP×(1−MMRTAV×Mi​​)​​Where:TAV\=Total Account ValueMMR\=Maintenance Margin RequirementZP\=Zero PriceMP\=Mark PriceTS\=Trade Size​ 1. _**Full Liquidation**_ Close-out Margin Req\>Account Value\\small \\text{Close-out Margin Req} > \\text{Account Value}Close-out Margin Req\>Account Value If a user goes below the close-out margin requirement, the LLP closes all of the user's positions by taking them over in ascending order of unrealized PnL. For each position, the LLP takes it over only if doing so would keep the LLP's total account value above the Initial Margin Requirement. Any positions that would cause the LLP to fall below this threshold are instead auto-deleveraged. 2. **Auto-deleveraging (ADL)** When an account has a negative value and the LLP does not have enough capital to cover the losses of the bankrupt account, the exchange initiates auto-deleveraging (ADL) for the bankrupt account’s positions. A bankrupt account, by definition, has at least one open position. The exchange identifies positions on the opposite side of the bankrupt positions and executes trades between these accounts if their zero prices align. This ensures that ADL does not decrease the health of any account, as the execution price cannot be worse than the zero price of the position. When selecting positions for ADL on the opposite side, the system ranks users based on their leverage and unrealized PnL. ### [hashtag](https://docs.lighter.xyz/trading/liquidations-and-llp-insurance-fund#isolated-liquidations) Isolated Liquidations When a users sets a market to the isolated mode, the position will be treated as a separate account and won't be affected by the other positions. The calculations and the flow will be the same as above, but the collateral for an isolated position is called AllocatedMargin. [PreviousPrelaunch Marketschevron-left](https://docs.lighter.xyz/trading/prelaunch-markets) [NextLLP Strategieschevron-right](https://docs.lighter.xyz/trading/liquidations-and-llp-insurance-fund/llp-strategies) Last updated 1 month ago * [Overview](https://docs.lighter.xyz/trading/liquidations-and-llp-insurance-fund#overview) * [Liquidation Waterfall](https://docs.lighter.xyz/trading/liquidations-and-llp-insurance-fund#liquidation-waterfall) * [Isolated Liquidations](https://docs.lighter.xyz/trading/liquidations-and-llp-insurance-fund#isolated-liquidations) sun-brightdesktopmoon sun-brightdesktopmoon --- # Retail | Lighter Docs For Season 2, 200,000 points per week will be distributed every Friday. The points will cover activity from Wednesday (inclusive) through Tuesday (inclusive). Some of the categories that affect how points are distributed include: * Volume * Open Interest * Fundings * Liquidations and Deleverages * PnL There are also scaling factors that favor traders with higher trading quality, depending on the category. ### [hashtag](https://docs.lighter.xyz/points-program/retail#notes) Notes: * Having a premium account impacts the weight of the metrics. * — this is not necessarily the case — but PnL generated by premium accounts may receive more points. * Some categories are separated per market, while others are applied globally. * Some categories are evaluated daily, while others are evaluated weekly. * Points are not necessarily distributed linearly with respect to the metric. * For example, 2× the volume will not always yield 2× the points; it may result in 3× or 1.5× the points. * Note: this extends beyond the volume metric. * Markets are not weighted equally. * For example, $100 in volume on BTC does not yield the same number of points as $100 in volume on HYPE. * Note: this extends beyond the volume metric. * Intentionally losing money or getting liquidated will not be beneficial. ### [hashtag](https://docs.lighter.xyz/points-program/retail#sybil-detection-and-farming) Sybil Detection & Farming We apply different sybil detection methods, both fully automated and semi-automated, to detect sybil accounts. We allow up to 10 accounts per user without penalty, as we understand that some people choose to maintain multiple accounts for risk management (for example), and that’s acceptable. [We’ve made an announcement on Discord regarding Self-Trading.arrow-up-right](https://discord.com/channels/987399783985590322/1314327323109097482/1422681158168084491) As mentioned in the announcement, we want to protect a level playing field and keep the platform healthy for all participants. We use various metrics to detect farming and sybil activity, which will not be disclosed here so as not to encourage their exploitation. [PreviousMarket Makerschevron-left](https://docs.lighter.xyz/points-program/market-makers) [NextPartner Attributionchevron-right](https://docs.lighter.xyz/integrations/partner-attribution) Last updated 1 month ago * [Notes:](https://docs.lighter.xyz/points-program/retail#notes) * [Sybil Detection & Farming](https://docs.lighter.xyz/points-program/retail#sybil-detection-and-farming) sun-brightdesktopmoon sun-brightdesktopmoon --- # Market Specifications | Lighter Docs Current RWA market specifications are outlined below. These parameters may be updated at the discretion of the Lighter team. Please monitor official announcement channels for any changes. Market Type Current Open Interest Cap (M) Tracked Underlying Oracle Link XAU commodity 100 Tracks the value of 1 troy ounce of gold. pythlazer [https://insights.pyth.network/price-feeds/Metal.XAU%2FUSDarrow-up-right](https://insights.pyth.network/price-feeds/Metal.XAU%2FUSD) XAG commodity 100 Tracks the value of 1 troy ounce of silver. pythlazer [https://insights.pyth.network/price-feeds/Metal.XAG%2FUSDarrow-up-right](https://insights.pyth.network/price-feeds/Metal.XAG%2FUSD) XCU commodity 10 Tracks the value of 1 pound of copper. chainlink N/A XPT commodity 10 Tracks the value of 1 troy ounce of platinum. chainlink N/A XPD commodity 10 Tracks the value of 1 troy ounce of palladium. chainlink N/A WTI commodity 25 We will be updating our WTI methodology to a continuously rolling model. Starting Monday, March 16, WTI will track 100% CLK6 until early April. pythlazer N/A NATGAS commodity 50 Tracks 100% of the NGK6 contract until early April. pythlazer N/A BRENTOIL commodity 100 Tracks 100% of the BZM6 contract until early April. pythlazer N/A EURUSD fx 200 Tracks the exchange rate of EUR/USD. pythlazer [https://insights.pyth.network/price-feeds/FX.EUR%2FUSDarrow-up-right](https://insights.pyth.network/price-feeds/FX.EUR%2FUSD) USDKRW fx 50 Tracks the exchange rate of USD/KRW. pythlazer [https://insights.pyth.network/price-feeds/FX.USD%2FKRWarrow-up-right](https://insights.pyth.network/price-feeds/FX.USD%2FKRW) USDJPY fx 50 Tracks the exchange rate of USD/JPY. pythlazer [https://insights.pyth.network/price-feeds/FX.USD%2FJPYarrow-up-right](https://insights.pyth.network/price-feeds/FX.USD%2FJPY) GBPUSD fx 50 Tracks the exchange rate of GBP/USD pythlazer [https://insights.pyth.network/price-feeds/FX.GBP%2FAUDarrow-up-right](https://insights.pyth.network/price-feeds/FX.GBP%2FAUD) USDCHF fx 50 Tracks the exchange rate of USD/CHF. pythlazer [https://insights.pyth.network/price-feeds/FX.USD%2FCHFarrow-up-right](https://insights.pyth.network/price-feeds/FX.USD%2FCHF) NZDUSD fx 50 Tracks the exchange rate of NZD/USD. pythlazer [https://insights.pyth.network/price-feeds/FX.NZD%2FUSDarrow-up-right](https://insights.pyth.network/price-feeds/FX.NZD%2FUSD) SKHYNIX equity 10 Tracks the value of one share of SK Hynix Inc. quoted in KRW. 000660.KS N/A SAMSUNG equity 10 Tracks the value of one share of Samsung Electronics Co Ltd. quoted in KRW. 005930.KS N/A HYUNDAI equity 10 Tracks the value of one share of Hyundai Motor Company. quoted in KRW. 005380.KS N/A HANMI equity 10 Tracks the value of one share of Hanmi Semiconductor Co Ltd quoted in KRW. 042700.KS N/A KRCOMP index 10 Tracks the value of an index of all common shares traded on the Korea Exchange (KRX), quoted in KRW. \- N/A NVDA equity 10 Tracks the value of one share of NVIDIA Corporation. pythlazer [https://insights.pyth.network/price-feeds/Equity.US.NVDA%2FUSDarrow-up-right](https://insights.pyth.network/price-feeds/Equity.US.NVDA%2FUSD) TSLA equity 10 Tracks the value of one share of Tesla Inc. pythlazer [https://insights.pyth.network/price-feeds/Equity.US.TSLA%2FUSDarrow-up-right](https://insights.pyth.network/price-feeds/Equity.US.TSLA%2FUSD) CRCL equity 10 Tracks the value of one share of Circle Internet Group Inc. pythlazer [https://insights.pyth.network/price-feeds/Equity.US.CRCL%2FUSDarrow-up-right](https://insights.pyth.network/price-feeds/Equity.US.CRCL%2FUSD) GOOGL equity 10 Tracks the value of one share of Alphabet Inc. Class A. pythlazer [https://insights.pyth.network/price-feeds/Equity.US.GOOGL%2FUSDarrow-up-right](https://insights.pyth.network/price-feeds/Equity.US.GOOGL%2FUSD) MSTR equity 10 Tracks the value of one share of MicroStrategy Incorporated. pythlazer [https://insights.pyth.network/price-feeds/Equity.US.MSTR%2FUSDarrow-up-right](https://insights.pyth.network/price-feeds/Equity.US.MSTR%2FUSD) MSFT equity 10 Tracks the value of one share of Microsoft Corporation. pythlazer [https://insights.pyth.network/price-feeds/Equity.US.MSFT%2FUSDarrow-up-right](https://insights.pyth.network/price-feeds/Equity.US.MSFT%2FUSD) AMZN equity 10 Tracks the value of one share of Amazon.com, Inc. pythlazer [https://insights.pyth.network/price-feeds/Equity.US.AMZN%2FUSDarrow-up-right](https://insights.pyth.network/price-feeds/Equity.US.AMZN%2FUSD) AAPL equity 10 Tracks the value of one share of Apple Inc. pythlazer [https://insights.pyth.network/price-feeds/Equity.US.AAPL%2FUSDarrow-up-right](https://insights.pyth.network/price-feeds/Equity.US.AAPL%2FUSD) COIN equity 10 Tracks the value of one share of Coinbase Global, Inc. pythlazer [https://insights.pyth.network/price-feeds/Equity.US.COIN%2FUSDarrow-up-right](https://insights.pyth.network/price-feeds/Equity.US.COIN%2FUSD) META equity 10 Tracks the value of one share of Meta Platforms, Inc. pythlazer [https://insights.pyth.network/price-feeds/Equity.US.META%2FUSDarrow-up-right](https://insights.pyth.network/price-feeds/Equity.US.META%2FUSD) INTC equity 10 Tracks the value of one share of Intel Corporation pythlazer [https://insights.pyth.network/price-feeds/Equity.US.INTC%2FUSDarrow-up-right](https://insights.pyth.network/price-feeds/Equity.US.INTC%2FUSD) HOOD equity 10 Tracks the value of one share of Robinhood Markets, Inc. pythlazer [https://insights.pyth.network/price-feeds/Equity.US.HOOD%2FUSDarrow-up-right](https://insights.pyth.network/price-feeds/Equity.US.HOOD%2FUSD) ASML equity 10 Tracks the value of one share of ASML Holding N.V. pythlazer [https://insights.pyth.network/price-feeds/Equity.US.ASML%2FUSDarrow-up-right](https://insights.pyth.network/price-feeds/Equity.US.ASML%2FUSD) AMD equity 10 Tracks the value of one share of Advanced Micro Devices, Inc. pythlazer [https://insights.pyth.network/price-feeds/Equity.US.AMD%2FUSDarrow-up-right](https://insights.pyth.network/price-feeds/Equity.US.AMD%2FUSD) SNDK equity 10 Tracks the value of one share of SanDisk Corporation pythlazer [https://insights.pyth.network/price-feeds/Equity.US.SNDK%2FUSDarrow-up-right](https://insights.pyth.network/price-feeds/Equity.US.SNDK%2FUSD) SPY index 100 Tracks the State Street SPDR S&P 500 ETF Trust. pythlazer [https://insights.pyth.network/price-feeds/Equity.US.SPY%2FUSDarrow-up-right](https://insights.pyth.network/price-feeds/Equity.US.SPY%2FUSD) QQQ index 100 Tracks the Invesco QQQ Trust, Series 1 ETF. pythlazer [https://insights.pyth.network/price-feeds/Equity.US.QQQ%2FUSDarrow-up-right](https://insights.pyth.network/price-feeds/Equity.US.QQQ%2FUSD) DIA index 10 Tracks the SPDR Dow Jones Industrial Average ETF. chainlink N/A BOTZ index 10 Tracks the Global X Robotics & Artificial Intelligence ETF. R N/A MAGS index 10 Tracks the Roundhill Magnificent Seven ETF. chainlink N/A IWM index 10 Tracks the iShares Russell 2000 ETF. chainlink N/A [PreviousFutures Contract Price Rolling Mechanismchevron-left](https://docs.lighter.xyz/trading/real-world-assets-rwas/futures-contract-price-rolling-mechanism) [NextPublic Poolschevron-right](https://docs.lighter.xyz/trading/public-pools) Last updated 16 days ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Partner Attribution | Lighter Docs The Partner Attribution Program allows third-party integrators to build on top of Lighter and offer its trading infrastructure through their own frontend. Integrators can configure trading fees for users accessing Lighter through their interface, within global limits set by Lighter. #### [hashtag](https://docs.lighter.xyz/integrations/partner-attribution#integrator-fees) Integrator Fees Integrators may configure fees for both spot and perpetual markets. Global limits set by Lighter: * Perpetual markets: up to 10 bps * Spot markets: up to 1% * Minimum fee increment: 0.01 bps #### [hashtag](https://docs.lighter.xyz/integrations/partner-attribution#user-approval) User Approval Before fees can be applied, the user must sign a message approving the integrator’s fee configuration. This approval: * authorizes the integrator to charge the configured fees * includes an expiry period (if integrator decides to include one) * can be revoked by the user at any time The approval has signature requirements depend on whether the integrator and user share the same L1 account. * Different L1 accounts: L1 approval + L2 confirmation * Same L1 account: L2 confirmation only #### [hashtag](https://docs.lighter.xyz/integrations/partner-attribution#begin-your-integration) Begin your Integration: API Docs: [https://apidocs.lighter.xyz/docs/partner-integrationarrow-up-right](https://apidocs.lighter.xyz/docs/partner-integration) Python SDK: [https://pypi.org/project/lighter-sdk/arrow-up-right](https://pypi.org/project/lighter-sdk/) [PreviousRetailchevron-left](https://docs.lighter.xyz/points-program/retail) [NextBug Bounty Programchevron-right](https://docs.lighter.xyz/security/bug-bounty-program) Last updated 29 days ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Market Makers | Lighter Docs Market-making activity will receive 20% of the total allocated points (50,000). Only premium accounts are eligible to earn points from market-making. [hashtag](https://docs.lighter.xyz/points-program/market-makers#llp) LLP ----------------------------------------------------------------------------- LLP will be considered a market maker, following the same rules. However, the points earned by LLP will not be allocated to it. Instead, all final points will be scaled so that the total remains 250,000 points. This effectively treats LLP as a market participant without directly returning points to LLP holders. In this way, if a market is dominated by LLP, most of the points will go to LLP and will then be effectively redistributed among all platform participants. [hashtag](https://docs.lighter.xyz/points-program/market-makers#points-for-volume) Points for Volume --------------------------------------------------------------------------------------------------------- For each week, we’ll be looking at the total maker volume generated by premium accounts. Each user will receive a volume score, which will be equal to score\=volume+max(0,(volume−2.5B)×0.25)\\text{score} = \\text{volume} + max(0, (\\text{volume} - 2.5B) \\times 0.25)score\=volume+max(0,(volume−2.5B)×0.25) Points will be distributed proportionally to this score. The score is calculated once for the entire week, not daily, meaning that $1 in volume on the first day has the same impact as $1 on the last day. The formula adds a 25% bonus to any weekly volume above 2.5B. All markets are weighted equally. [hashtag](https://docs.lighter.xyz/points-program/market-makers#points-for-providing-liquidity) Points for providing liquidity ----------------------------------------------------------------------------------------------------------------------------------- ### [hashtag](https://docs.lighter.xyz/points-program/market-makers#background) Background We recognize that providing strong liquidity with tight spreads on BTC can generate significant trading volume, and this will, to some extent, already be reflected in the volume-based rewards. However, providing $10M in liquidity on BTC at 2–3 bps might not produce the same volume, and the benefit of 2–3 bps of better execution must be weighted against the risk of posting that liquidity. With this in mind, we aim to incentivize market makers to provide high-quality liquidity even when it does not result in large trading volumes, ensuring that traders can execute sizable positions when needed. Another aspect concerns altcoins that currently lack traction on Lighter or have higher volumes on other exchanges. Traders may avoid these markets due to limited liquidity, while MMs may skip them because of low volume. To address this, we will assign a higher weight to such markets. ### [hashtag](https://docs.lighter.xyz/points-program/market-makers#market-weights) Market weights Each market will be given a weight that accounts for both liquidity demand and associated risk. For a selection of exchanges, we will approximate two multipliers that track how the volume and open interest on those exchanges compare to Lighter. We will then adjust the external volumes and open interest based on these multipliers. Using the adjusted values together with Lighter’s own data, we will determine the final market weight. Note: this approach shifts weight toward tokens that are heavily traded (e.g., BTC, ETH, SOL) and also assigns higher weight to tokens that are popular on other exchanges but not yet on Lighter, while maintaining balanced weights for tokens that show stronger activity on Lighter itself. Note: weights are recomputed hourly. #### [hashtag](https://docs.lighter.xyz/points-program/market-makers#methodology) Methodology We will sample the order book at random intervals, and users will receive points proportional to the share of liquidity they provide. At each sample, we will evaluate several metrics, such as: * who is providing liquidity within the top $10k, $30k, $100k, $300k, … * who is providing liquidity within 1 bps, 2 bps, 5 bps, 10 bps of mid-price These thresholds will depend on the market — for example, $10k in liquidity on BTC is relatively small, while $50M on YZY would be unrealistically high. For each market, we will use approximately 6–10 of these metrics, each carrying the same weight. Note: these metrics will be computed separately for the bid and ask sides. #### [hashtag](https://docs.lighter.xyz/points-program/market-makers#volatility) Volatility For each order book snapshot, we will compute a volatility score, which acts as a multiplier when providing liquidity. This is meant to incentivise market makers to provide liquidity even during volatile periods. Without the volatility multiplier, each order book sample would carry the same weight. Because the multiplier makes some snapshots contribute more than others, we will calculate the total score on a daily basis. To prevent a single trading day from dominating the results (for example, accounting for 90% of all points), we will implement a ceiling mechanism that ensures each day receives at least 8.33% of the total points for liquidity provision. For example, if one day in the week experiences very high volatility for 20 hours, the points for that day would be capped at 50% of the total pool. This scenario is unlikely, as we assume such volatility would last for only part of a single day, with the remaining six days being normal. #### [hashtag](https://docs.lighter.xyz/points-program/market-makers#example) Example You are a market maker who specialises in providing high-quality liquidity on BTC, offering $1M at once but only on one side of the order book. If we were to allocate 1,000 points weekly for BTC liquidity provision, and the BTC metrics were as follows: * top $300k, $1M, $3M, $10M, $30M * top 0.5 bps, 1 bps, 2 bps, 4 bps, 10 bps Assuming you provide 100% of the top $1M in liquidity, you could expect to receive: * 50 points for top $300k category * 50 points for top $1M category * 16.6 points for top $3M category * 5 points for top $10M category * 1.66 points for top $30M category For the bps categories, the same logic applies; the actual points depend on how much liquidity exists at those levels. Note: You would receive only 50 points for the top $300k category because we assume you quote on one side at a time. These numbers are purely illustrative; the actual parameters used in calculating these metrics may differ. ### [hashtag](https://docs.lighter.xyz/points-program/market-makers#notes) Notes * Depending on the market conditions, data availability, and team discretion, some constants might change. [PreviousPoints Programchevron-left](https://docs.lighter.xyz/points-program) [NextRetailchevron-right](https://docs.lighter.xyz/points-program/retail) Last updated 2 months ago * [LLP](https://docs.lighter.xyz/points-program/market-makers#llp) * [Points for Volume](https://docs.lighter.xyz/points-program/market-makers#points-for-volume) * [Points for providing liquidity](https://docs.lighter.xyz/points-program/market-makers#points-for-providing-liquidity) * [Background](https://docs.lighter.xyz/points-program/market-makers#background) * [Market weights](https://docs.lighter.xyz/points-program/market-makers#market-weights) * [Notes](https://docs.lighter.xyz/points-program/market-makers#notes) sun-brightdesktopmoon sun-brightdesktopmoon --- # Contract Specifications | Lighter Docs Lighter Test Network currently supports perpetual futures markets for the following markets. Lighter Governance will continuously add new markets as the test network grows. IMR, MMR, and CMR represent the Initial, Maintenance, and Close-Out Margin Requirements, respectively. For more information about the meaning of these fractions, refer to the [Liquidations & LLP (Insurance Fund)](https://docs.lighter.xyz/trading/liquidations-and-llp-insurance-fund) page. circle-info Currently each deployed market has a funding period of 1 hour. Funding period is a configuration of each market, thus it might be different for some of the new market deployments. Symbol Price Step Amount Step Leverage IMR MMR CMR BTC 0.1 0.00001 50x 2% 1.2% 0.8% ETH 0.01 0.0001 50x 2% 1.2% 0.8% SOL 0.001 0.001 25x 4% 2.4% 1.6% XRP 0.000001 1 20x 5% 3% 2% HYPE 0.0001 0.01 20x 5% 3% 2% BNB 0.0001 0.01 20x 5% 3% 2% ARB 0.00001 0.1 15x 6.66% 3.99% 2.66% OP 0.00001 0.1 15x 6.66% 3.99% 2.66% TON 0.00001 0.1 10x 10% 6% 4% BCH 0.001 0.001 10x 10% 6% 4% ADA 0.00001 0.1 10x 10% 6% 4% DOGE 0.0001 0.01 10x 10% 6% 4% JUP 0.00001 0.1 10x 10% 6% 4% XMR 0.001 0.001 10x 10% 6% 4% TRUMP 0.0001 0.01 10x 10% 6% 4% LDO 0.00001 0.1 10x 10% 6% 4% SEI 0.00001 0.1 10x 10% 6% 4% LTC 0.001 0.001 10x 10% 6% 4% FARTCOIN 0.00001 0.1 10x 10% 6% 4% KSHIB 0.000001 1 10x 10% 6% 4% KBONK 0.000001 1 10x 10% 6% 4% IP 0.0001 0.01 10x 10% 6% 4% WIF 0.00001 0.1 10x 10% 6% 4% DOT 0.00001 0.1 10x 10% 6% 4% SUI 0.00001 0.1 10x 10% 6% 4% TIA 0.00001 0.1 10x 10% 6% 4% UNI 0.0001 0.01 10x 10% 6% 4% XPL 0.00001 0.1 10x 10% 6% 4% ENA 0.00001 0.1 10x 10% 6% 4% CRV 0.00001 0.1 10x 10% 6% 4% NEAR 0.00001 0.1 10x 10% 6% 4% KPEPE 0.000001 1 10x 10% 6% 4% WLD 0.00001 0.1 10x 10% 6% 4% APT 0.0001 0.01 10x 10% 6% 4% POPCAT 0.00001 0.1 10x 10% 6% 4% ONDO 0.00001 0.1 10x 10% 6% 4% AVAX 0.00001 0.1 10x 10% 6% 4% TRX 0.00001 0.1 10x 10% 6% 4% AAVE 0.001 0.001 10x 10% 6% 4% LINK 0.00001 0.1 10x 10% 6% 4% POL 0.000001 1 8x 12.5% 7.5% 5% PUMP 0.000001 1 8x 12.5% 7.5% 5% ZK 0.000001 1 8x 12.5% 7.5% 5% PAXG 0.01 0.0001 8x 12.5% 7.5% 5% PENGU 0.000001 1 8x 12.5% 7.5% 5% PENDLE 0.0001 0.01 5x 20% 12% 8% TAO 0.01 0.0001 5x 20% 12% 8% PYTH 0.00001 0.1 5x 20% 12% 8% SPX 0.00001 0.1 5x 20% 12% 8% STRK 0.00001 0.1 5x 20% 12% 8% SYRUP 0.00001 0.1 5x 20% 12% 8% VIRTUAL 0.00001 0.1 5x 20% 12% 8% ICP 0.0001 0.01 5x 20% 12% 8% MNT 0.00001 0.1 5x 20% 12% 8% KAITO 0.00001 0.1 5x 20% 12% 8% APEX 0.00001 0.1 5x 20% 12% 8% GRASS 0.00001 0.1 5x 20% 12% 8% CC 0.00001 0.1 5x 20% 12% 8% BERA 0.00001 0.1 5x 20% 12% 8% ASTER 0.00001 0.1 5x 20% 12% 8% GMX 0.0001 0.01 5x 20% 12% 8% HBAR 0.00001 0.1 5x 20% 12% 8% ETHFI 0.00001 0.1 5x 20% 12% 8% MORPHO 0.00001 0.1 5x 20% 12% 8% EIGEN 0.00001 0.1 5x 20% 12% 8% MET 0.00001 0.1 5x 20% 12% 8% ZRO 0.00001 0.1 5x 20% 12% 8% DYDX 0.00001 0.1 5x 20% 12% 8% FIL 0.00001 0.1 5x 20% 12% 8% ZEC 0.001 0.001 5x 20% 12% 8% S 0.00001 0.1 5x 20% 12% 8% YZY 0.00001 0.1 5x 20% 12% 8% VVV 0.0001 0.01 3x 33.33% 20% 13.33% DOLO 0.00001 0.1 3x 33.33% 20% 13.33% MYX 0.0001 0.01 3x 33.33% 20% 13.33% kTOSHI 0.0001 0.01 3x 33.33% 20% 13.33% ZORA 0.000001 1 3x 33.33% 20% 13.33% AERO 0.00001 0.1 3x 33.33% 20% 13.33% NMR 0.0001 0.01 3x 33.33% 20% 13.33% 2Z 0.00001 0.1 3x 33.33% 20% 13.33% AVNT 0.00001 0.1 3x 33.33% 20% 13.33% LINEA 0.000001 1 3x 33.33% 20% 13.33% USELESS 0.00001 0.1 3x 33.33% 20% 13.33% RESOLV 0.000001 1 3x 33.33% 20% 13.33% CRO 0.00001 0.1 3x 33.33% 20% 13.33% 0G 0.0001 0.01 3x 33.33% 20% 13.33% PROVE 0.00001 0.1 3x 33.33% 20% 13.33% EDEN 0.00001 0.1 3x 33.33% 20% 13.33% FF 0.00001 0.1 3x 33.33% 20% 13.33% KTOSHI 0.0001 0.01 3x 33.33% 20% 13.33% STBL 0.00001 0.1 3x 33.33% 20% 13.33% USDCHF 0.00001 0.1 25x 5% 2.4% 1.6% USDCAD 0.00001 0.1 25x 5% 2.4% 1.6% USDJPY 0.001 0.001 25x 5% 2.4% 1.6% EURUSD 0.00001 0.1 25x 5% 2.4% 1.6% GBPUSD 0.00001 0.1 25x 5% 2.4% 1.6% XAG 0.0001 0.01 10x 10% 6% 4% XAU 0.01 0.0001 15x 6.66% 3.99% 2.66% [PreviousPublic Poolschevron-left](https://docs.lighter.xyz/trading/public-pools) [NextPrelaunch Marketschevron-right](https://docs.lighter.xyz/trading/prelaunch-markets) Last updated 1 day ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Liquidations & LLP (Insurance Fund) | Lighter Docs ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/liquidations-and-llp-insurance-fund#overview) Overview Each market in Lighter has different margin requirement configurations, which essentially define how much leverage an account can have in its positions without getting liquidated. When the value of an account falls below the margin requirements, liquidation occurs. Lighter has three different levels of margin requirements, each triggering different actions by the exchange. For a specific account, the margin requirements are defined as follows: Si:\=∣posi∣Ii:\=initial margin fraction for the marketMi:\=maintenance margin fraction for the marketCi:\=close out margin fraction for the market Initial Margin Req:\=∑Si×marki×IiMaintenance Margin Req:\=∑Si×marki×MiClose Out Margin Req:\=∑Si×marki×Ci Account Value\=Collateral+∑(markPricei−avgEntryPricei)×positioni S\_i:= |pos\_i| \\\\ I\_i := \\text{initial margin fraction for the market} \\\\ M\_i := \\text{maintenance margin fraction for the market} \\\\ C\_i := \\text{close out margin fraction for the market} \\\\~\\\\ \\text{Initial Margin Req} := \\sum S\_i × mark\_i × I\_i \\\\ \\text{Maintenance Margin Req} := \\sum S\_i × mark\_i × M\_i \\\\ \\text{Close Out Margin Req} := \\sum S\_i × mark\_i × C\_i \\\\~\\\\ \\text{Account Value} = Collateral + \\sum (markPrice\_i - \\text{avgEntryPrice}\_i) \\times position\_i Si​:=∣posi​∣Ii​:=initial margin fraction for the marketMi​:=maintenance margin fraction for the marketCi​:=close out margin fraction for the market Initial Margin Req:=∑Si​×marki​×Ii​Maintenance Margin Req:=∑Si​×marki​×Mi​Close Out Margin Req:=∑Si​×marki​×Ci​ Account Value\=Collateral+∑(markPricei​−avgEntryPricei​)×positioni​ Margin requirement fractions are defined so that CiMaintenance Margin Req\\small \\text{Account Value} \\geq \\text{Initial Margin Req} > \\text{Maintenance Margin Req}Account Value≥Initial Margin Req\>Maintenance Margin Req An account is considered healthy when its account value is greater than all the margin requirements. It can execute any type of exchange operation as long as its position remains healthy after the execution of the transaction. 2. _**Pre-Liquidation**_**:** Initial Margin Req\>Account Value≥Maintenance Margin Req\\small \\text{Initial Margin Req} > \\text{Account Value} \\geq \\text{Maintenance Margin Req}Initial Margin Req\>Account Value≥Maintenance Margin Req An account is in pre-liquidation mode when its account value is below the initial margin requirements but above the maintenance margin requirements. In pre-liquidation mode, only exchange operations that do not decrease the account value to the maintenance margin requirement ratio and do not increase the size of any position can be executed. More formally:∙ For all market i, ∣posiold∣≥∣posinew∣ ∙ Account ValueoldInitial Margin Reqold≤Account ValuenewInitial Margin Reqnew\\bullet \\text{ \\small For all market i, } |{pos\_i}\_{old}| \\geq|{pos\_i}\_{new}| \\\\~\\\\ \\bullet \\text{ }\\frac{\\text{Account Value}\_{old}}{\\text{Initial Margin Req}\_{old}} \\leq \\frac{\\text{Account Value}\_{new}}{\\text{Initial Margin Req}\_{new}} ∙ For all market i, ∣posi​old​∣≥∣posi​new​∣ ∙ Initial Margin Reqold​Account Valueold​​≤Initial Margin Reqnew​Account Valuenew​​ 3. _**Partial Liquidation**_ Maintenance Margin Req\>Account Value\>Close-out Margin Req\\small \\text{Maintenance Margin Req} > \\text{Account Value} > \\text{Close-out Margin Req}Maintenance Margin Req\>Account Value\>Close-out Margin Req In the case of partial liquidation, liquidation engine first cancels all of the open orders of the user. If the account value is still below the maintenance margin, liquidation engine orders open positions of the underwater account by a heuristic, then sends IoC limit orders on behalf of the margin called user with corresponding zero price one by one **for the full amount of the position**. If the user goes above the maintenance margin requirement after **fully executing** a trade, then the liquidation engine stops the liquidations. If the user gets filled at a better price than the zero price, liquidation engine takes up to 1% liquidation fee and sends it to LLP (insurance fund). One important aspect of the zero price is, when a trade gets executed at the zero price, total account value to maintenance margin ratio stays the same. Thus any trade that happens in partial liquidation phase only increases the account health, since the trade price is at least as good as the zero price. If all of the account positions are closed (i.e. maintenance margin requirement is 0) at the zero price, account value also becomes zero. zeroPricei(short)\=markPricei×(1+Mi×Account ValueMaintenance Margin Req)zeroPricei(long)\=markPricei×(1−Mi×Account ValueMaintenance Margin Req)\\small zeroPrice\_i(short) = markPrice\_i \\times (1 + \\frac{{M}\_i\\times \\text{Account Value}}{\\text{Maintenance Margin Req}}) \\\\ zeroPrice\_i(long) = markPrice\_i \\times (1 − \\frac{{M}\_i \\times \\text{Account Value}}{{\\text{Maintenance Margin Req}}}) zeroPricei​(short)\=markPricei​×(1+Maintenance Margin ReqMi​×Account Value​)zeroPricei​(long)\=markPricei​×(1−Maintenance Margin ReqMi​×Account Value​) Deriving Zero Price For a Long Position TAV′\=TAV+(ZP−MP)×TSMMR′\=MMR−TS×MP×MiTAV′MMR′\=TAV+ZP×TS−MP×TSMMR−MP×TS×Mi\=TAVMMR(TAV+ZP×TS−MP×TS)×MMR\=TAV×(MMR−MP×TS×Mi)TAV×MMR+ZP×TS×MMR−MP×TS×MMR\=TAV×MMR−MP×TS×TAV×MiZP×TS×MMR−MP×TS×MMR\=−MP×TS×TAV×MiZP×MMR−MP×MMR\=−MP×TAV×MiZP×MMR\=MP×MMR−MP×TAV×MiZP×MMR\=MP×(MMR−TAV×Mi)ZP\=MP×(1−TAV×MiMMR)Where:TAV\=Total Account ValueMMR\=Maintenance Margin RequirementZP\=Zero PriceMP\=Mark PriceTS\=Trade Size\\text{Deriving Zero Price For a Long Position} \\\\~\\\\ \\\\ \\tiny \\begin{aligned} \\text{TAV}' &= \\text{TAV} + (\\text{ZP} - \\text{MP}) \\times \\text{TS} \\\\ \\text{MMR}' &= \\text{MMR} - \\text{TS} \\times \\text{MP} \\times M\_i \\\\ \\frac{\\text{TAV}'}{\\text{MMR}'} &= \\frac{\\text{TAV} + \\text{ZP} \\times \\text{TS} - \\text{MP} \\times \\text{TS}}{\\text{MMR} - \\text{MP} \\times \\text{TS} \\times M\_i} \\\\ &= \\frac{\\text{TAV}}{\\text{MMR}} \\\\ (\\text{TAV} + \\text{ZP} \\times \\text{TS} - \\text{MP} \\times \\text{TS}) \\times \\text{MMR} &= \\text{TAV} \\times (\\text{MMR} - \\text{MP} \\times \\text{TS} \\times M\_i) \\\\ \\text{TAV} \\times \\text{MMR} + \\text{ZP} \\times \\text{TS} \\times \\text{MMR} - \\text{MP} \\times \\text{TS} \\times \\text{MMR} &= \\text{TAV} \\times \\text{MMR} - \\text{MP} \\times \\text{TS} \\times \\text{TAV} \\times M\_i \\\\ \\text{ZP} \\times \\text{TS} \\times \\text{MMR} - \\text{MP} \\times \\text{TS} \\times \\text{MMR} &= - \\text{MP} \\times \\text{TS} \\times \\text{TAV} \\times M\_i \\\\ \\text{ZP} \\times \\text{MMR} - \\text{MP} \\times \\text{MMR} &= - \\text{MP} \\times \\text{TAV} \\times M\_i \\\\ \\text{ZP} \\times \\text{MMR} &= \\text{MP} \\times \\text{MMR} - \\text{MP} \\times \\text{TAV} \\times M\_i \\\\ \\text{ZP} \\times \\text{MMR} &= \\text{MP} \\times (\\text{MMR} - \\text{TAV} \\times M\_i) \\\\ \\text{ZP} &= \\text{MP} \\times \\left(1 - \\frac{\\text{TAV} \\times M\_i}{\\text{MMR}}\\right) \\end{aligned} \\quad \\begin{aligned} &\\text{Where:} \\\\ &\\text{TAV} = \\text{Total Account Value} \\\\ &\\text{MMR} = \\text{Maintenance Margin Requirement} \\\\ &\\text{ZP} = \\text{Zero Price} \\\\ &\\text{MP} = \\text{Mark Price} \\\\ &\\text{TS} = \\text{Trade Size} \\end{aligned}Deriving Zero Price For a Long Position TAV′MMR′MMR′TAV′​(TAV+ZP×TS−MP×TS)×MMRTAV×MMR+ZP×TS×MMR−MP×TS×MMRZP×TS×MMR−MP×TS×MMRZP×MMR−MP×MMRZP×MMRZP×MMRZP​\=TAV+(ZP−MP)×TS\=MMR−TS×MP×Mi​\=MMR−MP×TS×Mi​TAV+ZP×TS−MP×TS​\=MMRTAV​\=TAV×(MMR−MP×TS×Mi​)\=TAV×MMR−MP×TS×TAV×Mi​\=−MP×TS×TAV×Mi​\=−MP×TAV×Mi​\=MP×MMR−MP×TAV×Mi​\=MP×(MMR−TAV×Mi​)\=MP×(1−MMRTAV×Mi​​)​​Where:TAV\=Total Account ValueMMR\=Maintenance Margin RequirementZP\=Zero PriceMP\=Mark PriceTS\=Trade Size​ 1. _**Full Liquidation**_ Close-out Margin Req\>Account Value\\small \\text{Close-out Margin Req} > \\text{Account Value}Close-out Margin Req\>Account Value If user goes below the close-out margin requirement, LLP closes all of the user positions and takes over all the remaining account collateral and sends it to the LLP. Note that the LLP does not take over the position if total account value of the LLP goes below 0, so following must be satisfied for full liquidation: 2. **Auto-deleveraging (ADL)** When an account has a negative value and the LLP does not have enough capital to cover the losses of the bankrupt account, the exchange initiates auto-deleveraging (ADL) for the bankrupt account’s positions. A bankrupt account, by definition, has at least one open position. The exchange identifies positions on the opposite side of the bankrupt positions and executes trades between these accounts if their zero prices align. This ensures that ADL does not decrease the health of any account, as the execution price cannot be worse than the zero price of the position. When selecting positions for ADL on the opposite side, the system ranks users based on their leverage and unrealized PnL. ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/liquidations-and-llp-insurance-fund#isolated-liquidations) Isolated Liquidations When a users sets a market to the isolated mode, the position will be treated as a separate account and won't be affected by the other positions. The calculations and the flow will be the same as above, but the collateral for an isolated position is called AllocatedMargin. [PreviousPrelaunch Marketschevron-left](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/prelaunch-markets) [NextLLP Strategieschevron-right](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/liquidations-and-llp-insurance-fund/llp-strategies) Last updated 2 months ago * [Overview](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/liquidations-and-llp-insurance-fund#overview) * [Liquidation Waterfall](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/liquidations-and-llp-insurance-fund#liquidation-waterfall) * [Isolated Liquidations](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/liquidations-and-llp-insurance-fund#isolated-liquidations) sun-brightdesktopmoon sun-brightdesktopmoon --- # Introduction | Lighter Docs ![Page cover](https://docs.lighter.xyz/~gitbook/image?url=https%3A%2F%2F1186887628-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FXuISSHTfjHCg60BNss6v%252Fuploads%252FJA1wPuNsUVyGMfK5eoft%252FzklighterHeaderBlue.png%3Falt%3Dmedia%26token%3Df84e1eb0-2343-4f61-b20e-dc495f684a71&width=1248&dpr=3&quality=100&sign=763e1532&sv=2)![Page cover](https://docs.lighter.xyz/~gitbook/image?url=https%3A%2F%2F1186887628-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FXuISSHTfjHCg60BNss6v%252Fuploads%252F5AGP4r3Q4zBjjmRh6xzD%252FzklighterHeaderBlue.png%3Falt%3Dmedia%26token%3D99472e90-481c-48e1-8b68-9fe8564ff283&width=1248&dpr=3&quality=100&sign=376eca0f&sv=2) Lighter is a decentralized trading platform designed for security, scale, and performance in a zero-fee trading environment. It is the first exchange to offer verifiable order matching and liquidations while delivering performance comparable to traditional exchanges. The Lighter platform is available at: * [https://app.lighter.xyz/arrow-up-right](https://app.lighter.xyz/) * [https://lighter.exchange/arrow-up-right](https://lighter.exchange/trade/ETH) [NextTechnical Architecture: Lighter Corechevron-right](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/about-lighter/technical-architecture-lighter-core) Last updated 2 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # LIT Utility | Lighter Docs ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/about-lighter/lit-utility#staking) Staking The **LIT Staking Pool** ([https://app.lighter.xyz/stakingarrow-up-right](https://app.lighter.xyz/staking) ) is designed to align long-term participants with the core economics of the protocol. By staking LIT, participants gain access to platform benefits aligned with how they interact with the exchange. Unstaking is subject to a 3-day lockup period. Active Staking Programs: * LLP Access * Staking APR #### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/about-lighter/lit-utility#llp-access) LLP Access As part of our approach to offering access to niche financial products, the Lighter Liquidity Pool (LLP) is now exclusively accessible to LIT stakers. For every 1 LIT staked, participants may deposit up to 10 USDC into the LLP. #### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/about-lighter/lit-utility#staking-apr) Staking APR Staking participants currently earn APR through staking rewards. In the short term, Lighter is bootstrapping this yield using company funds and pre-TGE revenue. LIT is bought from `0x5E52363E65C99fefC0E356F0DC6c37b75bf8FC91` for these rewards. Soon staking yield will be funded by dedicated staking programs. One example currently in development will allow participants who do not use certain staking benefits ([such as trading fee discountsarrow-up-right](https://app.gitbook.com/o/UL2QKgoUbvRiSpqVpgNb/s/XuISSHTfjHCg60BNss6v/~/edit/~/changes/61/trading/trading-fees#fee-discounts-for-premium-accounts-via-staking-coming-soon) ) to transfer those benefits to others. Participants seeking access to specific fee tiers will pay upfront for these rights, and that revenue will be distributed to LIT stakers as yield. ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/about-lighter/lit-utility#buybacks) Buybacks LIT is bought back by the protocol using trading fee revenue. Buybacks are executed via daily 24-hour TWAPs, with the flexibility to use shorter timeframes depending on market conditions. The treasury account that conducts these is `0x0000000000000000000000000000000000000000` [PreviousTechnical Architecture: Lighter Corechevron-left](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/about-lighter/technical-architecture-lighter-core) [NextTrading Feeschevron-right](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/trading-fees) Last updated 2 months ago * [Staking](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/about-lighter/lit-utility#staking) * [Buybacks](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/about-lighter/lit-utility#buybacks) sun-brightdesktopmoon sun-brightdesktopmoon --- # Security Audits | Lighter Docs Access the latest security audits for our smart contracts and circuits below. file-pdf 363KB [22-09-2025\_Nethermind\_LighterCore.pdf](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2FpbieGJkDU9ReEfZC3bUC%2F22-09-2025_Nethermind_LighterCore.pdf?alt=media&token=b271defe-c541-4d6f-90f9-a43ad39b51da) PDF downloadDownload[arrow-up-right-from-squareOpen](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2FpbieGJkDU9ReEfZC3bUC%2F22-09-2025_Nethermind_LighterCore.pdf?alt=media&token=b271defe-c541-4d6f-90f9-a43ad39b51da) file-pdf 319KB [22-09-2025\_Nethermind\_LighterEvmDepositBridge.pdf](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2F68Lh9cMxEbCwll1TE7Wx%2F22-09-2025_Nethermind_LighterEvmDepositBridge.pdf?alt=media&token=382202e7-4667-4d1b-b19c-fef62b581f5c) PDF downloadDownload[arrow-up-right-from-squareOpen](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2F68Lh9cMxEbCwll1TE7Wx%2F22-09-2025_Nethermind_LighterEvmDepositBridge.pdf?alt=media&token=382202e7-4667-4d1b-b19c-fef62b581f5c) file-pdf 1MB [08-04-2025\_Block\_audit.pdf](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2Fx29oIB5HInlZotXSFFdK%2F08-04-2025_Block_audit.pdf?alt=media&token=ec2a4514-a8c6-45d5-bc24-70a4e01fe05f) PDF downloadDownload[arrow-up-right-from-squareOpen](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2Fx29oIB5HInlZotXSFFdK%2F08-04-2025_Block_audit.pdf?alt=media&token=ec2a4514-a8c6-45d5-bc24-70a4e01fe05f) file-pdf 695KB [09-08-2025\_Block\_and\_delta\_audit.pdf](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2FDLNwTsuvoIdTmdemt0NC%2F09-08-2025_Block_and_delta_audit.pdf?alt=media&token=6d917ddf-6546-42d9-8b9e-e983c13b5f97) PDF downloadDownload[arrow-up-right-from-squareOpen](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2FDLNwTsuvoIdTmdemt0NC%2F09-08-2025_Block_and_delta_audit.pdf?alt=media&token=6d917ddf-6546-42d9-8b9e-e983c13b5f97) file-pdf 640KB [10-10-2025\_Wrapper\_audit.pdf](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2FP5Vou5dAIWFzkyW9TL31%2F10-10-2025_Wrapper_audit.pdf?alt=media&token=4a69175c-3600-401a-b653-be23fad1eb95) PDF downloadDownload[arrow-up-right-from-squareOpen](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2FP5Vou5dAIWFzkyW9TL31%2F10-10-2025_Wrapper_audit.pdf?alt=media&token=4a69175c-3600-401a-b653-be23fad1eb95) file-pdf 516KB [11-05-2025\_Desert\_exit\_audit.pdf](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2FMDoggTx3YDmFtrSB4Ckx%2F11-05-2025_Desert_exit_audit.pdf?alt=media&token=16b89739-ec70-461d-9fbd-79ce81209f44) PDF downloadDownload[arrow-up-right-from-squareOpen](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2FMDoggTx3YDmFtrSB4Ckx%2F11-05-2025_Desert_exit_audit.pdf?alt=media&token=16b89739-ec70-461d-9fbd-79ce81209f44) file-pdf 322KB [11-24-2025\_Spot\_audit.pdf](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2FDhCeHhKLv6I0TAJWhbIi%2F11-24-2025_Spot_audit.pdf?alt=media&token=bd0f625e-3019-4c81-b6bb-8be84dc2812e) PDF downloadDownload[arrow-up-right-from-squareOpen](https://1186887628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuISSHTfjHCg60BNss6v%2Fuploads%2FDhCeHhKLv6I0TAJWhbIi%2F11-24-2025_Spot_audit.pdf?alt=media&token=bd0f625e-3019-4c81-b6bb-8be84dc2812e) [PreviousBug Bounty Programchevron-left](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/security/bug-bounty-program) Last updated 3 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Bug Bounty Program | Lighter Docs [PreviousRetailchevron-left](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/points-program/retail) [NextSecurity Auditschevron-right](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/security/security-audits) Last updated 2 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # PnL And Total Account Value | Lighter Docs ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/pnl-and-total-account-value#pnl-profit-and-loss) **PnL (Profit and Loss)** _**Unrealized PnL**_ represents the potential gain or loss an account would incur by closing all its open positions. It is calculated based on the difference between the average entry price of the positions and the current [mark price](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/fair-price-marking) . Let posipos\_iposi​ be the current position size of an account. posipos\_iposi​ is positive if the account position is long and negative if it is short. The unrealized PnL of the account can be calculated as: Unrealized PnL:\=∑(markPricei−avgEntryPricei)×positioni \\text{Unrealized PnL} := \\sum(\\text{markPrice}\_i - \\text{avgEntryPrice}\_i) \\times position\_i Unrealized PnL:=∑(markPricei​−avgEntryPricei​)×positioni​ **Realized PnL** is the gain / loss that has already been captured from the position after closing or due to funding payments. It is calculated based on the difference in USDC value between your average entry price and exit price. Additionally, all funding payments for the position are immediately applied to its realized PNL. * When the user is closing a portion of an existing long or short position, average entry price stays the same and exchange realizes the difference in average exit and entry prices. ΔCollateral:\=(exitPricei−avgEntryPricei)×Δpositioni\\Delta Collateral := (\\text{exitPrice}\_i - \\text{avgEntryPrice}\_i) \\times \\Delta position\_i ΔCollateral:=(exitPricei​−avgEntryPricei​)×Δpositioni​ * When the user is increasing the size of their open position, no PnL is realized. Exchange updates the average entry price according to the following formula avgEntryPricei,new:\=avgEntryPricei,old×positioni,old+tradePrice×tradeSizepositioni,new \\text{avgEntryPrice}\_{i, new} := \\frac{{avgEntryPrice}\_{i, old }\\times {position\_{i, old}} + {tradePrice\\times tradeSize}}{position\_{i, new}}avgEntryPricei,new​:=positioni,new​avgEntryPricei,old​×positioni,old​+tradePrice×tradeSize​ ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/pnl-and-total-account-value#total-account-value) Total Account Value _**Total Account Value**_ represents the total USDC value of an account in Lighter, including all open positions and collateral. It is calculated as follows: Total Account Value\=Collateral+Unrealized PnL\\text{Total Account Value} = \\text{Collateral} + \\text{Unrealized PnL}Total Account Value\=Collateral+Unrealized PnL Note: Isolated positions have a different collateral (`AllocatedMargin`) for the margin supporting the relevant position. It is the same as collateral, but supporting a specific position only and should be considered as collateral when doing the calculations above [PreviousFunding Rate Rebateschevron-left](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/funding/funding-rate-rebates) [NextFair Price Markingchevron-right](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/fair-price-marking) Last updated 1 month ago * [PnL (Profit and Loss)](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/pnl-and-total-account-value#pnl-profit-and-loss) * [Total Account Value](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/pnl-and-total-account-value#total-account-value) sun-brightdesktopmoon sun-brightdesktopmoon --- # Points Program | Lighter Docs Lighter’s Season 1 Points Program ended with the final Private Beta distribution on September 30, 2025. Season 2 points will be distributed every Friday. The Lighter team may adjust distributions at its discretion. Earn points by running organic trading strategies via UI and API. Sybil, self-trading, and similar activities will not earn points. [PreviousAPIchevron-left](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/api) [NextMarket Makerschevron-right](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/points-program/market-makers) Last updated 2 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Unified Trading Accounts | Lighter Docs ![](https://docs.lighter.xyz/~gitbook/image?url=https%3A%2F%2F1186887628-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FXuISSHTfjHCg60BNss6v%252Fuploads%252FivSDmtDOvErQNQ2kTXGl%252Fcollateral-docs-header.png%3Falt%3Dmedia%26token%3D36147d68-0707-4b82-9121-8d472885b2da&width=768&dpr=3&quality=100&sign=125ea154&sv=2) #### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/unified-trading-accounts#unified-trading-account-uta) Unified Trading Account (UTA) Unified Trading Accounts (UTA) enables unified margin on Spot and Perpetuals USDC balances. This functionality represents the first step toward supporting additional Spot assets as collateral in perpetual markets. #### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/unified-trading-accounts#simple-trading-account) Simple Trading Account Simple Trading Accounts**,** perpetual and spot balances are maintained separately. Perpetual positions may only use settlement assets as collateral. Cross-margining applies exclusively within perpetual markets and does not extend to spot balances. [PreviousOrder Types & Matchingchevron-left](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/order-types-and-matching) [NextPublic Poolschevron-right](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/public-pools) Last updated 1 month ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Prelaunch Markets | Lighter Docs ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/prelaunch-markets#market-structure) Market structure All prelaunch markets will operate in **isolated mode only**. It is not possible to open positions in cross-margin mode due to the experimental and volatile nature of these markets. ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/prelaunch-markets#xlp) XLP Because prelaunch markets are volatile, we are taking precautions in deploying them. LLP will not act as a market maker on these markets. Instead, a new pool called **XLP** (Experimental Liquidity Provider) will offer liquidity for these markets. LLP will have no exposure to prelaunch markets. XLP will act solely as a liquidity provider for these markets, without a special role in the liquidation flow. More details on liquidations can be found below. ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/prelaunch-markets#liquidations) Liquidations Due to the nature of prelaunch markets and the addition of XLP, the liquidation flow is different. **Prelaunch markets have no liquidation fee.** If a user needs to be liquidated — that is, when their margin falls below the **Maintenance Margin** but remains above the **Close-Out Margin** — the exchange will send an **Immediate-or-Cancel (IoC)** order on behalf of the user to close the position. This will not have a fee associated with it. If the user falls below the **Close-Out Margin**, they will be directly **Auto-Deleveraged (ADL)**. This flow differs from crypto markets, where the entire account would typically be transferred to LLP. In normal cases, ADL is used only when LLP does not have sufficient funds to cover the losses of a bankrupt account. **Note:** ADL occurs when a user is below the Close-Out Margin. This does not imply that the user is bankrupt. Because of this, the counterparty (the trader on the other side of the ADL) receives a more favorable execution price. [PreviousRWA Pricing Mechanismchevron-left](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/real-world-assets-rwa/rwa-pricing-mechanism) [NextLiquidations & LLP (Insurance Fund)chevron-right](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/liquidations-and-llp-insurance-fund) Last updated 5 months ago * [Market structure](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/prelaunch-markets#market-structure) * [XLP](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/prelaunch-markets#xlp) * [Liquidations](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/prelaunch-markets#liquidations) sun-brightdesktopmoon sun-brightdesktopmoon --- # Trading Fees | Lighter Docs For both perpetual futures and spot markets, Lighter currently charges no maker or taker fees for Standard Accounts, allowing all users to trade across all markets free of charge. Premium Accounts are subject to maker and taker fees, with the option to receive fee discounts by staking LIT. ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/trading-fees#account-types) Account Types #### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/trading-fees#standard-account-default-trade-for-free) Standard Account (Default) — Trade for free. * Fees: 0 maker / 0 taker * Taker latency: 300ms * Maker latency: 200ms * Cancel latency: 200ms #### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/trading-fees#premium-fee-tiers) Premium Fee Tiers For Premium Accounts, all order cancelations & Post Only order placements not subject to any additional latency. For this account type, please consider the [volume quota programarrow-up-right](https://apidocs.lighter.xyz/docs/volume-quota-program) . Staked LIT Maker/Taker Fee Discount Maker Fee Taker Fee Taker Latency Latency Improvement 0 0.0040% 0.0280% 200 ms 1,000 2.5% 0.0039% 0.0273% 195 ms 2.5% 3,000 5% 0.0038% 0.0266% 190 ms 5% 10,000 10% 0.0036% 0.0252% 180 ms 10% 30,000 15% 0.0034% 0.0238% 170 ms 15% 100,000 20% 0.0032% 0.0224% 160 ms 20% 300,000 25% 0.0030% 0.0210% 150 ms 25% 500,000 30% 0.0028% 0.0196% 140 ms 30% * * * ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/trading-fees#fee-discounts-for-premium-accounts-via-staking) Fee Discounts for Premium Accounts via Staking All Premium Account fees and latency will be eligible for staking discounts. Staking discounts will be applied at the L1 address level, where the total staked LIT is calculated as the combined stake across the main account and all associated sub-accounts. As a result, the main account and its sub-accounts will share the same staking tier, determined by the aggregated LIT stake. #### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/trading-fees#lit-fee-credits-program-coming-soon) LIT Fee Credits Program \[coming soon\] We are planning a LIT Fee Credits program designed to support smaller or capital-constrained participants making use of Premium Accounts. Instead of staking the full amount required for a higher discount tier, users will be able to buy staked LIT fee credits, which will count toward their staking tier. For example, a participant with 100,000 LIT staked may use an additional 200,000 staked LIT via LIT Fee Credits to qualify for the next staking tier. Acquiring LIT Fee Credits will require a one-time upfront fee, determined by the amount of LIT accessed and the selected access duration. All proceeds from the LIT Fee Credits program are distributed to LIT stakers, with the upfront fee streamed as daily rewards over the full access period. This program is currently in the design phase, and feedback is welcome. #### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/trading-fees#rate-limits-considerations) Rate Limits Considerations We recognize that many participants distribute trading activity across multiple addresses due to operational or rate-limit considerations. To avoid disrupting existing workflows, rate limits will be adjusted to allow users to consolidate activity through sub-accounts without any downside. In addition, participants may provide a list of addresses to the Lighter team, enabling all associated accounts to share a single tier based on the total staked LIT across those addresses. We also plan to introduce in-app wallet linking for fee-discount purposes soon. [PreviousLIT Utilitychevron-left](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/about-lighter/lit-utility) [NextContract Specificationschevron-right](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/contract-specifications) Last updated 1 month ago * [Account Types](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/trading-fees#account-types) * [Fee Discounts for Premium Accounts via Staking](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/trading-fees#fee-discounts-for-premium-accounts-via-staking) sun-brightdesktopmoon sun-brightdesktopmoon --- # Self-Trade Prevention | Lighter Docs Lighter imposes a self-trade prevention mechanism. Trades between the same account cancel the resting order (maker) instead of executing the respective trade. Without this mechanism, self-trades would result in no position change and fees being paid unnecessarily. [PreviousFair Price Markingchevron-left](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/fair-price-marking) [NextAPIchevron-right](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/api) Last updated 2 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Technical Architecture: Lighter Core | Lighter Docs Read the Whitepaper: [https://assets.lighter.xyz/whitepaper.pdfarrow-up-right](https://assets.lighter.xyz/whitepaper.pdf) ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/about-lighter/technical-architecture-lighter-core#background) Background Lighter Core is built on the following principles: * Users always maintain custody of their assets. * Operations must be verifiable and strictly adhere to a publicly predefined set of rules. * The system must scale seamlessly in both latency and throughput. * Users must always be able to exit securely and independently. Achieving this requires a **publicly verifiable compute engine** that prevents operator misbehavior and guarantees execution strictly according to publicly defined rules. A few existing solutions for verifiable computation exist, each with trade-offs: * **Blockchains with Decentralized Consensus**: Achieve verifiability via redundant execution across network nodes. While secure, they face latency and throughput limitations due to consensus mechanisms and network coordination. Additionally, common approaches lack flexibility around data privacy since data must be public to provide redundancy. The Ethereum blockchain is an example of a blockchain with decentralized consensus. * **Trusted Execution Environments (TEEs)**: Provide hardware-level verification but depend on vendor trust and are vulnerable to side-channel attacks. They require some level of trust since users cannot independently verify execution. * **Succinct Proofs (ZK-Proofs)**: Historically costly and challenging to develop, succinct proofs offer strong security and scale both horizontally and vertically. They also provide modularity for data privacy, unlike consensus-based systems. Additionally, secure exits require asset storage in a robust non-custodial environment. However, the security of the environment users exit to is equally critical. Isolated blockchains connected via bridges offer no non-custodial fallback if compromised. Despite inherent scalability limitations, Ethereum is the most battle-tested verifiable execution platform, providing a neutral, secure settlement layer ideal for user exits. ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/about-lighter/technical-architecture-lighter-core#lighter-core) Lighter Core Lighter Core combines succinct execution proofs with Ethereum as the anchoring layer for both proofs and system state. Users can securely enter or exit directly through Ethereum, with all proofs verified publicly before any state updates occur. Scalability is achieved through Lighter Core’s novel proving engine, purpose-built from scratch for exchange-specific workloads. It leverages new algorithms and optimized data structures for efficient exchange-operation proof generation. All exchange operations are executed deterministically via user-signed transactions. A batch of these transactions produces a new post-execution state along with a succinct cryptographic proof. ![](https://docs.lighter.xyz/~gitbook/image?url=https%3A%2F%2F1186887628-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FXuISSHTfjHCg60BNss6v%252Fuploads%252FKpB5ZGDlaQH6k213BQwz%252Fimage%2520%285%29.png%3Falt%3Dmedia%26token%3D786ede76-0295-4389-9197-0495edf70b6c&width=768&dpr=3&quality=100&sign=a283ade&sv=2) Simplified diagram of the described architecture Smart contracts on Ethereum hold deposited assets and the canonical Lighter state root, which encapsulates user assets and positions, public pools, order books, and other critical system components. While processing exchange operations, Lighter Core periodically publishes state update proposals to Ethereum. Each proposal transaction is accompanied by data blobs containing the details of the state transition (e.g., per-account changes), allowing users to independently reconstruct and verify their state. The posted data is highly compressed, enabling Lighter Core to publish state data directly to Ethereum at high scale without relying on third parties. A Sequencer coordinates first-in–first-out transaction ordering and provides soft finality, executing exchange operations and generating data consumed by other system components. This data is fed to API servers, which provide ultra-low-latency data to end users, and to horizontally and vertically scalable Witness Generator services, which transform it into circuit-friendly inputs for the Lighter Prover. The Prover generates proofs in parallel across Lighter transactions. Hundreds of thousands of these execution proofs are then fed into a multi-layer aggregation engine, where they are combined into a single batch proof. This enables efficient and cost-effective verification on Ethereum. Once the proof for a state-update proposal is verified on Ethereum, the contracts update the exchange state. These proofs also attest to the validity and sufficiency of the data posted in Ethereum’s data blobs—demonstrating that the posted data alone is enough to reconstruct all user states using only censorship-resistant and immutable on-chain data. #### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/about-lighter/technical-architecture-lighter-core#escape-hatch) Escape Hatch To guarantee liveness and censorship resistance, Lighter Core introduces a **priority request queue** directly on Ethereum. Users can submit critical exit operations—such as withdrawals, public pool exits, or reduce-only IOC orders—on-chain, ensuring that the Sequencer must process them within a predefined timeframe. If the Sequencer fails to process these priority requests in time, the system automatically triggers **Escape Hatch mode**. In this state, the Lighter Core smart contract freezes entirely. Users can then leverage Ethereum-posted data blobs to reconstruct their account state and generate succinct proofs of ownership (balances, positions, pool shares). These proofs allow users to withdraw the full value of their assets directly on Ethereum, with no reliance on off-chain coordination—ensuring complete asset security and independence. [PreviousIntroductionchevron-left](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g) [NextLIT Utilitychevron-right](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/about-lighter/lit-utility) Last updated 2 months ago * [Background](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/about-lighter/technical-architecture-lighter-core#background) * [Lighter Core](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/about-lighter/technical-architecture-lighter-core#lighter-core) sun-brightdesktopmoon sun-brightdesktopmoon --- # Fair Price Marking | Lighter Docs _**Mark price**_ is the fair price of a perpetual contract. Mark price is calculated using the liquidity in the perpetual market order book and the _**index price**_ (spot price of the underlying market). At any point in time, mark price is defined as follows: Impact Notional Amount\=500 USDC/Initial Margin FractionImpact Bid Pricet\=Avg execution price for a market sell of the impact notional valueImpact Ask Pricet\=Avg execution price for a market buy of the impact notional valueImpact Pricet\=(Impact Bid Pricet+Impact Ask Pricet)/2 price1t\=indext+EMA⁡8 min(clamp(Impact Pricet−indext,−indext/200,+indext/200))whereclamp⁡(x,a,b)\=max⁡(a,  min⁡(b,x))andEMA⁡8 minrefers to the Exponential Moving Average of the value over 8 minutes price2t\=median(cexPricest)where cexPricest are mark prices from different centralized exchanges Mark Price\=Median(Impact Pricet,price1t,price2t)\\small \\text{Impact Notional Amount} = 500 \\text{ USDC} / \\text{Initial Margin Fraction} \\\\ \\text{Impact Bid Price}\_t = \\text{Avg execution price for a market sell of the impact notional value} \\\\ \\text{Impact Ask Price}\_t = \\text{Avg execution price for a market buy of the impact notional value} \\\\ \\text{Impact Price}\_t = (\\text{Impact Bid Price}\_t + \\text{Impact Ask Price}\_t) / 2 \\\\ \\\\~\\\\ \\text{price1}\_t = index\_t + \\operatorname{EMA}\_{8\\ \\mathrm{min}}( \\text{clamp}( \\text{Impact Price}\_t - index\_t, -index\_t/200,+index\_t/200 )) \\\\ \\text{where} \\operatorname{clamp}(x,a,b) = \\max\\bigl(a,\\;\\min(b,x)\\bigr) \\\\ \\text{and} \\operatorname{EMA}\_{8\\ \\mathrm{min}} \\text{refers to the Exponential Moving Average of the value over 8 minutes} \\\\~\\\\ \\text{price2}\_t = median(\\text{cexPrices}\_t) \\\\ \\text{where cexPrices}\_t \\text{ are mark prices from different centralized exchanges} \\\\~\\\\ \\text{Mark Price} = Median(\\text{Impact Price}\_t, price1\_t, price2\_t) Impact Notional Amount\=500 USDC/Initial Margin FractionImpact Bid Pricet​\=Avg execution price for a market sell of the impact notional valueImpact Ask Pricet​\=Avg execution price for a market buy of the impact notional valueImpact Pricet​\=(Impact Bid Pricet​+Impact Ask Pricet​)/2 price1t​\=indext​+EMA8 min​(clamp(Impact Pricet​−indext​,−indext​/200,+indext​/200))whereclamp(x,a,b)\=max(a,min(b,x))andEMA8 min​refers to the Exponential Moving Average of the value over 8 minutes price2t​\=median(cexPricest​)where cexPricest​ are mark prices from different centralized exchanges Mark Price\=Median(Impact Pricet​,price1t​,price2t​) Lighter uses a combination of oracles (Chainlink, Stork, Pyth) to determine the index price. **Note**: because the mark price is used when deciding if liquidations should be happening, the mark price should reflect as much as possible the impact price, so that the execution of liquidations should happen close to mark price. Because of this, we chose to incorporate the impact price directly in the mark price formula. Price 1 can be summarised as Index Price + Lighter Perpetual Premium, where the premium is capped at 0.5% of the Index Price. The usage of the EMA makes it so if someone tries to manipulate the order book, they'd need to do so for a prolonged period of time. The cap of 0.5% ensures that the mark price on Lighter will not be bigger than the other external components by more than 0.5%. In summary, the EMA component should yield better results than just using the funding rate due to the shorter time span, while also being resilient to manipulation. [PreviousPnL And Total Account Valuechevron-left](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/pnl-and-total-account-value) [NextSelf-Trade Preventionchevron-right](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/self-trade-prevention) Last updated 2 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Real World Assets (RWA) | Lighter Docs RWAs are tradeable 24/7. Market types include commodities, equities, and fixed income. ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/real-world-assets-rwa#leverage) Leverage Leverage does not change outside trading hours. If you’re holding a 10× long position on Gold (XAU), your position remains unaffected, and there’s no need to reduce it. However, be aware that prices may swing significantly at market open. ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/real-world-assets-rwa#market-structure) Market structure All RWA markets will operate in **isolated mode only**. It is not possible to open RWA positions in cross-margin mode due to the experimental and volatile nature of these markets. **Coming Soon:** Cross Margin for RWAs. ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/real-world-assets-rwa#xlp) XLP Because RWAs are still experimental, we are taking precautions in deploying them. LLP will not act as a market maker on RWA markets. Instead, a new pool called **XLP** (Experimental Liquidity Provider) will offer liquidity for these markets. LLP will have no exposure to RWA markets. XLP will act solely as a liquidity provider for these markets, without a special role in the liquidation flow. ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/real-world-assets-rwa#liquidations) Liquidations Due to the nature of RWAs and the addition of XLP, the liquidation flow will change. **RWA markets will have no liquidation fee.** If a user needs to be liquidated — that is, when their margin falls below the **Maintenance Margin** but remains above the **Close-Out Margin** — the exchange will send an **Immediate-or-Cancel (IoC)** order on behalf of the user to close the position. This will not have a fee associated with it. If the user falls below the **Close-Out Margin**, they will be directly **Auto-Deleveraged (ADL)**. This flow differs from crypto markets, where the entire account would typically be transferred to LLP. In normal cases, ADL is used only when LLP does not have sufficient funds to cover the losses of a bankrupt account. **Note:** ADL occurs when a user is below the Close-Out Margin. This does not imply that the user is bankrupt. Because of this, the counterparty (the trader on the other side of the ADL) receives a more favourable execution price. **Note:** For Silver (XAG), the maximum leverage when opening a position is **10×**. Users are liquidated through the order book when leverage reaches **16.6×**. When leverage reaches **25×**, the entire position is ADL'ed. (All such positions use isolated margin only.) **Example:** If a user holds a long $1,000 XAG position with only $40 in collateral (for that isolated-margin position) and the price of XAG is $50, the entire position would be ADLed. Assume the position is fully deleveraged with a single counterparty. The counterparty — who holds a short position larger than $1,000 — will have their position reduced by $1,000 and will receive the $40 USDC in collateral. This effectively means the counterparty opened a long position at an average entry price of **$48**. [PreviousPublic Poolschevron-left](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/public-pools) [NextRWA Pricing Mechanismchevron-right](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/real-world-assets-rwa/rwa-pricing-mechanism) Last updated 1 month ago * [Leverage](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/real-world-assets-rwa#leverage) * [Market structure](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/real-world-assets-rwa#market-structure) * [XLP](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/real-world-assets-rwa#xlp) * [Liquidations](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/real-world-assets-rwa#liquidations) sun-brightdesktopmoon sun-brightdesktopmoon --- # API | Lighter Docs You can find the Lighter API Documentation here: [https://apidocs.lighter.xyzarrow-up-right](https://apidocs.lighter.xyz/docs/get-started-for-programmers-1#/) You can join the Telegram API Channel for updates here: [https://t.me/lighter\_api\_updatesarrow-up-right](https://t.me/lighter_api_updates) ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/api#api-keys) API Keys Each account and sub-account on Lighter may interact with the exchange using Lighter API keys. These API keys are owned by the account and are used to sign requests when interacting with the exchange. Signed requests are verified by the exchange to confirm authorization by the API key holder and the associated account. Each account or sub-account may register up to 256 API keys. ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/api#sub-accounts) Sub-Accounts To create a Lighter account, users must have an Ethereum wallet. Using this wallet, users register a main account by signing a message that associates their Ethereum address with Lighter. Assets can then be deposited by sending a transaction from the wallet to Lighter’s smart contracts. In addition to the main account, users may create multiple sub-accounts linked to the same Ethereum wallet. [PreviousSelf-Trade Preventionchevron-left](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/self-trade-prevention) [NextPoints Programchevron-right](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/points-program) Last updated 2 months ago * [API Keys](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/api#api-keys) * [Sub-Accounts](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/api#sub-accounts) sun-brightdesktopmoon sun-brightdesktopmoon --- # Order Types & Matching | Lighter Docs ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/order-types-and-matching#market-orders) **Market Orders** A market order is an order that executes immediately at the current market price for a given position size. Users can set an average execution price to limit how much their execution price can deviate from the mid-price of the order book. If there is insufficient liquidity in the market, or if subsequent fills would cause the average execution price to exceed the set limit, the market order will be partially filled. #### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/order-types-and-matching#execution-options) Execution options * The **Reduce-Only** execution option ensures that changes to the position only move it closer to zero, regardless of whether the position is positive or negative. * * * ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/order-types-and-matching#limit-orders) **Limit Orders** A limit order is a buy or sell order that executes at the limit price user sets or better. Limit orders also support enhanced order options like expiration and execution instructions. #### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/order-types-and-matching#execution-options-1) Execution options * The **Post-Only** execution option ensures that a limit order is placed only as a maker order. If there are crossing orders on the opposite side of the order book at the time of placement, the exchange automatically cancels the post-only order to prevent it from becoming a taker order. If no crossing orders are present, the order is inserted into the order book. This guarantees that the order acts only as a maker and will pay maker fees for any trades. * The **Reduce-Only** limit order reduces the position size towards zero, executing partially if the order size exceeds the position, with any remaining portion canceled once the position reaches zero. #### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/order-types-and-matching#time-in-force) Time in Force Time-in-force options allow users specify the lifetime of an order. * **Good ‘Til Time** option allows users to specify a time until which the order remains valid. If the expiry time of an active order in the order book passes, the exchange automatically cancels the order. * **The Immediate or Cancel** option automatically cancels an order if it is not immediately filled. These orders are not placed into the order book as maker orders. * * * ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/order-types-and-matching#stop-loss-and-take-profit-orders) Stop-loss and Take-profit Orders A stop-loss (SL) order is an instruction to sell (or buy) an asset when its price hits a **trigger price**, with the goal of limiting potential losses. On the other hand, a take-profit (TP) order specifies a trigger price at which an asset will be sold (or bought) to lock in gains. Both orders are automatically triggered. In addition, there are **stop-loss limit orders** and **take-profit limit orders**. A **stop-loss limit order** combines the stop-loss trigger with a limit order, ensuring the asset will be sold (or bought) only at the specified price or better once the mark price reaches the trigger price. Similarly, a **take-profit limit order** sets a price at which the asset will be sold (or bought) to secure profits, but only if the market price meets or exceeds the trigger price. These limit orders offer more control over the execution price compared to standard stop-loss or take-profit orders. **Trigger conditions** Stop-Loss Sell Order & Take-Profit Buy Order: markPrice≤triggerPrice\\text{markPrice} \\le \\text{triggerPrice}markPrice≤triggerPrice Stop-Loss Buy Order & Take-Profit Sell Order: markPrice≥triggerPrice\\text{markPrice} \\ge \\text{triggerPrice}markPrice≥triggerPrice #### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/order-types-and-matching#time-in-force-1) Time in Force * The **Good ‘Til Time** option is available for SL/TP limit orders and it allows users to set an expiration time, after which the order is automatically canceled if not triggered. #### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/order-types-and-matching#execution-options-2) Execution options * The **Reduce-Only** option works the same way as for Limit Orders, ensuring the position size decreases towards zero and canceling the order if further fills would cause the position to exceed zero. * * * ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/order-types-and-matching#twap) TWAP TWAP (Time-Weighted Average Price) Orders are a type of order designed to execute a large order over a specified time period at an average price, aiming to minimize the market impact of the order. The goal is to match the average price of the asset over the execution period, rather than executing all at once at a specific price. #### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/order-types-and-matching#running-time) Running Time The running time option for a TWAP order defines the total time over which the order will be filled. Every 30 seconds, a new market order will be placed with a size of: order size\=total amount#orders\\text{order size} = \\frac{\\text{total amount}}{\\text{\\#orders}}order size\=#orderstotal amount​ where **#orders** is calculated as: #orders\=execution duration30s+1\\text{\\#orders} = \\frac{\\text{execution duration}}{30\\text{s}} + 1#orders\=30sexecution duration​+1 #### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/order-types-and-matching#execution-options-3) Execution options * The **Reduce-Only** option ensures that a trade is executed only if it reduces the position towards 0. The TWAP order will not be canceled when the position reaches 0; it will continue attempting to execute until it expires, but a trade will only happen if the position moves closer to 0. Partial fills may occur during this process. * * * ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/order-types-and-matching#order-margin) Order Margin The Matching Engine performs risk checks after every trade to ensure that the health of trading accounts is maintained: 1. Healthy Accounts: A trade must not cause a currently healthy account to become unhealthy. 2. Unhealthy Accounts: If an account is unhealthy prior to a trade, the trade must improve the account's health. If a trade violates these rules, the Matching Engine auto-cancels the corresponding order(s) that violates the risk checks. To ensure the order book accurately reflects orders that are likely to be executable (i.e., orders that wouldn't trigger an auto-cancellation upon trade execution), the Risk Engine employs a margining system for limit orders placed onto the book. Each limit order consumes a certain amount of Order Margin. Margin consumed by these orders does not affect the position margin; it is merely a checking mechanism used only when placing new orders. Order margin usage does not affect liquidations, etc. Available order margin is calculated as follows: orderValueask/bid\=∑i∈activeLimitOrdersask/bid(limitPricei×orderSizei)orderMarginsameSide\=orderValueask/bidleverageorderMarginoppositeSide\={orderValueask/bid−2×(∣position∣×markPrice)leverageif Cross MarginorderValueask/bidleverage−TAVisolated−IMRisolatedif Isolated MarginavailableOrderMarginmi\=TAVcross−IMRcross−Mother−McurrentwhereMother\=∑i≠mi\[max⁡(orderMargini,sameSide,orderMargini,oppositeSide)\]Mcurrent\={orderMarginmi,sameSideif New Order Side\=Position SideorderMarginmi,oppositeSideif New Order Side≠Position Side\\begin{align\*} \\text{orderValue}\_{\\text{ask/bid}} &= \\sum\_{i \\in \\text{activeLimitOrders}\_{\\text{ask/bid}}} (\\text{limitPrice}\_i \\times \\text{orderSize}\_i) \\\\\[1em\] \\text{orderMargin}\_{\\text{sameSide}} &= \\frac{\\text{orderValue}\_{\\text{ask/bid}}}{\\text{leverage}} \\\\\[1em\] \\text{orderMargin}\_{\\text{oppositeSide}} &= \\begin{cases} \\frac{ \\text{orderValue}\_{\\text{ask/bid}} - 2 \\times (|\\text{position}| \\times \\text{markPrice} ) } {\\text{leverage}} & \\text{if Cross Margin} \\\\\[1.5ex\] \\frac{ \\text{orderValue}\_{\\text{ask/bid}}}{\\text{leverage}} - \\text{TAV}\_{\\text{isolated}} - \\text{IMR}\_{\\text{isolated}} & \\text{if Isolated Margin} \\end{cases} \\\\\[1.5em\] \\text{availableOrderMargin}\_{\\text{mi}} &= \\text{TAV}\_{\\text{cross}} - \\text{IMR}\_{\\text{cross}} - \\mathbf{M}\_{\\text{other}} - \\mathbf{M}\_{\\text{current}} \\end{align\*} \\\\\[0.5em\] \\text{where} \\\\ \\begin{align\*} \\mathbf{M}\_{\\text{other}} &= \\sum\_{i \\neq \\text{mi}} \\left\[ \\max\\left( \\text{orderMargin}\_{i,\\text{sameSide}}, \\text{orderMargin}\_{i,\\text{oppositeSide}} \\right) \\right\] \\\\\[0.5em\] \\mathbf{M}\_{\\text{current}} &= \\begin{cases} \\text{orderMargin}\_{\\text{mi},\\text{sameSide}} & \\text{if New Order Side} = \\text{Position Side} \\\\ \\text{orderMargin}\_{\\text{mi},\\text{oppositeSide}} & \\text{if New Order Side} \\neq \\text{Position Side} \\end{cases} \\end{align\*}orderValueask/bid​orderMarginsameSide​orderMarginoppositeSide​availableOrderMarginmi​​\=i∈activeLimitOrdersask/bid​∑​(limitPricei​×orderSizei​)\=leverageorderValueask/bid​​\=⎩⎨⎧​leverageorderValueask/bid​−2×(∣position∣×markPrice)​leverageorderValueask/bid​​−TAVisolated​−IMRisolated​​if Cross Marginif Isolated Margin​\=TAVcross​−IMRcross​−Mother​−Mcurrent​​whereMother​Mcurrent​​\=i\=mi∑​\[max(orderMargini,sameSide​,orderMargini,oppositeSide​)\]\={orderMarginmi,sameSide​orderMarginmi,oppositeSide​​if New Order Side\=Position Sideif New Order Side\=Position Side​​ * * * ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/order-types-and-matching#price-checks) Price Checks Price checks are used to guarantee that order prices remain within acceptable and realistic ranges, helping to prevent erroneous or extreme values. **Fat Finger Prevention Check** This check ensures that the price of a limit order is within a reasonable range to prevent errors. * For an **ask** order, the price must be at least: max(MarkPrice,bestBid)×0.95max(MarkPrice, bestBid)×0.95max(MarkPrice,bestBid)×0.95 * For a **bid** order, the price must be at most: min(MarkPrice,bestAsk)×1.05 min(MarkPrice, bestAsk)×1.05min(MarkPrice,bestAsk)×1.05 If the **bestBid** or **bestAsk** does not exist, only the **markPrice** is used for validation. The same check applies to SL/TP limit orders, but in this case, the _TriggerPrice_ set in the order is used instead of the _MarkPrice_. * * * ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/order-types-and-matching#order-matching) Order Matching When matching orders, Lighter uses a price-time priority system. When a new order is placed as the taker, the Lighter Matching Engine finds the highest-priority order on the opposite side of the order book, meaning the order with the best price. If there are multiple orders with the same best price, the oldest one is selected. The matching engine then executes the trade at the maker’s price. If the taker order is not fully filled, this process continues until the taker order is completely filled or until there are no more crossing orders. If the taker order is a limit order that needs to be placed in the order book, the Lighter Matching Engine inserts it on the corresponding side. circle-info The Lighter Matching Engine ensures that price-time priority is always respected by utilizing SNARKs to generate cryptographic proofs for fair order book matching execution. As a result, the Lighter Matching Engine operates as a trustless service, bound to function in a predefined way, making it mathematically impossible for it to act maliciously. [PreviousContract Specificationschevron-left](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/contract-specifications) [NextUnified Trading Accountschevron-right](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/unified-trading-accounts) Last updated 1 month ago * [Market Orders](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/order-types-and-matching#market-orders) * [Limit Orders](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/order-types-and-matching#limit-orders) * [Stop-loss and Take-profit Orders](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/order-types-and-matching#stop-loss-and-take-profit-orders) * [TWAP](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/order-types-and-matching#twap) * [Order Margin](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/order-types-and-matching#order-margin) * [Price Checks](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/order-types-and-matching#price-checks) * [Order Matching](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/order-types-and-matching#order-matching) sun-brightdesktopmoon sun-brightdesktopmoon --- # Public Pools | Lighter Docs Public pools enable market participants to pool their funds, entrusting an operator to trade on their behalf. Users are allowed to create their own public pools, enabling them to attract participants and trade using pooled funds. Profits from these trades are distributed among the participants after deducting an operator fee. This collaborative approach allows participants to engage in trading while benefiting from the expertise of the pool operator. * * * Each pool comes with the following properties that the owner can set during its creation: **Operator Fee** The percentage of profits allocated to the operator during shareholder withdrawals as compensation for managing the pool. **Minimum Operator Share** The minimum ownership percentage the operator must retain in the pool to ensure their continued vested interest in its performance. For example, if the minimum operator share is set at 10% and the operator has 10,000 USDC in the pool, users can deposit up to a maximum of 90,000 USDC. **Isolated Margin** Public pools can not have isolated positions. [PreviousUnified Trading Accountschevron-left](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/unified-trading-accounts) [NextReal World Assets (RWA)chevron-right](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/real-world-assets-rwa) Last updated 6 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Contract Specifications | Lighter Docs Lighter Test Network currently supports perpetual futures markets for the following markets. Lighter Governance will continuously add new markets as the test network grows. IMR, MMR, and CMR represent the Initial, Maintenance, and Close-Out Margin Requirements, respectively. For more information about the meaning of these fractions, refer to the [Liquidations & LLP (Insurance Fund)](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/liquidations-and-llp-insurance-fund) page. circle-info Currently each deployed market has a funding period of 1 hour. Funding period is a configuration of each market, thus it might be different for some of the new market deployments. Symbol Price Step Amount Step Leverage IMR MMR CMR BTC 0.1 0.00001 50x 2% 1.2% 0.8% ETH 0.01 0.0001 50x 2% 1.2% 0.8% SOL 0.001 0.001 25x 4% 2.4% 1.6% XRP 0.000001 1 20x 5% 3% 2% HYPE 0.0001 0.01 20x 5% 3% 2% BNB 0.0001 0.01 20x 5% 3% 2% ARB 0.00001 0.1 15x 6.66% 3.99% 2.66% OP 0.00001 0.1 15x 6.66% 3.99% 2.66% TON 0.00001 0.1 10x 10% 6% 4% BCH 0.001 0.001 10x 10% 6% 4% ADA 0.00001 0.1 10x 10% 6% 4% DOGE 0.0001 0.01 10x 10% 6% 4% JUP 0.00001 0.1 10x 10% 6% 4% XMR 0.001 0.001 10x 10% 6% 4% TRUMP 0.0001 0.01 10x 10% 6% 4% LDO 0.00001 0.1 10x 10% 6% 4% SEI 0.00001 0.1 10x 10% 6% 4% LTC 0.001 0.001 10x 10% 6% 4% FARTCOIN 0.00001 0.1 10x 10% 6% 4% KSHIB 0.000001 1 10x 10% 6% 4% KBONK 0.000001 1 10x 10% 6% 4% IP 0.0001 0.01 10x 10% 6% 4% WIF 0.00001 0.1 10x 10% 6% 4% DOT 0.00001 0.1 10x 10% 6% 4% SUI 0.00001 0.1 10x 10% 6% 4% TIA 0.00001 0.1 10x 10% 6% 4% UNI 0.0001 0.01 10x 10% 6% 4% XPL 0.00001 0.1 10x 10% 6% 4% ENA 0.00001 0.1 10x 10% 6% 4% CRV 0.00001 0.1 10x 10% 6% 4% NEAR 0.00001 0.1 10x 10% 6% 4% KPEPE 0.000001 1 10x 10% 6% 4% WLD 0.00001 0.1 10x 10% 6% 4% APT 0.0001 0.01 10x 10% 6% 4% POPCAT 0.00001 0.1 10x 10% 6% 4% ONDO 0.00001 0.1 10x 10% 6% 4% AVAX 0.00001 0.1 10x 10% 6% 4% TRX 0.00001 0.1 10x 10% 6% 4% AAVE 0.001 0.001 10x 10% 6% 4% LINK 0.00001 0.1 10x 10% 6% 4% POL 0.000001 1 8x 12.5% 7.5% 5% PUMP 0.000001 1 8x 12.5% 7.5% 5% ZK 0.000001 1 8x 12.5% 7.5% 5% PAXG 0.01 0.0001 8x 12.5% 7.5% 5% PENGU 0.000001 1 8x 12.5% 7.5% 5% PENDLE 0.0001 0.01 5x 20% 12% 8% TAO 0.01 0.0001 5x 20% 12% 8% PYTH 0.00001 0.1 5x 20% 12% 8% SPX 0.00001 0.1 5x 20% 12% 8% STRK 0.00001 0.1 5x 20% 12% 8% SYRUP 0.00001 0.1 5x 20% 12% 8% VIRTUAL 0.00001 0.1 5x 20% 12% 8% ICP 0.0001 0.01 5x 20% 12% 8% MNT 0.00001 0.1 5x 20% 12% 8% KAITO 0.00001 0.1 5x 20% 12% 8% APEX 0.00001 0.1 5x 20% 12% 8% GRASS 0.00001 0.1 5x 20% 12% 8% CC 0.00001 0.1 5x 20% 12% 8% BERA 0.00001 0.1 5x 20% 12% 8% ASTER 0.00001 0.1 5x 20% 12% 8% GMX 0.0001 0.01 5x 20% 12% 8% HBAR 0.00001 0.1 5x 20% 12% 8% ETHFI 0.00001 0.1 5x 20% 12% 8% MORPHO 0.00001 0.1 5x 20% 12% 8% EIGEN 0.00001 0.1 5x 20% 12% 8% MET 0.00001 0.1 5x 20% 12% 8% ZRO 0.00001 0.1 5x 20% 12% 8% DYDX 0.00001 0.1 5x 20% 12% 8% FIL 0.00001 0.1 5x 20% 12% 8% ZEC 0.001 0.001 5x 20% 12% 8% S 0.00001 0.1 5x 20% 12% 8% YZY 0.00001 0.1 5x 20% 12% 8% VVV 0.0001 0.01 3x 33.33% 20% 13.33% DOLO 0.00001 0.1 3x 33.33% 20% 13.33% MYX 0.0001 0.01 3x 33.33% 20% 13.33% kTOSHI 0.0001 0.01 3x 33.33% 20% 13.33% ZORA 0.000001 1 3x 33.33% 20% 13.33% AERO 0.00001 0.1 3x 33.33% 20% 13.33% NMR 0.0001 0.01 3x 33.33% 20% 13.33% 2Z 0.00001 0.1 3x 33.33% 20% 13.33% AVNT 0.00001 0.1 3x 33.33% 20% 13.33% LINEA 0.000001 1 3x 33.33% 20% 13.33% USELESS 0.00001 0.1 3x 33.33% 20% 13.33% RESOLV 0.000001 1 3x 33.33% 20% 13.33% CRO 0.00001 0.1 3x 33.33% 20% 13.33% 0G 0.0001 0.01 3x 33.33% 20% 13.33% PROVE 0.00001 0.1 3x 33.33% 20% 13.33% EDEN 0.00001 0.1 3x 33.33% 20% 13.33% FF 0.00001 0.1 3x 33.33% 20% 13.33% KTOSHI 0.0001 0.01 3x 33.33% 20% 13.33% STBL 0.00001 0.1 3x 33.33% 20% 13.33% USDCHF 0.00001 0.1 25x 5% 2.4% 1.6% USDCAD 0.00001 0.1 25x 5% 2.4% 1.6% USDJPY 0.001 0.001 25x 5% 2.4% 1.6% EURUSD 0.00001 0.1 25x 5% 2.4% 1.6% GBPUSD 0.00001 0.1 25x 5% 2.4% 1.6% XAG 0.0001 0.01 10x 10% 6% 4% XAU 0.01 0.0001 15x 6.66% 3.99% 2.66% [PreviousTrading Feeschevron-left](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/trading-fees) [NextOrder Types & Matchingchevron-right](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/order-types-and-matching) Last updated 2 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Funding | Lighter Docs ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/funding#overview) Overview The funding mechanism is a crucial component of perpetual futures trading. It ensures that the price of the perpetual contract closely tracks the underlying asset’s spot price. Unlike traditional futures contracts, perpetual futures do not have an expiration date. To maintain price stability and avoid significant deviations from the spot price, a periodic funding mechanism is implemented. Funding payments occur at each hour mark. Traders holding long and short positions pay or receive a funding fee based on the difference between the contract price and the spot price. These payments are fully peer-to-peer with no fees taken by the exchange. The funding payment for an account position depends on the size and side of the position, as well as the funding rate. The funding rate represents the difference between the mark price of the perpetual futures market and the index price, which is equivalent to the spot market price of the underlying asset. When the funding rate is positive, users with long positions pay a funding fee to users with short positions. When the funding rate is negative, users with short positions pay a fee to users with long positions. ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/funding#funding-rate-calculation) Funding Rate Calculation For each minute at a random time, Lighter calculates the premium of each market, which represents the differentiation of the mark price from the index price for the corresponding market with the following formula: premiumt\=Max(0,Impact Bid Pricet−indext)−Max(0,indext−Impact Ask Pricet)indext\\small premium\_{t} = \\frac{Max(0, \\text{Impact Bid Price}\_{t} - index\_{t}) - Max(0, index\_{t} - \\text{Impact Ask Price}\_{t})}{ index\_{t}}premiumt​\=indext​Max(0,Impact Bid Pricet​−indext​)−Max(0,indext​−Impact Ask Pricet​)​ At the end of each hour, a 1-hour premium is calculated as the time-weighted average of the 60 premiums calculated over the course of the last hour. In addition to the premium component, each market has a fixed interest rate component that accounts for the difference in interest rates of the base and quote currencies. The funding rate is then calculated as: premium:\=TWAP of premiumt since the latest fundingfundingRate\=(premium/8)+interestRateComponent\\small premium := \\text{TWAP of } premium\_{t} \\text{ since the latest funding} \\\\ fundingRate = (premium / 8) + interestRateComponentpremium:=TWAP of premiumt​ since the latest fundingfundingRate\=(premium/8)+interestRateComponent Dividing the 1-hour premium by 8 ensures that funding payments for the premium are distributed over 8 hours, closely aligning with the approach adopted by centralized perpetual exchanges. Also note that the hourly funding rate is clamped within the range \[-0.5%, +0.5%\]. Funding round payment for account _**i**_ and market _**j**_ is calculated as follows: fundingaccounti,j:\=(−1)×positionaccounti,j×markj×fundingRatej\\small funding\_{{account\_i},j} := (-1) \\times position\_{{account\_i},j} \\times mark\_{j} \\times fundingRate\_{j}fundingaccounti​,j​:=(−1)×positionaccounti​,j​×markj​×fundingRatej​ [PreviousLLP Strategieschevron-left](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/liquidations-and-llp-insurance-fund/llp-strategies) [NextFunding Rate Rebateschevron-right](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/funding/funding-rate-rebates) Last updated 1 year ago * [Overview](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/funding#overview) * [Funding Rate Calculation](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/trading/funding#funding-rate-calculation) sun-brightdesktopmoon sun-brightdesktopmoon --- # Market Makers | Lighter Docs Market-making activity will receive 20% of the total allocated points (50,000). Only premium accounts are eligible to earn points from market-making. [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/points-program/market-makers#llp) LLP -------------------------------------------------------------------------------------------------------------- LLP will be considered a market maker, following the same rules. However, the points earned by LLP will not be allocated to it. Instead, all final points will be scaled so that the total remains 250,000 points. This effectively treats LLP as a market participant without directly returning points to LLP holders. In this way, if a market is dominated by LLP, most of the points will go to LLP and will then be effectively redistributed among all platform participants. [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/points-program/market-makers#points-for-volume) Points for Volume ------------------------------------------------------------------------------------------------------------------------------------------ For each week, we’ll be looking at the total maker volume generated by premium accounts. Each user will receive a volume score, which will be equal to score\=volume+max(0,(volume−2.5B)×0.25)\\text{score} = \\text{volume} + max(0, (\\text{volume} - 2.5B) \\times 0.25)score\=volume+max(0,(volume−2.5B)×0.25) Points will be distributed proportionally to this score. The score is calculated once for the entire week, not daily, meaning that $1 in volume on the first day has the same impact as $1 on the last day. The formula adds a 25% bonus to any weekly volume above 2.5B. All markets are weighted equally. [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/points-program/market-makers#points-for-providing-liquidity) Points for providing liquidity -------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/points-program/market-makers#background) Background We recognize that providing strong liquidity with tight spreads on BTC can generate significant trading volume, and this will, to some extent, already be reflected in the volume-based rewards. However, providing $10M in liquidity on BTC at 2–3 bps might not produce the same volume, and the benefit of 2–3 bps of better execution must be weighted against the risk of posting that liquidity. With this in mind, we aim to incentivize market makers to provide high-quality liquidity even when it does not result in large trading volumes, ensuring that traders can execute sizable positions when needed. Another aspect concerns altcoins that currently lack traction on Lighter or have higher volumes on other exchanges. Traders may avoid these markets due to limited liquidity, while MMs may skip them because of low volume. To address this, we will assign a higher weight to such markets. ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/points-program/market-makers#market-weights) Market weights Each market will be given a weight that accounts for both liquidity demand and associated risk. For a selection of exchanges, we will approximate two multipliers that track how the volume and open interest on those exchanges compare to Lighter. We will then adjust the external volumes and open interest based on these multipliers. Using the adjusted values together with Lighter’s own data, we will determine the final market weight. Note: this approach shifts weight toward tokens that are heavily traded (e.g., BTC, ETH, SOL) and also assigns higher weight to tokens that are popular on other exchanges but not yet on Lighter, while maintaining balanced weights for tokens that show stronger activity on Lighter itself. Note: weights are recomputed hourly. #### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/points-program/market-makers#methodology) Methodology We will sample the order book at random intervals, and users will receive points proportional to the share of liquidity they provide. At each sample, we will evaluate several metrics, such as: * who is providing liquidity within the top $10k, $30k, $100k, $300k, … * who is providing liquidity within 1 bps, 2 bps, 5 bps, 10 bps of mid-price These thresholds will depend on the market — for example, $10k in liquidity on BTC is relatively small, while $50M on YZY would be unrealistically high. For each market, we will use approximately 6–10 of these metrics, each carrying the same weight. Note: these metrics will be computed separately for the bid and ask sides. #### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/points-program/market-makers#volatility) Volatility For each order book snapshot, we will compute a volatility score, which acts as a multiplier when providing liquidity. This is meant to incentivise market makers to provide liquidity even during volatile periods. Without the volatility multiplier, each order book sample would carry the same weight. Because the multiplier makes some snapshots contribute more than others, we will calculate the total score on a daily basis. To prevent a single trading day from dominating the results (for example, accounting for 90% of all points), we will implement a ceiling mechanism that ensures each day receives at least 8.33% of the total points for liquidity provision. For example, if one day in the week experiences very high volatility for 20 hours, the points for that day would be capped at 50% of the total pool. This scenario is unlikely, as we assume such volatility would last for only part of a single day, with the remaining six days being normal. #### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/points-program/market-makers#example) Example You are a market maker who specialises in providing high-quality liquidity on BTC, offering $1M at once but only on one side of the order book. If we were to allocate 1,000 points weekly for BTC liquidity provision, and the BTC metrics were as follows: * top $300k, $1M, $3M, $10M, $30M * top 0.5 bps, 1 bps, 2 bps, 4 bps, 10 bps Assuming you provide 100% of the top $1M in liquidity, you could expect to receive: * 50 points for top $300k category * 50 points for top $1M category * 16.6 points for top $3M category * 5 points for top $10M category * 1.66 points for top $30M category For the bps categories, the same logic applies; the actual points depend on how much liquidity exists at those levels. Note: You would receive only 50 points for the top $300k category because we assume you quote on one side at a time. These numbers are purely illustrative; the actual parameters used in calculating these metrics may differ. ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/points-program/market-makers#notes) Notes * Depending on the market conditions, data availability, and team discretion, some constants might change. [PreviousPoints Programchevron-left](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/points-program) [NextRetailchevron-right](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/points-program/retail) Last updated 2 months ago * [LLP](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/points-program/market-makers#llp) * [Points for Volume](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/points-program/market-makers#points-for-volume) * [Points for providing liquidity](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/points-program/market-makers#points-for-providing-liquidity) * [Background](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/points-program/market-makers#background) * [Market weights](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/points-program/market-makers#market-weights) * [Notes](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/points-program/market-makers#notes) sun-brightdesktopmoon sun-brightdesktopmoon --- # Retail | Lighter Docs For Season 2, 200,000 points per week will be distributed every Friday. The points will cover activity from Wednesday (inclusive) through Tuesday (inclusive). Some of the categories that affect how points are distributed include: * Volume * Open Interest * Fundings * Liquidations and Deleverages * PnL There are also scaling factors that favor traders with higher trading quality, depending on the category. ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/points-program/retail#notes) Notes: * Having a premium account impacts the weight of the metrics. * — this is not necessarily the case — but PnL generated by premium accounts may receive more points. * Some categories are separated per market, while others are applied globally. * Some categories are evaluated daily, while others are evaluated weekly. * Points are not necessarily distributed linearly with respect to the metric. * For example, 2× the volume will not always yield 2× the points; it may result in 3× or 1.5× the points. * Note: this extends beyond the volume metric. * Markets are not weighted equally. * For example, $100 in volume on BTC does not yield the same number of points as $100 in volume on HYPE. * Note: this extends beyond the volume metric. * Intentionally losing money or getting liquidated will not be beneficial. ### [hashtag](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/points-program/retail#sybil-detection-and-farming) Sybil Detection & Farming We apply different sybil detection methods, both fully automated and semi-automated, to detect sybil accounts. We allow up to 10 accounts per user without penalty, as we understand that some people choose to maintain multiple accounts for risk management (for example), and that’s acceptable. [We’ve made an announcement on Discord regarding Self-Trading.arrow-up-right](https://discord.com/channels/987399783985590322/1314327323109097482/1422681158168084491) As mentioned in the announcement, we want to protect a level playing field and keep the platform healthy for all participants. We use various metrics to detect farming and sybil activity, which will not be disclosed here so as not to encourage their exploitation. [PreviousMarket Makerschevron-left](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/points-program/market-makers) [NextBug Bounty Programchevron-right](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/security/bug-bounty-program) Last updated 5 months ago * [Notes:](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/points-program/retail#notes) * [Sybil Detection & Farming](https://docs.lighter.xyz/~/revisions/oWY7zM9pmF1WoGayT19g/points-program/retail#sybil-detection-and-farming) sun-brightdesktopmoon sun-brightdesktopmoon ---