I finally created a group where
whitehats can grow together and lock in together,thank you for the great advice on the call @arsen_bt
*the card trick mentality for me
would tag more auditors,let’s lock in and build together
would close soon
Lighter $15.5m hack. explained for dummies
tldr: exploit of the community pools feature. the protocol wasn't hacked. smart contracts are intact. a couple of people affected. in theory anyone whose api keys got stolen was at risk for a while. should be fine now
two big market makers had their api keys leaked
here are the victims' addresses (possibly wallets of the Abraxas Capital fund):
0x0d1D09312665D31Ed68231b88079a245E0458F6F - 10,383,864.27 USDC
0x66Cf2f85115CC20bF439720927C1f93De9672068 - 5,086,895.71 USDC (but these didn't make it out)
you probably know what an API key is, but still. it's a key "for the bot": it can trade and even withdraw, but only to the owner's own wallet. sending funds to anyone else needs a signature from the main wallet. so the worst case should be dumping your positions, right?
but Lighter has public pools: a shared vault account run by a trader, where other people put money in and get shares. any account can create a pool. with an API key. no wallet signature. and that's exactly how the money got pulled out.
HOW?
let's go step by step:
1) what's an account on Lighter?
it's a record in Lighter's l2 database with a number (account_index), a USDC balance and positions. tied to an L1 address (an Ethereum wallet). one L1 address can have several accounts: a main one and sub-accounts. controlled by an API key (trading, sub-accounts) and an L1 key (transfers to others, changing api keys)
2) what's a pool?
you probably know it's basically copytrading behind the pool leader. technically it's the same account, just with the "pool" type (account_type 2) and a share table: who holds what percent of the pool. created via create_public_pool(operator_fee, initial_total_shares, min_operator_share_rate) from the main account, and the pool gets its L1 address. the operator trades the pool with their API key
3) how a normal (regular, via ui) pool deposit works
one call: mint_shares(public_pool_index, share_amount) from the depositor's account. the sequencer: computes share price = pool balance / number of shares → debits share_amount × price usdc from the depositor → credits it to the pool → increases the share count and records share_amount to the depositor. money and shares change in one operation, the ratio holds
4) how the hacker's deposit went
not mint_shares, but transfer in same_master_account mode: from victim account #714710 to pool account #281474976415757 in $1m chunks. to the sequencer it's a transfer between two accounts under the same L1 address, no L1 signature. it credits USDC to the pool and that's it. the share table is untouched.
so the hacker's account held ±100% of the pool's shares. the pool's NAV spiked, and every one of the hacker's shares got worth multiples more. and the victim, due to the technical vulnerability, held only about 0.01%
here's drainer pool 1 - https://t.co/OBIzGvOmMz
here's drainer pool 2 - https://t.co/sZNZKBUEPc
and here's where the $10m from pool 1 was pulled out to - 0xb3fffca23d4444ee73349825acd84f7b5020e387
One month since Metric’s public launch:
$600M+ volume today
$25M+ in TVL
$8.0B+ traded in 30 days
Thank you to everyone trading, providing liquidity and building on Metric at such an early stage.