If you build on @Solana, you know how wild AMM architecture can get. I just shipped a fully custom, end-to-end Concentrated Liquidity Market Maker protocol built entirely from scratch.
Zero Anchor. Just native Rust and raw performance.
The architecture:
⚡️ Native Rust Program
🔍 Zero-copy bitmap scanning for hyper-optimized tick traversal
🧮 Precision-optimized Q64.64 fixed-point math
🖼️ NFT-backed transferable liquidity positions
🦀 Real-time async Rust Indexer & Next.js UI.
@kirat_tw@SuperteamIN@orca_so
From the smart contract down to the async indexer and Next.js trading UI, here is what I built. 👇🧵
@ayushagarwal027 Debug is almost never on a hot path, so the inline buys nothing there. You just end up with a copy of the same formatting code in every crate that calls it.
built an escrow program on solana with anchor, learning anchor as i went
coming from raw solana_program, anchor just deletes a whole category of pain:
- no next_account_info loops, just a #[derive(Accounts)] struct
- Signer / Account<T> do the signer + owner checks
- init + seeds + bump creates the PDA and pays rent
- InitSpace sizes the account for you
- CpiContext::new_with_signer instead of hand-rolled invoke_signed
disputes with a 3-arbiter vote next
#Solana #Rust #Anchor
@jh23766311@decentra1ized_@aryansinghtwts@Javi_4B@SolanaFndn For Pinocchio the hand-written IDL is the part to watch. Nothing derives it from the code, so a test that decodes a real account through the generated client is what catches drift.
@arsen_bt Agreed it's the account model, not Rust. Coming from Solidity the shift is that every account passed in is attacker input, so the classic bug is a missing owner or signer check rather than reentrancy.
@m_a_zeeshan The ~265 CU per swap from Pump AMM's redeploy is exactly the drift nobody catches. Would love the same old vs new diff on emitted events, since indexers break on those silently even when outcomes match.
@tom_doerr An agent that auto-reads every inbound email is the textbook prompt injection surface. The rule that drafts always need confirmation before sending is doing the real security work in that repo.
@ctatedev Running it on both a physical machine and Vercel Sandbox makes state the interesting part. Do the persistent views live somewhere both can reach, or does each instance keep its own?
@DhravyaShah Having the small model only emit 0-100 scores and a deterministic evaluator pick the action is the right cut. When to speak becomes a formula you can retune instead of a prompt.
@a_milz@anza_xyz@SolPlay_jonas With consensus near 150ms, most of that 0.9s is probably client side now. Was it polling getSignatureStatuses or a signatureSubscribe websocket?
@pjvann@X How do you handle false alarms? X is ahead of disclosure but also full of wrong "compromised" claims, so I'd want a second source before the agent blocks a package.
@ImposeCost What the agent changes is the window, not the root cause. A known bug on the perimeter could sit unnoticed for weeks, now the patch SLA is racing automated scanning.
@parmardarshil07 DuckDB first, even past 100 GB, since it spills to disk. The real signal for Spark is when one machine's cores are the bottleneck, not whether the data fits in RAM.
@SebastianSzturo Right up until you need a second app server, because the database lives on one disk. Before that point it's genuinely the right default.
@steipete The next wall is SQLite's single writer. Async fixes the reads, but writes still serialize, so funneling them through one batching writer task usually beats a connection pool.
@Sorologgg What happens to the 20M labels when the model changes? Storing the model version next to each judgment is what lets you re-judge a range instead of the whole history.
@mitsuhiko Agents make unsafe cheaper to write, not cheaper to verify. With Miri running in CI I'd agree, since that turns the invariants into something the agent can actually check against.
@jurlycat The catch is enumerating the options up front. Minecraft hands you a finite action list, but most real tools take arguments, and once the options aren't finite you're back to generating.