
ex @inconetwork , ex @quranium_org | 3x🏆
OnChain
Joined September 2022
- Tweets1.5K
- Following1.3K
- Followers637
- Likes23.6K
Pinned Tweet
Your market view shouldn’t end with a liquidation.
Meet Hedgeveil, options on @NEARProtocol, backed before you trade.
Choose your exposure. See the cost upfront. No margin calls.
Full walkthrough below ⬇️
@NEARProtocol #NEARHackathon
Projects I’ve built, things I’m learning, and a companion you can choose.
Built a little personality into this one :)
0xdeepak18.xyz
Deepak retweeted
Today, we are launching Honey.
@0xhoneywallet lets you invest in what you believe in, with the help of private agents.
It's the first permissionless app that lets anyone invest in their beliefs without revealing their strategies.
Invest in what you believe, copy strategies from others, or invest alongside your friends. Track how everyone is doing on leaderboards and discover new investment opportunities together.
No need to worry about crypto, commodities, stocks, chains, liquidity, or fees. Honey handles it all for you.
Honey is live.
Check it out: honeywallet.org
Built at @NEARProtocol Hackathon #NEARHackathon powered by @near_intents and @near_ai
Here’s Hedgeveil in action: connect, fund, explore outcomes, buy, sell and withdraw.
Inspired by Vitalik’s research on options-based index-tracking assets:
ethresear.ch/t/building-inde…
Try it: hedgeveil.vercel.app
Code: github.com/deepakA18/hedgeve…
7
108
Deepak retweeted
this could be the most important SIMD in the history of solana:
>unlocks neural nets onchain
>unlocks cryptography onchain
neural nets unlock more advanced models onchain
cryptography unlocks privacy onchain
both unlock gigacapital onchain
github.com/solana-foundation…
Deepak retweeted
2/ Train yourself to go from 10 to 40 to 100 hours of focused work a week. I did this for months building an automated trading system from scratch. 5am-10pm 7days/week
99% of people need #WorkLifeBalance or whatever, and that's great. But I'm talking to the people on a mission.
Back with another interesting topic from my validator infra roadmap, @Rakurai_io's post-pack feed, and one detail explains most of the design.
Rakurai’s validator connects to your server and pushes transactions it has selected. @jito's validator connects out to receive transactions for inclusion.
The interesting part is what happens when the bytes stay compatible but the fields change meaning.
First, what “post-pack” actually means, when Rakurai’s scheduler selects a transaction for the block being built, the feed sends subscribers an early copy, that does not mean the transaction has landed.
Rakurai’s own docs describe it as “an early scheduled update, not a confirmation.”
You’re seeing a scheduling decision before the block is public. That distinction matters to anything trading or reacting to the feed.
The protocol starts with Jito. In the version I examined, packet.proto is byte-for-byte identical. The authentication handshake follows the same design, matching field numbers. A comment states the intention, 'drop-in wire compatibility'.
That lets Rakurai reuse existing protocol machinery. But decoding the messages successfully is only half the compatibility story. The service surface changes too.
The compared Rakurai interface removes Jito’s bundle-related messages, no bundle subscription or block-builder fee methods. Its validator-facing service retains an address lookup, that fits the reversed flow.
Jito sends the validator candidates to include. Rakurai’s post-pack feed reports decisions the scheduler has already made. This connection isn’t where you bid for inclusion.
Then I found 'expiry_ms'.
In the Rakurai path I traced, that field carries the slot number of the block being built.
The name still says milliseconds, the value means slot.
Suppose a consumer interprets 371,000,000 as a lifetime in milliseconds. That’s roughly 4.29 days.
But a freshness check using that interpretation could accept updates far longer than intended. A message can be wire-compatible while being behaviorally incompatible. That’s the distinction I’d want in front of any operator connecting existing tooling to this feed.
There’s another example in 'Meta.addr'.
A field normally used for the packet’s source IP carries an opaque string instead. Meanwhile, port, flags, and sender_stake are zeroed. These are valid values on the wire. Understanding them requires Rakurai-specific knowledge.
Protobuf does allow backward-compatible additions, so reusing these fields wasn’t an unavoidable limitation of the format. It was an implementation choice with consequences for existing consumers. The stream’s return direction is narrower than it looks. The RPC is bidirectional, but the defined return message is a heartbeat with a counter.
There’s no application-level acknowledgment saying “I processed this transaction,” and no bundle submission on that return path. If you react by submitting a bundle, it travels through a separate submission route.
The bidirectional shape also has some history, Jito’s original proto describes it as a workaround for a proxy issue with one-way streams. Rakurai inherited that shape along with the protocol. Even the source of a transaction depends on context outside the packet.
Scheduler updates and TPU-forwarded transactions use the same packet representation. You distinguish them by the subscription method you opened, rather than an explicit source label inside each message.
That means a consumer merging feeds needs to preserve that subscription context. The packet alone doesn’t tell the whole story.
Finally, there’s the timing guarantee. The stronger claim around post-pack is that updates arrive after ordering is locked, preventing front-running of those scheduled transactions. But the emission point lives inside Rakurai’s closed scheduler binary.
The public interface lets you inspect how updates are transported. It doesn’t independently establish exactly when the scheduler emits them or prove the claimed ordering guarantee. That’s where my review reaches its limit.
The lesson I’m taking from this:
Compatibility has at least three layers: can I decode it, do the fields mean the same thing, and can I rely on the same guarantees?
Rakurai’s feed makes those layers unusually visible.
For anyone adapting Jito tooling, the first thing I’d inspect is the code after deserialization, especially freshness checks and source attribution.
That’s where a message that parses perfectly can still produce the wrong decision.
2
8
430
Last week I looked at @Rakurai_io’s closed-source scheduler. This week I followed the money to its open-source payout programs.
Thousands of staker payouts can be committed to with one 32-byte root. But the trust sits with whoever gets to upload it.
Here’s how that works, and what the on-chain checks actually guarantee.
First, which rewards are we talking about?
The distribution path I traced collects transaction fee revenue, the validator code sums RewardType::Fee from finalized blocks.
Jito’s MEV tips flow through a separate system that Rakurai also integrates with. Keeping those paths separate matters when reading the accounting.
The fee-reward path looks like this:
1. The validator earns fees while producing blocks.
2. Those fees flow into a holding account for that validator and epoch, with Rakurai’s cut deducted along the way.
3. An off-chain tool snapshots stake and calculates the distribution.
4. It builds a Merkle tree and uploads the root.
5. Claim transactions submit proofs and transfer the allocated rewards.
The Merkle tree compresses the commitment to the payout list. Paying recipients still requires individual claims.
To prove “this account gets 0.4 SOL,” a claim supplies the recipient, amount, and sibling hashes. The program hashes its way back to the stored root.
Two implementation details are worth noticing:
- Leaves use a 0 byte prefix, internal nodes use 1. That separates the two kinds of hash input.
- Each pair is sorted before hashing, so proofs don’t need separate left/right markers.
But “the proof is valid” does not mean “the payout was calculated fairly.” It means the recipient and amount belong to the committed tree. The claim handler doesn’t reconstruct the stake snapshot or independently calculate what that recipient should receive.
There are payout limits, a maximum total amount and a maximum number of claims. The amount cap is also bounded by the funds in the account.
Those limits constrain how much can leave. They don’t establish who deserves it. An authorized uploader could construct a tree that stays within the pool’s limits while allocating the rewards incorrectly. Membership proofs would still verify against that root. That makes the upload authority the important part of the design.
In the Rakurai program I examined, each distribution account names a single root-upload authority. The program checks that authority’s signature. It doesn’t itself require an operator quorum to approve the allocation. Compare that with Jito’s TipRouter, where the normal approval path uses stake-weighted operator agreement on a commitment covering the distribution roots. Both use Merkle proofs downstream. The approval process upstream is different.
Rakurai also allows the authorized uploader to replace the root before any claims have occurred, within the applicable upload conditions. The first successful claim locks the distribution in.
Then I followed the activation logic, because it answers a different question, who can enable this relationship?
Activation requires a two-party handshake. One side proposes, the other accepts. The same party cannot perform both steps. Revocation needs only one side.
That asymmetry makes sense, entering the arrangement requires agreement, leaving it should be easier.
What needs care is interpreting what the switch controls.
In the public code I traced, is_enabled gates specific on-chain reward and tip operations. I didn’t find a corresponding reader in the validator’s open Rust that stops scheduler execution. That supports calling it an economic gate in the visible implementation.
It doesn’t establish what the closed scheduler may check internally, so “switch it off and the scheduler definitely keeps running” would go further than the available source supports.
The activation account also stores a 64-byte hash value supplied by the client.
In the paths I examined, I found writes to that field but no comparison enforcing a match against the running binary. Its presence alone therefore doesn’t demonstrate binary verification. Even comparing a recorded hash with a downloaded artifact would answer a narrower question than proving which code a validator is actually executing.
One accounting detail I liked, the distribution generator includes a payout to cover estimated distribution costs.
That estimate accounts for the root upload, recipient claims, and cleanup. The distribution funds its own delivery through the same tree. The remaining rewards are split proportionally by stake. Integer division rounds allocations down, leaving residual dust that returns to the validator when the account closes.
The through-line across all of this:
The Merkle proof protects the integrity of an accepted payout list. The upload authority determines which list gets accepted.
So when reading a reward-distribution program, don’t stop at verify(proof), follow the authority check.
Who can upload the root, and what must happen before their signature is accepted?
1
9
345
Been reading @Rakurai_io’s validator client this week as part of my Solana validator infra roadmap.
One design choice which seems quite interesting to me,
A component that helps decide which transactions enter a block, and in what order, ships without publicly available source code.
The scheduler arrives as a prebuilt library. Operators download it rather than compile it themselves.
To get it, you sign a message with your validator’s identity key and send the signature to an API. Download the file, put it where the validator can find it, and it loads on startup.
Simple installation, interesting trust boundary.
Transaction ordering is where technical decisions become economic decisions.
Within a block, ordering can determine who captures a profitable trade. A better scheduling strategy can translate into more revenue, giving its developers a reason to keep the implementation private.
But the scheduler sits directly in the transaction-processing path.
So the engineering question becomes:
How do you integrate a proprietary scheduler into a performance-critical system, and what tradeoffs come with that boundary?
There are two approaches worth comparing.
1. Run it as a separate process.
The scheduler and validator exchange work through shared memory, a ring buffer coordinated with counters.
This connects directly to what I wrote about Temporal’s que. Anza’s shaq uses similar ideas, cache-aligned counters, local progress published in batches, and initialization markers so both sides know the shared memory is ready.
The handoff requires synchronization and cache-coherence work.
In return, you get a process boundary. A scheduler crash can be contained separately, although keeping the validator operational still requires recovery logic.
Think of a contractor in a separate workshop, passing parts through a hatch.
2. Load it into the validator’s process.
Rakurai takes this route.
The scheduler library runs inside the validator, allowing direct interaction with its in-memory data structures.
The contractor is now at your kitchen table.
This avoids the separate-process handoff, but coordination costs don’t disappear. And the library shares the validator’s address space, so a serious fault can affect the whole process.
That leads to the detail I found most interesting, what crosses the library boundary.
A deliberately stable interface defines exactly how both sides exchange data. Each side can change internally while preserving that contract.
Rakurai’s interface passes Rust-native data types whose binary layout Rust does not guarantee to keep stable across builds.
The source suppresses the compiler lint warning about those types at the foreign-function boundary.
That suppression doesn’t itself prove the integration is broken. It does mean compatibility depends on tightly matching the builds, rather than relying on a stable interface contract.
Both sides need to agree on layouts, types, and ownership expectations.
If they disagree, the failure may be memory corruption rather than a clean “incompatible version” error.
You can see the engineering effort around that dependency:
The library filename encodes multiple versions to help select a matching build.
The integration includes panic-handling and abort logging, though those cannot catch every kind of failure.
The build pipeline includes a source-based scheduler build to check the types at the boundary.
That last check stood out to me.
Keeping the two components compatible becomes an ongoing build-system responsibility.
Then there’s a separate question, even if the library fits correctly, how do you establish trust in its behavior?
Rakurai publishes signed build provenance.
That is useful evidence about the artifact’s origin and build process. It doesn’t, by itself, tell you whether its scheduling policy behaves as expected.
Provenance establishes where the binary came from. Behavioral verification asks what it does.
Transaction logging offers another view.
The validator can record transaction signatures entering and leaving the scheduler. Comparing those records can expose omissions and patterns worth investigating.
But a difference between the lists isn’t automatically evidence of censorship. Transactions can expire, conflict, or miss capacity limits. Establishing selective exclusion requires that context.
These mechanisms answer different questions:
- Version checks help establish compatibility.
- Build provenance helps establish origin.
- Runtime logs help investigate behavior.
None substitutes for the others.
The question I’m taking into the next repo:
When I can’t inspect a component’s source, what exactly am I trusting, and what evidence would tell me that trust was misplaced?
1
13
480
Another day of my Solana validator infra learning , and ended up thinking, what if a restaurant's kitchen gets more orders than it can cook, which ones should it take first?
Solana validators, checks and process transactions, face a similar problem. Even checking whether a transaction’s digital signature is valid takes resources.
So when too many transactions arrive, someone has to decide which ones get checked first.
That’s where @temporal_xyz's QoS sidecar comes in.
“Sidecar” just means software running alongside the validator. Think of it as someone managing orders before they reach the kitchen.
It gives incoming transactions a score using a few clues,
- The past record of the network address they came from.
- The past record of the account listed as paying the fee.
- The estimated fee relative to the computing work requested.
Think of two restaurant orders.
One pays more overall but could occupy the kitchen for an hour. Another pays less but takes a few minutes.
The bigger bill alone doesn’t tell you which order makes better use of limited capacity.
Similarly, this sidecar combines several signals to decide what goes first.
Higher-scoring transactions get sent onward for checking. When its waiting area fills up, the lowest-scoring ones get dropped. Getting into this queue doesn’t guarantee a transaction will succeed. It gives it a chance to reach the next stage.
But here’s the detail that made this interesting to me.
At this point, the transaction’s signature hasn’t been verified. The account named as the fee payer might not have authorized anything.
Imagine someone sends a fake restaurant order with your name on it.
Should the restaurant damage your reputation when it discovers the order was forged?
Of course not. Anyone could write your name.
The sidecar follows that distinction, when signature verification fails, it can lower an existing score for the source IP address. It doesn’t punish the account merely named in the transaction.
That avoids letting someone damage your account’s reputation simply by putting your public key on fake transactions.
An IP address is still an imperfect clue, though.
People sharing a VPN or gateway can share an address, someone switching addresses may escape the old address’s penalty. Knowing where a request came from isn’t the same as knowing who is responsible.
The system also learns from what happens later.
Once execution feedback arrives, it can compare the estimated fee with the time the transaction actually took to run, that information helps score future arrivals. It doesn’t automatically reshuffle transactions already waiting.
So the loop looks like this:
Make an early estimate → choose what to check → observe the outcome → update future decisions.
Takeaway:
Keeping a busy system running means choosing where to spend its limited attention, and being careful about who you blame when something goes wrong.
Turns out there’s quite a bit of judgment involved before a validator even checks a signature.
1
4
246
Been working through my Solana validator infra learning, and somehow ended up down a rabbit hole about zero-copy IPC.
@temporal_xyz 's que.
Its reported benchmark hits 50 million+ messages per second with 1,264-byte messages on an AMD EPYC 9254.
What caught my attention was how much of the design comes down to one question:
How often do two CPU cores actually need to coordinate?
At 50M messages/sec, you’re averaging one message every 20ns. Around 60 clock cycles at 3GHz.
That’s a throughput budget, not a claim that every message reaches the reader in 20ns. But it explains why a syscall for every message would be expensive.
que uses shared memory to keep that work in userspace.
Both processes map the same underlying memory. Once it’s set up, they can access the buffer through ordinary memory operations.
But sharing memory doesn’t give you a queue.
It gives you bytes.
You still need to know:
• Where does the next message go?
• Has the writer finished publishing it?
• Has the reader consumed it?
• Is there room for another?
The ring buffer handles the bookkeeping.
Picture a notebook with 8 pages, reused in a loop.
The writer has produced 37 pages.
The reader has consumed 34.
There are 3 pages waiting.
The next write position is 37 % 8 = 5, using zero-based slots.
Why keep running totals instead of just the current slot?
Because if both sides say “slot 5,” you’re missing something crucial.
The reader might have caught up, or the writer might be a full lap ahead.
Same position, completely different queue state.
Keeping track of progress beyond the slot number preserves that distinction. Real integer counters still need to handle eventual overflow.
The interesting part is what happens when those counters cross CPU cores.
CPUs coordinate cached memory in units called cache lines, commonly 64 bytes on this hardware.
When one core writes a line another core has cached, the hardware has to coordinate ownership and visibility.
Do that repeatedly, and a tiny counter can become a surprisingly expensive part of your queue.
Even unrelated counters can interfere if they share a cache line. That’s false sharing.
This is where keeping local progress and publishing it in batches helps.
The writer can advance its local position as it produces messages, then publish progress through a shared counter.
The reader can similarly batch its progress updates.
That spreads synchronization overhead across multiple messages.
But there’s a tradeoff hiding inside that optimization, a message may already be written into the buffer while the reader still doesn’t know it’s available.
Until the writer publishes its progress, the reader must treat that message as unavailable.
Higher throughput can come at the cost of waiting longer for a batch to become visible.
Then there’s the choice I found most interesting, what happens when the reader falls behind?
que offers a lossless SPSC mode, one producer, one consumer, that prevents overwriting unread entries and preserves FIFO ordering.
Its headless mode allows overwriting old entries and supports multiple consumers without tracking a shared reader position.
That makes the application’s requirements part of the performance design. For a feed of independent price snapshots, skipping an outdated snapshot may be acceptable, you care about the latest state.
For incremental order-book updates, dropping one message can leave your local book wrong.
“Market data” alone doesn’t tell you whether loss is safe, you need to know whether each message stands alone or depends on the ones before it.
That’s the lesson I’m taking back to my validator infra learning.
Performance starts with deciding what the application must preserve:
- Every message?
- Strict ordering?
- Immediate visibility?
- Or the freshest available state?
Those answers determine how much coordination you can afford to remove.
The question I’ll keep asking while reading infra code:
What guarantee are we paying for every time these cores communicate?
2
33
1,490
Back from an awesome Japan trip 🇯🇵
Picking up with something I’ve been digging into,
How a searcher’s MEV tip on Solana actually reaches a staker!?
The most interesting part? A valid Merkle proof can prove your payout was included in a distribution. It can’t prove the distribution was fair.
That distinction explains why Jito’s TipRouter exists.
Let’s follow the money.
This distinction explains one of the most interesting parts of Jito on Solana.
Follow a searcher’s tip to a staker, and you find two separate problems:
- Deciding what everyone is owed.
- Enforcing the resulting payouts.
Here’s how those fit together.
First, the money needs somewhere to go.
Jito’s tip-payment system routes rewards into a validator’s TipDistributionAccount, an account tied to that validator and a particular epoch.
Think of it as an epoch’s reward pot, with a few rules attached, commission settings, an upload authority, and an expiry.
Then comes the expensive part, calculating the split across stake accounts.
That calculation happens off-chain. The resulting recipient-and-amount entries are organized into a merkle tree, whose root commits to the distribution.
The root compresses the commitment. It doesn’t eliminate the payouts.
Each payment still needs a claim transaction, and successful claims create ClaimStatus accounts. A separate payer can submit and fund the claim, the staker doesn’t have to do it personally.
The claim handler verifies the proof, checks authorization and expiry, prevents repeat claims, enforces claim limits, and transfers the lamports.
It does bookkeeping.
What it doesn’t do is recalculate the recipient’s stake-weighted entitlement. Claim implementation that leaves a crucial trust boundary.
Suppose an authorized root assigned an unfair amount to one recipient.
A valid proof would still demonstrate that the payment belongs to that root. Duplicate-claim protection and payout caps wouldn’t establish whether the allocation was deserved.
Those checks constrain execution, fairness depends on how the root was produced and accepted.
This is where TipRouter comes in.
TipRouter uses a network of operators built on Jito Restaking to compute and vote on the distribution.
More precisely, operators produce a meta Merkle root, a commitment covering the individual validator distribution trees.
They submit votes to an on-chain ballot box, under the normal consensus path, agreement requires a stake-weighted supermajority of roughly two-thirds. A cranker can then prove that a validator’s distribution root belongs to the accepted meta root and upload it.
The claim program still doesn’t reproduce the accounting. Trust moves into the process that approves the accounting result.
And there’s an important distinction, the stake determining your validator rewards and the restaked assets determining operator voting weight serve different roles. TipRouter has its own operator set and security assumptions, it doesn’t inherit Solana consensus security simply by using stake-weighted voting.
The design lesson extends well beyond MEV:
Whenever a protocol verifies a proof, ask what that proof actually establishes. For a Merkle payout, it establishes membership in an accepted distribution.
The next question is where the deeper security analysis begins:
Who gets to make that distribution the accepted one?
2
12
411
Stake on @solana isn't just for consensus, it's a priority currency the validator spends everywhere a scarce resource has to be rationed, and once I saw that, the whole system clicked (diff than what I was assuming from day 1 of my understanding).
Reading the Agave source, closing a loop I've traced all week. Three things about how a block gets finalized and broadcast that I'd had completely wrong:
A block ends on the clock, not when it's full(with CU capacity ~100M now).
PoH is a continuous hash chain, and the leader interleaves two kinds of entries, transaction entries ("these txns happened here") and tick entries (empty markers that just record time passing). A slot is a fixed 64 ticks (~400ms, lower now ~150-200ms). The block ends when the tick count hits max_tick_height!
Hitting the 60M compute limit does NOT end the block. Neither does running out of txns. In both cases the leader just emits empty ticks until the clock runs out. Capacity and available work change what's inside the block, never when it ends. A txn races two separate walls, the slot clock, and whether the block filled before then.
Blocks are erasure-coded, so packet loss usually needs no retransmit.
Entries can't hit the wire directly. The shredder splits them into data shreds (the actual bytes, cut to packet size) and coding shreds (Reed-Solomon redundancy). With 32 data + 32 coding = 64 total, a receiver reconstructs the whole block from any 32 of the 64(if K is data shreds and N is total shreds, so K of N).
Turbine is a stake-weighted tree, and it mirrors the ingress side exactly.
The leader doesn't send every shred to everyone (bandwidth cliff). It sends to the root of a tree, each node forwards to its children (fanout 200), the block propagates in ~2 hops. Higher-stake nodes sit closer to the root, shreds sooner, more reliably. The tree is deterministic, every validator computes the same one from slot, shred index, and stake, so zero coordination needed.
Here's what clicked, this is the same principle as the ingress side. On the way in, stake buys QoS priority (admission + bandwidth). On the way out, stake buys tree position.
That's the loop, end to end, a transaction from a QUIC packet → QoS → sigverify → scheduling → execution → PoH → out as erasure-coded shreds through a stake-weighted tree → into the follower path where other validators replay and vote.
If you want to read it yourself, it's all in agave/poh, agave/ledger (shredder), and agave/turbine, I have posted the links below ⬇️
1
13
546
The image attached(tick()): github.com/anza-xyz/agave/bl…
entries -> data + Reed-Solomon coding shreds: github.com/anza-xyz/agave/bl…
stake-weighted tree: github.com/anza-xyz/agave/bl…
5
205












