
Lighter Security Incident Full Story: Third-Party SDK Leaked Private Keys, $5 Million in Funds Fully Returned
Author: TechFlow
On November 17, the decentralized perpetual contract trading platform Lighter official social media released a security response update. After the Security Council officially disabled Guardian Mode, the platform's deposit and withdrawal functions have fully returned to normal, and all pending withdrawal requests are being processed sequentially.
This incident originated on the morning of November 16 UTC (afternoon of November 16 Beijing time), when an attacker stole a trader's API key and attempted to transfer funds. Lighter's official security response statement explicitly clarified that the protocol's core architecture, smart contracts, and underlying infrastructure were not impacted, and the platform's overall operations remained secure.

Reuse of Random Number in Signature by External Unofficial SDK Leads to Private Key Leakage
Technical tracing investigations revealed that the affected account integrated an external unofficial software development kit (SDK) during the quantitative high-frequency trading signing process. Due to the crude implementation of the underlying signing algorithm in this SDK, the same random number (Nonce) was repeatedly called when consecutively signing orders, creating a serious vulnerability for subsequent attacks.
In cryptographic systems such as Elliptic Curve Digital Signature Algorithm (ECDSA), every signature must rely on a unique and unpredictable random number. Once a developer reuses the same Nonce during the signing process, attackers can extract multiple publicly available signature data on-chain and reverse-engineer the account's corresponding private key through systems of algebraic equations.
In contrast, Lighter's official open-source codebase and SDK utilizes a cryptographically secure random number generator to dynamically allocate Nonces, ensuring each transaction signature is independent and completely isolating such private key derivation risks. Traders unauthorizedly replacing the underlying signing components became the direct root cause of the loss of API key control in this incident.
Automatic Circuit Breaker in Guardian Mode and Full Compensation from Security Council
After the attack behavior was triggered, the automated guardian program (Guardian) deployed at the smart contract layer on Lighter's official decentralized trading platform detected abnormal high-frequency withdrawal characteristics in real time, automatically triggering the circuit breaker mechanism and freezing the withdrawal channel. This precisely intercepted the vast majority of malicious operations before large-scale fund transfers could occur.
Relying on the response window secured by the Guardian Mode, the Lighter Security Council swiftly completed the isolation of affected funds and account verification. Currently, approximately 5 million USDC (worth roughly $5 million) in secure assets have been fully returned to the affected traders' accounts through the Security Council's multi-signature mechanism.
Practical Guidelines for API Private Key Management and Anti-Reuse Audits for Quantitative High-Frequency Traders
This incident serves as a wake-up call for on-chain high-frequency market makers and quantitative institutions: even if a decentralized exchange's smart contracts undergo thorough audits, vulnerabilities in the trading terminal's client-side code can still lead to asset losses. When integrating with derivative protocols, quantitative teams should enforce locking to official signing library versions and strictly prohibit directly calling community external SDKs in production environments without review.
At the level of key permissions and technical detection, high-frequency quantitative teams must have independent institutions or internal security architects conduct strict tests for signing entropy and Nonce uniqueness before deploying production terminals, and integrate static code analysis rules into automated continuous integration pipelines.
Meanwhile, account administrators must, under the guidance of Lighter's official developer documentation, strictly configure IP whitelists and daily withdrawal limits for API keys, implementing rigorous physical isolation between the quantitative trading signing environment and core fund custody permissions.















