u8

285 posts

u8

u8

@atarashi

co-founder @0xGhostLogs

انضم Şubat 2009
2.6K يتبع1.5K المتابعون
u8
u8@atarashi·
this is great. we landed on a similar approach: accounts_pre.bin, accounts_post.bin and other metadata needed to execute for your 1mo lookback, did you process and store TxFixtures for every tx already? or is it more on-demand: snapshot + incremental snapshot + minimal replay -> TxFixture?
English
1
0
6
899
dr cavey phd ∿
dr cavey phd ∿@cavemanloverboy·
got bored last week during accelerate while y'all were at e11even, so I worked on a limited-lookback (1 month) historical account state service: ​ getTransactionFixture(signature) -> TransactionFixture ​ which returns everything you need (pre/post accounts, feature set, sysvars, txn status, rpc client version/hash, etc) to re-execute the transaction. very helpful for debugging and trying out changes. i think main use cases are something along the lines of: ​ 1. how would this trade have gone (as a maker or a taker) if program commit B was deployed instead of A? 2. how many cus would this txn have used if some other commit was live? 3. what was the pre/post execution state of some account? why was some special branch hit? ​ in fact, 2. is exactly what i show in Figure 1 to compare p-token vs current tokenkeg. I took a random swap that went through zerofi and goonfi with my nifty client... ​ the left shows all results matching (successful replay). the right shows me adding the flag --replace-program=TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA:spl-p-token-1.0.0-rc.1.so, which replaces the current token program with the p-token program. we get a match in status, but a mismatch in CUs (and logs... p-token does not log "Instruction: Transfer"!). ​ we will be using this internally (it has already come in handy bigly twice), but we also want to try to offer this to external users. if there's enough interest we may do a pilot. dm me if you want to try it.
dr cavey phd ∿ tweet media
English
12
15
121
27.4K
u8 أُعيد تغريده
Zensen
Zensen@Zensen977·
Rust source-level debugger for Solana programs inspect variables, set breakpoints, step into/over functions, etc. coming soon™️to @blueshift sbpf (which already has an assembly debugger btw) here's what stepping through a Pinocchio vault program looks like:
English
10
18
147
24.7K
u8
u8@atarashi·
@cavemanloverboy alternatively, use an anycast TVU (and some validators already do this)
English
1
0
4
455
dr cavey phd ∿
dr cavey phd ∿@cavemanloverboy·
i've been toying around with ideas regarding a single blockchain node itself being a distributed system. i think it's possible, for example, to come up with a distributed single leader system where a single leader sets up nodes around the world and broadcasts batches tagged with a node index. batches would then be merged, sorted, deduped before replay. in thinking through these ideas, and in encountering weird tokyo->tokyo shred latencies, i've come up with an interesting way to IBRL turbine with a very simple and minimal change: tvu relays. github.com/anza-xyz/agave…
dr cavey phd ∿ tweet media
English
5
3
49
4.8K
u8
u8@atarashi·
So how do Solana propAMMs fare against Binance? Spent some time over the weekend finding out Turns out: really, really good Took 24hr of onchain trades and compared vs. Binance VIP 1 and VIP 9 (a) does not naively rely on block timestamp. Uses shred-level timing data and is geo-aware based on leader location (b) comparison is size-aware and contemporaneous. Walks the L2 book for the same size at the same moment (c) does not naively compare onchain SOL/USDC against Binance SOL/USDT since USDC is not 1:1 with USDT (results would be clearly bimodal). Adjusts for this (d) compares executed onchain trades (>1M) not simulations. Accounts for priority and base fees paid Measured execution quality: did the propAMMs give the trader a good fill relative to executable Binance liquidity at that time? vs. Binance VIP 1: 10 bps advantage on propAMMs vs. Binance VIP 9: 2-3 bps advantage on propAMMs
u8 tweet mediau8 tweet mediau8 tweet mediau8 tweet media
English
12
21
106
23.1K
u8
u8@atarashi·
If you know me, you know I'm a huge fan of onchain routing Love to see this from Titan. Their new router dynamically sources liquidity at execution time Onchain routing helps Solana go from "average fill can beat Binance VIP9" to "virtually every fill should be competitive with or better than Binance" in the video: simulated outputs without API calls (no offchain router component!) gap bps = how far output is behind best output interval bps = how far output is behind the one immediately above it
Titan@Titan_Exchange

x.com/i/article/2040…

English
6
24
176
24.8K
u8
u8@atarashi·
@toly @trentdotsol Agreed, but one thing to note is that InitializeNonce done on your behalf won't show up in getTransactionsForAddress since the authority is part of the ix data instead of accounts So you have to parse every nonce account init. Not difficult but something to be aware of
English
2
0
7
1.1K
toly 🇺🇸
toly 🇺🇸@toly·
@trentdotsol They didn’t really hide it well. The nonce was assigned to the multisig signer, which should have been a red flag immediately and triggered pager duty.
English
7
3
98
10.6K
trent.sol
trent.sol@trentdotsol·
as the initial author and chief hater of durable nonces, i don't defend them often. despite the number of references in this thread, their only role in the hack was allowing the attacker to hide while they compromised signers. durable nonces aren't magic. they just extend tx ttl
Drift@DriftProtocol

Earlier today, a malicious actor gained unauthorized access to Drift Protocol through a novel attack involving durable nonces, resulting in a rapid takeover of Drift’s Security Council administrative powers. This was a highly sophisticated operation that appears to have involved multi-week preparation and staged execution, including the use of durable nonce accounts to pre-sign transactions that delayed execution.

English
11
4
98
25.8K
u8
u8@atarashi·
To me it looks unrelated to axios Notice how these txs are unusual: the multisig signers never used durable nonces except for the 2 exploit txs that approved the new admin The hacker created new nonce accounts on behalf of the 5 Squads signers days ago This gave him days to socially engineer the signers and collect their signatures. Since the transactions used durable nonces, they aren't limited to the standard 151 block expiry
Haseeb >|<@hosseeb

Looks like Drift was compromised by admin key compromise. Some speculation that maybe was tied to a dev w/ admin access locally doing a version bump on the Axios JS library, which was widely compromised yesterday 👇 Still fog of war... but would make sense

English
2
1
49
15K
u8
u8@atarashi·
@alessandrod aside: MCP probably doesn't need GPS clocks but it sure would be cool if DoubleZero started installing them and making them available to validators. DZ Time
English
0
0
2
247
u8
u8@atarashi·
@ADPthegreat I've seen both cases
English
1
0
0
30
u8
u8@atarashi·
Simulating pAMM outputs is non-trivial. If you're checking quotes without varying these params, your sim may be incomplete Swap output depends on much more than pool state, reserves, and input size: - outer program (router) - router method - price/CU (*) - presence of extra accounts (**) - presence of other swaps and much more... (*) some pAMMs check the priority fee from the ix sysvar and adjusts bps (**) a pAMM that doesn't want to be bundled adds a surcharge (historically 1bps) if you don't include a specific vote account in the passed accounts
English
3
2
16
2.4K
u8 أُعيد تغريده
Jarry Xiao
Jarry Xiao@jarxiao·
Designing markets requires adversarial thinking, economic intuition, systems knowledge, and taste. The first three are table stakes. As an engineer, taste is the visceral discomfort you feel when a system has hidden fragility, even if it "works”. You sense something is broken before you can articulate why, and then you spiral until you can. This is the only way I know how to build things, and it's shaped by experience. Serum's matching engine had an event queue that split matching and settlement into two separate transactions. The first time I read the code, I knew something was off: the design introduced an asynchronous bottleneck in the hot path. Every maker fill had to wait for a third-party transaction before funds became available. Phoenix V1 eliminated this by settling both sides of all trades atomically. In 2022, every indexer on Solana relied on program logs for state reconstruction. The problem was that program logs could get truncated, and any system built on them could never have full data integrity. That felt unacceptable to me, so I pioneered using no-op CPIs to circumvent this entirely by emitting the event in the call data. The mechanism is now widely adopted across Solana and natively supported in Anchor. Brittle systems fail when the pressure is high, and markets are adversarial environments where high pressure is the default state. Building a perps exchange on Solana is one of the toughest problems in DeFi. Margin systems, funding rate mechanisms, liquidation engines, and oracle integration are all areas where one wrong decision can lead to catastrophe. Our team has traded real markets and built real trading systems in TradFi. We know what markets do under stress because we've been on the other side. That experience gives us the intuition to know which tradeoffs matter and which don't. And we're too stubborn to accept the important ones that feel wrong, even when they're easier. We've made plenty of mistakes along the way, but we have always kept them out of the critical path. Good design and a strong foundation give you room to absorb surprises and adapt without large breaking changes. For Solana to win in on-chain perps, you need a foundation built by people who are pathologically uncomfortable with fragility. That's us. The rest is execution.
English
20
14
172
34.6K
u8
u8@atarashi·
Got around to integrating Jetstreamer into our data pipelines Super smooth to add since we already convert upstream RPC/BigTable/Yellowstone/gg-geyser data into local GhostBlock, GhostTx types Nice work by @Sam0xSol and also @triton_one for old faithful This thing is fast af One minor piece of feedback: would prefer the ClickHouse integration to be a plugin instead of part of the runner. Or at least behind a Cargo feature since we already use a different ClickHouse client library
English
2
2
14
914
u8
u8@atarashi·
Continuous price updates are a beautiful thing to observe on Solana The first block in this leader window saw 871 propAMM oracle price updates across 77 pools One pool alone had 47 updates in a single block (purple = propAMM updates) sandwiched.me/validators/Dum…
u8 tweet media
English
6
5
42
2.9K
u8
u8@atarashi·
It's not time since the validator added the tx, it's time since the first tx shred we observed for that slot, measured on a listener server We listen to shred streams and timestamp shred arrivals. When reconstructing txs, we assign each tx a timestamp that's the earliest time we had enough shreds to decode it, either because all required data shreds arrived on the wire or missing ones were recoverable via RS
English
1
0
2
77
klyk
klyk@K_Lykov·
@atarashi how do you compute time since first tx_shred? Don't you need to know when in time on validator side you add transaction.
English
1
0
0
105
u8
u8@atarashi·
Started tracking shreds to measure: - transaction arrival timing: histogram of txs within a slot, bucketed by time since the first shred observed - how consistently the leader releases shreds over a 4-block window Coming soon to the sandwiched.me Validators page
u8 tweet media
English
8
10
83
10.1K
u8
u8@atarashi·
Here’s an example of a leader with very different timing and distribution characteristics
u8 tweet media
English
1
2
17
1.4K
Space Monkey
Space Monkey@RealSpaceMonkey·
@atarashi how do you determine the price? do you simulate? and if so, are you doing a direct swap or a jupiter swap?
English
1
0
0
285
u8
u8@atarashi·
new panel in the PropAMMs tab bid/ask depths in realtime at 1/2/5/10bps!
English
30
17
202
55K