Twitxy Saved

cryppi / perpdexlist

Verified account This account is verified. Learn more

@cryppimagic

No CEX on the first date; @perpdexlist founder
perpdexlist.com Joined October 2021
3.5K Following 10K Followers 4K Posts

Latest posts 5

Pinned post

cryppi / perpdexlist Verified account @cryppimagic
can't believe i'm dropping this now. bloomberg terminal for basis and funding arbitrage

a lot of time and effort went into this, and here's what you get:
- scanner for arb setups across 35 cexes and perp dexes
- realtime parsing of 9300 unique pairs
- bid and ask of both legs are accounted for, not just last or mark price
- you can see real returns over 24h, 7d, 30d based on historically paid funding (not just converting current funding into APR)
- ability to filter pairs by volume and open interest

and most importantly for every pair you can open a detailed chart section that includes:
- price chart (including bid ask)
- historical in/out spread chart (based on real bid ask)
paid funding chart
- funding change chart (yes, it's always different and not always equal to funding paid)

and yes, all of this is completely free

link: perpdexlist.com/arbitrage
0:52
69 replies 32 reposts 469 likes 106K views View on X
cryppi / perpdexlist Verified account @cryppimagic
Lighter admitted their vulnerability, but the way more interesting part is how the api key got stolen from Abraxas

no access to hardware, their servers, accounts or anything else. just public data and a bit of math

every order on Lighter is signed with an API key. the signature is public (well, not anymore), the key is secret

to keep the key from being calculated, every signature gets a random one-time number mixed in. it's called a nonce

simplified:
signature = nonce + hash × key
hash = fingerprint of the tx, everyone can see it

as long as the nonce is fresh every time, there's no way to get the key. two unknowns, one equation

the trader's bot was signing with its own homemade code instead of the official lighter sdk. and used the same nonce twice

say key = 7, nonce = 10
tx 1, hash 3: 10 + 3×7 = 31
tx 2, hash 5: 10 + 5×7 = 45

the hacker subtracts: 45 − 31 = (5 − 3) × key
14 = 2 × key
key = 7

irl the numbers are ~100 digits long, but the math is the same.

and you know the rest..
Lighter Verified account @Lighter_xyz 18h
View quoted post on X
10 replies 5 reposts 170 likes 16K views View on X
cryppi / perpdexlist Verified account @cryppimagic
theres a lot of takes on X saying Lighter wasnt at fault. that it was all on Abraxas Capital for storing their keys badly. nah, thats cope

you cant withdraw to another address via API, and it was Lighter's pool flaw that made it possible

just read the breakdown i wrote
cryppi / perpdexlist Verified account @cryppimagic 1d
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 - app.lighter.xyz/public-pools/2…
here's drainer pool 2 - app.lighter.xyz/public-pools/2…

and here's where the $10m from pool 1 was pulled out to - 0xb3fffca23d4444ee73349825acd84f7b5020e387
View quoted post on X
12 replies 3 reposts 62 likes 4.9K views View on X
cryppi / perpdexlist Verified account @cryppimagic
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 - app.lighter.xyz/public-pools/2…
here's drainer pool 2 - app.lighter.xyz/public-pools/2…

and here's where the $10m from pool 1 was pulled out to - 0xb3fffca23d4444ee73349825acd84f7b5020e387
app.lighter.xyz Lighter Lighter - Trade perpetuals with unmatched efficiency and security
Lighter Verified account @Lighter_xyz 1d
We are actively investigating a security incident that appears to involve a single compromised external party.

As a precaution, we have temporarily suspended all withdrawals and pool creation while we investigate the circumstances and assess the full impact.
View quoted post on X
18 replies 17 reposts 226 likes 27K views View on X
cryppi / perpdexlist Verified account @cryppimagic
we’re all building the future of finance

literally everyone. everyone who just trades, arbs, even the ones building perp dexs, dropping tokens and rugging them, even the ones farming points and dumping them on TGE day, even the ones hacking them

we’re all building the future of finance. through wins and fails

give it time and most of finance will run on perp dex rails, even if people don’t realize it

we’re all building the future of finance