Blockchain & Tech

The protocol underneath and everything standing on it — consensus, EIPs and cryptography, then the services, chains, payments, and the market and regulatory reading that decides what any of it is allowed to be — plus robotics, embodied AI, data-science method, and anything else that does not belong under Economics.

done (52) / all (216)

  • 1Governance capture — when the exploit is a market order

    $8.5M left Term's vaults without a line of code breaking. The number nobody publishes for a token-governed vault is what decisive voting power costs against what it controls.

    How it worksMechanics as reported: the attacker cornered a majority of a sparsely held governance token, then passed malicious proposals to seize the strategy vaults, holding 100% of voting power in four of five USDC strategy vaults and roughly 91% in the Ethereum Meta Vault at execution time. The vault contracts then executed the malicious calls as legitimate, because they were.

    WhyThe distinction is the whole story. Term has two very different products under one brand: the core fixed-rate repo markets use per-loan collateral lockers to isolate borrower and lender exposure, and that design held and was untouched.

  • 2The budget is the wrong invariant

    A spend cap constrains the amount, not the purchase. An agent that spends $50 of its $100 on the wrong thing passed every check — and on-chain there is no chargeback behind it.

    How it worksTwo mechanisms, and the second is the one that will draw fire. First: sign the intent, not the limit.

    WhyAutonomous payments are almost always secured with a spend cap, and the cap is the wrong invariant. An agent given $100 that spends $50 on the wrong item has violated nothing — the session key worked, the limit held, the signature verified.

  • 3Shared liquidity — quoted depth vs. the balance behind it

    1inch Aqua leaves LP tokens in the wallet and lets one balance quote across many positions. The number nobody publishes is how much of that quoted depth is actually fillable.

    How it worksMechanism, as documented · The gap the public documentation leaves · The measurement

    WhyThe pitch is self-custody — tokens never leave the wallet, no deposit, no debt — and all of that is true. The part worth a card is what the design trades away to get it.

  • 4RWA across chains — the invariant nobody enforces

    Reading a practitioner's multichain RWA architecture and finding the one box it leaves empty: who stops the tokens on five chains from summing past the asset behind them.

    How it worksThe proposed stack, as written: a Private Operational Registry (Canton named as candidate infrastructure) holds the sensitive originals and the authoritative current state — custody balances, NAV, investor eligibility, total issuance, redemption and suspension status. Responsible institutions issue only the necessary facts as verifiable credentials rather than exposing the registry.

    WhyAlmost every question this catalogue asks shows up in one place here. The post's thesis is that RWA's bottleneck is not minting tokens but carrying one off-chain fact to many chains, so the thing to standardise first is the fact-transport interface, not the token contract — which is the same enforce-on-chain-remember-off-chain split the CRE × Cloud card arrives at from the other direction.

  • 5OpenZeppelin Relayer & Monitor

    The managed service shut down; the tools were opened. Self-hosted transaction plumbing and on-chain alerting.

    How it worksRelayer keeps the plumbing: it accepts a transaction over a REST API, signs it, and owns nonce sequencing, gas pricing, and retry — EVM multi-chain plus Solana and Stellar, with keys in HashiCorp Vault or AWS KMS rather than an env var. Monitor watches the other direction: declarative JSON rules over events, function calls, and transaction patterns, firing Slack or webhook alerts.

    WhyTwo questions this catalogue has not asked yet. First, the operational one: every agent demo here hand-rolls the dullest and most failure-prone part of on-chain work — nonce management, gas strategy, retries — and OpenZeppelin Relayer is that exact layer, extracted and hardened.

  • 6DVT in the protocol

    Reading notes on absorbing distributed validators into the protocol — m-of-n without splitting keys, plus what it makes buildable.

    How it worksToday's DVT (Obol, SSV) splits one validator key with Shamir sharing or threshold BLS and runs an off-chain consensus round to reassemble a signature each time; the protocol still sees a single validator, and all distribution lives in middleware. The proposal never splits the key: each participant registers their own (n ≤ 16), the protocol groups them m-of-n, and BLS aggregation plus a participation bitfield — the same grammar as today's attestation aggregation — decides whether enough took part.

    WhyReading a live protocol-design discussion closely enough to separate three things people usually blur: what the proposal actually changes, what it leaves unresolved, and which parts of the idea can be built one layer up without waiting for it. It is also a second instance of a pattern this site already documents elsewhere — middleware doing a job well until the protocol absorbs it, which is exactly what ERC-4337 bundlers face from native account abstraction.

  • 7L1 zkEVM — the word doing the work is "optional"

    EIP-8025 lets a validator verify a block by checking a proof instead of re-executing it. The number nobody publishes is how many still re-execute once it is cheaper not to.

    How it worksMechanism first, as documented: a validator may verify a block by checking a succinct proof of the state transition rather than re-executing its transactions, with the mainnet state transition function exposed to the execution layer through an EXECUTE precompile in the EIP-8079 draft, and Native Rollups built on the same primitive. Proving is made feasible by the two Glamsterdam pieces above rather than by any change in EIP-8025 itself.

    WhyTwo forks make one machine, and it is worth stating the dependency plainly because the roadmap coverage rarely does. Glamsterdam sets out two chairs: ePBS (EIP-7732) supplies time, because splitting the slot seats the builder as prover and opens an interval between header commitment and payload reveal; BAL (EIP-7928) supplies partition, because a block that declares the state it will touch is a block whose proving work can be sliced across many provers.

  • 8ERC-7683 settlement security — the layer left deliberately unstandardized

    ERC-7683 standardizes order envelopes, not settlement proofs. The three settlement models (optimistic, light-client, committee bridge) decide who actually bears the bridge risk and why filler loan spreads diverge.

    How it worksHow the money actually moves — t=0, t=1, t=2 · What the standard fixes, and what it leaves blank · Why the blank is not laziness

    WhyIntents did not eliminate bridge risk — they moved it from users to fillers. A user signs on the origin chain, escrows input tokens, and the filler advances their own funds on the destination chain immediately.

  • 9The hiring signal is the spec — event-contract plumbing

    Brokerages wiring crypto event contracts into their apps are hiring backends who know clearing, settlement, order routing and regulatory reporting — not prediction-market specialists. Those job posts are a free requirements document for the same plumbing built on contracts instead of a licence.

    How it worksThe measurement: one table, no code · What the buckets actually tell you · Why this is worth doing before it is needed

    WhyA single line in a hiring feed is worth a card. With Gemini's Titan becoming Apex Fintech's exclusive regulated venue, wiring crypto event contracts into brokerage apps stopped being a thesis and became a staffed project — and the people being hired are not prediction-market specialists.

  • 10Tokenized Money for Banks

    Tempo Research's primer on the three product families banks can use to put a settlement asset onchain — tokenized deposits, first-party stablecoins, and third-party stablecoins — and the Basel LCR/NSFR cost each one hard-codes.

    How it worksThree families, each a different trade on the balance sheet. (1) Tokenized deposits — the claim stays a deposit, just wrapped in a token; cheapest Basel treatment (25% LCR runoff, 50% NSFR ASF for the permissioned variant) but narrow reach — JPMD on Base is the live example.

    WhyA structured way to read every "bank issues a stablecoin" headline: the report separates three genuinely different balance-sheet moves that get talked about as one thing, and shows why a bank ends up needing all three rather than picking a winner. Useful background for anything touching bank-adjacent stablecoin rails or institutional settlement design.

  • 11Not what a stablecoin can do — what needs one

    Start from "where could we use a won stablecoin?" and you will find somewhere. Start from "which transactions are painful enough today?" and the list gets much shorter — and in Korea the incumbent to beat is not slow settlement, it is an instant free transfer.

    How it worksThe screen, with the disqualifier made explicit · The four candidates, scored on the source's own test · The trap underneath the trap

    WhyThe ordering flip is right and it is the whole point. Ask "where can we use a won stablecoin?" and the answers arrive immediately — retail payments, remittance, games, tourist payments, local currency vouchers — because that question cannot fail.

  • 12Monad — the last general-purpose L1, and the number nobody adjusts for

    Monad bet a record $412M on one thesis: a chain fast enough to hold everything. Nine months of mainnet data now exists, but nearly every headline number overlaps a live incentive program, and nobody publishes the incentive-adjusted figure.

    How it worksThe three numbers this card wants · Why measurement 1 is the cheapest and most damaging · Where the premium is actually appearing

    WhyThree conditions, and the second one already failed once. The report sets Monad's success conditions as: prove a composability premium only integration can create, keep successful apps from leaving, and create demand that runs without incentives.

  • 13The bridge is not beside the token any more — it is inside it

    cbBTC is expanding to another chain with one messaging layer named as its exclusive cross-chain infrastructure, and the announcement argues the design reduces systemic risk by holding and auditing the underlying Bitcoin in one place instead of fragmenting issuance. The surface area really does shrink. The blast radius grows by the same move — and under a natively-interoperable token standard the bridge stops being a counterparty beside the asset and becomes a component of it.

    How it worksTwo models for the same asset · Surface area is not blast radius · The four failures, kept separate

    WhyThe load-bearing sentence is the one that sounds like a safety argument. Holding the underlying in one place instead of fragmenting issuance across every chain does shrink the surface area — there is one reserve to attest, one reconciliation, one auditor.

  • 14The property that makes a market work is the one that makes it gambling

    Umia routes corporate decisions through markets and enforces them with a Cayman entity. The same essay argues a prediction market only works if participants cannot change the outcome — which is the exact property Korea's regulator cited when it called prediction markets gambling. Decision markets cross that line on purpose.

    How it worksThe same property, read by two authorities · What Umia does about it, and what each defence costs · The number, and why it transfers

    WhyPut two documents side by side and they draw the same line for opposite reasons. The essay's own earlier critique of prediction markets is that a market only discovers an outcome if participants cannot change it — once they can, the market stops predicting and starts manufacturing.

  • 15Stake concentration risk

    How much stake sits behind one router, one ASN, one data centre — and how close that is to halting finality.

    How it worksPlanned as a measurement, not an essay: pull the active validator set and its stake weights from public RPC, resolve each advertised gossip/TPU endpoint to an IP, map those to ASN and hosting provider with a public IP-intelligence dataset, then aggregate stake by ASN, by provider, and by geographic region. The headline figure is the stake-weighted Herfindahl index plus the single largest correlated bucket, both plotted against the 33% halt line.

    WhyIn 2026 a routing error on Solana took roughly 29% of stake offline at once and the network came within a few percentage points of losing finality. Nothing was hacked and no key was stolen — the consensus math worked exactly as designed.

  • 16A price at a moment — the instant, the window, and who can move it

    Polymarket's five-second trick and Balance Coin's oracle attack are the same defect: one price, one instant, no band, no delay. The push-versus-pull oracle split exists because of exactly that problem, and the fix is a parameter with a number attached rather than a principle.

    How it worksPush versus pull, and why the split exists · The three knobs, and the curve that decides them · The three concrete advantages of pull

    WhyTwo 2026 incidents look unrelated and are not. 2M out of settlement windows they classified as likely manipulated — with 93% of the losses in those windows, market makers excluded, landing on retail.

  • 17The redemption desk — what actually makes a stablecoin's denominator

    Ripple Mint turns issuance and redemption into an institutional workflow. The claim worth testing: circulation is won at the redemption desk, not on the chain.

    How it worksThe comparison set is one issuer's institutional path against at least one other, on four axes rather than on marketing copy: who is eligible and what onboarding costs, how long redemption takes and under what conditions it can be suspended, what the audit trail looks like end to end, and what happens when the same unit exists on more than one chain. 6B, which makes bridging part of the redemption story rather than a side feature: a unit redeemed has to be a unit burned on whichever chain it was actually sitting on.

    WhyThis catalogue keeps arriving at the same conclusion from different directions — the contest is not TPS but the denominator and its circulation — and stablecoins are where that can be stated most precisely. What builds a stablecoin's denominator is not its chain or its peg mechanism but whether an institution can get out at par, on a schedule, with a record its auditor will accept.

  • 18Nobody runs the peg — the competing bots are the mechanism

    A perpetual future tracks spot with no expiry date forcing it to. What holds the two together is funding payments making the gap painful, and dozens of arbitrage bots racing each other to close it — which means the basis you observe is a readout of the cheapest arbitrageur's cost floor.

    How it worksThe loop, in eight steps · The worked example, and the unit error in it · Delta-neutral is not risk-neutral

    WhyThe closing observation in the source is the best part, and it deserves to be the headline. A perpetual future has no central price-correcting process.

  • 19Trusted third parties — the blast radius nobody maps

    Four 2026 incidents with one root: a vendor you authorized. And the control everyone reaches for first — SRI and CSP — would have stopped none of them.

    How it worksThe build is an inventory and a containment test, in that order. Inventory: for one real frontend, list every third-party script and every vendor holding customer PII, and go one layer down where it is discoverable — ShipMonk's exposure arrived through Metabase, and a list that stops at direct vendors would have missed it.

    WhyFour incidents in four months, and the interesting thing is not that they happened but that they share a root the usual threat model draws outside the boundary. 94M left at least 11 wallets, the stolen pUSD was bridged from Polygon to Ethereum and consolidated into roughly 1,893 ETH, and every affected user was reimbursed — the vendor has still not been named publicly.

  • 20Same product, three verdicts in eight days

    Between 8/18 and 8/25 one activity was criminal gambling in Korea, a brokerage product line in the US, and something a US company sells only outside the US. The axis is not the product — it is the jurisdiction, and no design document has a box for it.

    How it worksThe three events, side by side · The grounds, turned into levers · Why the December document needs two branches, not one

    WhyThree events, eight days, one axis. Korea's communications standards commission classified Polymarket as criminal gambling and blocked access.

  • 21Four capabilities, each buying back what the chain gave away

    The must-build column of the plumbing table turns into four engineering capabilities: netting, hybrid matching with a verifiable audit trail, intent routing, and oracle failure with surveillance. Each one re-acquires, at a cost, a property the on-chain design discarded for free.

    How it worksThe four rows, and the number each one is measured by · Why the symmetry matters more than the list · The order to learn them in, and why

    WhyThe four capabilities look unrelated and are the same move four times. Clearing, matching, routing and resolution each name a property the on-chain design already has for free — and each is the price of keeping that property once the system has to be fast, capital-efficient, or connected to the world.

  • 22The migration works by making the contract dumber

    A draft EIP replaces the deposit contract's hardcoded BLS12-381 dimensions with variable-length credentials, and adds a BLS retirement mode that a system call flips once and never back. The technique is not teaching the contract a new scheme — it is removing the opinion it held about the old one.

    How it worksTwo mechanisms, and what each one actually buys · Three modes, and the draft's actual status · The pattern worth stealing

    WhyThe instructive move is the one that looks like a downgrade. Today the deposit contract knows what a validator credential is: 48 bytes of public key, 96 bytes of signature metadata.

  • 23Ten-second slots — the constant nobody wrote down

    Cutting slot time from 12s to 10s changes no API, which is exactly what makes it dangerous. Every poll interval, confirmation rule, oracle heartbeat and deadline in an application encodes 12 seconds somewhere, and almost none of them say so.

    How it worksWhere twelve seconds hides · The rule the table produces · Why it sits next to the other protocol cards

    WhyA timing change is the worst kind of change, because it does not break a build — it shifts a distribution. Nothing fails to compile, no test goes red on the day the fork lands, and the symptoms arrive later as flakiness: an update that occasionally arrives a beat late, a quote that occasionally misses its window, a confirmation rule that quietly guarantees less than it did last week.

  • 24When gas stops being one number — data pricing and bandwidth accounting

    EIP-8131 and EIP-8279 point at charging separately for the resources a transaction actually consumes. A settlement app that posts a lot of bytes and computes very little has been cross-subsidized by the single gas number — and repricing decides which design stays cheap.

    How it worksOne number, five resources · The measurement, and why it is small · The state-growth footnote worth keeping

    WhyA single price for several resources always cross-subsidizes, and the subsidy runs toward whatever is hardest for the network to scale. One gas number covers computation, state growth and bandwidth at once, so somebody is overpaying and somebody is underpaying — and the underpayer is, by construction, the usage pattern the network would most like to discourage.

  • 25An RPC response is a view, not consensus

    A hosted RPC reports what one node currently believes. Availability, correctness, canonicality, and finality are separate properties, yet applications often compress them into "the chain says."

    How it worksQuery two independent providers for latest, safe, and finalized block number plus hash; inject a stale or disagreeing response; and define when the application degrades, retries, or refuses an irreversible action. The useful pattern is not "always send every request twice."

    WhyMulti-provider failover fixes downtime but can amplify disagreement unless responses are compared by block hash and confidence tag. The PoC turns RPC trust into an observable policy.

  • 26Ponder — the indexer is the reorg handler

    An indexer is not merely a faster RPC cache. It owns rollback, replay, idempotency, and the database state a product shows while the chain can still reorganize.

    How it worksIndex one small contract with Ponder, force a local reorg, and assert that derived rows match a clean replay byte for byte. Measure initial sync, restart recovery, RPC calls, and schema-change rebuild time.

    WhyThe existing replayability card states the invariant; this PoC tests whether a production library actually buys it. A fast query layer that leaves stale rows after a reorg is faster at returning the wrong answer.

  • 27The wallet disappeared into the app

    Embedded wallets and passkeys remove the seed phrase from onboarding, but the trust question moves into recovery, export, app signers, and transaction policies.

    How it worksBuild one login-to-first-transaction flow with an embedded wallet, then test device loss, key export, MFA recovery, and a scoped app signer. Draw the authority matrix before judging the UX.

    WhyThe trend is not "wallets became easy." Wallet responsibilities moved into the application.

  • 28HTTP 402 is the easy part — settlement owns the retry

    x402 turns payment into HTTP middleware, but the product boundary is what happens when verification succeeds, settlement times out, and the client retries the paid request.

    How it worksPut one idempotent API behind @x402/express, inject failures between verify, settle, and fulfillment, then prove that one signed payment produces at most one charge and one response entitlement. Protect one idempotent API route with @x402/express.

    WhyThe facilitator removes blockchain plumbing from the seller; it does not remove distributed-systems semantics. A paid API needs an idempotency key and a durable payment-to-resource state machine.

  • 29A Safe module is a root key with an interface

    Safe modules can execute transactions without the normal owner-signature path, while guards can block execution. Installing either changes the account's real security boundary.

    How it worksDeploy one allowance module and one guard, enumerate every reachable call, demonstrate a module bypassing the normal threshold, then test the recovery path from a guard that rejects everything. Deploy a Safe with a two-owner threshold, an allowance module, and a no-delegatecall guard.

    Why"Modular wallet" sounds like application extensibility, but wallet extensions act on assets. The useful deliverable is an authority graph and uninstall/recovery test, not a plugin gallery.

  • 30Hiding the amount is the easy half

    Confidential settlement encrypts the invoice value and publishes who paid whom and when. That second half is offered as the harmless one, and for a supply chain it may be the half worth hiding — while the opposite tool, computing over data that never becomes readable, solves the problem a blockchain structurally cannot.

    How it worksTwo opposite tools, and the question each answers · The attack, and it runs entirely on synthetic data · The trilemma, stated as one

    WhyInstitutional privacy converged on one shape in 2026 — Tessera on Sui, XRPL's confidential transfers, Circle's Arc Privacy, Canton, Midnight — and the shape is: encrypt the value, publish the graph. Sui states it without hedging in its own announcement: the chain shows who paid whom and when, and the amount appears as ▦▦▦.

  • 31ERC-8141

    Native account-abstraction explainer — Ethereum's protocol-level Frame Transactions.

    How it worksNot a working demo by necessity: EIP-8141 defines a new transaction type where a single transaction carries a sequence of frames (a VERIFY frame for signature/fee authorization, then one or more EXECUTE frames) instead of one implicit call — but no client or RPC can send this transaction type yet, since it requires execution-layer support the network doesn't have. As of writing it's only "considered for inclusion" in a future fork, so this stays a diagram/explainer page rather than a live demo.

    WhyA protocol-native preview of what this project's application-layer AA demos (session keys, atomic batching) do today with smart contracts and delegation — EIP-8141 proposes moving those same properties into Ethereum's base transaction format itself.

  • 32A successful receipt is not settlement

    status: 1 proves execution in one block; it does not prove that the block will remain canonical. Payment products need included, safe, finalized, and reorged states instead of one paid boolean.

    How it worksBuild a reorg-aware payment state machine, replay a removed receipt on a local fork, and verify that reversible fulfillment rolls back while irreversible fulfillment waits for the configured confidence level. Implement detected → included → safe → finalized plus reorged.

    WhyThe RPC call succeeds before the business promise is safe. This is where chain finality becomes product policy: cheap reversible goods can accept risk; expensive irreversible delivery cannot.

  • 33L2 finality is three clocks

    A sequencer confirmation, publication to L1, and L1 finalization answer different questions. Showing one "confirmed" badge collapses three trust boundaries into one word.

    How it worksTrack an OP Stack transaction from unsafe to safe to finalized, record each timestamp, then repeat for a withdrawal whose challenge or proof path adds a fourth clock. Submit one OP Stack transaction and record the timestamps at which its block becomes unsafe, safe, and finalized.

    WhyL2s feel instant because the first clock is fast, but bridges and high-value settlement depend on later clocks. The PoC makes the latency/trust trade explicit instead of hiding it behind UX.

  • 34Simulation belongs before the wallet prompt

    A wallet prompt tells the user what they are being asked to sign; simulation tells the application what that signed transaction is expected to do.

    How it worksWrap three writes with viem simulateContract: one success, one custom-error revert, and one state-dependent failure. Compare the predicted outcome with the receipt and surface decoded failure before requesting a signature.

    WhyMost failed writes are knowable before gas or user attention is spent. Simulation cannot guarantee future state, but it turns avoidable failures into application errors rather than wallet surprises.

  • 35Gasless is two infrastructure services

    An ERC-4337 user operation can be valid on-chain and still be rejected by a bundler or denied by a paymaster. "Gasless" is therefore an availability and policy promise, not a wallet property.

    How it worksSend the same UserOperation through two bundlers and two sponsorship policies; classify simulation, policy, quota, deposit, inclusion, and execution failures; and define a user-funded fallback. Send the same UserOperation to two bundlers under two paymaster policies.

    WhyBundlers pay gas up front and paymasters remain liable even when execution fails, so both apply local risk controls. The application must expose those service decisions instead of rendering every rejection as "transaction failed."

  • 36Private RPC changes visibility, not settlement

    A protected transaction avoids the public mempool, but it can still expire, remain unincluded, or become non-canonical. Privacy changes the monitoring path rather than removing transaction states.

    How it worksSubmit equivalent swaps through a public RPC and Flashbots Protect, record where each hash is observable, test cancellation and timeout behavior, and reconcile both against canonical receipts. Submit equivalent small swaps through a public endpoint and Flashbots Protect.

    WhyApplications often use public-mempool visibility as evidence that a submission exists. Private order flow breaks that assumption and requires provider-specific status plus ordinary chain finality.

  • 37Connect once means authorize a session

    A WalletConnect connection is not merely an address exchange. Its namespaces, chains, methods, accounts, expiry, and update events describe a standing capability that the application must track.

    How it worksConnect with the smallest method set, compare it with a broad default proposal, then exercise account change, chain change, session update, expiry, relay disconnect, and explicit revocation. Create one minimal proposal and one broad proposal using the WalletConnect Sign client or Reown AppKit.

    WhyThe UI usually collapses session state to "connected." That hides which methods remain authorized and produces stale-account bugs when the wallet changes state outside the application.

  • 38An invariant test is only as good as the actions it reaches

    Foundry can assert a property after randomized call sequences, but a green campaign proves little when most calls revert or important states are unreachable.

    How it worksWrite an open invariant test and a handler-based version for the same vault, compare call/revert distributions, add ghost-variable accounting, and deliberately seed a sequence-only bug. Test the same ERC-4626-style vault twice: first by targeting the contracts directly, then through handlers that prepare balances and approvals.

    WhyStateful fuzzing is becoming standard Solidity tooling, yet its main failure mode is silent: the test passes because the generator never performed meaningful work. Reachability metrics belong beside the assertion.

  • 39Constraint was the product — and no firewall blocks a sentence

    MCP spent early 2026 being declared dead by people whose complaints were correct, then shipped the most breaking release in its history — deleting the handshake, the session layer and three primitives — and the critics retracted. The lesson is not that the protocol won. It is that the thing being sold was never capability, and the one hole the deletion could not reach is the one that matters.

    How it worksThe three complaints, and which one the rewrite actually answered · What was deleted on 2026-07-28 · Two entry points into the context. One of them is reviewed.

    WhyIn March 2026 "MCP is dead" was a defensible position, and the reason it is worth revisiting is that the complaints were not wrong. Tool schemas were loaded into the context window before the user typed anything.

  • 40Merkle vs Verkle

    Why proof size, not hashing speed, is what decides whether stateless clients are possible.

    How it worksReading note, not a demo: how a Merkle proof's size grows with tree width (you must supply every sibling at every level), why vector commitments collapse that to a constant-size proof regardless of width, and what Ethereum's Verge roadmap intends to buy with the swap — stateless clients that validate without holding the state. Also what it costs: heavier cryptography, and a migration of the entire state trie.

    WhyThe state-bloat problem this catalogue keeps running into from the application side, looked at from the protocol side. Every card here that writes a storage slot — an enforcer's spent counter, a token balance — adds to state that every node keeps live forever.

  • 41What encryption does not hide

    Two competing encrypted-mempool EIPs leave the sender, the gas, and the size in plaintext. Measure how much of the sandwich survives on metadata alone.

    How it worksThree measurements, cheapest first. One, the residual-MEV replay.

    WhyThe briefing reads as if the question is still open — developers will meet, encryption is being considered, no scheme is ready. Two of those are true and one is not.

  • 42Choosing a chain is signing a lease

    An L2's pitch moved from cheap blockspace to run your chain here, which is a revenue model moving from transaction fees to rent on settlement space. That makes chain selection a commercial negotiation, and the terms — sequencer control, fee sharing, exit cost — are the product's margin.

    How it worksThe lease term sheet · Two pitches, one destination · The row to price first

    WhyA self-description changed, and self-descriptions are where revenue models announce themselves early. Use Ethereum cheaply sells transactions and earns per transaction.

  • 44Liquid's peg-out drain — the mint was poisoned, not the gate

    The Blockstream Liquid loss was not an authorization bypass — my earlier guess was wrong. An Elements issuance bug minted LBTC that was technically valid, and the peg-out system correctly honored it. The gate worked; the set it counted was contaminated at the source.

    How it worksTwo questions, two different pieces of code · Why 'valid token' is a weaker claim than it sounds · The negotiation was the unusual part

    WhyThe correction is the point. I first read this as an access-control gap — a check that should have refused a withdrawal and didn't.

  • 45Base App — what a Mini App buys, and what it rents

    The thing worth wanting from Base App is not the audience. It is that every user arrives with a passkey smart account already created and already funded — which deletes the two steps that kill most of a crypto product's funnel. The cost is that discovery belongs to somebody else.

    How it worksThree ways to use it, in increasing order of commitment · What is actually being deleted · The measurement, and it decides the whole thing

    Why"The ecosystem is hot" is not a distribution channel, and treating it as one is the mistake this card exists to prevent. A feed is a ranking algorithm, and a ranking algorithm is somebody's product decision that can change on a Tuesday.

  • 46LayerZero — the default verifier is a trust assumption nobody wrote down

    LayerZero moves arbitrary messages between chains and lets the application pick its own verifier set. That is the real feature and the real trap: skip the choice and you have still made one, and nothing in your codebase records who you are now trusting.

    How it worksThe first contact, and the three lines that matter · The two traps, and why both are silent · Cost, and where it varies

    WhyThe product is not a bridge, and reading it as one hides the interesting part. LayerZero is a message layer: an application inherits OApp and sends an arbitrary payload from its contract on one chain to its contract on another, with OFT and ONFT as the token-shaped wrappers over that.

  • 47A bridge's rate limit is not the loss cap — its refill speed is

    xERC20 (ERC-7281) puts a per-bridge mint/burn rate limit on-chain, and the limit refills over time. That refill is the part that decides the real exposure: a 1M limit that refills in an hour lets an attacker drain it 24 times a day, so the true loss cap is not the limit but limit × (time-to-detect ÷ refill period). The number most designs quote is the least binding one.

    How it worksThe limit is not the cap · Same limit, three refill speeds, 6-hour detection · The trade you cannot escape

    WhyA rate limit reads like a loss cap, and it is not one. "This bridge can mint at most 1M" sounds like the most it can lose is 1M.

  • 48Nasdaq + Kraken's NETs — the incumbent doesn't get disrupted, it builds the rail

    Nasdaq is investing $100M in Payward (Kraken's parent) to build Nasdaq Equity Tokens (NETs): tokenized shares that keep the rights and investor protections of the underlying stock, tradeable on-chain, targeted for Q2 2027 and run by Nasdaq's 24/7 Digital Liquidity Network. The story isn't 'tokenization disrupts the exchange' — it's the exchange operator building the tokenization rail itself, keeping the regulatory perimeter a retail wrapper lacks.

    How it worksThe facts · Why an exchange operator does this · Read against the AMC wrapper

    WhyThe lesson is about who wins when a technology threatens to route around an incumbent. Tokenized equities looked like disruption: put a stock on-chain and you seem to bypass the exchange.

  • 49Why AMC's tokenized stock ran to a premium — the peg needs an open mint/redeem path

    AMC's tokenized stock traded at a big premium to the real share. Binji's analogy: you invited all the guests but forgot the toilet paper — demand showed up, but the supply-side plumbing that mints new tokens against real shares was missing, so the price detached. Traced through the flow of how a stock gets tokenized, the premium is exactly where the mint/redeem loop was closed.

    How it worksThe flow — how a stock becomes a token · What actually pegs the price · Where AMC broke — the missing toilet paper

    WhyThe lesson is that a token's peg to its backing is not a property of the token — it is a property of the mint/redeem mechanism around it. The token is just a claim; what keeps its price at the value of the share behind it is an open, low-friction creation/redemption loop that lets arbitrageurs expand supply into demand and contract it into slack.

  • 50Hyperliquid paid for a public good — the amicus brief as a regulatory moat

    Reported (2026-09): Hyperliquid's Policy Center filed an amicus brief — via former US Solicitor General Elizabeth Prelogar (Cooley) — backing the CFTC against CME's suit over perpetual futures. Every perps venue benefits if CME loses, but only Hyperliquid paid. The bet: being the named party in the room when the rules get written is a moat that never shows up in a fee table. Observations, not advice; specifics unverified.

    How it worksThe free-rider inversion · The three private returns (not the ruling) · The honest counter

    WhyThe transferable idea is the free-rider inversion. Normally a public good goes unfunded because everyone waits for someone else; here someone funds it anyway, which only makes sense if the private return — not the shared ruling — beats the bill.

  • 51What Jayverse can build on — the shortlist of rails, by need

    A curated menu of external libraries, platforms, and services each Jayverse product can reach for instead of rebuilding: oracles, cross-chain, account abstraction, execution/MEV, payments, indexing, monitoring, identity. One row per need — the option to reach for, and what it plugs into.

    How it worksThe shortlist — by need · The most load-bearing today · How to use this card

    WhyJayverse's value is its product logic — a prediction market that resolves fairly, a bridge that keeps a 1:1 invariant, an agent that pays under a mandate — not a reimplementation of oracles, bridges, wallets, or execution layers. Several cards here already say this one at a time: use the rail, don't rebuild it (chainlink-jayverse-cooperation); a reimplemented bridge inherits the whole attack surface (liquid-issuance-not-authorization, who-holds-the-mint).

  • 52Priced in fiat, settled in tokens — the quote is a product promise

    A five-dollar checkout paid in a volatile token needs a quote TTL, a re-quote flow and a policy for who absorbs the drift. That is product design wearing an exchange-rate costume — not an oracle problem.

    How it worksOne checkout, a scripted price feed, three drift policies, and the ledger of who paid for movement. A checkout against anvil: item priced 5 USD, paid in a mock token whose USD price a script walks ±3% per minute.

    WhyUsers think in their currency; chains settle in theirs. Between the price shown and the payment settling, the rate moves — so every fiat-priced crypto checkout is silently running a tiny FX desk, whether its designers noticed or not.

  • 53An invariant is a stop, not an alarm — how to price a false positive

    In the Liquid case every individual transaction was valid and only the total was wrong. One line checking holdings == issued every block would have turned a week-long drain into a single block. The usual objection is false positives — 'a wrong stop is also an incident' — and it dissolves the moment you put both costs side by side.

    How it worksThe false-positive argument, priced · The check that would have caught Liquid · Two rules that keep it honest

    WhyThe word 'monitoring' hides a decision. An alarm notifies and hopes someone reacts in time; an invariant stops the system before the bad state can be acted on.

  • 54MCP from three sides — build one, consume one, wrap an agent as one

    The 2026-07-28 revision drops the session handshake, so an MCP server becomes an ordinary stateless HTTP service — deployable to serverless and edge, and authorized like any enterprise API. That protocol change is underneath the other two positions, which is why it should be done first.

    How it worksThree seats, one protocol · What actually changed on 2026-07-28 · Three things worth verifying by doing rather than reading

    WhyThe reason to build one now rather than a year ago is that the shape of the answer changed. Until this revision an MCP server was a stateful conversation: an initialize/initialized handshake, an Mcp-Session-Id header, and a server that had to remember which client it was talking to.

  • 55Anvil proves the protocol, a testnet proves the chain, only a wallet proves the user

    Building an L2 teaches the layer an application rents rather than operates, so the study depth is "enough to read the lease". What is worth building instead is a support matrix — because "supports EIP-7702" is one phrase for three independent facts, and only the third one decides whether a user can actually do it.

    How it worksOne phrase, three independent facts · What Anvil structurally cannot show you · The matrix, which is the actual deliverable

    WhyThe advice not to build an L2 is right, and the reason is sharper than time against utility. An L2's sequencer, data availability and proof system are precisely the layer an application developer is renting.

  • 56An architecture is a record of which failure you agreed to accept

    Every pattern is a purchase: it prevents one failure and introduces another. Studying the catalogue without the failures produces vocabulary rather than judgement — and only two pieces of theory actually predict behaviour, which is a much shorter reading list than it looks.

    How it worksEvery pattern, as a purchase · The two results that predict rather than describe · The orders of magnitude, which are the actual content

    WhyArchitecture is usually studied as a catalogue, and a catalogue is a list of answers with the questions removed. Read front to back, it produces someone who can name a pattern and cannot say when not to use it, which is the definition of cargo cult.

  • 57A list of attacks does not transfer — the trust boundary does

    Six cards in this catalogue already made the same move without calling it a method: ask not whether a component was authorized but what it can reach. That move is the unit worth studying, and attack lists are its output rather than its curriculum.

    How it worksSix cards, one move · The two questions, and why the usual one fails · The short list that does have to be memorised

    WhySecurity is usually taught as a list, and a list is the wrong shape for the subject. The lists are real and worth knowing, but they are a catalogue of instances, and instances age: a vulnerability class that dominated one decade is a solved configuration default in the next.

  • 58The middleman is optional in the spec — and standard in practice

    x402's pitch is payment with no processor in the loop, yet every paid request still passes through a facilitator that verifies and settles — a role the spec leaves permissionless and the market mostly rents from Coinbase. Run one paid endpoint against three facilitators — the Coinbase-hosted default, one competitor, one self-hosted — and write the authority row for each before comparing latency: who can refuse to settle, who sees the traffic, and who sets the fee when the waiver ends.

    How it worksWhat a facilitator actually does · The roster, as of 2026-09 · Who governs the spec

    WhyStart from the pitch and find the slot. x402's story is payment with no processor: the server quotes a price in a 402 response, the client signs a USDC authorization, done.

  • 59A one-person media company is six bots and one shared brain

    A viral how-to ('build a one-person media company with six Hermes bots') buries a genuinely good multi-agent operations pattern. The claim worth keeping is not that AI writes faster — writing was never the bottleneck. The bottleneck is the loop: idea → research → angle → long-form → distribution → review → performance → updated playbooks. Six specialists each own one decision under a strict contract, a shared Obsidian 'content brain' gives them compatible judgment, and structured handoffs on a durable board replace one fragile chat. Treat the impression numbers as marketing; steal the architecture.

    How it worksThe loop (break any edge and quality drops) · Three layers, each for what it is good at · Six specialists, one decision each

    WhyThe source is a marketing thread; the architecture is real. The author sells a build (six vendor 'Hermes' bots = a full media company, millions of impressions) — discount the numbers as promotion and the named tool as one option, not a requirement.

  • 60A boolean hides a state machine

    Five cards in this catalogue — rpc-view-not-consensus, receipt-is-not-settlement, bundler-paymaster-dependencies, private-rpc-visibility, walletconnect-session-authority — are one law seen five times. A single UI status ("connected", "sent", "success", a green dot) collapses a multi-owner state machine in which different parties observe and different parties decide. The bug is always the collapse; the fix is always to model the explicit states and never conflate the layers.

    How it worksThe one law, five times · Two families, two invariants · How to spot the collapse

    WhyThe shared shape is a lossy projection: one bit standing in for several states with different owners. Read it card by card and the same collapse appears each time.

  • 61The double-click mints twice — idempotency is the app's duty

    The chain dedupes nonces, not intents: a user double-clicking Buy produces two valid transactions, and both settle. Payment APIs solved this decades ago with idempotency keys — on-chain apps have to rebuild that discipline themselves.

    How it worksOne checkout, two builds — with and without intent IDs — and a race you widen on purpose. A mint-or-buy button against anvil.

    WhyEvery payment API since Stripe ships idempotency keys because retries and double-clicks are how real users behave. On-chain the problem is worse: the wallet happily signs twice, both transactions carry different nonces so the chain sees two distinct valid payments, and finality means no one un-charges the second one.

  • 62Your app doesn't read the chain — it reads a projection

    Every real product reads an indexer, not the chain — a derived read model that is always some blocks behind. The honest UI prints which block it is speaking for; the dishonest one just looks occasionally wrong.

    How it worksTwo data paths for one screen, lag you control, and the two UI elements that repair trust. An anvil chain with a token, a tiny indexer (Ponder or a hand-rolled event loop) writing balances to SQLite, and one balance page with a data-source toggle.

    WhyReading the chain directly does not scale past one widget — real screens need joins, history and aggregates, so they read a projection built by an indexer. That is CQRS by necessity, and it imports CQRS's one cost: the read model lags the write model.

  • 63The wallet is not the user

    One person holds five wallets; one wallet is shared by a team; SIWE proves control of a key, not identity of a person. An account model that assumes wallet = user breaks linking, history and support the moment real users arrive.

    How it worksAn account service, two linked wallets, and the three edge cases that define the model. A small app (SIWE via viem, SQLite accounts): create an account with wallet A, link wallet B by signing a challenge from an already-authenticated session.

    WhyWallet addresses are the worst of both identity worlds: too sticky to be anonymous, too loose to be an account. The person is many wallets (hot, cold, work, mobile, the one from 2021); sometimes the wallet is many people (a team multisig, a shared ops key).

  • 64A refund is a new payment — support flows on irreversible rails

    Settlement finality does not delete refunds from your product — it moves them from reverse-the-charge to issue-a-linked-counter-payment. The refund becomes a first-class payment with its own receipt, policy and budget.

    How it worksA payment, a linked counter-payment, a policy gate, and one reconciled ledger. On anvil: a merchant contract (or plain transfers plus a server ledger) where checkout records { paymentId, payer, amount }.

    WhyCard rails bake refunds into the protocol: reverse the charge, the network handles the money. Crypto rails bake in the opposite: nobody can reverse anything, ever.

  • 65The chain never calls you back — notifications are your job

    Users expect a push when their payment arrives; chains have no callbacks, so the app builds event → queue → notify itself — and reorg-safety means the pipeline must also know how to take a notification back.

    How it worksWatcher, queue, tiered delivery, and a reorg drill. On anvil: a watcher (viem watchEvent or the Ponder pipeline) feeding a queue table { event, blockHash, tier, notifyState }.

    WhyWeb2 rails call you back — Stripe webhooks, push services, delivery receipts. A chain just is: state advances, logs are emitted, and nobody tells your user their money arrived.

  • 66A faucet without limits is a payout, not a feature

    Anything free and permissionless — faucets, airdrops, gasless calls, referral bonuses — gets farmed by generated wallets within hours. Abuse economics is application design: price the free thing in something the attacker cannot mint.

    How it worksOne naive faucet, one scripted sybil, four gates, and the attacker's P&L per gate. 1 tokens per claim.

    WhyIn a permissionless system, an address costs nothing — so any benefit keyed to an address is keyed to nothing. One person is a thousand wallets whenever a thousand wallets pay better than one.

  • 67A crypto safety margin has a shelf life — date it, and make the signature scheme replaceable

    On 2026-09-10 researchers cut the estimated quantum-attack resources for BTC/ETH by roughly 50%, with an AI agent as co-author beating Google's March result on Shor's core computation. The Ethereum Foundation has a Jan-2026 post-quantum team (pq.ethereum.org) and a 2029 quantum-resistant target. What got cut is the estimated resources, not the hardware — the gap is still orders of magnitude. So the news is not 'the risk arrived,' it is 'the target moved toward us,' and the durable lesson is in the method: a safety margin means 'X years against the best known attack,' so speeding up the search for that best-known shortens every margin's shelf life — and whether 2029 is a migration or a redeploy is decided today by whether signature verification sits behind one interface.

    How it worksWhat actually got cut · Why the method matters — a margin has a shelf life · The response — replaceability is a paragraph, not an architecture

    WhyTwo lessons share one root. The epistemic one: a safety margin is a claim indexed to a moment's knowledge, and what changed here is the rate at which that knowledge advances — an AI agent co-authoring the result is the method story, not the ~50% number.

  • 68A status page must outlive the service it reports on

    Status-page SaaS (Statuspage, status.io, Better Stack) give incident notices, per-component status, and an incident history, with notice templates and subscriber alerts built in. The value is not the features — it is that there is already a place to say 'investigating,' which buys the right to answer slowly. The catch is a hosting one: never put the status page on the same infrastructure as the service, or it dies exactly when it is needed. It is the watcher version of the invariant lesson — the thing that reports the failure must not share fate with the thing that fails.

    How it worksWhat it is · Why a channel, not just a habit · The one hosting rule

    WhyThis is where the 'say investigating out loud' lesson actually lives. Announcing that you are looking into it buys time — but only if there is a channel for the announcement; without one, you do not use it, and silence gets filled by other people's guesses.

  • 69MoneyGram's stablecoin Visa card — invisible to the user, a just-in-time conversion under the hood

    MoneyGram's stablecoin Visa card went live in Colombia: users spend a dollar (stablecoin) balance anywhere Visa is accepted. To the user it is a normal card with a dollar balance; under the hood the stablecoin is converted to local fiat just-in-time at authorization, and the merchant and Visa never touch crypto. The invisibility is the product. (Two layers, as asked: how it feels, and how it works.)

    How it worksWhat the user feels · Under the hood — one swipe, step by step · The seam that makes it work

    WhyThe lesson is that the winning stablecoin UX is invisibility. The user does not want 'crypto'; they want a dollar balance they can spend, and in a higher-inflation economy like Colombia's, dollar exposure without a US bank account.

  • 70Uniswap v4 StablePair Hook — a constant fee is the wrong setting for a stable pair

    Uniswap Labs shipped StablePair Hook, a v4 hook that sets liquidity-provider fees dynamically for two stable-pair pools on Ethereum instead of one constant rate. The point under the announcement: a stable-stable pool sits near 1:1 almost always (a low fee should win the volume) but occasionally depegs (the fee should rise to protect LPs). One constant fee is wrong for both regimes; a hook lets the fee track the risk.

    How it worksOne pool, two regimes — why a constant fee fails · What the hook does · The pattern this card files under

    WhyThe headline is a fee tweak; the principle is that a constant fee is the wrong invariant for a stable pair — the same shape as 'The budget is the wrong invariant' (agentic-intent-veto) and refill-rate-is-the-real-cap: a single number that ignores the regime it operates in. A stable-stable pool lives in two regimes.

  • 71The remote excavator — teleoperation is a latency budget, not a '6G' headline

    A showcased demo (CCTV): an excavator in Changsha driven live by an operator in Beijing over a network, billed as '6G remote control.' The real story is not the label — 6G is not a deployed standard — but the constraint teleoperation always has: a latency-and-reliability budget tight enough that the operator's control loop stays usable, plus bandwidth for the multi-camera feed. The value under the spectacle is pulling humans out of extreme, dangerous sites.

    How it worksThe gate: a latency-and-reliability budget · Read past the '6G' label · The real value (unglamorous, genuine)

    WhyTeleoperation is an old idea — mining, subsea, space, surgery — whose only hard gate is the network: a human closes a control loop remotely, so the loop's round-trip latency and its reliability decide whether the thing is a tool or a toy. That makes remote control a 'property at a latency,' the same shape as refill-rate-is-the-real-cap and scaling-simulation-on-a-general-cloud: a rig fine at demo latency tells you nothing about congested-network latency, and the number that matters only exists as a measurement under load.

  • 72Atlas (text-to-3D) — the output is a rigged character, not a static mesh

    A text-to-3D tool whose pitch is that it does not stop at a static mesh: a prompt yields a standardized T-pose plus a rig and skin weights, so the character is IK-ready and animatable the moment it is generated. Filed as a marker of where generative 3D is heading — from geometry to pipeline-ready assets. (Naming note: unrelated to FastLane's Atlas / execution abstraction discussed elsewhere here.)

    How it worksStatic mesh vs. what Atlas claims to ship · What to actually measure · Naming collision

    WhyThe pitch names the real bottleneck in generative 3D. Geometry was never the hard part of using a generated model — rigging and skinning were: a raw mesh must be retopologized, given a skeleton, and weighted before it can move, which is hours to days of manual work.

  • 73The Coxon resignation thread — race logic inside a safety lab, and who amplified it

    A reported ~60-hour X timeline (2026-09-09→10): a departing Anthropic researcher (ex-OpenAI, ~4 months) posts that both frontier labs are racing toward self-improving superintelligence irresponsibly; several current and former alignment researchers publicly engage with a range of views; and a parallel dispute erupts over the post's timing, its first amplifiers, and vesting incentives. Filed as a marker — the specifics are contested and unverified.

    How it worksThree layers to hold separately · The two structures this catalogue cares about · Status: unverified

    WhyFiling this is not about adjudicating whether the doom is right — that is a real and contested debate, and a portfolio card is not where it gets settled. It is that the thread is a clean instance of two structures this catalogue already tracks.

  • 74Simulate scaling before you need it — a load study on AWS or GCP

    A dev study: deploy a trivial service on a general cloud (GCP Cloud Run / GKE, or AWS Fargate / EKS), drive synthetic load, and watch how the platform actually scales — where latency knees, what a request costs at scale, how cold starts and the autoscaler behave. Scaling is a property you measure, not one you assume.

    How it worksThe four curves to record · The knobs, one at a time · The one idea

    WhyScaling is a property at a load — the same shape as this catalogue's other 'property at a speed' cards (refill-rate-is-the-real-cap, an-invariant-is-a-stop-not-an-alarm). A service that is fine at 10 RPS tells you nothing about 1,000: the knee (where p99 falls off), the autoscaler's lag (how long before new instances absorb a spike), and the cost curve are all empirical and provider-specific.

  • 75A mid-level backend JD, read as a stack checklist

    A saved 'what you'll do if you join' listing for a mid-level backend engineer: Java/Spring Boot, JPA/Querydsl over MySQL/MariaDB, REST + GraphQL, tech-debt paydown, Docker/Kubernetes with CI/CD, and Scrum. Kept as a snapshot of the boring-but-real stack such a team hires for.

    How it workspng (captured 2026-09-10).

    WhyThe posting is worth keeping not for any one line but for its shape: a mid-level backend role is defined almost entirely by the reliable operation of a conventional stack — Java/Spring, an ORM over a relational database, HTTP APIs, containers, CI/CD, and an agile process. Nothing on the list is a research problem; the bar is competence and steadiness across all of it at once.

  • 76OP_RETURN became a negotiation channel — sharing one fact without trust

    The Liquid attacker and Blockstream settled a return over Bitcoin OP_RETURN + PGP: fix the bug, patch every bridge node, then return the funds. Blockstream posted patch-complete as an on-chain message; 3,400 BTC (85%) came back on 2026-09-07, 598.5 BTC (~$47M) did not. Two parties with zero mutual trust closed a deal by trusting the same ledger.

    How it worksWhy OP_RETURN could be the channel · What it could not do · Where this lands in Jayverse

    WhyThe interesting thing is not the theft; it is that the settlement ran over a data field on Bitcoin. OP_RETURN has four properties at once — unforgeable, ordered, publicly verifiable, irreversible — and those four turned the sentence 'the patch has shipped' into shared state that neither side could later deny.

  • 77LeRobot — why the dataset format outlives the framework

    HuggingFace's robotics stack bundles pretrained policies, datasets, and sim environments around a standard dataset format (LeRobotDataset), running the teleoperation-collect → train → replay loop in one repo. Placed in the wider stack (ROS 2 / LeRobot / MuJoCo-MJX / openpi / Isaac Lab), its real contribution is not the models — it is the format.

    How it worksWhat churns vs. what persists · The data-first entry sequence · The trap

    WhyThe load-bearing choice in a young tooling stack is rarely the tool. Robotics learning frameworks churn on a two-to-three-year cycle — the model architecture, the training harness, the sim backend all get replaced — but the data you collected does not.

  • 78Tenderly — lowering the cost to start watching on-chain

    A SaaS bundling contract simulation, debugging, alerts, and a Web3 Gateway. It simulates a transaction before execution and fires alerts on event or state conditions, and because it is on-chain-specific you do not wire an exporter yourself. Against a self-hosted Grafana + Prometheus stack, its one real advantage is time-to-first-alert.

    How it worksWhere Tenderly beats a self-hosted stack, and where it does not · The sequence, not the verdict · The pairing

    WhyThe failure mode this card targets is not a missing tool; it is a check that never gets built because building it is slow. A self-hosted Grafana + Prometheus stack is the right long-term home for monitoring, but its weakness is setup time — exporters, dashboards, alert rules — and when the setup is the thing blocking you for days, the correct move is not to push harder on it.

  • 79Four ways into robotics, and what each one actually buys

    The entry cost stopped being a robot, and then it stopped being an ecosystem too. What is left is a choice between buying compute, buying a body, buying a pipeline, or buying a training loop — and the honest way to pick is to name what you are trying to learn before looking at any price.

    How it worksThe four entries, and the question each one answers · Pipeline versus loop · Why MJX is fast, and why the lesson generalises

    WhyTwo years ago the answer to "how do I get into robotics" was a robot, and it cost more than a car. Then a $100 arm and an open imitation-learning library removed that.

  • 80Give the agent the right to ask, not the right to write

    Samsung Account (≈2.1B users) built a production multi-agent AIOps system on Bedrock AgentCore, and its load-bearing choice is a permission boundary, not a model: agents get no write access — they only propose an exact command, and a separate deterministic scheduler executes the approved artifact verbatim after a human reviews it. Analysis can be wrong and re-checked; execution that is wrong is irreversible. It is a shipped implementation of "separate deciding from acting by something that is not a prompt."

    How it worksThe line that organizes everything: read vs write · Propose vs execute — the split that makes it safe · How automation scales without moving the safety line

    WhyOne sentence carries the whole design: analysis can be wrong and a human verifies it, but execution that is wrong is irreversible — so the agent gets the right to ask, never the right to write. The agent proposes an exact command or code; a separate deterministic scheduler runs the approved artifact verbatim, and the LLM never touches the write path.

  • 81The CLI leaves an artifact; the MCP holds a conversation

    Two ways to drive Blender from Codex or Claude Code: the CLI generates Blender Python and runs it headless to an output, while MCP connects to a running Blender and operates it interactively, reading the live scene between steps. Their capabilities overlap — either can add a cube — but the workflow differs on one axis: the CLI leaves a re-runnable, reviewable script (batch, reproducibility, server execution); the MCP holds a stateful conversation with a live process (inspect, adjust, verify, repeat). The mature move is both — CLI to generate and batch-output, MCP to refine in the middle.

    How it worksSame capability, different workflow · The combined pipeline · Tell it how to verify, not just what to build

    WhyThey overlap in capability and differ in workflow, and the axis is reproducibility versus live state. The CLI path is generate-then-run: the AI writes Blender Python, it runs headless, it emits an output — and the script is a durable, reviewable, re-runnable artifact, which is why it suits batch processing, format conversion, and server execution.

  • 82Every AI-engineering skill is framing the same non-determinism

    Andrew Ng's AI Engineering Skills Map (from 10,000+ job postings and dozens of interviews) names four skills: building & deploying AI apps, software-engineering fundamentals, using coding agents, and shaping the build. Read through this catalogue they collapse into one job — putting a deterministic frame (specs, evals, verifiers, named tradeoffs) around a non-deterministic core. Ng says it himself: the one thing that makes AI apps different is unpredictable output, and skill #1 is the discipline of making it behave predictably. As agents make building cheap, the durable skill is the frame.

    How it worksThe map · The four skills, and the non-determinism each frames · Three of four are one meta-skill

    WhyNg's own framing gives the through-line, and it is sharper than the list of four. He says AI applications differ from traditional software in exactly one way — unpredictable output — and that skill #1 is using statistical techniques (evals, error analysis) to make them behave predictably.

  • 83"As if all chains are one network" is the value and the risk at once

    The thesis worth taking seriously: LayerZero's long-term value is not connecting Ethereum to Base, it is letting a developer build one omnichain application that behaves as if every supported chain is part of a single distributed network — an interoperability operating system, broader than bridging tokens, which is why institutions are watching. The candid turn: an operating system is by definition the layer everything depends on, so "as if one network" is simultaneously the value and the risk — one shared verification model, one finality floor, one lock-in, one blast radius.

    How it worksThe shift the thesis names · Where "as if one network" leaks · The candid ledger of becoming an OS

    WhyThe thesis is right about the shift, and it is worth stating precisely before evaluating it. LayerZero's value is not a bridge between two chains; it is that a developer can write one application that treats many independent chains as a single network — the OApp / omnichain model.

  • 85A known workflow is a graph, not a swarm

    Google's 'graph engineering' frames an agent system as an org chart of nodes — some LLM agents, some deterministic functions — wired by explicit edges and a shared state. The claim worth keeping: when you already know the workflow, pinning it as a graph buys the predictability, debuggability, and control that a single loop or an emergent swarm gives up. Fan-out, join, and router are just parallelism, a barrier, and a switch statement wearing new names.

    How it worksReading note, not a demo. The failure mode is a category error: a swarm for a known DAG (throwing away determinism you didn't need to) or a graph for an open problem (faking a certainty you don't have).

    WhyThree scopes get called 'the agent,' and most confused arguments are two people meaning different ones. They nest: the harness is one model's environment (tools, memory, guardrails); the loop is that harness running — reason, act, observe — until a goal is met; the graph is many of those, plus deterministic functions, wired into one workflow through a shared state.

  • 86Deposit trusts a fast confirmation; exit waits on the rollup's own proof

    Ethlabs' 'Fast Ethereum' work makes the L1→L2 deposit fast: the Fast Confirmation Rule (FCR) lets bridges confirm an L1 transaction in 12–24 seconds — ~30× faster than finality — a weaker-but-priceable guarantee, enough to credit a deposit. But the L2→L1 exit cannot be sped the same way: an optimistic rollup is bounded by its challenge window, a zk rollup by its proving time. That asymmetry is structural, not an implementation gap — entering a rollup only needs you to trust an L1 confirmation, while leaving needs the rollup to prove its state. The lesson the app-L2s (Lighter, Derive) named as their top pain: you can accelerate the direction you can trust weakly, not the direction that must be proven.

    How it worksOne boundary, two clocks · Fast-Ethereum pieces, and which gap each closes · The adoption supply chain

    WhyThe two directions across a rollup boundary run on different security clocks, and that is why one accelerates and the other does not. Entering a rollup — a deposit — only requires the L2 to trust that an L1 transaction happened.

  • 87Distribution splits from infrastructure — a wallet is worth more un-captured

    Consensys is splitting in two: the company rebrands as MetaMask, fully focused on the consumer wallet (the distribution layer), and spins its protocols and institutional infrastructure — including the Linea L2 — into a separate company. Read the logic under the announcement: a wallet that also owns an L2 has a conflict — every default network, every routing choice, every "recommended" chain is a captured decision. Separating MetaMask (distribution to tens of millions) from Linea (one L2 among many) is a bet that the distribution layer is worth more when it is credibly neutral — not quietly steering users into infrastructure it owns. Distribution and infrastructure are different businesses; the split names the conflict between them.

    How it worksTwo businesses, one conflict · Why separate instead of promise · The reusable audit

    WhyA wallet and an L2 are different businesses, and owning both quietly turns the neutral one into a funnel for the other. MetaMask's asset is distribution — the wallet tens of millions of people already open, the same insight wallet-is-a-distribution-business drew from KakaoPay.

  • 88The chain stops verifying — it only checks that a proof exists

    EIP-8288 (recursive STARK mempools, Vitalik's "Proof Singularity," aimed at the I-star fork) makes one move: Ethereum's execution stops verifying signatures and proofs and instead only checks that a proof exists that a statement holds — all the real verification is pushed into the mempool, where nodes aggregate every tick into one recursive STARK. A tx carries a dependency frame (claims like "hash M was signed by SPHINCS+ pubkey P"); the envelope carries the actual signature/STARK; mempool nodes recursively prove all of them and broadcast one STARK. On-chain you pay for one STARK (~100–300 kB) + 96 bytes per statement — not the signatures, not the verification. That single relocation unlocks quantum-safe signatures, cheap privacy, any new scheme without EVM changes, and private account abstraction.

    How it worksThe relocation, in one table · The flow · The four unlocks

    WhyThe whole idea is a relocation: move every cost that is not ledger bookkeeping off the core execution path and shard it through the mempool. Today, when a contract checks a signature or a ZK proof, three costs land on-chain: the gas to run the verification, the data (a SPHINCS+ post-quantum signature is ~3 kB, on-chain forever), and the politics — the EVM must natively support each scheme, so adding a new signature or proof algorithm is a governance fight.

  • 89A stablecoin wallet is a distribution business, not a crypto one

    KakaoPay finished a PoC extending its 43M-user prepaid KakaoPay Money wallet to hold, send, pay, and settle on-chain assets — including a KRW stablecoin — verified at its high-traffic scale. Read where the moat actually sits: not in the on-chain support (the late, small addition) but in the 43M users, the settlement infra that already carries that traffic, the payment and merchant relationships, and a regulatory posture. "Add stablecoins" is a feature bolted onto a distribution business. KakaoGroup is now packaging that wallet tech + consulting as a B2B product for other firms and banks — renting the distribution out. And the CEO names where value lands: not at issuance, but at the usage stage where the asset is actually spent.

    How it worksSplit the stack, score what's scarce. The drain of value flows to the top four rows; the PoC verified the bottom one.

    WhyThe scarce thing in a stablecoin wallet is the distribution it already has, not the on-chain support it adds. The on-chain layer — key custody, signing, an ERC-20 balance — is a solved, commoditized problem; SDKs ship it in weeks.

  • 90Issuance-as-a-service — you mint a brand, the platform keeps the money

    PayPal, M0, and MoonPay launched PYUSDx, a platform where any developer mints their own branded stablecoin — USDat (Saturn), concUSD (Concrete), cUSD (Cap) already live, $100M+ in scale — all backed by one reserve: PYUSD. But read what the issuer actually gets versus what the platform keeps. The developer configures the surface: the token's name, reward logic, access controls, reserve mix, and cross-chain routing. The reserve and redemption stay with the stack underneath — PYUSD (issued by Paxos), reserves custodied by MoonPay, infra by M0. So a 'new stablecoin' here is a configured skin over someone else's dollar, and the durable position is the reserve layer, not the brand on top. That is PayPal's real move: turn PYUSD from a payment coin into the base layer others are obliged to build on.

    How it worksWho holds what, drawn once. Ethereum, Arbitrum, Monad.

    WhyA stablecoin's moat was never the coin — it is being the reserve layer everyone else has to issue on top of. PYUSDx makes that literal.

  • 91The private key never leaves the secure element

    A hardware wallet's whole thesis in one sentence: a certified tamper-resistant chip generates the private key, keeps it, and signs inside itself — the key is never exported. Malware on the connected phone or PC can request a signature but can never read the key, and the on-device screen closes the loop (what-you-see-is-what-you-sign). But that only protects the key in use. The BIP-39 seed that can regenerate it is a bearer secret whose backup is the real attack surface — which is exactly the problem D'CENT's R3covery card and SLIP-39 shares target.

    How it worksThe trust boundary, drawn once. Cross-refs: pick-a-signer-not-a-brand (the signer is a role, not a logo — a secure element is one implementation of that role), the-wallet-is-not-the-user (the key signs; it is not identity), embedded-wallet-policy (MPC/Shamir moves the same key-in-use problem into software and turns custody into a configuration), safe-module-root-key (the root key's authority is the real question), agentic-intent-veto and agents-computer-use (delegated signing is where 'the key can't leave' meets 'what may it sign without me').

    WhySelf-custody is two problems wearing one word, and a hardware wallet only fully solves one of them. The base technology under every hardware wallet — and under D'CENT's 8-year rebrand into institutional and premium tiers — is the secure element: a certified (Common Criteria EAL5+/6+) tamper-resistant chip that generates the seed from on-chip entropy, stores it, derives keys, and performs the ECDSA/EdDSA signature without the private key ever leaving the die.

  • 92You can SFT the shape of thinking, not the thinking

    Reproducing a reasoning model the S1 way — SFT a base model on <think>…</think> traces harvested from DeepSeek R1 or Gemini — works, and that is exactly what exposes the catch: you are teaching the model to emit text that looks like step-by-step thought, not to think. Test-time scaling spends inference tokens on that pattern; the weights don't get smarter. The way past a frozen-weight imitator is experience — RL from environment interaction, accumulated across sessions.

    How it worksReading note plus one measurement, not a demo. Run the same model with and without the forced <think> span on a held-out set.

    WhyTest-time scaling is a real lever: instead of a bigger model, spend inference tokens on a step-by-step span before answering. On math and code it clearly helps.

  • 93The code was right and the layout was wrong

    An attacker took Enjin's admin rights through a storage slot collision — adapters and the contract managing them used the same storage for different meanings — and drained about $162,000. Every function was individually correct. The defect lived in the space between modules.

    How it worksWhy a single-file review cannot find it · The two checks, in order of cost · The generalisation worth keeping

    WhyNothing broke. No function reverted, no assertion failed, no key leaked, and no line of code was individually wrong.

  • 94The ceremony ends, the committee doesn't

    Distributed key generation is written up as a one-time event. Every real deployment is a committee whose membership changes — and the second ceremony, resharing, is the one nobody budgets for.

    How it worksWhat a DKG actually produces · The three membership events · The measurement, and it is small

    WhyDistributed key generation is the protocol by which n parties jointly produce one keypair such that the private key is never assembled anywhere, and any t of them can sign or decrypt with it. It is the primitive underneath four things this catalogue already has cards for: DVT validator keys (dvt), the keyper committees in threshold-encrypted mempools (encrypted-mempool), MPC custody (the custodian in fisheries-receivable-rail), and randomness beacons.

  • 95Censorship resistance stops being a norm and becomes a fork-choice rule

    FOCIL moves inclusion-list authorship from one proposer to a randomly drawn committee, and — the part that matters — moves enforcement into fork choice. Attesters withhold votes from blocks that ignore the aggregated list, so a censoring block cannot become canonical. The guarantee changes category: not "please include this" but "omit it and your block does not count."

    How it worksWhat moves where · The slot has to hold three things in order · The freeze deadline is a two-sided failure

    WhyThe old inclusion-list designs asked the censor to police himself. One proposer wrote the list, and that proposer could be exactly the party leaving the transaction out — the watchman and the watched were the same seat.

  • 96The record is not the path — a registry and a vault for the same problem

    ERC-7812 proposes one on-chain registry where any protocol can store and prove identity statements by ZK without publishing the data. Docbank makes the opposite bet with the same premise: the catalogue stays on your machine, and a stable node ID rather than a file path is the identity.

    How it worksSame premise, opposite architectures · What to read in the standard · What Docbank does that a sync folder does not

    WhyTwo projects, opposite architectures, and the same premise underneath: an account or a file path is a poor long-term identity. ERC-7812 is the standardisation attempt.

  • 97A fork date nobody decided — reading the claim, not the number

    The 8/20 core-devs call produced a Sepolia slot of 2026-09-28 14:44:48 UTC, confirmed by six client teams without dissent — and the same minutes record the decision as deferred to the next call. There is still no mainnet date, yet mainnet numbers are already circulating.

    How it worksThe status column that reporting leaves out · The rule this produces · Why it is worth doing for a project, not just for reading

    WhyThe only verifiable fact in this news is the six-team confirmation. Everything downstream of it — the mainnet timing, the throughput multiple — is conditional, and unusually, the minutes say so themselves.

  • 98Simplicity CTF

    Blockstream's first Simplicity CTF — unlock 0.01 LBTC (~$600) locked in a contract for the reward; hands-on practice with Simplicity, the new smart-contract language for Bitcoin/Liquid.

    How it works01 LBTC (~$600) locked in a contract.

    WhyA hands-on way to actually learn Simplicity rather than just read about it.

  • 99The stablecoin replaces the float, not the paperwork

    A Korean custodian and a B2B invoicing-automation company are jointly building cross-border settlement so exporters can be paid in stablecoin and settle in won. The pairing is the whole tell: a payments announcement needed an invoicing company, because the expensive part of cross-border B2B is not moving the money — it is knowing which invoice the money paid. The chain settles in seconds and still cannot answer that.

    How it worksOne payment, two problems · What actually compresses, and what only relocates · The crossover that decides the market

    WhyRead the pairing before the product. A custody company knows how to hold an asset and a billing-automation company knows which invoice is outstanding, and those are not adjacent skills — they are the two ends of a payment.

  • 100Build the rail, rent it, or own it together — three answers in one month

    Thirty-nine US state bankers associations launched a network the industry would own. Days later a Korean group signed to verify issuance on Visa's platform. Visa is what the last bank-owned consortium became — and whichever answer you pick, a reversible card message still has to meet an irreversible settlement.

    How it worksThree answers, one question · The two-date table, and why it is the whole card · What the alliance says it will carry

    WhyTwo banking systems answered the same question in one week and picked opposite sides. Thirty-nine US state bankers associations launched a network the industry would own, precisely so member banks would not depend on somebody else's rail.

  • 101Every verb is "explore" — the one commitment is which stablecoin

    Dunamu and Visa announced a stablecoin and AI partnership: payments in major markets, cross-border remittance, settlement, all to be explored and phased against each country's rules. Every verb in it is exploratory, which makes the announcement an option rather than a product. The one concrete thing is the choice of OUSD over the incumbents — and that is a claim on reserve income and redemption control, not on technology.

    How it worksSort the announcement into two columns · Which half each side is buying · Why the issuer choice is the real decision

    WhyThe exchange is buying the half it does not have, and it is the opposite half a bank buys. In build-rent-or-own-the-rail a bank went to Visa for issuance, remittance and redemption verification — a bank already has acceptance in the sense that its customers can spend, and what it lacked was the digital-asset machinery.

  • 102Two currencies on one ledger — the spread is the claim

    Revolut is launching a euro stablecoin on Ethereum, and the argument made for it is that dollars and euros can now coexist and trade against each other with shared liquidity. That last part is not a thesis — it is an on-chain EUR/USD spread, measurable today against interbank.

    How it worksThree claims, sorted · The measurement, in full · Why the euro question is not a detail

    WhyThe post makes three claims, and only one of them can be checked this week. That is not a criticism — it is an advocacy piece and reads as one.

  • 103The harness, not the model — governing agents instead of building them

    Once a standard stops being contested, an operations layer grows on top of it. Every card here about agents is about making one work; this one is about what happens when one misbehaves — and one company is already running that architecture against real capital, with the wrapper published as open source.

    How it worksThe infrastructure layer · Four things to check in senpi-skills, in the order that makes each cheap · The measurement, and it is one week long

    WhyA standard winning is not the end of a story, it is the start of a different one. While the protocol was contested, the interesting work was the protocol.

  • 104Can an agent drive a computer yet — and if so, whose?

    OSWorld jumped from 42% to 85% in a year and buyers stopped comparing models. What they buy instead is verification, escalation and error handling — and at the other end of the same question, a script tag now lets natural language drive one specific page without any of that.

    How it worksWhere the benchmark went, and why it stopped mattering · The cost comparison that decides whether to build · Two scales of the same capability

    WhyTracking where computer-use agents actually stand in production, not in demos. The a16z piece is built on interviews with real operators — a CPG data platform running 15-20M portal interactions a month, a systems integrator running 27 live workflows — not just benchmark numbers.

  • 105A claim, not a derivative — the three jobs a tokenized share creates

    Coinbase listed tokenized Nvidia, Meta, Apple and Alphabet shares on Base for non-US users. Each token is a direct claim on real stock held by Alpaca as a regulated broker-custodian, priced by Chainlink — and the token is the easy part. Reconciliation, corporate actions and market-data licensing are the jobs.

    How it worksWhat the token does, and what still happens somewhere else · Reconciliation is the product · The jurisdiction footnote

    WhyThe load-bearing word is claim. A derivative tracks a price: it needs a counterparty, a margin model and a liquidation path, and the underlying never has to exist anywhere.

  • 106The token is not the product — composability is, and volume is its scoreboard

    Coinbase Tokenized Stocks went live on Base — Nvidia, Meta, Apple and Alphabet first, thousands promised. Coinbase is third into a ~$3B market Ondo already leads with ~$1B. The bet is not that its token is better. It is that a token which survives being used as collateral is worth more than a token that merely arrived first — and that claim is settled by a different number than the one the leaderboard currently shows.

    How it worksThree positions, three different bets · What B20 changes, stated narrowly · The two scoreboards

    WhyTwo scoreboards are being used for one market, and picking one decides who is winning. Ondo leads on assets outstanding — roughly a third of a ~$3B market.

  • 107T+0 removes settlement risk, and removes netting with it

    Japan's FSA, Ministry of Finance and the BOJ have opened a study body on 24-hour instant settlement for JGBs and equities. The headline is T+0; the load-bearing part is the BOJ current account on the ledger, because gross settlement needs the intraday liquidity that netting used to save.

    How it worksTwo legs, and only one of them is the easy one · The number the announcement does not carry · Reading the schedule with the provenance rule

    WhySettlement delay is not a defect that nobody got around to fixing. T+2 buys something: the interval is where multilateral netting happens, and netting is what turns thousands of trades into a handful of obligations that actually move.

  • 108Linking payment systems is a routing problem

    Most of what "link national payment systems and CBDCs" requires is addressing, FX quoting and settlement coordination — and a shared ledger only earns its place on one of them.

    How it worksThe comparison has a built-in baseline, which is what makes it measurable rather than speculative. Nexus is the no-ledger arm: a multilateral hub so each domestic instant-payment system makes one connection instead of N-squared bilateral ones, with a prototype that connected the test systems of the Eurosystem, Malaysia and Singapore and let payments be addressed by mobile number, now extending across ASEAN.

    WhyThe news is real and the conclusion attached to it usually is not, which is why this belongs in the catalogue rather than in a bookmark. India's central bank governor has said BRICS is weighing links between national fast-payment systems and CBDCs — UPI and CIPS are the systems named — and the reporting is explicit that this is early-stage, with technical, regulatory and governance hurdles outstanding.

  • 109The seat is the point — a non-reserve currency at the standards table

    Project Agorá is BIS-led, not Korean and not American, and both were founding participants. The fact worth keeping is narrower: Korea is one of only two non-reserve-currency jurisdictions among the seven, and the rules a unified ledger settles on will decide whether such a currency is a first-class leg or always routed through dollars.

    How it worksThe claim, sorted · The seven, and why the split matters · The one design decision to read the outputs for

    WhyThe correction is worth recording before the content, because the shape of the error is one this catalogue already has a rule for. Agorá started in Korea is a claim with no source, and it appears to be a confusion with Korea's separate domestic CBDC and tokenised-deposit work, which is real and substantial.

  • 110What tokenization actually removed

    Toyota Finance sold a ¥1B bond through its own payments app with no securities firm distributing it. The intermediary did not disappear — the account-opening step did.

    How it worksThree things to work out, and the first is just bookkeeping. Write the participant list for this deal and for an ordinary retail bond side by side, and mark what each party is paid for: underwriter, distributor, transfer agent, bond administrator, custodian, financial advisor.

    WhyThe headline is disintermediation — Toyota Finance recruits investors itself, no securities firm distributing, subscribe from the TOYOTA Wallet app with no brokerage account. The interesting part is what that sentence quietly does not say.

  • 111Headless arrives — the company that sells the engine, not the app

    LayerZero's ATLAS is not an exchange. It is matching, clearing, settlement and risk sold as a backend so anyone can run their own venue — with Citadel Securities, DTCC, ARK Invest and ICE named as partners. The people it needs are not blockchain developers.

    How it worksThe partner list, read as a gap list · Why an engine is harder than a venue · What it means for anyone choosing where to build

    WhyThe word that arrived is headless. In web commerce it meant the same thing a decade ago: stop selling the storefront, sell the engine behind it and let others own the customer.

  • 112Three layers failed in a month; the fourth one fails silently

    Coldcard's entropy source, Trezor's fulfilment partner, Ledger's Ethereum app — three manufacturers, three different layers, one month. A brand name is four independent supply chains wearing one word, and the layer that stayed quiet is the one whose failures never announce themselves.

    How it worksOne word, four vendors · The two tests you can run yourself · Why "no incidents" is the wrong filter

    WhyThe question "which hardware wallet" is usually answered with a brand, and a brand is the wrong unit. One word stands in for at least four independent supply chains — the silicon and firmware that generate the seed, the application that constructs and signs a transaction for a specific chain, the cryptographic construction that turns a key and a message into a signature, and the logistics that put the box in your hands.

  • 113Showing is not telling — a demonstration is an example, not a specification

    A startup and an incumbent shipped the same interaction within weeks: stop writing the instruction, record yourself doing the task. But a recording cannot separate what mattered from what merely happened — and the cheapest way to recover that separation is to record the same task twice and diff the results.

    How it worksThe experiment: record it twice, then diff · What the format can and cannot carry · Why two vendors arrived at once

    WhyTwo products, weeks apart, converged on the same move: replace the written instruction with a recording of you doing the thing. Anthropic shipped "Record a skill" inside Claude Cowork on 2026-07-21 — record your screen, narrate as you go, and the walkthrough becomes a reusable skill.

  • 114The NDF market is the size of the restriction, and removing it does not relocate the market

    A won NDF market trading roughly $60-90B a day exists because the won is not deliverable offshore, so the volume measures the control rather than the demand. A won stablecoin changes deliverability — but a currency can become usable offshore and have its price made there too, which is a different question and the one worth preparing for.

    How it worksWhy a large won market has no won in it · The forecast people make, and the option they leave out · The three offshore demands, and which one decides the outcome

    WhyThe observation that opens the post is the good one: a very large won market was built without any won in it. An NDF settles the difference between an agreed rate and the fixing rate, in dollars, and delivers nothing.

  • 115The rule names an entity and the risk lives in the group

    A BIS brief points out that activity restrictions reach only the issuer, so a prohibited activity moves to a sister company and the restriction is satisfied while nothing about the risk changed. The asymmetry is sharper than it sounds: banks already carry group-wide supervision and non-banks do not, so the same rule binds hardest where it was least needed.

    How it worksThe same restriction, two structures · The six functions, and which ones the perimeter actually covers · Why vertical integration is the specific harm

    WhyThe sentence doing the work is an ordinary one about corporate structure, and it dissolves a whole class of rule. If a regime says an issuer may not do X, and X can be performed by a sister company owned by the same parent, then the restriction has been satisfied by a filing.

  • 116AML — where the cryptography stops

    Travel Rule, KYC reuse, sanctions screening — the layer this catalogue keeps hitting and calling 'not a technical problem', studied on its own terms.

    How it worksPlanned as a reading study with a map as its output, not an essay. The Korean layer first, since that is the one that would actually bind: 특금법 registration for a VASP, the 실명확인 입출금계정 requirement that gates everything else, 트래블룰 above the threshold, and the domestic solutions that carry it (CODE, VerifyVASP) — which are, structurally, the same institution-to-institution fact transport the RWA card is about, solved by consortium rather than by protocol.

    WhyThis card exists because of a sentence written on another one. The institutional custody study card promised a separation — which parts are engineering (MPC, approval state machines, AA policies) and which parts are a licence you either have or do not — and then set the licence half aside.

  • 117The chain gives you the graph and never the names

    Chainalysis ran a multi-agency operation that turned existing crypto intelligence into 14,300 investigative leads and 7,700 identified accounts. The intelligence already existed; what the operation supplied was the join between an on-chain address and an off-chain identity, which only intermediaries hold.

    How it worksThe funnel, and where it stops · Why the participant list is the artifact · The question this catalogue can actually work on

    WhyThe stated purpose of the operation is the finding. It was not run to detect anything — the crypto intelligence already existed, and the operation's job was to convert it into leads investigators could act on.

  • 118The bill count is not the disagreement count

    Ten-plus digital asset bills sit in the National Assembly and the reporting counts them. Nobody publishes the number that matters: how many operative clauses actually conflict, and how many days of public comment the chosen legislative route removes.

    How it worksTwo numbers, neither published · The stablecoin clause rhymes with cap-table-ceiling · The route is the disclosure

    WhyKorea's second-stage digital asset legislation has been reported the same way for over a year: a count. Ten-plus bills pending.

  • 119Thirty percent of spot is a restriction, not a market size

    Circle's read of Korea leads with a real number — the won accounts for roughly 30% of global crypto spot trading — beside the note that institutional participation is only now opening after years of restrictions on corporate activity. Both are true, and they are the same fact seen from two ends. The spot share is high partly because everything adjacent was closed, which makes the headline figure a readout of the constraint whose removal is being announced.

    How it worksWhat the headline measures, and what it does not · The prediction, stated so it can be wrong · The two claims in tension

    WhyThe number is real and it measures the wrong quantity. Share of spot volume is turnover, not capital: it counts how often money changes hands, not how much money is there.

  • 120Jurisdiction is not country-sized

    A fourth US state blocked Kalshi, so the same product is now legal and illegal inside one country. The axis has not changed — jurisdiction decides the category — but the unit has: the design document needs a row per ruling, not per country, and an eligibility policy keyed the same way.

    How it worksFour events, one axis, a finer unit · The artifact stakeholders can actually use · The design consequence worth stating plainly

    WhyThe axis held and the unit broke. jurisdiction-decides-the-category put three events on one line and found that the product barely changed while the verdict changed completely.

  • 121The ceiling is per holder, the control is not

    Two banks each took a stake just under the statutory ceiling. Together with a securities firm the financial sector holds close to 40% — an aggregate that no single approval ever had to look at.

    How it worksThe gap: approval is per holder, control is aggregate · Why this is not an accusation · What is actually at stake

    WhyA digital-asset custodian announced the close of its Pre-A round on 2026-08-24. The strategic investors named are Sh Suhyup Bank, iM Bank and HFR (KOSDAQ 230240), and the company states the position plainly: Korean banks now hold about 30%, and close to 40% counting SK Securities, an existing shareholder.

  • 122The custody was never the hard part

    A fisheries bank just bought 14.95% of a digital-asset custodian. Design the one service only those two could ship — then find the number that decides whether it should exist.

    How it worksThe imaginary service: catch-to-cash · Why only these two could ship it · The gap, and it is the same gap three other cards found

    Why95% stake in 인피닛블록, a licensed Korean VASP whose business is digital-asset custody, becoming joint second-largest shareholder alongside a partnership agreement. The company's stack is described as extending to internal controls, security and stablecoin issuance management.

  • 123Institutional custody study

    MPC · approval flows · AA · AML — and which parts are buildable without a VASP licence.

    How it worksReading study, not a deployment: MPC signing (threshold schemes vs. the key-splitting DVT already studied elsewhere here), approval workflows as state machines, where account abstraction's policy layer overlaps custody policy, and AML/travel-rule obligations.

    WhyEverything else in this catalogue is a single wallet acting for itself. Institutional custody is the opposite shape: keys split across an MPC quorum, transactions gated by an approval workflow, and a compliance surface that is legal rather than technical.

  • 124Priced by the wrong thing — a question, an instrument, and the gap between them

    Bitcoin rose about 22% in a week on a possibility the Treasury never committed to. A tokenised-equity desk's highest-volume instrument tracks a company that does not trade. Two clean questions, two instruments that answer something else — and in both cases the missing fact is what it settles against.

    How it worksCase one — three states, one price · Case two — the one instrument that is not like the others · The growth claims, marked

    WhyTwo stories, one finding: a well-formed question routed through an instrument that answers a different question. The first is the rally, and the rally is not the interesting part — the routing is.

  • 125CRE × Cloud — four hybrid patterns

    Cloud holds the private truth, CRE is the verified bridge, the chain settles.

    How it worksReading note: four patterns sharing one shape — a private system of record, a verified bridge that attests to it without publishing it, and on-chain settlement conditioned on that attestation. The load-bearing question in each is what the bridge's attestation is actually worth, since the chain cannot check the private data itself.

    WhyMost of this catalogue assumes the interesting data is already on-chain. Real institutional workloads are the opposite: the authoritative record is in a private system that cannot be published, and the chain is only the settlement venue.

  • 126Solana

    EVM-vs-Solana study + a sample Anchor program on devnet.

    How it worksPlanned: an Anchor (Rust) program deployed to Solana devnet — starting with a PDA-based counter, then a small SPL-token escrow to exercise Solana's account model (all state passed in explicitly, rather than living in contract storage) and cross-program invocations. The page would connect via Phantom/wallet-adapter and call the program through its Anchor-generated TypeScript client.

    WhyA deliberate non-EVM data point: every other on-chain demo here is Ethereum-family (Hyperliquid, Sepolia AA, PBS); Solana is the largest ecosystem with a genuinely different execution model, worth understanding rather than assuming EVM concepts transfer.

  • 127Linera microchains

    One chain per user — removing blockspace contention instead of pricing it.

    How it worksReading note: the microchain model where each user owns a chain they alone extend, validators run all of them, and cross-chain messages replace shared-state contention. The interesting question the note tracks is not throughput but composability — what happens to an application whose whole point is that many users touch the same state, like an order book.

    WhyAlmost every scaling design here takes contention as a given and competes for the block: PBS auctions it, gas prices it, a relayer sequences around it. Linera's premise is that contention is a choice — give each user their own chain and there is nothing to contend for.

  • 128Thirdweb — platform survey

    Contracts, wallets/AA, backend tx, Unity SDK — breadth bought with best-in-class parts.

    How it worksReading note across four surfaces (contract deploys, Connect wallets and account abstraction, Engine for backend-signed transactions, the Unity SDK), each rated against doing it directly. The touchpoints that matter here are named: the AA pillars already shipped, backend transactions for the AP2 path, and the Unity track the game card would need.

    WhyNot a neutral survey — this project already depends on it. The AA card's sponsored-gas and atomic-batch pillars run on thirdweb's 4337 stack, and the D1 gas decision on the agent PoC turns on exactly the tradeoff this note names: thirdweb gives you a paymaster, but only for a 4337 account, which is a different account type from the 7702/7710 one the mandate story is built on.

  • 129Procedural, not generated — when the model is a program

    A post claims Kimi K3 built an app turning 2D schematics into fully procedural 3D models, with a code-generated tank swappable for anything else. The load-bearing word is procedural: the output is code that makes geometry, not a mesh. Whether the arrow really points 2D → 3D is testable in one shot.

    How it worksThree things that get called the same thing · The experiment, in full · Why it belongs in this catalogue at all

    WhyThe interesting word is procedural, and it is not a synonym for generated. A generated model is a mesh: a bag of vertices that arrived somehow and can now only be edited by hand.

  • 130Sub-2-bit LLMs, locally

    A 2.4T model in 397GB — shrinking the codebook below IQ1_S, and what the last half-bit costs.

    How it worksThe compression trick is narrower than the headline suggests. 5625 bits per weight, of which 11 are index bits into a 2048-entry codebook.

    Why8 makes the gap unusually visible. The 27B model on a 16GB machine is the ordinary claim.

  • 131Capacity loads the model; bandwidth serves it

    A pitch for local inference on Apple silicon leads with 512GB of unified memory and 200B-parameter models. Capacity decides what you can load. Memory bandwidth decides how fast it answers, and autoregressive decoding reads the weights once per token — so the ceiling is bandwidth divided by the bytes a model actually touches. Run that division and the post's two headline promises, huge models and always-on agents, turn out to pull against each other on the same machine.

    How it worksThe division that sets the ceiling · Capacity and bandwidth fail differently · Cost per token has a denominator

    WhyThe arithmetic is the whole card, and it is arithmetic anyone can redo. Autoregressive decoding is memory-bound rather than compute-bound: to produce one token the machine reads the active weights out of memory, so the rate is bounded above by bandwidth divided by those bytes.

  • 132Pixels to millimetres — the step before the arm moves

    Camera calibration, ArUco pose and hand-eye alignment on a built-in webcam and a sheet of A4. The output is not a demo but two error numbers.

    How it worksFour steps, and only the last two are optional. calibrateCamera yield the matrix K (fx, fy, cx, cy) and the distortion coefficients, and reprojection RMS is the first of the two numbers this card exists to produce — under one pixel is the pass mark.

    WhyThe LeRobot card is about moving the arm; this is the step in front of it, and skipping it is why a cheap arm grabs at empty air. A policy trained on demonstrations learns actions in the robot's own coordinate frame, but everything the camera reports is in pixels, and nothing in the imitation-learning loop converts between them for you.

  • 133The 70% has to be wrong three times in ten

    Accuracy needs a threshold, and a threshold throws away the number you actually act on. A probability is scored by whether it is true as a frequency — and the market price is a free baseline that most forecasting projects never compare themselves against.

    How it worksWhat each score can and cannot see · The decomposition, and why one number is not enough · The measurement, in the shape this project can actually run

    WhyA model that outputs a probability cannot be graded with accuracy, and the substitution is the most common quiet mistake in applied work. 63 becomes a yes.

  • 134The model is not the experiment — the split is

    Almost every applied result that fails in production failed at the split, not at the model. On-chain data breaks two splitting rules at once — it is ordered in time and grouped by address — and the number worth reporting is the gap between the naive split and the honest one.

    How it worksThree leaks, and the split that closes each · Why the answer is a gap and not a score · The step people skip, stated concretely

    WhyThe reason applied results do not survive contact with production is almost never the model, and treating it as a modelling problem is how teams spend months on the wrong thing. A leak is any path by which information that would not exist at prediction time reaches the estimator during training.

  • 135Hugging Face is a package manager, and almost nobody pins the version

    Every repo is a git repo and revision= takes a commit SHA — but the default is a floating branch, trust_remote_code=True executes code from that branch, and the licence that decides whether you can ship is per-repo. The build is a five-field lockfile.

    How it worksThree services wearing one name · The lockfile, in five fields · The measurement that makes the argument for you

    WhyHugging Face is used as a website and behaves as a package manager, and the gap between those two mental models is where the surprises live. Every repo is a git repository with LFS.

  • 136The lead time is the product — a fault detected at failure is worth nothing

    The slide that motivates fault detection states a cost ratio: unplanned downtime costs multiples of planned maintenance. That ratio is not motivation, it is the alert threshold. But the saving only exists if the warning arrives earlier than a repair can be scheduled — so the first number in the project is the time-to-repair distribution, and it needs no model.

    How it worksThree problems wearing one name · The cost ratio is the threshold · Why the first model should not be supervised

    WhyThe motivating slide for every fault-detection project says the same thing, and it says more than it means to. Unplanned downtime costs multiples of planned maintenance; the failure modes underneath it are safety, quality and throughput.

  • 137You can share the code you write, not the code you must obey

    One codebase across platforms is the default now, and it is the right default. But it shares the layer that was already easy — permissions, background execution, push, secure storage, biometrics and store review stay per-platform, and for anything touching money those are the parts that matter. The reading list is set by surface, not by platform count.

    How it worksWhat gets shared, and what never does · The self-test, before choosing anything · An ordering for the study, since the volume is the actual complaint

    WhyThe premise in the question is right: writing once and running everywhere is the mainstream answer in 2026, not a minority one. React Native and Flutter carry a large share of new consumer apps, Kotlin Multiplatform occupies the conservative middle by sharing logic while leaving UI native, and Expo removed most of the build-tooling tax that used to be the strongest argument against the approach.

  • 138The gap widens only where being wrong is silent

    A widely shared post lists five competencies that survive the agent era and claims the gap between those who have them and those who do not is widening rather than closing. The list is right; the reason is sharper than stated. An agent multiplies production and not review, so the gap closes wherever a cheap oracle exists and opens wherever being wrong is silent — which reorders the five.

    How it worksThe five, re-sorted by whether being wrong is loud · Why divergence needs a mechanism · The audit this produces

    WhyThe post's argument is that an agent writing the code does not remove the need for software knowledge but increases it, because the agent builds what it is told and somebody has to decide what to tell it. Its load-bearing sentence is about full-stack and it is the best line in the piece: full-stack is not a person who can build every layer, it is a person who can see every layer.

  • 139Two reading lists, and the same instruction — steal the structure, not the content

    Ninety-odd distilled agent skills from Google, and a free three-hour course that runs the whole arc from agent design to revenue. Neither is worth reading for what it says. Both are worth thirty minutes for how they are shaped.

    How it worksWhat to take from each, and what to skip · The one thing worth writing down afterwards · Why loops versus graphs is the chapter to keep

    WhyBoth of these entered the queue for the same reason, and it is not the reason a reading list usually gets added. md ecosystem packages them — is not the content.

  • 140Claude in Slack — the workflow first, the presence second

    Wire Slack, Claude and Notion together through MCP connectors so a thread gets summarized and logged. The tagged-bot version of the same idea is the packaged form of that workflow, which is why it stays parked until the workflow is worth having.

    How it worksTwo forms of one idea · The test that decides whether the second one is ever needed · Why it stays parked

    WhyThese were two cards and one of them said so. The tagged-bot idea recorded that it feeds into the integration workflow rather than standing alone, which is the definition of a merge.

  • 141What you are buying is resume, not scheduling

    Cron, queues and status columns all make you store where you got to. A durable execution engine journals every step and, when a worker dies, replays that journal to restore the exact in-memory position — so await sleep(three days) really waits three days across restarts. The price is determinism: no clock, no randomness, no network calls inside workflow code, and that constraint is most of the learning curve.

    How it worksWhat each tool actually stores · The bargain, in one line each · Two traps, both better hit locally

    WhyThe category name hides the product. "Workflow engine" sounds like scheduling, and scheduling is the part you already have — cron fires, a queue delivers, a status column remembers.

  • 142Microservice patterns — Circuit Breaker & Saga

    Circuit Breaker (fail fast on inter-service calls, probe recovery half-open) and Saga (distributed transactions as local-transaction chains plus compensations) — verex's settlement pipeline is a Saga; its RPC/indexer calls want a breaker.

    How it worksCircuit Breaker (inter-service calls): trip the circuit and fail fast once failures cross a threshold, then probe recovery half-open after a cooldown. Saga (data consistency): resolve a distributed transaction as a chain of local transactions plus compensating transactions — eventual consistency without 2PC.

    WhyVerex's settlement pipeline (oracle lookup → settlement → payout) is literally a Saga, and its RPC/indexer calls want a circuit breaker as a baseline.

  • 143Web stack layers

    A five-layer map of the stack, with this project overlaid on it.

    How it worksA static five-layer diagram with the project's routes and demos placed on it. No code.

    WhyAn orientation map rather than a study: which layer each piece of this project actually lives at, and where the gaps are. Useful mostly for noticing that several cards which sound like different problems turn out to sit at the same layer — and that one or two layers have nothing on them at all.

  • 144Pull the page you are stuck on, not the next one in order

    A progressive curriculum assumes ignorance arrives in order. It does not. The honest use of graded material for an experienced engineer is as a reference opened at the point of today's block — and this repository already holds 152 curriculum items that quietly assume otherwise.

    How it worksTwo access patterns for the same material · The measurement, and it settles the argument · The honest counter-argument

    WhyA curriculum encodes an assumption that is false for anyone experienced: that ignorance arrives in order. Day 1 to day 100 is a sensible shape when the reader knows nothing, because the ordering is doing real work — each item is a prerequisite for the next.

  • 145The draft already exists — a selection rule, not a new channel

    The daily report already produces publishable prose every morning and rabbit's docs hub is already a public channel. What is missing is one rule that decides, per section, publish or keep — and the scarce half is not the English original, it is the Korean reconstruction.

    How it worksThe rule, as a table of defaults · Why a default beats a habit · The measurement, if one is wanted

    WhyThe method is reconstruction, not translation, and that is the whole differentiator. Carrying an English argument across into Korean produces a worse copy of something already abundant.

  • 146Apple container

    Apple's official open-source tool for running Linux containers as lightweight VMs on Apple Silicon — a Docker Desktop alternative candidate.

    How it worksApple's official open source — runs Linux containers as lightweight VMs on Apple Silicon Macs. 0, requires macOS 26.

    WhyA Docker Desktop alternative candidate for local infra across two PCs and midnight automated jobs.

  • 147Google Glass form factor & Stitch

    A note that Google Glass will likely land as a "use only when needed" form factor, plus trying out Stitch.

    How it worksGoogle Glass is expected to land as a "use only when needed" form factor rather than always-on wear; separately, try out Stitch.

    WhyA quick idea to revisit, not yet expanded.

  • 148The data was always public — the SLA is the product

    Google Cloud's Blockchain Analytics has been queryable in BigQuery for years, and the news is that its SLA is with the lawyers. Read it the right way round: nothing about the data changed. What is being manufactured is a liability — who pays when the chain is ahead of the table — and until that sentence is signed, "Preview" means the promise is zero.

    How it worksWhat the product is · Preview vs. GA — what actually changes · What a chain-dataset SLA would have to define

    WhyThe article is thin and the reading is the point. "The SLA is under legal review" is one status line in a documentation page, and the piece is that line inflated to a headline.

  • 149Twenty-one banks, one issuer — "own it together" becomes a company

    In October 2025 ten banks were "exploring" a reserve-backed coin. Eleven months later there are twenty-one institutions, a company being incorporated, a dollar coin first, G7 currencies later, and a launch target of H1 2027. This is the third answer of build-rent-or-own-the-rail turning into a legal entity — and the two lines worth underlining are the qualifier "where applicable" on GENIUS and MiCA, and the question no press release answers: what hours will the redemption desk keep?

    How it worksFrom memo to company — what actually changed in eleven months · Who is in — and what the roster says · Consortium precedents — the base rates

    WhyThe verb finally changed. the-only-commitment-is-the-issuer reads a Korean exchange's roadmap where every verb is explore and the only hard commitment is which coin to integrate.

  • 1506% is not interest — a neobank whose deposit rate is a trade

    Ethena Pay's beta looks like a bank: 5% cashback, 6% on dollar deposits, free instant cross-border transfers. But a bank pays interest out of lending; Ethena pays carry out of a delta-neutral basis trade. The word "deposit rate" imports banking's mental model into a product whose engine is a hedged trading position — and carry, unlike interest, can go negative.

    How it worksA bank and this app, side by side · The stack behind one card swipe · Questions for the terms of service

    WhyRead the two rates as customer-acquisition spend and carry, not as banking. 5% cashback is marketing budget with a runway — the question is only how long.

  • 151Halted or upgraded — the block gap is the same either way

    Injective disputes reports that its chain halted: an attack targeted a few binary-options dApps, not the chain, and what happened was an emergency upgrade. The dispute is over a word; the observable is block timestamps. And the remedy quietly answers the blast-radius question — if only apps were targeted, why did every validator need an emergency binary?

    How it worksClaim vs. observable · The blast-radius ladder · Timeline to reconstruct

    WhyIncident language is written for the token; chain data is written by the protocol. "The chain was not halted, it was upgraded" and "the chain stopped producing blocks for N minutes" can both be true — the first is a frame, the second is a measurement.

  • 152The incumbent lists the wrapper — xStocks moves inside the LSE

    Tokenized stocks have lived on crypto venues, wrapping shares held somewhere else. LSE partnering with Kraken's parent Payward to list xStocks on its 24-hour platform in 2027 inverts the direction: the venue that runs the actual market adopts the token. Whether that token becomes a real register entry or stays an IOU is now a choice the incumbent gets to make.

    How it worksThree structures the same ticker can hide · What the incumbent changes — and what it can't · What to read in 2027, in order

    WhyUntil now the wrapper chased the register; now the register considers the wrapper. xStocks on a crypto exchange is a token whose issuer promises there is a share somewhere — tokenized-equity-claim-rail's whole problem is auditing that promise.

  • 153No yield allowed — the interest ban is the border between payment and deposit

    MAS's draft stablecoin rules require 100% segregated reserves, stress tests, and wind-down plans — all table stakes now. The clause that defines the instrument is the ban on paying holders any interest: a stablecoin that yields is functionally a deposit, and the ban legislates it back into a payment object. The yield doesn't disappear; it moves one layer up, out of the regulated category.

    How it worksThe five clauses, three regimes · Where the yield goes when the issuer can't pay it · Questions for the consultation window (until 2026-10-16)

    WhyAsk why a regulator would ban paying people money. The answer defines the instrument.

  • 154DGX Spark vs. Mac Studio — you are buying bandwidth, not FLOPs

    Local LLM decode speed is bounded by memory bandwidth, not compute: tokens/s ≤ bandwidth ÷ model bytes. That one law reorders the shopping list — a 1-petaFLOP DGX Spark at 273GB/s can chat slower than a Mac Studio at 819GB/s — and the honest third option is renting: a $4k box is ~1,600 H100-hours you could buy by the hour instead.

    How it worksThe three boxes (street prices, early 2026 — treat as ~) · The law, applied — theoretical decode ceilings (Q4 weights) · The rental menu instead

    WhyDecode is a memory problem wearing a compute costume. Generating one token reads every weight once, so tokens/s can never exceed bandwidth ÷ model-bytes — a 40GB Q4 70B model tops out near 273/40 ≈ 7 tok/s on a DGX Spark and near 819/40 ≈ 20 tok/s on an M3 Ultra, before software even enters.

  • 155Fable 5.1 — the price that dropped names the customer

    Anthropic shipped Fable 5.1 with headline token prices unchanged ($10/$50 per million) and cache reads cut 75% ($1.00 → $0.25). Cache reads are the cost of re-reading long, stable context — which is exactly the cost structure of a long-running tool-use agent. Leaving chat prices alone and cutting only the cache is pricing design: it makes loops cheap, not conversations.

    How it worksWhat moved, what didn't (per million tokens) · Who each line item bills · Conditions for the discount to reach you

    WhyRead a price sheet the way you read a diff: what moved is the message. Every vendor price cut is also a statement about which customer the vendor wants more of.

  • 156The reporting form ships before the rule — OCC shows its checklist early

    OCC Bulletin 2026-24 publishes reporting forms for GENIUS-era stablecoin issuers while the underlying rule is still a proposal. That ordering is the practice, not an accident: a form is the regulator publishing what it will look at — reserve composition, redemption statistics, audit cadence get fixed here, before the rule is final. The paperwork is moving; the stage lights are irrelevant.

    How it worksThe ordering, which is the point · The players' positions while the rule is unfinished · What to extract from the form

    WhyRules announce; forms operationalize. A rule can be litigated, delayed, softened — a reporting form is the regulator's working model of the industry, leaked in advance by necessity, because issuers need lead time to build the reporting.

  • 157xERC20, CCTP, NTT — three answers to who holds the mint

    Lock-and-wrap bridges all shared one failure mode: breach the bridge, mint forever — the common structure of 2022's bridge disasters. xERC20, CCTP and NTT are three variations of the same correction — the issuer takes mint authority back: xERC20 puts limits in code (per-bridge rate limits), CCTP puts the authority in one party (Circle's burn-and-mint monopoly), NTT hands the choice to the deployer. The difference is not technology; it is the shape of delegated trust.

    How it worksThe three designs · The loss-cap arithmetic (xERC20-style limits) · Questions before choosing, in order

    WhyThe 2022 lesson, stated structurally: a wrapped token is a liability issued by its bridge. Lock-and-wrap made every bridge an unlicensed mint — the wrap contract would print against a lockbox it believed in, so one signature compromise on the lockbox printed unbacked supply into every connected chain.

  • 158The formula is free — an ETF-grade index is an ops manual

    Bonanza Lab patented an integrated system for digital-asset index operations — multi-exchange collection, standardization, quality judgment, anomaly monitoring, incident response, audit history. Note what the patent does not cover: the index formula. A volume-weighted average is a homework problem; what turns a number into a reference price for an ETF is the machinery around it — and the machinery is exactly what got patented.

    How it worksWhat the patent covers vs. what an afternoon covers · The three attacks and the surviving rules · The benchmark lineage

    WhyAsk why the patent covers operations and not math. Because the math was never the product.

  • 159Essential Math for Data Science (book)

    Thomas Nield's O'Reilly book — linear algebra, calculus, probability, and statistics rebuilt from scratch in plain Python (numpy/sympy), ending at linear/logistic regression and a from-scratch neural network. The math floor under the data-science dark horse: every Dune query, index-quality rule, and anomaly detector in that track leans on exactly these four subjects.

    How it worksChapter map — book subject → on-chain use · Why this book and not a course

    WhyThe Jayverse plan's §10 names 데이터 과학 (pandas/numpy, Dune/The Graph) as a dark-horse track, and the honest gap is not tooling but the math underneath it — a trimmed mean, a staleness cutoff, or a manipulation-cost curve is a statistics decision before it is a line of code. This book is the shortest respectable path through that gap: four subjects, one notebook language, no measure theory.

  • 160Middleware's moat has a fork date

    Middleware is a company doing what the protocol doesn't do yet — Obol/SSV sell DVT outside the protocol, Pimlico and the paymasters sell account abstraction outside the protocol — and its moat is "only we can do this." The moment the protocol absorbs the feature (native m-of-n keys, native AA), the feature becomes free and the moat evaporates. But it evaporates on fork cadence, not on announcement — a middleware moat is an expiring asset, and the expiry date is the enshrinement timeline.

    How it worksThe absorption map, today · The precedents, both directions · The moat arithmetic

    WhyMiddleware is a timing business wearing a technology costume. "Only we can do this" is true only while the protocol hasn't done it; the moment m-of-n keys or frame transactions land in the base layer, the paid workaround becomes a free feature.

  • 161MuJoCo/MJX — the simulator is the data factory

    If LeRobot is the training stack, MuJoCo is the factory underneath it: real-robot demonstrations are robotics' true cost, and simulation is the only legal way around that cost. pip install mujoco gives you DeepMind's physics engine; MJX runs thousands of environments in parallel on a GPU. But sim throughput alone is worthless — productivity is throughput × sim-to-real transfer, and a fast simulator also teaches wrong physics faster.

    How it worksThe stack, top to bottom · What MJX changes · The productivity equation

    WhyName the cost being avoided, and the tool makes sense. The LeRobot conclusion was that collecting real demonstrations is robotics' actual bottleneck — hours of human teleoperation per skill.

  • 162Cloudflare R2 + Workers — cut jurisdiction at the edge, not in the backend

    Sanctions and country blocks are enforced where requests arrive, not on-chain — Korea's Polymarket block hit exactly this layer. Cloudflare Workers read request.cf.country before your backend exists to the request, and R2 removes S3's biggest hidden cost (egress fees). Cutting at the edge means the backend never learns about jurisdiction — one enforced, logged boundary instead of policy smeared through the codebase.

    How it worksThe pieces, and what each replaces · Where the cut happens · Edge cut vs. backend cut

    WhyThe principle this implements: jurisdiction logic lives in one access layer, and never in settlement. A geo rule inside business logic multiplies — every endpoint re-implements it, every refactor can drop it, and proving compliance means auditing the whole codebase.

  • 163The share stays put — Korea tokenizes a trust receipt, and the cash leg comes last

    Korea's FSC will pilot listed-stock tokenization through KRX — but read the structure, not the headline. The token is a trust beneficiary certificate; the share and its rights stay in the existing electronic-securities system; and on-chain settlement is deliberately stage 3, gated on stablecoin legislation. The design states precisely what is trusted to the chain: the economics yes, the rights no, the money later.

    How it worksThe two-ledger split — what lives where · Korea vs. the reference models · The roadmap, read as dependencies

    WhyThe two-ledger split is the design's honest sentence. Votes, corporate actions, every legal right of the share stay in the electronic-securities system that already works; the token carries only the beneficiary claim on a trust.

  • 164Who prices Samsung on a Sunday? — the hours column is the oracle's real product

    Pyth's weekly deployment ships Shein's HK listing, Amazon and Samsung indices, S&P futures and palladium — and every symbol carries an hours class: Regular, Extended, 24/5, 24/7. That column is the interesting part. A crypto oracle never had to ask when a price means something; equities close. The price it serves after the bell is not a report but a methodology decision, and every DeFi protocol consuming the feed inherits that decision silently.

    How it worksThe hours classes in this deployment · Off-hours pricing: the menu and its failure modes · The consumer policy table (the PoC's deliverable)

    WhyA crypto oracle grew up in a market with no closing bell, and its move into TradFi symbols imports a concept it never needed: time. m.

  • 165Robinhood Chain — the growth formula runs backwards when you launch with the asset

    Two months after launch, Robinhood Chain's daily fees passed $4M — twice Hyperliquid, two-thirds of all Ethereum L2 revenue — by running the ecosystem playbook in reverse: stock tokens (RWA) on day one, proven DeFi imported, and the explosion coming from memecoins launched paired against stock tokens instead of the native coin. The growth formula was never a law; it was a dependency order on whatever the chain lacked — and this chain lacked apps, not users or assets.

    How it worksThe formula, forwards and backwards · Why the inversion was available · The numbers (early September)

    WhyThe growth formula was a dependency graph, not a recipe. Chains launch DeFi-first because a cold start lacks everything: DEXs and lending manufacture liquidity so anything else can trade, RWA arrives last because it needs trust, users and regulators.

  • 166The moat is the soldering iron — robotics stays uncrowded because the entry fee is paid in atoms

    A viral 6-month robotics roadmap (100+ resources, 27 projects, budget tiers from $0 to $300) whose structure is its real argument: months of electronics, motors and CAD before any machine learning. "The least crowded high-value skill in tech" is true for a reason the roadmap embodies — the entry fee is paid in atoms, hardware filters out the software crowd, and that filter is the moat.

    How it worksThe spine, month by month · The budget ladder · What job listings actually ask (the article's analysis)

    WhyWhy is a high-value skill uncrowded? Because the queue forms where the entry is cheap. Software careers compound on zero-marginal-cost copies — a laptop and a browser admit everyone, so everyone comes.

  • 167The 2027 question is easy — the 2030 question is whether you can leave

    An industry response to Korea's token-securities roadmap agrees with the direction and attacks the one thing the roadmap doesn't design: the exit. Brokerages will sink billions of won into KSD-specific contracts, accounts, nodes and back-office; "one security, one ledger" plus a migration ban is headed into the enforcement decree; and once that hardens, the sunk cost itself becomes the reason nothing changes. Starting carefully and building a closed end-state are entirely different problems.

    How it worksThe lock-in chain, layer by layer · The five asks, mapped to the lock-in each one counters · The historical ledger

    WhyFinancial infrastructure has stronger path dependence than ordinary IT, and the post names the mechanism precisely. A brokerage doesn't just integrate an API — it builds a chain: KSD-specific smart contracts → KSD account structures → private nodes → back-office → accounting and audit → internal controls.

  • 1683,500 lanterns nobody asked for — Blender agents and the underspecification benchmark

    Two frontier agents were given Blender: one built 3,500 lanterns nobody requested ("see how far I can go unprompted"), the other finished fast and showed something presentable first. Both reasoned well — which is exactly why capability wasn't the interesting axis. An open-ended creative tool makes every spec incomplete, and what an agent does with that slack — over-build, show early, or ask — is a design temperament you can measure.

    How it worksThe wiring options · The two temperaments, observed · The four numbers to record per run

    WhyWhen both agents are smart, the benchmark moves to what they do with slack. "Make a night scene" underdetermines almost everything — count, mood, when to stop.

  • 169The 2,234 pieces were already there — the agent collapsed the interface premium

    A viral "THIS IS WILD" demo: an agent-built 3D site exploding male anatomy into 2,234 pieces. Look closer: the pieces come from BodyParts3D, an open dataset, keyed to the FMA anatomy ontology (the panel shows FMA13403). The agent built the shell — loader, explode slider, search, isolate. The wow is misattributed, and the misattribution is the lesson: when an agent builds product-grade UI in days, every business that was "a nice interface over open data" loses its moat.

    How it worksWhat the demo is actually made of · The interface premium, before and after · The checklist for any "agent built X" headline

    WhyRead the wow carefully: the agent is being credited with the dataset's work. "2,234 modeled pieces" is the headline, but no model modeled them — BodyParts3D did, years ago, with anatomists; and search-by-structure works because every mesh carries an FMA ontology ID (the demo's panel shows FMA13403).

  • 170Reentrancy — the withdraw that calls back before the balance drops

    Reentrancy lets a callee re-enter the caller before its state updates, the class that drained The DAO in 2016; the fix (checks-effects-interactions) is old, and the bug still ships.

    How it worksNot yet built.

    WhyThe PoC reproduces a minimal reentrancy exploit on a local fork, then shows the one-line ordering change and a reentrancy guard closing it — the canonical first lesson in smart-contract security.

  • 171Integer overflow — arithmetic that wraps past zero

    Before Solidity 0.8 made checks default, unchecked arithmetic could wrap a balance from near-zero to near-max, and the pattern survives today in unchecked blocks and other languages.

    How it worksNot yet built.

    Why8 checks, making the invisible wrap explicit.

  • 172Broken access control — the function that forgot its modifier

    The most common and least glamorous vulnerability class is a privileged function missing an onlyOwner-style check, the same OWASP top category that lets one anonymous caller become admin.

    How it worksNot yet built.

    WhyThe PoC ships a contract with one unguarded initializer or setter and shows the takeover, then the missing modifier — the boring bug that causes real losses.

  • 173Oracle manipulation — a flash loan rewrites the price for one block

    A protocol that reads price from a spot AMM can be fooled by a flash loan that moves that pool within a single transaction, the mechanism behind a long list of DeFi drains.

    How it worksNot yet built.

    WhyThe PoC executes a flash-loan price manipulation on a local fork and then shows a TWAP or Chainlink feed resisting it — the difference between a spot read and a manipulation-resistant one.

  • 174Signature replay — a valid signature used twice, or on the wrong chain

    Signatures without a nonce, domain separator, or chain id can be replayed against the same contract twice or against its twin on another chain — the class EIP-712 exists to close.

    How it worksNot yet built.

    WhyThe PoC replays a signed permit against a second deployment to show the cross-chain replay, then adds the domain separator that binds the signature to one contract and chain.

  • 175Log4Shell — a logging line that executes attacker code

    The Log4j zero-day (CVE-2021-44228) turned a logged string into remote code execution across half the internet, the canonical lesson that a dependency's feature is your attack surface.

    How it worksNot yet built.

    WhyThe PoC studies the JNDI-lookup mechanism in a sandbox and the patch timeline, treating 'what does logging even do' as the security question the incident forced everyone to ask.

  • 176Heartbleed — reading memory the protocol never meant to send

    Heartbleed (CVE-2014-0160) let an attacker read chunks of OpenSSL server memory via a missing bounds check, leaking keys and sessions — a one-line bug in the code that secures most of the web.

    How it worksNot yet built.

    WhyThe PoC dissects the missing length check and why memory-safety and mandatory bounds checks would have prevented it, connecting to the case for memory-safe languages.

  • 177XZ Utils backdoor — a supply-chain attack that almost shipped

    The 2024 XZ backdoor was a multi-year social-engineering campaign that planted an SSH bypass in a core Linux compression library, caught by luck days before wide release.

    How it worksNot yet built.

    WhyThe PoC studies the maintainer-trust attack rather than the payload — how a patient contributor earned commit rights — because the human supply chain is the vulnerability here.

  • 178SolarWinds — compromising the build server, not the code

    The SolarWinds attack inserted malware during the build, so signed, trusted updates carried the backdoor to thousands of customers — proof that a valid signature says nothing about a clean build.

    How it worksNot yet built.

    WhyThe PoC maps the build-pipeline attack to reproducible-builds and SLSA provenance as the defenses, framing the CI system as the highest-value target.

  • 179Spectre and Meltdown — the CPU leaks through speculation

    Spectre and Meltdown showed that speculative execution — a performance feature in every modern CPU — leaves timing traces that leak memory across security boundaries in hardware.

    How it worksNot yet built.

    WhyThe PoC studies the cache-timing side channel at concept level and why mitigations cost real performance, the case that some vulnerabilities are architectural, not bugs.

  • 180SQL injection — the oldest bug that still tops the charts

    SQL injection concatenates untrusted input into a query so the input becomes code, a decades-old class that parameterized queries fully solve yet still appears in new breaches.

    How it worksNot yet built.

    WhyThe PoC demonstrates injection against a toy endpoint and the parameterized fix, then generalizes to the rule: never build a command by string-joining untrusted data.

  • 181XSS and CSRF — the browser trusts the wrong origin

    Cross-site scripting runs attacker JavaScript in a victim's session and CSRF rides the victim's cookies to act as them; both exploit the browser's trust model, and both matter for any dapp UI.

    How it worksNot yet built.

    WhyThe PoC shows a stored-XSS payload and a CSRF request, then the defenses (CSP, sanitization, SameSite, tokens) — the front-end half of security a contract audit never covers.

  • 182SSRF — making the server fetch the URL you chose

    Server-side request forgery tricks a backend into requesting an attacker-chosen URL, reaching internal metadata endpoints and cloud credentials — the class behind several large cloud breaches.

    How it worksNot yet built.

    WhyThe PoC demonstrates SSRF reaching a mock metadata service and the allowlist/egress controls that close it, connecting to the edge-jurisdiction cards' request-layer theme.

  • 183Dependency confusion — the package manager pulls the wrong registry

    Publishing a public package with an internal package's name can make a build fetch the attacker's version, a supply-chain class that hit major companies via npm and PyPI defaults.

    How it worksNot yet built.

    WhyThe PoC reproduces the name-resolution mismatch in a sandbox and the scoping/lockfile defenses, framing the registry as trusted input that is not.

  • 184Ransomware — one password shut a pipeline

    The 2021 Colonial Pipeline shutdown started with one leaked VPN credential and no MFA, showing that a national-scale outage can trace back to the most basic control being absent.

    How it worksNot yet built.

    WhyThe PoC studies the intrusion chain and the recovery (including the traced ransom payment), framing MFA and segmentation as the boring controls that would have stopped it.

  • 185Prompt injection — untrusted text becomes an instruction

    An LLM agent cannot reliably tell data from instructions, so text in a fetched page or a tool result can hijack it — the class with no clean fix and rising stakes as agents gain permissions.

    How it worksNot yet built.

    WhyThe PoC plants an injection in a document an agent reads and shows it exfiltrating or acting out of scope, then the partial defenses (isolation, allowlists, human-in-the-loop) — the security core of the whole agent stack.

  • 186Static analysis — Slither and Semgrep read the code you skimmed

    Static analyzers like Slither (Solidity) and Semgrep (general) flag known-bad patterns before deployment, cheap and fast but drowning in false positives that only judgment filters.

    How it worksNot yet built.

    WhyThe PoC runs Slither and Semgrep on a deliberately buggy contract and triages the output, treating the true-positive rate and noise as the honest measure of the tool.

  • 187Bug bounty platforms — pricing a vulnerability before an attacker does

    Immunefi, HackerOne and code contests (Code4rena, Sherlock) create a legal market for finding bugs, and the payout size is a live signal of what a given exploit is actually worth.

    How it worksNot yet built.

    WhyThe PoC studies real disclosed reports and payout tiers, framing the bounty as a market that prices security the way an audit cannot.

  • 188CVE, NVD and the zero-day — the clock between discovery and patch

    A zero-day is a vulnerability with no patch available, and the CVE/NVD system is the public clock tracking it from disclosure to fix — the window during which everyone is exposed and priced.

    How it worksNot yet built.

    WhyThe PoC traces one CVE's lifecycle (report → embargo → disclosure → patch → exploitation) and the exploit market around it, framing patch latency as the real risk metric.

  • 189Audit firms and contests — who signs off, and what a signature means

    Trail of Bits, OpenZeppelin and competitive-audit platforms all produce a report, but a passed audit is a snapshot under a scope, not a proof of safety — the same preview-means-no-promise reading.

    How it worksNot yet built.

    WhyThe PoC compares a firm audit and a contest audit on scope, incentives and what each actually guarantees, treating 'audited' as a claim to be read, not a badge.

  • 190RAG — the model answers from what you retrieved, right or wrong

    Retrieval-augmented generation grounds an answer in fetched documents instead of the model's memory, which moves the failure mode from hallucination to retrieval quality — you now fail by fetching the wrong passage.

    How it worksNot yet built.

    WhyThe PoC builds a small RAG pipeline (chunk, embed, retrieve, answer) and measures answer quality against retrieval quality, showing the bottleneck is upstream of the model.

  • 191Fine-tuning and LoRA — teaching a model style without retraining it

    LoRA fine-tunes a model by training a small number of added weights instead of all of them, cheap enough to run on one GPU — best for form and format, rarely the right tool for new facts.

    How it worksNot yet built.

    WhyThe PoC fine-tunes a small model with LoRA on a style dataset and contrasts it with RAG, making the 'style vs facts' boundary the deliverable.

  • 192Prompt engineering — the few-shot examples do most of the work

    How you phrase and exemplify a task often changes accuracy more than which model you pick, and the discipline is measuring that rather than trusting intuition about wording.

    How it worksNot yet built.

    WhyThe PoC runs the same task under zero-shot, few-shot and formatted prompts against a fixed eval set, turning prompt choices into a measured comparison.

  • 193Chain-of-thought — reasoning out loud buys accuracy and tokens

    Prompting a model to reason step by step raises accuracy on multi-step problems, at the cost of latency and tokens — and the written reasoning is a rationalization, not a faithful trace of the computation.

    How it worksNot yet built.

    WhyThe PoC compares direct and chain-of-thought answers on a reasoning benchmark and the token/accuracy tradeoff, cautioning that the trace explains less than it appears to.

  • 194RLHF — aligning a model to preferences, and to their biases

    Reinforcement learning from human feedback tunes a model toward what raters prefer, which is how a raw model becomes a helpful assistant — and how rater bias becomes model behavior.

    How it worksNot yet built.

    WhyThe PoC studies the reward-model-plus-policy loop conceptually and where preference data injects bias, framing alignment as a data-provenance problem.

  • 195Quantization — running a big model in a small memory

    Quantization stores weights at lower precision (8-bit, 4-bit) so a large model fits on modest hardware, trading a measurable accuracy drop for a large memory and speed win.

    How it worksNot yet built.

    WhyThe PoC runs one model at several bit-widths and measures the accuracy-versus-footprint curve, the number that decides whether local inference is viable.

  • 196Attention — the mechanism, and why context costs quadratically

    Self-attention lets every token weigh every other, which is the transformer's power and its cost — compute grows with the square of context length, the reason long context is expensive.

    How it worksNot yet built.

    WhyThe PoC visualizes attention on a short sequence and the O(n^2) scaling, connecting the mechanism to why context windows and caching matter downstream.

  • 197Tokenization — the model does not see characters

    Text is split into subword tokens before a model sees it, which is why models miscount letters, why some languages cost more tokens, and why a prompt's real length is not its character count.

    How it worksNot yet built.

    WhyThe PoC tokenizes English and Korean with the same tokenizer to show the cost asymmetry and the counting failures, making the invisible preprocessing visible.

  • 198Embeddings — meaning as a vector you can search

    Embeddings map text to vectors where nearby means similar, the substrate under semantic search and RAG — and the quality of every retrieval is bounded by the quality of the embedding model.

    How it worksNot yet built.

    WhyThe PoC embeds a corpus, runs nearest-neighbor search, and shows where semantic similarity diverges from what a user actually meant.

  • 199Mixture of Experts — a big model that only runs part of itself

    MoE models route each token to a few of many expert sub-networks, so total parameters can be huge while compute per token stays modest — the architecture behind several frontier models.

    How it worksNot yet built.

    WhyThe PoC studies the routing mechanism and the capacity-versus-compute tradeoff, explaining how a model can be 'large' and 'cheap to run' at once.

  • 200Speculative decoding — a small model drafts, a big model checks

    Speculative decoding speeds generation by letting a small draft model propose tokens that a large model verifies in parallel, cutting latency with no change to the output distribution.

    How it worksNot yet built.

    WhyThe PoC contrasts plain and speculative decoding on the same prompt and measures the latency win and its dependence on draft-model agreement.

  • 201KV cache — why the second token is cheaper than the first

    The KV cache stores attention keys and values so each new token does not recompute the whole context, which is why prefill is expensive and decoding is fast — and why cache pricing reshapes agent economics.

    How it worksNot yet built.

    WhyThe PoC measures prefill versus decode cost with and without cache reuse, connecting the mechanism to the cache-read price cut that changes long-context agent bills.

  • 202Distillation — a small model trained to imitate a big one

    Distillation trains a compact student on a large teacher's outputs, capturing much of the capability at a fraction of the cost — the standard path from a frontier model to a deployable one.

    How it worksNot yet built.

    WhyThe PoC distills a small model from a larger one's outputs on a narrow task and measures the capability retained versus the size saved.

  • 203Constitutional AI — alignment from written principles, not just raters

    Constitutional AI has a model critique and revise its own outputs against a written set of principles, reducing reliance on human labels — and moving the value judgment into an auditable document.

    How it worksNot yet built.

    WhyThe PoC studies the self-critique loop and where a principle set decides behavior, framing the constitution as the reviewable seat of the model's values.

  • 204Tool use — the model that stops guessing and calls a function

    Function calling lets a model emit a structured call to real code instead of hallucinating an answer, the primitive under agents, MCP and x402 — and the point where a wrong call becomes a real action.

    How it worksNot yet built.

    WhyThe PoC wires a model to two tools and shows correct routing, a wrong call, and the validation layer that must sit between intent and execution.

  • 205Agentic loops — ReAct, and the cost of letting a model iterate

    The reason-act-observe loop lets a model plan, call tools, and react to results across many steps, which unlocks real tasks and multiplies the ways it can go wrong or run away in cost.

    How it worksNot yet built.

    WhyThe PoC runs a small ReAct agent on a multi-step task with a step and cost budget, treating termination and guardrails as the hard part, not the planning.

  • 206Evals — you cannot improve what you do not measure, judge included

    LLM evaluation ranges from exact-match benchmarks to using a model as a judge, and the judge itself has biases (length, position, self-preference) that must be measured before its scores are trusted.

    How it worksNot yet built.

    WhyThe PoC builds a small eval set and an LLM-judge, then measures the judge's own biases — the meta-evaluation that keeps a scoreboard honest.

  • 207Structured output — forcing valid JSON instead of hoping for it

    Constrained decoding and schema-guided generation make a model emit output that always parses, turning a flaky text-to-JSON step into a reliable interface an application can depend on.

    How it worksNot yet built.

    WhyThe PoC contrasts free-form prompting with schema-constrained decoding on a extraction task and measures the parse-failure rate each produces.

  • 208Multimodal — one model that reads images and text together

    Vision-language models take pixels and tokens in the same context, enabling screenshot understanding and document parsing — and inheriting prompt-injection risk through images, not just text.

    How it worksNot yet built.

    WhyThe PoC runs a VLM on a screenshot task and shows both the capability and an image-borne injection, connecting multimodal power to its new attack surface.

  • 209Context engineering — the window is a budget, not a bucket

    As context windows grow, the skill shifts from fitting information in to choosing what belongs there, because models attend unevenly and a stuffed context degrades accuracy (lost-in-the-middle).

    How it worksNot yet built.

    WhyThe PoC measures accuracy as a fact is moved through a long context and as irrelevant filler is added, making 'more context is not more signal' a number.

  • 210Isaac Lab — the sim that gets faster when you buy a GPU

    NVIDIA's robot-learning framework runs thousands to tens of thousands of environments in parallel on the GPU, with RL/imitation workflows and sensor sim built in. It fills the slot the stack map left empty — large-scale sim infrastructure. If MuJoCo/MJX is the "runs on a laptop" side, Isaac Lab is the "buy a GPU and it goes faster" side, and if the sim-to-real bottleneck is data, this points straight at it — at the cost of binding hard to one hardware and software stack.

    How it worksWhere Isaac Lab sits · Laptop-scale vs GPU-scale · The benchmark that decides it

    WhyIsaac Lab is the missing quadrant of the robotics stack, and the quadrant is 'throughput you can buy.' The earlier stack map — ROS 2 for control, LeRobot for learning, MuJoCo for physics, openpi for policy — had no entry for the case where the constraint is simply how many environment-steps per hour you can generate.

  • 211Temporal — where 'retry, idempotency, visibility into a stuck run' actually lives

    Temporal is durable workflow orchestration: it replays workflow code deterministically so a process that dies keeps its state, and retries, timeouts, compensations, and multi-day waits are first-class. It is the product the dual-write end-condition problem keeps describing — and a settlement flow that is long-running plus externally-waiting is the textbook fit, at the price of a determinism constraint that reshapes how the code is written.

    How it worksThe pattern three cards arrived at separately · Deterministic replay — the mechanism and its tax · Build vs buy

    WhyTemporal is the packaged answer to a question this catalogue keeps arriving at from different doors. The pattern is always the same: a process has to survive its own death mid-flight, retry the parts that failed without redoing the parts that succeeded, wait days for something external, and let an operator see where it is stuck.

  • 212A heist that has to wait is one you can still stop

    SlowMist flagged (via The Block, 2026-09-07) two attackers replaying last week's ~$1.7M Notional Finance exploit on BNB Chain: they have already opened malicious fCash positions on an unnamed contract (0x0795…D9F0), but the positions must mature before the funds can be pulled. Unlike an atomic flash-loan drain, this attack is staged on-chain in advance and leaves a maturity window — the rarest thing in an exploit: time to notice and act before the money moves.

    How it worksAtomic exploit vs staged (maturity) exploit · The window is only real if the inequality holds · The incident, with its caveats

    WhyAlmost every on-chain exploit is atomic, and this one is not — that is the whole card. A flash-loan price manipulation (sec-oracle-flashloan) or a reentrancy drain (sec-reentrancy) executes inside a single transaction: by the time it is visible it is already done, and "detection" means forensics.

  • 213One AA spec, two execution models — or the EVM fragments

    The Base-backed EIP-8130 and the L1-favored Frame Transactions (EIP-8141) collided over Ethereum's native account-abstraction design, acrimoniously enough that a working group formed to unify them (Ethlabs, Week 11, 2026-09). The governance drama is downstream of one technical fact: 8141 validates transactions by running EVM code (maximally general), while L2s validate with native code for speed and cannot afford EVM validation at high TPS. Every proposed fix shares one move — let the L2 recognize the validation and substitute equivalent native code, so one spec runs two ways.

    How it worksTwo ways to validate a transaction · The reconciliation: recognize the general path, substitute the fast one · The rest of "Fast Ethereum," and the asymmetry

    WhyThe acrimony is real but downstream — this is an execution-model fight wearing a governance costume. The accusations ("Base is hijacking L1 governance," "L1 is unresponsive to L2s") are what a genuine technical incompatibility looks like when it reaches a mailing list.

  • 214Geometric series → DCF valuation

    Sum of a geometric series, applied to perpetuity/Gordon-formula valuation.

    How it worksPlanned: a small derivation-to-code page showing the geometric series sum formula S = a / (1 − r) for |r| < 1, then substituting cash-flow growth into it to derive the Gordon Growth perpetuity formula, with an interactive calculator comparing the closed-form result against a brute-force sum of many discounted future cash flows — to visually confirm the two converge. Not yet built.

    WhyConnects a pure-math result (the closed-form sum of a geometric series) to something used directly in finance — the Gordon Growth Model for valuing a perpetuity, which underpins terminal-value calculations in discounted cash flow (DCF) analysis.

  • 215Amortized analysis via potential functions

    Proving O(1) amortized cost for dynamic-array doubling with a potential function.

    How it worksPlanned: an interactive dynamic array (a growable vector) where each push is logged with its real cost, alongside a running potential function Φ that tracks "banked" cost from cheap operations — demonstrating that amortized cost = real cost + ΔΦ stays bounded even across a resize. Not yet built.

    WhyA core algorithms-interview topic: proving that an operation with occasional expensive worst cases (like a dynamic array's resize-and-copy) is still O(1) on average over a sequence of operations, using the potential-function accounting method rather than a hand-wavy argument.

  • 216Moralis — wallet snapshot via API

    Querying balance/net-worth for an address with Moralis's Wallet API.

    How it worksPlanned: a small server route calling Moralis's Wallet API (net-worth and token-balance endpoints) with a server-held API key, rendering a simple portfolio snapshot for any address a visitor enters — read-only, no wallet connection needed. Not yet built.

    WhyA quick evaluation of a common build-vs-buy tradeoff in crypto tooling — instead of indexing chain data yourself (event logs, balance changes) to answer "what does this wallet hold," a hosted indexing API like Moralis answers it in one call.

Fundamentals

The foundations underneath the rest of the catalogue — mathematics, then algorithms, then the money logic of economics — merged into one track and renumbered as one, each item tagged with where it came from.

done (6) / all (192)

Math · 시작 — 값의 시간가치와 시장 (Day 1–2)

  • 1Math수열·급수·시그마

    수열은 규칙을 가진 수의 나열이고, 급수는 그 항들을 시그마 기호로 더한 것이다. 공비가 r인 등비수열의 합은 유한 항이면 a(1-r^n)/(1-r)이고, |r| < 1이면 항이 기하급수적으로 작아져 무한합이 a/(1-r)로 수렴한다.

    How it works이 수렴 조건이 금융에서 할인율의 정체다 — 매년 g만큼 성장하는 현금흐름을 할인율 d로 현재가치로 바꾸면 공비가 (1+g)/(1+d)인 등비급수가 되고, d > g일 때만 합이 유한하다. 그 합이 곧 고든 성장모형 V = CF/(d-g)이며, DCF의 터미널 밸류가 이 한 줄에서 나온다.

    Why무한한 미래 현금흐름을 유한한 숫자로 요약할 수 있는 이유가 바로 이 수렴성이고, d ≤ g로 가정을 잘못 잡으면 밸류에이션이 발산해 아무 의미 없는 숫자가 나온다.

  • 2Math공급·수요·효용·시장균형

    수요곡선 D(p)는 우하향하고 공급곡선 S(p)는 우상향하며, 균형가격 p*는 D(p*) = S(p*)를 만족하는 점이다. 이 등식은 풀어서 얻는 답이 아니라 초과수요·초과공급이 가격을 밀어붙여 도달하는 피드백의 결과다.

    How it works일반 재화와 달리 블록 공간은 블록당 가스 상한이 고정돼 공급곡선이 수직선이고, 그러면 가격이 전부 수요 쪽에서 결정돼 같은 크기의 수요 충격에도 가격이 훨씬 크게 움직인다. EIP-1559는 이 가격 발견을 경매에 맡기는 대신, 직전 블록의 혼잡도를 보고 base fee가 오르내리는 알고리즘으로 옮겨 사용자가 매번 처음부터 가격을 추측하지 않게 한다.

    Why공급이 수직선인 시장에서 가격 변동성이 왜 유독 크게 튀는지를 이해해야, 가스비나 LMSR 보조금 같은 설계에서 그 변동을 흡수할 장치를 미리 넣을 수 있기 때문이다.

Math · 7월 — 이산수학·논리 (Day 3–10)

  • 3Math명제논리·집합·함수·관계

    명제논리는 참·거짓 값을 갖는 명제와 결합자(∧, ∨, ¬, →, ↔)로 이루어지며, 특히 함의 p→q는 p가 거짓이면 무조건 참이라는 점과 그 대우 ¬q→¬p가 항상 동치라는 점이 핵심이다. 집합은 원소의 모임으로 ∈, ⊆, ∪, ∩, 여집합, 곱집합 같은 표기를 쓰고, 한정기호 ∀와 ∃는 부정할 때 서로 뒤바뀌며 안쪽 명제가 부정된다(¬∀x P(x) ≡ ∃x ¬P(x)).

    How it works관계는 곱집합 A×B의 부분집합으로 정의되며, 반사·대칭·추이 세 성질을 모두 가지면 동치관계가 되어 집합을 서로소인 동치류로 분할하고, 반사·반대칭·추이를 가지면 부분순서가 된다. 함수는 정의역의 각 원소에 정확히 하나의 값을 대응시키는 특수한 관계이며, 단사(injective)·전사(surjective)·전단사(bijective)의 구분이 크기 비교와 역함수 존재의 기준이 된다.

    Why논문·명세·정형 검증 문서는 전부 이 표기로 쓰여 있어서, 기호를 못 읽으면 알고리즘의 전제 조건과 보장 범위를 오해하게 된다.

  • 4Math귀납법/구조적 재귀

    수학적 귀납법은 자연수 집합의 정렬성(well-ordering)에 기반한 증명 원리로, 기저 사례와 "n에서 n+1로 넘어간다"는 단계를 보이면 모든 자연수에 대해 명제가 성립함을 결론짓는다. 강한 귀납법은 n보다 작은 모든 경우를 가정에 쓸 수 있게 한 형태이고, 이를 일반화하면 well-founded 관계 위의 정초 귀납법이 되어 자연수가 아닌 구조에도 적용된다.

    How it works구조적 귀납법은 그 특수형으로, 대수적 자료형이 생성자로부터 유한하게 만들어진다는 사실을 이용해 각 생성자마다 명제를 보이는 방식이다. 트리에 대해서는 리프(기저)와 내부 노드(자식들의 가정으로부터 결론)를 각각 처리하면 되고, 이 증명 구조는 그대로 재귀 함수의 형태와 일치한다.

    Why재귀 함수나 트리 자료구조의 불변식을 "돌려 보니 되더라"가 아니라 왜 항상 성립하는지로 설명할 수 있어야, 엣지 케이스를 테스트가 아니라 구조로 걸러낼 수 있다.

  • 5Math그래프 기초(DAG·트리·해시 링크)

    그래프는 정점 집합과 간선 집합의 쌍이고, 간선에 방향이 있는지와 사이클이 있는지에 따라 성질이 크게 갈린다. DAG는 방향 간선만 있고 사이클이 없는 그래프로, 위상 정렬이 항상 가능하며 그 순서가 의존성 해결과 순차 처리의 기준이 된다.

    How it works트리는 연결되어 있으면서 사이클이 없는 그래프로 정점이 n개면 간선이 정확히 n-1개이고, 루트를 정하면 각 정점에서 루트까지의 경로가 유일하다. 해시 링크는 간선을 메모리 주소가 아니라 대상 노드 내용의 해시로 두는 방식으로, 노드 내용을 바꾸면 해시가 달라져 그 노드를 가리키던 상위 노드까지 전부 달라지므로 구조 전체가 변조 감지 가능해진다.

    Why블록체인 구조, 머클 증명, 빌드 의존성, 트랜잭션 의존 그래프가 전부 같은 DAG와 해시 링크 언어로 설명되기 때문이다.

  • 6Math비둘기집 원리

    비둘기집 원리는 n개의 상자에 n보다 많은 물건을 넣으면 적어도 한 상자에는 두 개 이상이 들어간다는 진술이다. 일반화하면 m개 물건을 n개 상자에 넣을 때 어떤 상자에는 m/n의 올림 이상이 들어간다.

    How it works해시 함수는 사실상 무한한 정의역을 고정 길이 출력으로 보내므로, 이 원리에 의해 충돌의 존재 자체는 증명적으로 피할 수 없다. 암호학적 해시가 노리는 것은 충돌이 없다는 것이 아니라 충돌을 계산적으로 찾기 어렵다는 성질이다.

    Why출력 비트 수를 그대로 보안 강도로 착각해 해시를 잘라 쓰거나 짧은 식별자를 쓰면, 원상 공격이 아니라 충돌 공격 쪽에서 강도가 절반으로 떨어진다. 어떤 저항성이 필요한 자리인지 구분해야 안전한 길이를 고를 수 있다.

  • 7MathBig-O & 가스

    Big-O는 입력 크기가 커질 때 자원 사용량이 어떤 함수의 상수배 이내로 증가하는지를 나타내는 점근적 상한이며, 정의상 상수 배수와 낮은 차수 항을 무시한다. 가스는 EVM에서 각 연산에 매겨진 비용 단위이고, 트랜잭션과 블록에 가스 한도가 있어 유한한 계산량만 허용된다는 뜻에서 '유한 계산의 가격표'다.

    How it works두 개념의 결정적 차이는 가스가 상수까지 포함한 구체적 가격표라는 점이며, 그래서 스토리지 쓰기나 해시처럼 상수가 큰 연산이 n이 작은 구간에서도 전체 비용을 지배한다. 반대로 배열 전체를 도는 O(n) 루프는 n을 공격자가 키울 수 있으면 블록 가스 한도에 걸려 함수가 영구히 실행 불가능해지는 DoS 벡터가 된다.

    Why온체인 코드에서는 느린 코드가 그냥 느린 게 아니라 아예 실행되지 않고 자금을 묶어 버릴 수 있다. 무한정 길어질 수 있는 배열 순회는 실제 취약점 유형이다.

  • 8Math관계와 동치류

    집합 위의 이항 관계는 곱집합의 부분집합으로 정의되며, 어떤 두 원소가 관계를 맺는지를 나열한 것이다. 반사성, 대칭성, 추이성을 모두 만족하는 관계를 동치관계라 한다.

    How it works동치관계는 집합을 서로소인 동치류들로 쪼개고, 반대로 임의의 파티션은 하나의 동치관계를 정의하므로 둘은 일대일로 대응한다. 동치류 전체의 집합을 몫집합이라 하며, 몫집합 위의 연산은 대표원을 무엇으로 고르든 결과가 같아야 잘 정의된다.

    Why무엇을 같은 것으로 볼지 정하는 일은 중복 제거, 캐시 키, 리플레이 방지 같은 설계의 본질이며, 기준이 대칭성이나 추이성을 깨면 그대로 버그가 된다.

  • 9Math카운팅 원리(순열·조합·이항계수)

    카운팅의 토대는 두 규칙이다. 서로 배타적인 선택지는 더하고(합의 법칙), 독립적으로 이어지는 단계는 곱한다(곱의 법칙).

    How it works순서를 구분해 n개 중 k개를 뽑는 순열의 수는 n!/(n-k)!이고, 순서를 구분하지 않는 조합의 수는 이항계수 C(n,k)=n!/(k!(n-k)!)이다. 이항계수는 (x+y)^n의 전개 계수와 같고, 파스칼 항등식 C(n,k)=C(n-1,k-1)+C(n-1,k)는 '특정 원소를 포함하는 경우와 포함하지 않는 경우'로 나눈 조합적 논증에서 바로 나온다.

    Why알고리즘의 경우의 수 분석, 해시 충돌 확률, 무작위 샘플링 설계 같은 실무 계산이 전부 이 기본 규칙 위에 서 있고, 여기서 어긋나면 확률 추정 전체가 틀어진다.

  • 10Math재귀관계와 생성함수(가볍게)

    점화식은 수열의 항을 이전 항들로 정의하는 관계식이며, 알고리즘의 비용을 서술하는 가장 자연스러운 언어다. 상수 계수를 갖는 선형 동차 점화식은 특성방정식의 근으로부터 닫힌 형태의 해를 얻을 수 있고, 비동차 항이 있으면 특수해를 더해 일반해를 구성한다.

    How it works생성함수는 수열을 형식적 멱급수의 계수로 담아 하나의 함수로 다루는 도구이며, 점화식을 이 함수에 대한 대수 방정식으로 바꿔 풀고 다시 계수를 읽어 내는 방식으로 닫힌 형태를 유도한다. 분할정복 알고리즘에서 나오는 형태의 점화식은 마스터 정리로 재귀 비용과 분할 비용 중 어느 쪽이 지배적인지 판정해 점근적 해를 바로 얻을 수 있다.

    Why알고리즘 복잡도 분석, 재시도 백오프의 누적 지연, 큐 길이의 재귀적 추정 같은 실무 계산이 모두 점화식 세우기에서 출발한다.

Math · 8월 — 게임이론·프로토콜 경제학 (Day 11–17)

  • 11Math내시균형·죄수의 딜레마

    내시균형은 각 참여자의 전략 조합에서, 누구도 혼자만 전략을 바꿔서는 이득을 볼 수 없는 상태이다. 이는 최적의 결과라는 뜻이 아니라 이탈 유인이 없는 안정점이라는 뜻이며, 죄수의 딜레마가 그 차이를 보여 준다.

    How it works죄수의 딜레마에서는 상대가 무엇을 하든 배신이 더 낫기 때문에 배신이 우월전략이고, 결과적으로 둘 다 배신하는 조합이 유일한 내시균형이지만 둘 다 협력하는 것보다 모두에게 나쁘다. 즉 개인 합리성의 균형과 집단 효율(파레토 최적)은 일치하지 않을 수 있다.

    Why프로토콜 설계는 결국 참여자가 이탈할 유인이 없도록 보상과 벌칙을 배치하는 일이라, 균형 개념 없이 만든 인센티브는 의도와 반대로 작동하기 쉽다.

  • 12Math경매(1·2위가격, 수입동등정리)

    1위 가격 밀봉 경매는 최고 입찰자가 낙찰받고 자기 입찰액을 지불하는 방식이고, 2위 가격(비크리) 경매는 최고 입찰자가 낙찰받되 두 번째로 높은 입찰액을 지불하는 방식이다. 사적 가치 가정 아래 2위 가격 경매에서는 자기 가치를 그대로 쓰는 것이 우월전략이라, 입찰자가 경쟁자의 전략을 추측할 필요가 없다.

    How it works반면 1위 가격 경매에서는 가치보다 낮게 쓰는 shading이 균형 전략이며, 얼마나 깎을지는 경쟁자 수와 가치 분포에 의존한다. 수입동등정리는 가치가 독립적이고 동일한 분포를 따르며 입찰자가 위험 중립적이고, 두 형식이 같은 배분 규칙(가장 높은 가치가 낙찰)과 같은 최저 유형의 기대 이득을 가질 때, 판매자의 기대 수입이 동일하다는 결과다.

    Why블록 공간 배분, MEV 입찰, 토큰 세일, 청산 경매 등 프로토콜 설계의 여러 지점이 사실상 경매이고, 형식 선택이 참여자 전략과 담합·조작 가능성을 바꾼다.

  • 13Math메커니즘 디자인(VCG 개념)

    메커니즘 디자인은 참가자들이 사적 정보(선호, 가치)를 가지고 전략적으로 행동한다는 전제 아래, 원하는 결과가 균형에서 나오도록 규칙 자체를 설계하는 분야다. 핵심 목표 중 하나는 유인 합치성으로, 특히 참가자가 남의 행동과 무관하게 진실 보고가 최적이 되는 dominant-strategy 유인 합치성이 가장 강한 성질이다.

    How it worksVCG 메커니즘은 신고된 가치의 합을 최대화하는 배분을 선택하고, 각 참가자에게 '그가 참여함으로써 다른 참가자들이 잃은 후생'만큼을 지불액으로 매기는 방식이며, 이렇게 하면 각자의 순이익이 자신이 만든 사회적 잉여와 정렬되어 진실 신고가 우월 전략이 된다. 단일 물품 경매에 VCG를 적용하면 2등 가격 경매(Vickrey auction)가 되고, 낙찰자는 자기 입찰가가 아니라 차순위 입찰가를 낸다.

    Why블록스페이스 경매, MEV 분배, 수수료 시장, 오라클 보상처럼 프로토콜이 값을 매기는 모든 자리는 메커니즘이고, 유인이 어긋나면 참가자가 규칙을 게임하는 방식으로 반드시 드러난다.

  • 14MathEIP-1559 수수료시장(base fee = AIMD)

    EIP-1559는 블록 수수료를 프로토콜이 정하는 base fee와 사용자가 붙이는 priority fee로 나누고, base fee는 소각하고 priority fee만 블록 제안자에게 준다. 5%로 제한된다.

    How it works이 되먹임은 혼잡 제어의 AIMD 계열 제어기와 같은 역할을 하며, 목표 사용률 주위로 수렴시키는 것이 설계 의도다. 사용자 입장에서 실제 지불액은 base fee + priority fee이되 max fee를 넘지 않고, 초과분은 환불되므로 first-price 경매에서 오던 과다 입찰 유인이 줄어든다.

    Why가스비 추정 로직이나 트랜잭션 재전송 정책을 짤 때 base fee의 최대 변화율을 모르면 max fee를 너무 낮게 잡아 pending에 묶이거나 필요 이상으로 높게 잡게 된다.

  • 15Math셸링 포인트

    셸링 포인트는 서로 소통할 수 없는 상황에서 참가자들이 자연스럽게 수렴하게 되는 선택지를 말한다. 조정 게임에는 균형이 여러 개 존재하는데, 보수 구조만으로는 어느 균형이 실제로 선택될지 정해지지 않고 현저성·단순성·문화적 맥락 같은 게임 밖의 요소가 선택을 결정한다는 것이 핵심 통찰이다.

    How it works셸링 포인트가 작동하려면 그 선택지가 눈에 띄는 것만으로는 부족하고, 남들에게도 그것이 눈에 띈다는 사실을 서로가 안다는 공유 지식이 필요하다. 그래서 셸링 포인트는 강제력 없이도 조정을 만들어 내지만, 맥락이 달라지면 쉽게 무너진다.

    Why강제 규칙이 아니라 다들 이걸 고를 것이라는 상호 기대만으로 유지되는 합의가 실제로 많고, 프로토콜 분기나 표준 채택, 오라클 투표가 그런 구조이기 때문이다.

  • 16Math조합 게임이론(제로섬 vs 비제로섬)

    게임을 분류하는 가장 기본적인 축은 참가자 보수의 합이 상수인지 여부다. 제로섬 게임은 한쪽의 이득이 정확히 다른 쪽의 손실이라 순수 대립 구조이며, 유한 2인 제로섬 게임에는 혼합 전략을 허용할 때 minimax 값이 유일하게 존재한다는 정리가 있다.

    How it works비제로섬 게임은 보수의 합이 전략에 따라 달라져 협력으로 모두가 나아지거나 모두가 나빠질 수 있고, 해 개념은 상대 전략이 주어졌을 때 누구도 일방적으로 바꿀 유인이 없는 내시 균형으로 옮겨간다. 유한 게임이면 혼합 전략 내시 균형은 항상 존재하지만 여러 개일 수 있고, 죄수의 딜레마처럼 균형이 전체 최적보다 나쁠 수도 있다.

    Why프로토콜 설계는 결국 참여자가 규칙 안에서 무엇을 할지 예측하는 일이고, 제로섬으로 착각한 상황이 실제로는 담합이 이득인 비제로섬이면 인센티브 설계가 통째로 어긋난다. 균형이 존재한다는 것과 그 균형이 바람직하다는 것은 별개라는 점도 중요하다.

  • 17Math반복게임과 평판

    1회성 게임에서는 배신이 우월전략이어서 협력이 균형이 되지 못하지만, 같은 상대와 게임이 반복되면 현재의 이득과 미래의 보복이 함께 계산되어 협력이 균형으로 유지될 수 있다. 핵심 변수는 할인인자로, 미래 보수를 얼마나 중시하는지(또는 게임이 계속될 확률이 얼마인지)를 나타내며, 이 값이 충분히 크면 이탈로 얻는 일회성 이득보다 이후 처벌로 잃는 손실이 커진다.

    How it worksgrim trigger나 tit-for-tat 같은 유발전략은 바로 이 비교를 실행 가능한 규칙으로 만든 것이고, 협력 유지 조건은 '이탈 이득 ≤ 할인된 미래 처벌 손실'이라는 부등식으로 정리된다. 폴크정리는 할인인자가 1에 가까워질 때 개인 합리성을 만족하는 사실상 모든 보수 조합이 균형으로 지지될 수 있음을 말해 준다(증명은 다루지 않는다).

    Why검증자, 오라클 제공자, 마켓메이커처럼 계속 참여하는 주체의 정직함은 처벌 가능성과 미래 수익의 크기로 설계되는 것이지 선의로 기대할 수 있는 게 아니다. 관계가 일회성이 되는 순간 그 균형은 사라진다.

Math · 9월 — 선형대수 (Day 18–26)

  • 18Math벡터·행렬·행렬곱·역행렬

    벡터는 좌표로 표현된 원소이고 행렬은 선형변환을 기저에 대해 좌표로 적은 것이다. 행렬곱은 변환의 합성이므로 결합법칙은 성립하지만 교환법칙은 일반적으로 성립하지 않으며, (m×n)과 (n×p)처럼 안쪽 차원이 맞아야 정의되고 순진한 계산 비용은 O(mnp)다.

    How it works역행렬은 정사각행렬이 가역일 때만 존재하고, 이는 행렬식이 0이 아니라는 것, 즉 열벡터들이 선형독립이라는 것과 동치다. 선형계 Ax=b를 풀 때 실제 수치계산에서는 역행렬을 명시적으로 구하기보다 LU 분해 같은 방법으로 바로 푸는 편이 빠르고 안정적이다.

    Why선형대수 표기를 못 읽으면 최적화·통계·암호학 문서를 통째로 못 읽고, 역행렬을 남용하면 수치적으로 불안정한 결과를 그대로 신뢰하게 된다.

  • 19Math내적·노름·코사인 유사도

    두 벡터의 내적은 대응 성분의 곱의 합으로 정의되며, 기하적으로는 두 벡터 크기의 곱에 사잇각의 코사인을 곱한 값과 같다. 노름은 벡터의 크기를 재는 함수로, L2 노름은 자기 자신과의 내적의 제곱근이고 L1은 성분 절댓값의 합, L∞는 최대 절댓값이다.

    How it works코시-슈바르츠 부등식은 내적의 절댓값이 두 노름의 곱을 넘지 못한다고 말하며, 이 덕분에 내적을 두 노름으로 나눈 값이 항상 -1과 1 사이에 있어 코사인 유사도가 잘 정의된다. 코사인 유사도는 벡터의 크기를 무시하고 방향만 비교하므로, 문서 길이나 스케일 차이를 배제하고 싶을 때 유클리드 거리 대신 쓴다.

    Why임베딩 검색, 유사도 랭킹, 정규화 여부에 따른 결과 차이 같은 실무 문제는 결국 '어떤 노름으로 재고 크기를 정규화했는가'로 갈린다.

  • 20Math유한체 GF(p) 위 선형대수 (12월 다리, 스레드 A)

    GF(p)는 소수 p에 대한 modulo p 잉여류 집합이 이루는 유한체이며, 0이 아닌 모든 원소가 곱셈에 대한 역원을 가진다. 이 체 위의 선형대수는 벡터공간, 랭크, 행렬식, 역행렬 같은 개념이 실수 위에서와 동일하게 정의되고 가우스 소거법도 그대로 작동하되, 나눗셈이 모듈러 곱셈 역원으로 대체된다.

    How it works실수 계산과 결정적으로 다른 점은 크기 비교나 반올림 오차 개념이 없어서, 수치적 안정성을 위한 부분 피벗팅이 필요 없고 0이 아닌 아무 원소나 피벗으로 삼아도 된다는 것이다. 또 모든 연산이 정확하기 때문에 랭크와 해집합이 오차 없이 결정되며, 특성이 p라는 사실 때문에 p번 더하면 0이 되는 등 실수에서는 없는 현상이 나타난다.

    Why비밀 분산, 소거 부호, 그리고 대부분의 ZK 증명계가 유한체 위의 다항식과 선형대수로 서술되므로, 이 계산 감각이 없으면 라이브러리를 블랙박스로만 쓰게 된다.

  • 21Math리스크·포트폴리오 행렬(공분산·상관)

    여러 자산의 수익률을 벡터로 볼 때, 공분산 행렬은 각 쌍의 동조 정도를 모아 놓은 대칭 양의 준정부호 행렬이다. 상관계수 행렬은 각 성분을 표준편차로 나눠 정규화한 것으로, 스케일을 제거해 -1에서 1 사이 값으로 비교 가능하게 만든다.

    How it works포트폴리오 비중 벡터 w에 대해 분산은 w에 공분산 행렬을 양쪽에서 곱한 이차형식으로 계산되며, 상관이 낮거나 음수인 자산을 섞을수록 이 값이 개별 분산의 가중합보다 작아진다. 이것이 분산투자 효과의 수학적 정체이다.

    Why여러 포지션을 동시에 들고 있을 때 진짜 위험은 각 포지션의 변동성이 아니라 그들이 함께 움직이는 정도에서 나온다.

  • 22Math고유값/고유벡터

    정방행렬 A에 대해 Av = λv를 만족하는 영이 아닌 벡터 v를 고유벡터, 스칼라 λ를 고유값이라 하며, 이는 그 선형변환이 해당 방향으로는 방향을 바꾸지 않고 크기만 λ배로 늘리거나 줄인다는 뜻이다. 고유값은 특성방정식 det(A - λI) = 0의 근으로 구하고, 고유벡터가 공간의 기저를 이루면 A는 대각화되어 A = PDP^(-1) 꼴이 되며 이때 A의 거듭제곱 계산이 대각 원소의 거듭제곱으로 단순해진다.

    How it works실대칭행렬은 항상 실수 고유값과 서로 직교하는 고유벡터 기저를 가지며(스펙트럼 정리), 공분산행렬처럼 실무에서 자주 다루는 행렬이 여기에 속한다. 고유값의 절댓값은 변환을 반복 적용할 때의 성장과 감쇠를 지배하므로, 스펙트럼 반지름이 1보다 작은지가 반복 과정의 수렴 여부를 결정한다.

    Why마르코프 체인의 정상분포, PCA에 의한 차원 축소, 반복 수치해법의 수렴 조건, 그래프의 구조 분석이 모두 고유값 문제로 환원된다.

  • 23MathPCA·SVD

    SVD는 임의의 실수 행렬 A를 A = UΣVᵀ로 분해하는 것으로, U와 V는 직교행렬이고 Σ는 음이 아닌 특이값을 큰 순서로 담은 대각행렬이다. 기하학적으로는 어떤 선형 변환도 '회전(또는 반사) → 축별 스케일링 → 회전'의 합성으로 볼 수 있다는 뜻이며, 특이값의 크기는 각 방향이 얼마나 늘어나는지를, 0에 가까운 특이값의 개수는 행렬이 얼마나 계수 부족(rank deficient)인지를 말해 준다.

    How it works상위 k개의 특이값만 남긴 절단 SVD는 프로베니우스 노름 기준에서 최적의 계수 k 근사라는 성질(Eckart–Young)을 가지며, 이것이 차원 축소와 잡음 제거의 이론적 근거다. PCA는 데이터를 열 평균으로 중심화한 뒤 공분산 행렬의 고유벡터를 찾는 절차인데, 중심화된 데이터 행렬의 SVD에서 V의 열이 바로 그 주성분이고 특이값의 제곱이 각 성분이 설명하는 분산에 비례한다.

    Why고차원 지표를 압축하거나 상관된 신호에서 주요 변동 축을 뽑는 일은 이상 탐지·리스크 분해·특징 추출에서 반복적으로 등장하고, 조건수와 계수 부족을 읽는 것도 수치적 불안정성을 진단하는 기본 도구다.

  • 24Math수치선형대수(조건수)

    조건수는 입력의 상대 오차가 출력의 상대 오차로 얼마나 증폭되는지를 나타내는 양이며, 선형계 Ax = b에서는 κ(A) = ||A|| · ||A⁻¹||로 정의된다. 2-노름에서는 이 값이 최대 특이값과 최소 특이값의 비 σ_max/σ_min와 같고, 따라서 A가 특이행렬에 가까울수록 조건수가 커진다.

    How it works해의 상대 오차는 대략 조건수 곱하기 입력의 상대 오차로 상계되므로, 조건수가 10^k 규모면 유효 자릿수를 약 k자리 잃는다고 볼 수 있다. 중요한 구분은 조건수가 문제 자체의 성질이라는 점이며, 알고리즘의 성질인 수치 안정성과는 별개다.

    Why회귀나 최적화에서 결과가 데이터의 미세한 변화에 요동친다면 코드 버그가 아니라 설계된 문제 자체가 ill-conditioned일 가능성이 높고, 대응 방법이 완전히 다르다.

  • 25Math행렬식과 랭크

    행렬식은 정사각행렬에 대응하는 스칼라로, 그 행렬이 나타내는 선형변환이 부피를 몇 배로 바꾸는지와 방향을 뒤집는지를 나타낸다. 행렬식이 0이라는 것은 변환이 공간을 더 낮은 차원으로 납작하게 만든다는 뜻이고, 이는 역행렬이 존재하지 않는다는 것과 동치다.

    How it works랭크는 행렬의 열들이 생성하는 공간의 차원, 즉 선형독립인 열의 최대 개수이며 행랭크와 열랭크는 언제나 같다. 랭크-널리티 정리에 따라 열이 n개인 행렬에서 랭크와 영공간의 차원을 더하면 n이 되고, 이 관계가 선형 연립방정식의 해가 유일한지 무수히 많은지를 결정한다.

    Why선형 시스템이 유일해를 갖는지, 데이터에 사실상 중복된 설명변수가 있는지, 수치 계산이 불안정해질지가 전부 랭크와 조건수로 판정되기 때문이다.

  • 26Math최소제곱법(Least Squares)

    최소제곱법은 방정식 수가 미지수 수보다 많아 정확한 해가 없는 과결정 연립방정식 Ax=b에서, 잔차의 유클리드 노름 ||Ax-b||를 최소로 만드는 x를 구하는 방법이다. 기하학적으로 이는 b를 A의 열공간 위로 정사영하는 것과 같고, 최적점에서 잔차는 열공간과 직교한다.

    How it works이 직교 조건을 쓰면 정규방정식 AᵀAx = Aᵀb가 나오며, A의 열이 일차독립이면 해는 유일하다. 다만 수치적으로 AᵀA를 직접 만드는 것은 조건수를 제곱시켜 정밀도를 잃으므로, 실무에서는 QR 분해나 SVD로 푸는 편이 안전하다.

    Why회귀·캘리브레이션·센서 보정 등 데이터를 모델에 맞추는 거의 모든 작업이 최소제곱이며, 정규방정식을 무심코 쓰다 조건수 문제로 계수가 요동치는 사고가 흔하다. 잔차가 왜 직교해야 하는지를 알면 결과 진단도 쉬워진다.

Math · 10월 — 미적분·최적화 (Day 27–34)

  • 27Math미분·기울기·연쇄법칙

    미분은 한 점 근방에서 함수를 가장 잘 근사하는 선형 함수의 계수이며, 그래서 미분값은 '입력이 조금 변할 때 출력이 몇 배로 변하는가'를 뜻한다. 다변수 함수에서는 각 변수에 대한 편미분을 모은 벡터가 기울기(gradient)이고, 이 벡터는 그 점에서 함수값이 가장 빠르게 증가하는 방향을 가리키며 크기는 그 증가율이다.

    How it works연쇄법칙은 합성함수의 미분이 각 단계 미분의 곱이라는 규칙이고, 다변수에서는 야코비 행렬의 곱으로 일반화된다. 역전파는 이 야코비 곱을 출력 쪽에서 입력 쪽으로 계산해 중간 결과를 재사용함으로써, 파라미터가 많을 때 기울기를 훨씬 싸게 얻는 방법이다.

    Why최적화, 곡선 적합, 파라미터 튜닝은 모두 기울기 위에서 돌아가고, 마켓메이커 곡선처럼 함수의 민감도를 따져야 하는 문제에서도 미분이 그대로 언어가 된다. 연쇄법칙을 모르면 합성된 시스템의 민감도를 계산할 수 없다.

  • 28Math편미분/그래디언트

    편미분은 다변수 함수에서 한 변수만 변화시키고 나머지를 고정한 채 구한 미분이다. 그래디언트는 편미분들을 모은 벡터로, 그 점에서 함수가 가장 가파르게 증가하는 방향을 가리키고 크기는 그 방향의 증가율이다.

    How it works미분 가능한 점에서 그래디언트는 그 점을 지나는 등위면에 수직이다. 최적화의 기본은 그래디언트 반대 방향으로 조금씩 이동하는 경사하강이며, 제약 없는 매끄러운 함수의 국소 최적점에서는 그래디언트가 0이 된다.

    Why파라미터 캘리브레이션·비용 최소화·모델 학습이 전부 그래디언트 기반이라, 수식에서 민감도를 읽지 못하면 왜 발산하거나 수렴이 멈추는지 진단할 수 없다.

  • 29MathGradient Descent / Convex 직관

    경사하강법은 목적함수의 기울기가 가장 가파른 상승 방향임을 이용해, 그 반대 방향으로 학습률만큼 이동하기를 반복하는 최적화 방법이다. 볼록함수는 정의역의 두 점을 잇는 선분이 항상 함수 그래프 위에 있는 함수이며, 이 성질 덕분에 국소 최소점이 곧 전역 최소점이고 기울기가 0인 점이 최적해가 된다.

    How it works기울기가 L-립시츠 연속인 매끄러운 볼록함수에서는 학습률을 1/L 이하로 잡으면 수렴이 보장되고, 강볼록성까지 있으면 오차가 기하급수적으로 줄어드는 더 빠른 속도를 얻는다. 학습률이 너무 크면 발산하고 너무 작으면 느리며, 조건수가 나쁘면 좁고 긴 골짜기에서 지그재그로 진동한다.

    Why머신러닝뿐 아니라 시장조성 파라미터 튜닝이나 캘리브레이션 같은 수치 최적화에서, 수렴하지 않는 원인이 문제의 비볼록성인지 학습률·조건수 문제인지 구분해야 한다.

  • 30Math라그랑주/KKT(개념)

    제약이 있는 최적화에서 라그랑주 승수법은 등식 제약을 목적함수에 승수를 곱해 더한 라그랑지안을 만들고, 그 정상점을 찾는 방법이다. 기하적으로는 최적점에서 목적함수의 기울기가 제약면의 기울기들이 만드는 공간 안에 놓여야 한다는 조건, 즉 제약을 따라 움직여서는 더 이상 개선할 방향이 없다는 조건을 표현한다.

    How it works부등식 제약까지 포함하도록 확장한 것이 KKT 조건이며, 라그랑지안의 정상성, 원 문제의 실현가능성, 부등식 승수의 비음수성, 그리고 상보 여유성으로 구성된다. 상보 여유성은 제약이 활성이 아니면 그 승수가 0이어야 한다는 조건으로, 느슨한 제약은 최적해에 영향을 주지 않는다는 직관을 형식화한 것이다.

    Why리스크 한도 하의 배분, 담보 제약 하의 포지션 최적화, 자원 제약이 있는 스케줄링처럼 실무의 최적화는 거의 항상 제약이 붙은 형태이고, 승수는 제약을 한 단위 완화했을 때의 가치라는 해석까지 준다.

  • 31Math뉴턴법/고정점 반복(StableSwap 필수)

    뉴턴법은 함수 f의 근을 찾을 때 현재 점에서 접선을 그어 그 접선의 근으로 이동하는 반복법으로, x를 f(x)/f'(x)만큼 빼는 갱신을 반복한다. 근 근처에서 f'가 0이 아니고 초기값이 충분히 가까우면 오차가 매 단계 제곱으로 줄어드는 이차 수렴을 보인다.

    How it works고정점 반복은 방정식을 x = g(x) 꼴로 바꿔 반복하는 더 일반적인 형태이며, g가 축약사상이면 수렴하고 그 속도는 보통 일차이다. 뉴턴법은 빠르지만 초기값이 나쁘거나 도함수가 작으면 발산하거나 진동할 수 있어, 반복 횟수 상한과 구간 안전장치가 필요하다.

    Why닫힌 해가 없는 불변식(StableSwap의 D나 y 같은)은 반복법으로 풀 수밖에 없고, 온체인에서는 그 반복 하나하나가 가스이자 실패 가능 지점이다.

  • 32Math고정소수점 산술(Q64.96)

    n 표기는 정수부 m비트와 소수부 n비트를 뜻하며 실제 값은 저장된 정수를 2의 n제곱으로 나눈 값이다. 96은 소수부를 96비트로 두는 형식으로 160비트 안에 담기며, Uniswap v3가 가격의 제곱근을 이 형식으로 저장하는 것으로 잘 알려져 있다.

    How it works덧셈과 뺄셈은 정수 연산 그대로지만, 곱셈은 결과의 소수부가 2n비트가 되므로 다시 2의 n제곱으로 나눠 스케일을 되돌려야 하고 나눗셈은 반대로 먼저 곱해야 해서, 중간값 오버플로가 가장 큰 위험 요소가 된다. 그래서 512비트 중간 결과를 다루는 mulDiv 계열 구현이 필요하며, 나눗셈에서 하위 비트가 버려지는 절단 오차는 불가피하므로 반올림 방향을 프로토콜에 불리하지 않은 쪽으로 일관되게 정하는 것이 표준 관행이다.

    WhyEVM에는 부동소수점이 없어 모든 가격·이자·수수료 계산이 고정소수점으로 이루어지고, 곱셈과 나눗셈의 순서 하나가 오버플로나 사용자에게 유리한 반올림 취약점으로 이어진다.

  • 33Math테일러 급수(1차 근사)

    테일러 급수는 충분히 매끄러운 함수를 한 점 a 근방에서 그 점에서의 도함수 값들로 만든 다항식으로 근사하는 도구다. 1차 근사는 f(x) ≈ f(a) + f'(a)(x-a)로, 곡선을 접선으로 바꾸는 것이며 오차는 2차 항이 지배하므로 x가 a에 가까울수록 (x-a)²에 비례해 줄어든다.

    How it works다변수에서는 f(x) ≈ f(a) + ∇f(a)ᵀ(x-a)가 되어 기울기 벡터가 국소 선형 모델이 되고, 이것이 경사하강법과 뉴턴법 같은 최적화·수치해석 기법이 서 있는 토대다. 자주 쓰는 근사인 (1+x)^n ≈ 1 + nx, e^x ≈ 1 + x, ln(1+x) ≈ x도 모두 a=0에서의 1차 테일러 전개이며, |x|가 작을 때만 유효하다는 조건이 함께 따라온다.

    Why가격 곡선의 국소 민감도(슬리피지, 델타)나 수수료 변화의 영향을 빠르게 추정할 때 선형화가 기본 도구이고, 어디까지가 유효 범위인지 아는 것이 그 추정을 안전하게 만든다.

  • 34Math볼록집합/볼록함수 판별

    집합 C가 볼록하다는 것은 C의 임의의 두 점을 잇는 선분이 통째로 C 안에 있다는 뜻이고, 함수 f가 볼록하다는 것은 정의역이 볼록이고 임의의 두 점과 0과 1 사이의 계수에 대해 f(θx + (1−θ)y) ≤ θf(x) + (1−θ)f(y)가 성립한다는 뜻이다. 동치 조건으로 f의 에피그래프가 볼록집합이라는 기하적 특징이 있고, 미분 가능하면 1차 조건(어느 점의 접평면이 함수의 전역 하계)으로, 두 번 미분 가능하면 Hessian이 준정부호(PSD)라는 2차 조건으로 판별한다.

    How it works볼록성은 연산에서 보존되며, 비음수 가중합, 아핀 사상과의 합성, 점별 상한(supremum), 볼록·비감소 함수와의 합성 등이 대표적인 보존 규칙이다. 볼록 문제에서는 국소 최소가 곧 전역 최소이고 강한 쌍대성이 성립하는 조건이 잘 알려져 있어, 문제를 볼록으로 만들 수 있느냐가 최적화 실무의 핵심 갈림길이 된다.

    Why"볼록이냐"에 따라 전역 최적을 보장받는 solver를 쓸지, 초기값에 의존하는 휴리스틱을 쓸지가 갈리므로 모델링 단계에서 판별할 수 있어야 한다.

Math · 11월 — 확률·통계·금융수학 (Day 35–43)

  • 35Math조건부확률·베이즈·기대값·정규분포

    조건부확률 P(A|B)는 B가 일어났다는 정보 아래에서 A가 일어날 확률이며 P(A와 B가 함께)를 P(B)로 나눈 값으로 정의된다. 베이즈 정리는 P(A|B) = P(B|A)P(A)/P(B)로, 사전확률을 새 증거의 우도로 갱신해 사후확률을 얻는 절차를 준다.

    How it works기대값은 확률로 가중한 평균이고 선형성 덕분에 독립이 아니어도 합의 기대값은 기대값의 합이지만, 분산은 상관이 없을 때만 단순히 더해진다. 정규분포는 평균과 분산으로 결정되는 분포이며, 독립이고 분산이 유한한 확률변수를 많이 더하면 그 합의 분포가 정규분포에 가까워진다는 중심극한정리 때문에 기본 모형으로 쓰인다.

    Why기저율이 낮으면 정확도 높은 탐지기라도 양성 판정 대부분이 거짓이라는 베이즈적 결론이 실무 판단을 뒤집고, 예측시장 가격 자체가 사후확률로 읽히기 때문이다.

  • 36Math로그수익률·변동성(σ)

    로그수익률은 연속된 가격의 비를 자연로그로 취한 값 ln(P_t/P_{t-1})로 정의된다. 단순수익률과 달리 기간을 이어 붙일 때 단순 덧셈이 되어 다기간 집계가 쉽고, 상승과 하락이 대칭적으로 표현되며 값이 작을 때는 단순수익률과 거의 같다.

    How it works변동성 σ는 이 수익률의 표준편차이며, 수익률이 독립동일분포라는 가정 아래에서는 기간 길이의 제곱근에 비례해 커지므로 짧은 주기 변동성에 기간 수의 제곱근을 곱해 환산한다. 실제 금융 시계열은 이 가정을 잘 만족하지 않아 두꺼운 꼬리와 변동성 군집이 나타나고, 그래서 과거 데이터로 계산한 실현 변동성과 옵션 가격에서 역산한 내재 변동성이 서로 다르다.

    Why리스크 한도, 마진, 가격 모델이 모두 변동성 수치 위에 서 있는데 제곱근 스케일링을 기계적으로 적용하면 꼬리 위험을 체계적으로 과소평가한다. 어떤 가정에서 나온 숫자인지 아는 것이 핵심이다.

  • 37Math집중부등식(Chebyshev·Hoeffding, 12월 다리)

    집중부등식은 확률변수가 기댓값 근처에 얼마나 몰려 있는지를 보장하는 부등식들의 총칭이다. Markov 부등식은 음이 아닌 변수에 대해 평균만으로 꼬리를 제한하는 가장 약한 형태이고, Chebyshev 부등식은 여기에 분산 정보를 더해 기댓값에서 표준편차의 k배 이상 벗어날 확률이 1/k² 이하임을 보장한다.

    How it worksHoeffding 부등식은 서로 독립이고 각각 유한한 구간 안에 갇힌 변수들의 평균에 대해, 벗어남 확률이 표본 수와 벗어남 폭에 대해 지수적으로 감소함을 보장한다. 이 계열의 일관된 원리는 가정을 더 강하게 둘수록(비음수 → 분산 유한 → 유계·독립) 꼬리 경계가 더 날카로워진다는 것이다.

    Why샘플링 기반 추정, A/B 판단, 랜덤 알고리즘의 실패 확률 산정에서 필요한 표본 수를 근거 있게 정하려면 이 부등식이 있어야 한다. 감으로 정한 표본 수는 대개 과소하거나 과대하다.

  • 38Math랜덤워크/GBM(개념)

    랜덤워크는 독립적인 증분을 계속 더해가는 확률과정으로, 대칭 단순 랜덤워크에서는 분산이 시간에 비례해 커지므로 전형적인 이동 거리는 시간의 제곱근 규모다. 이를 연속시간으로 극한을 취한 것이 브라운 운동이며, 증분이 서로 독립이고 정규분포를 따른다.

    How it works기하 브라운 운동은 값의 로그가 브라운 운동을 따르도록 만든 모형으로, 값이 음수가 되지 않고 수익률이 로그정규분포를 갖기 때문에 자산가격 모형으로 널리 쓰인다. 다만 실제 시장은 두꺼운 꼬리와 변동성 군집을 보여 GBM은 어디까지나 1차 근사다.

    Why가격·잔고·큐 길이처럼 누적되는 확률 과정의 변동 폭을 제곱근 스케일로 어림할 수 있어야 리스크 한도나 타임아웃을 근거 있게 정할 수 있다.

  • 39Math랜덤워크·열확산 방정식

    1900년 루이 바슐리에는 주가를 무작위 보행으로 취급해 옵션 가격을 설명했는데, 그 방정식은 5년 뒤 아인슈타인이 브라운 운동을 설명한 방정식과 수학적으로 동일하다. 무작위 보행의 확률밀도가 시간에 따라 퍼지는 과정을 극한으로 보내면 조제프 푸리에의 열확산 방정식 ∂p/∂t = D·∂²p/∂x² 이 그대로 나온다.

    How it works1973년 블랙-숄즈-머튼은 기초자산이 기하 브라운 운동을 따른다는 가정으로 옵션 가격이 만족하는 편미분방정식을 유도했는데, 변수를 로그가격·시간반전으로 바꾸면 이 식이 정확히 같은 열확산 방정식 모양이 된다. 오늘날 이미지 생성 AI의 디퓨전 모델은 원본 이미지에 가우시안 잡음을 무작위 보행처럼 더했다가, 신경망이 근사한 역방향 확산 과정으로 노이즈에서 이미지를 만들어낸다 — 같은 방정식이 120여 년 뒤 픽셀에 적용된 것이다.

    Why무작위 보행·열확산·옵션가격·디퓨전모델이 표면적으로 무관해 보여도 전부 같은 편미분방정식의 다른 경계조건일 뿐이라는 걸 알면, 새로운 확률적 현상을 만났을 때 이미 아는 도구로 접근할 수 있기 때문이다.

  • 40MathVaR·꼬리리스크

    VaR는 주어진 기간과 신뢰수준에서 손실이 넘지 않을 것으로 보는 임계값으로, 손실분포의 분위수로 정의된다. 정의상 VaR는 그 임계값을 넘었을 때 손실이 얼마나 커지는지는 아무것도 말해주지 않으며, 이것이 꼬리리스크를 과소평가하는 근본 한계다.

    How it works또한 VaR는 일반적으로 열등가법성(subadditivity)을 만족하지 않아 포트폴리오를 합쳤을 때 위험이 부분의 합보다 커 보이는 경우가 생기고, 이 때문에 정합적 위험척도(coherent risk measure)로 인정되지 않는다. 기대손실(Expected Shortfall, CVaR)은 VaR를 초과하는 손실의 조건부 기댓값으로 정의되어 꼬리의 크기를 반영하고 열등가법성을 만족한다.

    Why청산 임계값이나 담보 요구치를 정규분포 가정 VaR로 잡으면 평상시엔 멀쩡하다가 극단 구간에서 정확히 무너지는 설계가 된다.

  • 41MathLMSR/마켓 스코어링(Verex 연결)

    마켓 스코어링 규칙은 적정 스코어링 규칙을 자동화된 마켓 메이커로 바꾼 것으로, 참여자가 현재 분포를 자기 믿음으로 갱신하고 그 개선분만큼 보상받는 구조다. LMSR은 로그 스코어링 규칙에서 유도되며, 각 결과에 대해 지금까지 팔린 수량 벡터 q에 대한 비용함수를 로그-합-지수 형태로 정의한다.

    How it works어떤 거래의 비용은 거래 후 비용함수 값에서 거래 전 값을 뺀 차이이므로, 같은 최종 상태에 도달하는 모든 경로의 총비용이 동일한 경로 독립성이 성립한다. 순간 가격은 비용함수의 편미분이고 이는 수량을 유동성 파라미터로 나눈 값의 softmax 형태여서, 가격들의 합이 항상 1이 되어 확률로 해석된다.

    WhyLMSR은 상대 주문이 없어도 항상 호가를 제시하므로 초기 유동성 부트스트래핑에 쓰이고, 유동성 파라미터 선택이 곧 슬리피지와 운영 손실 예산 사이의 직접적인 교환이 된다.

  • 42Math마르코프 체인(개념)

    마르코프 체인은 다음 상태의 확률분포가 현재 상태에만 의존하고 그 이전 경로에는 의존하지 않는 확률 과정이다. 유한 상태에서는 전이확률 행렬 P로 전부 기술되고, n단계 후 분포는 초기 분포에 P의 n제곱을 곱한 것이 된다.

    How it works정상분포는 자기 자신을 다시 만들어 내는 분포로, 체인이 기약(irreducible)이고 비주기적(aperiodic)이면 정상분포가 유일하고 초기 상태와 무관하게 그 분포로 수렴한다. 수렴 속도는 P의 두 번째로 큰 고유값 크기와 관련되며, 이것이 혼합 시간의 개념이다.

    Why대기열 길이, 재시도 상태, 노드 동기화 단계처럼 "현재 상태에서 다음이 결정되는" 시스템의 장기 거동을 시뮬레이션 없이 계산할 수 있게 해 준다.

  • 43Math상관관계와 공적분(가볍게)

    상관계수는 두 변수의 선형 동조 정도를 -1과 1 사이로 표준화한 값이며, 인과를 뜻하지 않고 비선형 관계도 제대로 잡지 못한다. 시계열에서는 두 계열이 각각 추세를 가질 경우 실제 관계가 없어도 상관과 회귀 계수가 크게 나오는 허위 회귀 문제가 생기므로, 수준(level)끼리의 상관은 그대로 믿기 어렵다.

    How it works공적분은 각 계열은 비정상(단위근을 가짐)이지만 둘의 어떤 선형결합은 정상이 되어 평균으로 회귀하는 관계를 말하며, 이는 두 계열 사이에 장기 균형이 존재한다는 진술이다. 실무 절차는 각 계열의 단위근을 검정하고, 공적분 관계를 추정한 뒤 그 잔차가 정상인지 검정하는 순서이며, 공적분이 성립하면 오차수정모형으로 단기 이탈이 균형으로 되돌아가는 속도를 모델링한다.

    Why페어 트레이딩, 헤지 비율 산정, 스테이블코인이나 LST의 페그 이탈 분석은 모두 두 계열의 수준이 장기적으로 붙어 있는지를 묻는 질문이라 상관이 아니라 공적분의 영역이다.

Math · 12월 — 암호학·정보이론 (Day 44–52)

  • 44Math정수론·모듈러 산술

    모듈러 산술은 정수를 법 n으로 나눈 나머지로 동일시하는 체계로, 덧셈·뺄셈·곱셈은 나머지 연산과 잘 호환되지만 나눗셈은 역원이 존재할 때만 정의된다. a가 법 n에서 곱셈 역원을 가질 필요충분조건은 gcd(a, n) = 1이며, 그 역원은 확장 유클리드 알고리즘으로 ax + ny = 1을 풀어 얻는다.

    How it worksn이 소수 p이면 0이 아닌 모든 원소가 역원을 가져 유한체가 되고, 페르마의 소정리에 의해 a^(p-1) ≡ 1 (mod p)이므로 역원을 a^(p-2)로도 구할 수 있다. 오일러 정리는 이를 일반화해 gcd(a, n) = 1일 때 a^φ(n) ≡ 1 (mod n)을 주며, 이것이 RSA류 시스템에서 지수를 다루는 근거다.

    Why타원곡선 연산, 해시-투-필드, ZK 회로의 산술이 전부 유한체 위에서 돌아가므로, 모듈러 역원과 오버플로 처리를 이해하지 못하면 암호 코드의 정확성도 성능도 판단할 수 없다.

  • 45Math군론 기초(순환군·이산로그)

    군은 결합법칙, 항등원, 역원을 갖춘 이항 연산이 있는 집합이고, 하나의 원소 g의 거듭제곱만으로 전체가 생성되면 순환군이라 하며 g를 생성원이라 부른다. 유한군에서 원소의 위수는 그 원소가 만드는 순환 부분군의 크기이고, Lagrange 정리에 의해 부분군의 크기는 항상 전체 군의 크기를 나눈다.

    How it works이산로그 문제는 순환군에서 g와 h = g^x가 주어졌을 때 지수 x를 찾는 문제로, 지수 계산은 반복 제곱으로 빠른 반면 역방향은 적절히 고른 군에서 어렵다고 믿어지는 비대칭성이 공개키 암호의 토대다. 다만 어려움은 군의 선택에 달려 있어, 곱셈군의 크기가 작은 소인수만으로 분해되면 Pohlig-Hellman으로 문제가 잘게 쪼개지므로 군의 위수가 큰 소수여야 한다.

    Why서명이나 커밋먼트를 다룰 때 스칼라를 군의 위수로 모듈러 연산해야 하는데, 이 구조를 모르면 위수 초과 스칼라나 소부분군(small subgroup) 점을 검사 없이 받아들이는 취약점을 만든다.

  • 46MathECC·디지털 서명

    타원곡선 암호는 유한체 위에 정의된 타원곡선 점들이 이루는 덧셈군을 사용하며, 안전성은 점 P와 kP를 알아도 k를 구하기 어렵다는 이산로그 문제에 기반한다. 같은 안전 수준에서 RSA보다 키와 서명이 훨씬 짧고 연산이 빨라 실무에서 널리 쓰인다.

    How it works디지털 서명은 개인키로 생성하고 공개키로 검증하는 값으로, 위조 불가능성과 함께 제3자가 서명자와 메시지를 확인할 수 있게 해 준다. ECDSA는 서명마다 비밀 난수를 필요로 하는데 이 값이 재사용되거나 편향되면 서명 두 개만으로 개인키가 복원되므로, 메시지와 키에서 결정론적으로 유도하는 방식이 권장된다.

    Why지갑, 인증 토큰, 트랜잭션 승인까지 전부 여기에 걸려 있고 난수 재사용, 서명 연성, 서명 대상 미고정 같은 실수는 곧바로 자금 탈취로 이어지기 때문이다.

  • 47Math라그랑주 보간 + Reed-Solomon (스레드 A 수확)

    서로 다른 k개의 점이 주어지면 차수가 k-1 이하인 다항식이 유일하게 결정되고, 라그랑주 보간은 각 점에서만 1이고 나머지 점에서 0이 되는 기저 다항식을 조합해 그 다항식을 명시적으로 구성한다. Reed-Solomon 부호는 이 사실을 그대로 부호화에 쓴다.

    How it worksk개의 데이터 심볼을 다항식의 계수로 보고 서로 다른 n개의 점에서 평가한 값을 코드워드로 삼으면, n개 중 임의의 k개만 살아남아도 보간으로 원래 다항식을 복원할 수 있다. 그래서 이 부호는 최소 거리가 n-k+1인 MDS 부호가 되어 최대 n-k개의 소실을 복구하고, 위치를 모르는 오류는 그 절반까지 정정한다.

    Why복제 대신 소실 부호를 쓰면 같은 내구성을 훨씬 적은 저장 비용으로 얻을 수 있어 스토리지·전송 설계의 기본 도구다. 또 임계 서명과 데이터 가용성 설계가 모두 이 다항식 논리 위에 서 있다.

  • 48Math페어링/KZG(개념)

    페어링은 두 타원곡선 군의 원소를 받아 세 번째 군의 원소를 내놓는 쌍선형 사상으로, 지수(스칼라)가 곱해지는 관계를 군 원소만 보고 확인할 수 있게 해 준다. 이 성질 덕분에 숨겨진 값들 사이의 곱셈 관계를 검증할 수 있고, BLS 서명이나 여러 증명 시스템의 검증식이 여기에 기반한다.

    How it worksKZG 커밋먼트는 다항식 하나를 상수 크기의 군 원소 하나로 커밋하고, 임의의 점 z에서 f(z)=y라는 사실을 역시 상수 크기의 증명으로 열 수 있게 한다. 원리는 f(X)−y가 (X−z)로 나누어떨어진다는 사실이며, 그 몫 다항식에 대한 커밋먼트를 증명으로 제출하면 검증자가 페어링 한 번으로 나눗셈 관계를 확인한다.

    Why블롭 데이터 커밋먼트, 롤업 증명, 서명 집계 등 최근 이더리움 인프라의 상당 부분이 페어링과 다항식 커밋먼트 위에 서 있어서, 개념 없이는 설계 문서를 읽을 수 없다. 신뢰 설정 가정은 시스템의 실제 신뢰 경계이기도 하다.

  • 49Math엔트로피·정보·코딩

    한 사건의 정보량은 그 확률의 역수에 로그를 취한 값으로 정의되고, 엔트로피는 그 기대값이라 분포의 평균 불확실성을 나타낸다. 로그의 밑이 2이면 단위는 비트이고, 원소 수가 정해졌을 때 균등분포에서 엔트로피가 최대가 된다.

    How it works소스 코딩 정리에 따르면 무손실 부호의 평균 길이는 엔트로피보다 짧아질 수 없고, 허프만이나 산술부호화로 그 한계에 임의로 가깝게 접근할 수 있다. 상대 엔트로피(KL 발산)는 틀린 분포를 가정하고 부호화했을 때 치르는 추가 비용이고, 상호정보량은 한 변수를 알았을 때 줄어드는 다른 변수의 불확실성이다.

    Why압축의 이론적 한계, 시드·패스워드의 실제 엔트로피, 로그나 특징의 정보량 판단이 모두 여기 걸려 있어서, 엔트로피를 과대평가하면 안전하다고 착각한 난수를 쓰게 된다.

  • 50Math해시함수 설계 원리(스펀지·머클-담고르)

    암호학적 해시함수는 임의 길이 입력을 고정 길이 출력으로 보내면서 원상 저항성, 제2원상 저항성, 충돌 저항성을 목표로 한다. 생일 문제 때문에 n비트 출력의 충돌 저항성은 대략 2의 n/2제곱 수준이 상한이므로 출력 길이 선택이 곧 보안 수준이 된다.

    How it works머클-담고르 구조는 입력을 블록으로 나눠 압축함수를 반복 적용하고 마지막에 길이를 포함한 패딩을 붙이는 방식으로, 압축함수가 충돌 저항적이면 전체도 충돌 저항적임을 증명할 수 있지만 내부 상태가 곧 출력이라 길이 확장 공격에 취약하다. 스펀지 구조는 내부 상태를 외부에 드러나는 rate 부분과 절대 드러나지 않는 capacity 부분으로 나누고, 입력을 흡수(absorb)한 뒤 필요한 만큼 출력을 짜내는(squeeze) 방식이라 임의 길이 출력을 지원하고 길이 확장 공격이 성립하지 않는다.

    Why길이 확장 공격 가능 여부를 모른 채 해시를 인증에 쓰면 MAC 구성이 깨지고, 출력 길이를 잘못 고르면 충돌 기반 공격에 문이 열린다.

  • 51Math영지식 증명의 3성질(완전성·건전성·영지식)

    대화형 증명 시스템은 증명자가 검증자에게 어떤 진술이 참임을 납득시키는 절차이며, 영지식 증명은 여기에 세 가지 성질을 요구한다. 완전성은 진술이 참이고 양쪽이 정직하게 프로토콜을 따르면 검증자가 압도적인 확률로 수락한다는 성질이다.

    How it works건전성은 진술이 거짓이면 어떤 증명자도 무시할 만한 확률로만 검증자를 속일 수 있다는 성질이며, 이 보장이 모든 증명자에 대해 성립하면 증명, 계산 능력이 제한된 증명자에 대해서만 성립하면 논증이라 부른다. 영지식성은 검증자가 얻는 것이 진술이 참이라는 사실뿐임을 뜻하며, 증인을 모르는 시뮬레이터가 실제 대화 기록과 구별할 수 없는 것을 만들어 낼 수 있다는 형태로 형식화된다.

    Why실무에서 무너지는 지점은 대개 세 성질 자체가 아니라 그것이 성립하는 전제인데, 신뢰 설정의 무결성이나 대화형 프로토콜을 비대화형으로 바꿀 때의 가정이 여기에 해당한다.

  • 52Math신뢰된 셋업 vs 투명성(STARK vs SNARK)

    많은 SNARK는 증명 시스템을 쓰기 전에 공개 파라미터를 생성하는 신뢰된 셋업을 요구하고, 이때 쓰인 비밀값(흔히 toxic waste라 부른다)이 폐기되지 않으면 거짓 증명을 만들 수 있다. 그래서 다자간 의식(MPC ceremony)으로 참가자 중 한 명만 정직하면 안전하도록 만들고, KZG 기반의 universal·updatable 셋업처럼 회로마다 다시 하지 않아도 되는 형태가 선호된다.

    How it worksSTARK는 해시 함수와 오류정정부호에만 의존하는 구성이라 비밀 파라미터가 없고, 따라서 투명(transparent)하며 셋업 신뢰 가정이 사라진다. 대가는 증명 크기와 검증 비용으로, 일반적으로 STARK 증명이 페어링 기반 SNARK보다 크다.

    Why증명 시스템 선택은 성능 문제이기 이전에 신뢰 가정 문제이고, 셋업이 오염되면 그 위의 모든 검증이 무의미해진다.

Algorithms · A. 고급 알고리즘·자료구조 (Day 1–19)

  • 53Algorithms분할상환분석 심화

    분할상환분석은 연산 하나하나의 최악 비용이 아니라 n번 연산의 총비용을 보는 분석이다. 포텐셜 함수법은 자료구조의 상태를 실수 하나 Φ로 요약하고, 각 연산의 분할상환 비용을 실제 비용에 포텐셜 변화량을 더한 값으로 정의한다.

    How it works이 정의 덕분에 n번 연산의 총 분할상환 비용을 더하면 중간 항이 전부 telescoping으로 소거되어, Φ가 0 이상이고 초기값이 0이면 분할상환 비용의 합이 실제 비용의 합의 상한이 된다. 동적 배열이 가득 찰 때마다 2배로 늘리는 doubling 전략에 Φ = 2·num − size를 잡으면, 복사가 일어나는 비싼 삽입도 매번 상수 시간 3으로 상각된다.

    Why"평균적으로 O(1)"이라는 말이 운이 아니라 수학적으로 보장된다는 걸 증명해야, 시스템이 가끔 비싼 연산을 감당할 수 있는지 설계 단계에서 판단할 수 있기 때문이다.

  • 54Algorithms균형 트리 계열 비교

    Red-Black 트리·B+Tree·Skip List는 전부 정렬된 키를 O(log n)에 다루는 사전 자료구조지만, 실제로 갈리는 축은 복잡도가 아니라 디스크·동시성이다. 균형 트리에서 정말 비싼 연산은 탐색이 아니라 회전이고, 회전은 여러 노드를 원자적으로 바꿔야 해서 락 범위가 조상 쪽으로 넓어진다.

    How it worksSkip List는 균형을 구조적으로 유지하는 대신 삽입할 때 동전을 던져 레벨을 정해 확률로 사는데, 회전이 아예 없으므로 삽입이 지역적이라 CAS만으로 락프리 구현이 가능하다. B+Tree는 노드 하나에 페이지 크기만큼 많은 키를 담아 디스크 지역성을 얻는 대신 회전 없이 노드 분할·병합으로 균형을 유지한다.

    Why락을 어디에 얼마나 잡는가와 한 노드에 키를 몇 개 담는가가 그 자료구조가 동시 쓰기가 많은 시스템에서 쓸 수 있는지 없는지를 가르기 때문이다.

  • 55Algorithms영속(persistent) 자료구조와 구조 공유

    영속(persistent) 자료구조는 갱신 연산이 기존 버전을 파괴하지 않고 새 버전을 만들며, 이전 버전도 계속 조회 가능한 자료구조다. 핵심 기법은 구조 공유로, 변경된 경로 위의 노드만 새로 복사하고 나머지 서브트리는 이전 버전과 포인터를 그대로 공유한다.

    How it works균형 트리나 트라이 기반 구조에서는 루트부터 변경 지점까지의 경로 길이가 O(log n)이므로 갱신 한 번의 시간과 추가 메모리도 O(log n)에 머문다. 과거 버전을 읽기만 가능한 부분 영속성과 과거 버전에서 다시 갱신까지 가능한 완전 영속성을 구분하며, 함수형 언어의 불변 리스트나 HAMT(hash array mapped trie)가 대표 사례다.

    Why롤백, 스냅샷 격리, undo, 낙관적 동시성처럼 여러 버전을 동시에 살아 있게 해야 하는 시스템에서 매 갱신마다 전체 복사를 하면 O(n) 비용이 나기 때문이다.

  • 56Algorithms함수형 업데이트와 상태 diff

    함수형 업데이트는 기존 자료구조를 변형하지 않고 변경분만 반영한 새 버전을 만들어 반환하는 방식이다. 이를 값싸게 하는 핵심 기법이 path copying으로, 루트에서 수정 지점까지의 경로에 있는 노드만 복사하고 나머지 서브트리는 이전 버전과 포인터로 공유한다(structural sharing).

    How it works균형 트리나 HAMT 같은 트라이 계열에서는 경로 길이가 O(log n)이므로 한 번의 업데이트 비용도 O(log n) 노드 복사로 억제된다. 대신 진짜 비용은 점근 복잡도가 아니라 상수항에 숨어 있다.

    Why불변 상태를 쓰는 프론트엔드·상태머신 코드에서 "복사는 O(log n)이니 공짜"라고 믿다가 GC 스파이크와 캐시 미스로 처리량이 무너지는 일이 흔하다. 반대로 diff를 참조 비교로 처리할 수 있다는 점은 리렌더·변경 전파 최적화의 근거가 된다.

  • 57AlgorithmsVerkle tree

    트라이는 키를 문자 단위로 쪼개 경로로 표현하는 자료구조이고, 패트리샤 트라이는 자식이 하나뿐인 연속 구간을 하나의 간선으로 압축(path compression)해 깊이를 줄인 변형이다. 이더리움의 Merkle Patricia Trie(MPT)는 여기에 머클 해시를 얹어, 각 노드가 자식들의 해시를 담고 부모는 그 해시들을 다시 해시하는 방식으로 상태 전체를 하나의 루트 해시로 커밋한다.

    How it worksMPT의 분기 노드는 니블(4비트) 단위라 자식이 최대 16개이므로, 한 노드의 증명에는 형제 해시들이 모두 들어가고 증명 크기는 대략 (경로 깊이 × 분기 폭)에 비례해 커진다. Verkle 트라이는 해시 대신 벡터 커밋먼트(다항식 커밋먼트 계열)를 써서 한 노드의 자식 전체를 상수 크기 커밋먼트 하나로 묶고, 열람 증명도 상수 크기에 가깝게 만든다.

    Why상태 증명 크기는 라이트 클라이언트와 stateless 검증의 대역폭을 직접 결정하고, 갱신 비용은 풀노드의 블록 처리 시간을 결정한다. 어느 쪽을 깎을지 모르면 스토리지 계층 설계나 증명 기반 기능의 실현 가능성을 판단할 수 없다.

  • 58Algorithms확률적 자료구조

    확률적 자료구조는 정확한 답 대신 제한된 오차를 허용하는 대가로 메모리를 크게 줄이는 구조다. Bloom filter는 비트 배열과 k개의 해시 함수를 써서 원소 포함 여부를 판정하며, 거짓 양성은 있지만 거짓 음성은 없고 원소 삭제도 되지 않는다.

    How it worksCuckoo filter는 원소 대신 짧은 지문(fingerprint)을 두 후보 버킷 중 하나에 넣는 방식이라 삭제를 지원한다. Count-Min sketch는 여러 해시 행의 카운터 배열로 빈도를 추정하며, 충돌 때문에 과대추정은 하지만 과소추정은 하지 않는다.

    Why로그·멤풀·캐시처럼 원소가 수억 개인 곳에서 정확한 집합이나 카운터를 그대로 들고 있으면 메모리가 먼저 터진다.

  • 59Algorithms스트리밍/스케치 알고리즘

    스트리밍 알고리즘은 데이터를 한 번(또는 몇 번) 순차적으로만 훑으면서, 입력 크기보다 훨씬 작은 공간으로 근사 답을 내는 알고리즘이다. 정확한 답을 내려면 서로 다른 원소 수에 비례하는 메모리가 필요하다는 하한이 있기 때문에, 대신 오차와 실패확률을 파라미터로 받아 확률적 보장을 주는 스케치 자료구조를 쓴다.

    How it worksheavy hitters(빈도 상위 원소 찾기)는 Misra-Gries처럼 카운터를 고정 개수만 유지하며 일괄 감소시키는 방식이나, Count-Min Sketch처럼 여러 해시 함수로 2차원 카운터 배열에 더하고 최솟값을 추정치로 쓰는 방식으로 푼다. 근사 분위수는 t-digest, KLL 같은 구조가 표본을 계층적으로 압축해 원하는 분위수를 오차 범위 안에서 답한다.

    Why로그·메트릭·주문 흐름처럼 전량 저장이 불가능한 데이터에서 상위 사용자, p99 지연 같은 값을 실시간으로 알아야 할 때 정확 집계는 메모리에서 먼저 무너진다.

  • 60Algorithms순서 통계

    순서 통계란 배열을 정렬했을 때 k번째로 작은 원소를 뜻하며, 전체 정렬 없이 그 원소만 찾는 문제를 선택 문제라 한다. Quickselect는 퀵정렬의 분할을 재사용하되 피벗이 속한 한쪽 구간만 재귀하므로 기대 시간이 선형이지만, 피벗이 계속 치우치면 최악에는 제곱 시간이 된다.

    How it works중위수의 중위수는 원소를 5개씩 묶어 각 그룹의 중위수를 구하고 그 중위수들의 중위수를 피벗으로 삼아, 매 단계에서 일정 비율 이상의 원소가 확실히 제거되도록 보장한다. 이 보장 덕분에 재귀식이 선형으로 풀려 최악에도 선형 시간이 되지만 상수 계수가 커서 실무에서는 느리다.

    Whyp99 지연을 계산하거나 상위 N개를 뽑는 작업에서 전체 정렬을 돌리면 불필요한 로그 배수를 지불하게 되고, 순진한 Quickselect는 적대적 입력에서 최악 케이스로 끌려갈 수 있다.

  • 61Algorithms문자열 인덱스

    서픽스 배열은 문자열의 모든 접미사를 사전순으로 정렬한 뒤 그 시작 위치만 배열로 보관하는 인덱스이다. 정렬돼 있으므로 임의의 패턴 검색을 이분 탐색으로 처리할 수 있고, 인접한 접미사의 공통 접두사 길이를 담은 LCP 배열을 함께 두면 반복 부분문자열, 서로 다른 부분문자열 개수 같은 질의도 선형에 가깝게 풀린다.

    How it works서픽스 오토마톤(DAWG)은 같은 정보를 상태 기계로 표현한 것으로, 문자열의 모든 부분문자열을 인식하는 최소 결정적 오토마톤이며 상태 수가 입력 길이에 선형으로 유지된다. 오토마톤은 온라인으로 한 글자씩 추가하며 만들 수 있어 스트리밍에 유리하고, 서픽스 배열은 메모리가 조밀해 대용량 정적 텍스트에 유리하다.

    Why로그·트레이스처럼 텍스트는 고정돼 있는데 검색은 수없이 반복되는 상황에서, grep식 선형 스캔은 데이터가 커지는 순간 그대로 비용이 된다.

  • 62Algorithms세그먼트 트리 심화

    세그먼트 트리는 배열 구간에 대해 결합법칙이 성립하는 연산(합, 최솟값, gcd 등)을 O(log n)에 질의·갱신하는 이진 트리 구조다. Lazy propagation은 구간 전체를 갱신할 때 각 노드에 "아직 자식에게 내려보내지 않은 연산"을 보류값으로 저장하고, 그 자식을 실제로 방문하는 시점에 밀어내려 구간 갱신도 O(log n)에 처리한다.

    How it works이 기법이 성립하려면 보류 연산끼리 합성 가능해야 하고, 구간 크기에 따라 노드 값에 어떻게 반영되는지가 정의되어야 한다(예: 구간 덧셈이면 합에 delta 곱하기 구간 길이를 더한다). 영속(persistent) 세그먼트 트리는 갱신 시 루트에서 잎까지의 경로에 있는 O(log n)개 노드만 새로 만들고 나머지 서브트리는 이전 버전과 공유하는 path copying 기법으로, 모든 과거 버전을 O(log n) 추가 공간에 보존한다.

    Why롤백이나 시점 스냅샷이 필요한 상태 집계, 그리고 구간 갱신이 대량으로 들어오는 워크로드에서 naive 구현은 갱신당 O(n)으로 무너진다.

  • 63Algorithms위상정렬·DAG 스케줄링

    위상정렬은 방향 비순환 그래프(DAG)의 정점을 모든 간선 u→v에 대해 u가 v보다 앞서도록 나열하는 것이다. Kahn 알고리즘은 진입차수 0인 정점을 큐에 넣고 꺼낼 때마다 인접 정점의 진입차수를 줄이는 방식으로 O(V+E)에 이를 계산하며, 큐가 비었는데 남은 정점이 있으면 사이클이 존재한다는 뜻이다.

    How it works스케줄링 관점에서는 위상정렬의 각 단계, 즉 동시에 진입차수가 0이 되는 정점 집합을 하나의 병렬 레이어로 묶을 수 있고, 이때 레이어 수는 DAG의 최장 경로 길이와 같다. 따라서 프로세서가 무한히 많아도 실행 시간의 하한은 최장 경로(critical path)이며, 이것이 병렬 스케줄의 근본 한계다.

    Why블록 내 트랜잭션을 병렬로 돌리려는 모든 설계는 결국 '충돌 그래프의 최장 경로'라는 한계에 부딪히므로, 병렬화로 얻을 수 있는 최대 이득을 미리 추정하려면 이 계산이 필요하다.

  • 64Algorithms최대 유량·최소 컷과 매칭

    유량 네트워크는 각 간선에 용량이 있는 방향 그래프이고, 소스에서 싱크로 보낼 수 있는 최대 유량을 구하는 문제가 최대 유량 문제다. 최대 유량-최소 컷 정리는 소스와 싱크를 분리하는 컷 중 용량 합이 최소인 값이 최대 유량과 정확히 같다고 말하며, 이는 선형계획법 쌍대성의 조합론적 사례다.

    How it works알고리즘은 잔여 그래프(residual graph)에서 증가 경로를 찾아 유량을 밀어 넣는 방식이 기본이고, 경로 선택 전략에 따라 Edmonds-Karp(최단 증가 경로)나 Dinic(레벨 그래프 + 블로킹 유량)으로 나뉜다. 이분 매칭은 모든 용량을 1로 둔 유량 문제로 환원되며, 이때 최대 매칭 크기가 최소 정점 덮개 크기와 같다는 König 정리가 최소 컷 정리의 특수형으로 따라 나온다.

    Why스케줄링, 주문 배정, 노드-샤드 할당처럼 "누구에게 무엇을 얼마나" 문제가 나오면 대부분 유량 또는 매칭으로 환원되며, 잘못 모델링하면 지수 시간 탐색을 짜게 된다.

  • 65Algorithms선형계획과 쌍대성 직관

    선형계획(LP)은 선형 부등식 제약 아래에서 선형 목적함수를 최대화하거나 최소화하는 문제이며, 실행가능 영역은 볼록 다면체이고 최적해가 존재하면 그 꼭짓점에서 달성된다. 모든 LP에는 짝이 되는 쌍대(dual) 문제가 있고, 약쌍대성은 임의의 쌍대 실행가능해가 원문제 최적값의 한계를 준다는 것, 강쌍대성은 양쪽이 모두 실행가능하면 두 최적값이 일치한다는 것이다.

    How it works쌍대 변수는 각 제약의 잠재가격(shadow price), 즉 그 제약을 한 단위 완화했을 때 목적값이 얼마나 개선되는지를 뜻한다. 상보여유 조건은 여유가 남는 제약의 잠재가격은 0이고, 양의 가격이 붙은 제약은 반드시 타이트하다는 관계를 말한다.

    Why경매나 블록스페이스 배분처럼 희소 자원을 나누는 문제에서, 배분의 최적성 증명과 참가자에게 물릴 가격이 같은 쌍대 구조에서 나온다는 사실을 알아야 논쟁을 수치로 끝낼 수 있다.

  • 66Algorithms랜덤화·근사 알고리즘

    많은 조합 최적화 문제는 변수에 0 또는 1만 허용하는 정수계획(IP)으로 정확히 표현되지만 IP 자체는 NP-hard다. LP 완화는 이 정수 제약을 0 이상 1 이하의 실수 구간으로 느슨하게 풀어 다항 시간에 최적해를 구하는 기법이며, 완화한 최적값은 원 문제 최적값의 한계(하한 또는 상한)를 준다.

    How it works랜덤 라운딩은 이렇게 얻은 분수해 x_i를 "i를 선택할 확률"로 해석해 독립적으로 동전을 던져 정수해로 되돌린다. 기댓값 계산과 집중 부등식으로 결과가 LP 최적값의 일정 배 안에 들어옴을 보이면 근사비가 증명된다.

    Why실무의 스케줄링·배치·매칭 문제는 대부분 NP-hard라 최적해를 고집하면 풀리지 않고, 성능 보장이 있는 근사해를 언제 받아들일지 판단하는 근거가 필요하다. 또 LP 완화값은 휴리스틱 해가 최적에서 얼마나 떨어졌는지 재는 무료 기준선이 된다.

  • 67Algorithms온라인 알고리즘과 경쟁비

    온라인 알고리즘은 입력 전체를 미리 보지 못하고 요청이 도착할 때마다 되돌릴 수 없는 결정을 내려야 하는 알고리즘이다. 성능은 절대 비용이 아니라 경쟁비로 재는데, 임의의 입력열에 대해 (온라인 알고리즘의 비용) / (모든 입력을 아는 오프라인 최적의 비용)의 최악값으로 정의된다.

    How it works캐시 교체(페이징)에서는 크기 k인 캐시에 대해 LRU와 FIFO가 k-경쟁적이고, 결정론적 알고리즘의 경쟁비 하한도 k라서 LRU는 이 부류에서 최적이다. 무작위화를 허용하면 마킹 알고리즘처럼 기댓값 기준 경쟁비를 로그 규모로 낮출 수 있는데, 이는 적대적 입력이 알고리즘의 다음 수를 예측하지 못하게 만들기 때문이다.

    Why캐시, 커넥션 풀, 실시간 입찰, 주문 매칭처럼 '미래를 모른 채 지금 결정해야 하는' 코드는 어디에나 있는데, 평균 케이스 직관만으로는 적대적 트래픽에서 무너진다. 경쟁비는 그 최악을 정량화해 주는 유일한 언어다.

  • 68AlgorithmsNP-난해와 환원

    환원은 문제 A의 인스턴스를 다항 시간에 문제 B의 인스턴스로 바꾸는 변환이며, A가 B로 환원되면 B가 A보다 쉽지 않다는 뜻이다. NP-완전은 NP에 속하면서 NP의 모든 문제가 그 문제로 환원되는 문제이고, NP-난해는 NP 소속 여부와 무관하게 그만큼 어려운 문제를 가리킨다.

    How it works새로운 문제가 어렵다는 것을 보이는 표준 방법은 이미 알려진 NP-완전 문제를 그 문제로 환원하는 것이다. P와 NP가 다르다면 NP-완전 문제에 다항 시간 정확 알고리즘은 존재하지 않는다.

    Why어려움의 근거를 모르면 본질적으로 불가능한 최적화를 계속 튜닝하며 시간을 태우거나, 반대로 쉽게 풀리는 특수 구조를 못 알아보고 성급히 포기한다.

  • 69Algorithms병렬 알고리즘 모델

    work-span 모델은 병렬 계산을 DAG로 보고 두 값으로 요약한다. work T1은 전체 연산량(프로세서 1개로 걸리는 시간), span T∞는 의존성 사슬의 임계 경로 길이(프로세서가 무한히 많아도 못 줄이는 시간)이며, 병렬성은 T1/T∞로 정의된다.

    How it works좋은 스케줄러(예: work-stealing)는 Tp가 대략 T1/p + T∞ 수준임을 보장하므로, 병렬성이 p보다 충분히 커야 선형 스케일에 가까워진다. Amdahl의 법칙은 문제 크기를 고정한 채 직렬 비율 s가 있으면 속도향상이 1/s로 상한이 걸린다고 말한다.

    Why코어를 늘렸는데 성능이 안 오를 때, 원인이 직렬 구간인지 임계 경로인지 스케줄링 오버헤드인지 구분하지 못하면 엉뚱한 곳을 튜닝하게 된다.

  • 70Algorithms조합 생성·그레이 코드·순열 열거 (TAOCP 4권)

    조합적 대상의 열거란 부분집합, 조합, 순열 같은 구조를 중복 없이 빠짐없이 하나씩 생성하는 기법이다. 그레이 코드는 연속한 두 코드가 정확히 한 비트만 다르도록 부분집합을 나열하는 순서이며, 반사 이진 그레이 코드는 인덱스 i에 대해 i와 i를 오른쪽으로 한 칸 시프트한 값의 XOR로 간단히 얻는다.

    How it works순열은 사전순으로 다음 순열을 만드는 방법이나, 매 단계 인접 두 원소만 교환하며 모든 순열을 생성하는 방식으로 열거할 수 있다. 이런 최소 변화 열거의 핵심 이점은 이전 상태에서 한 번의 작은 갱신으로 다음 상태의 평가값을 증분 계산할 수 있다는 것이다.

    Why테스트 벡터 생성, 퍼징 시드 설계, 작은 상태 공간의 완전 탐색에서 중복이나 누락 없이 전수를 도는 것이 곧 검증의 신뢰도이고, 최소 변화 순서를 쓰면 상태 되감기 비용이 사라진다.

  • 71Algorithms[복습] 알고리즘 선택의 실전 기준표

    알고리즘 선택은 점근 복잡도만으로 결정되지 않고, 입력 규모, 데이터 분포, 접근 패턴, 메모리 계층, 갱신 빈도, 최악 대 평균 요구사항이라는 축들의 조합으로 결정된다. 예를 들어 n이 작으면 상수가 작은 O(n^2)가 O(n log n)을 이기고, 데이터가 거의 정렬돼 있으면 적응적 정렬이 유리하며, 캐시 지역성이 좋은 배열 기반 구조가 포인터 추적 구조보다 실측에서 앞서는 일이 흔하다.

    How it works읽기 위주면 정적 인덱스, 쓰기 위주면 로그 구조나 상환 분석이 좋은 구조를 고른다. 지연시간 꼬리(p99)가 중요하면 평균이 좋아도 최악이 나쁜 상환 알고리즘은 피해야 한다.

    Why실무 성능 사고의 상당수는 잘못된 알고리즘이 아니라 제약을 잘못 짚은 선택에서 나오고, 그 비용은 코드가 굳은 뒤에 드러난다.

Algorithms · B. 컴파일러·런타임·VM (Day 20–35)

  • 72AlgorithmsIR과 SSA 형식

    IR은 소스 언어와 타깃 기계 사이에 두는 중간 표현으로, 최적화와 코드 생성 로직을 언어 수 곱하기 타깃 수가 아니라 언어 수 더하기 타깃 수로 줄이기 위한 계층이다. SSA는 모든 변수가 정확히 한 번만 정의되도록 이름을 재부여한 IR 형식이며, 제어 흐름이 합류하는 지점에서는 어느 선행 블록에서 왔는지에 따라 값을 고르는 phi 함수를 둔다.

    How it works각 사용 지점이 유일한 정의를 가리키므로 def-use 관계가 표현 자체에 명시되고, 상수 전파·죽은 코드 제거·공통 부분식 제거 같은 최적화가 별도 자료 흐름 분석 없이도 단순해진다. phi를 어디에 넣을지는 지배 관계에서 나오는 dominance frontier로 계산하며, 레지스터 할당 직전에 phi를 복사 명령으로 풀어내는 out-of-SSA 단계를 거친다.

    WhyLLVM, Go 컴파일러, 대부분의 JIT, 그리고 Solidity의 Yul 기반 IR 파이프라인까지 현대 최적화가 전부 SSA 위에서 돌아가므로, 어떤 코드가 왜 최적화되고 왜 안 되는지 읽으려면 SSA 사고가 필요하다.

  • 73Algorithms데이터플로 분석

    데이터플로 분석은 프로그램의 제어흐름 그래프 위에서 각 지점에 성립하는 사실(fact)을 방정식으로 세우고, 격자(lattice) 위에서 고정점에 도달할 때까지 반복 계산하는 정적 분석 기법이다. 상수 전파는 각 변수에 '아직 모름 / 상수 c / 상수 아님'이라는 격자 값을 붙여 전방향으로 전파하고, 분기 합류점에서는 두 값의 meet를 취해 서로 다른 상수가 만나면 '상수 아님'으로 떨어뜨린다.

    How it works죽은 코드 제거는 반대로 후방향 liveness 분석을 써서, 어떤 변수의 정의가 이후 어디서도 쓰이지 않고 부수효과도 없으면 그 정의를 삭제한다. 격자의 높이가 유한하고 전이 함수가 단조(monotone)이면 반복이 반드시 종료한다는 것이 이 방식의 정당성 근거다.

    Why옵티마이저가 왜 어떤 코드는 지우고 어떤 코드는 남기는지, 특히 부수효과가 있는 연산 앞에서 최적화가 멈추는 이유를 이해해야 생성된 바이트코드나 기계어를 읽고 성능·가스 차이를 설명할 수 있다.

  • 74Algorithms레지스터 할당(그래프 컬러링)과 스필 비용

    레지스터 할당은 무한한 가상 레지스터를 갖는 중간 표현을 실제 물리 레지스터 개수 k개에 사상하는 단계다. 동시에 살아 있는(live) 값들을 정점으로, 생존 구간이 겹치는 쌍을 간선으로 하는 간섭 그래프(interference graph)를 만들면 문제는 그래프 k-컬러링이 되고, 일반 그래프의 k-컬러링은 NP-완전이므로 Chaitin류의 휴리스틱(차수 < k인 정점을 스택에 밀어내고 되돌리며 색칠)을 쓴다.

    How it works색칠에 실패한 값은 메모리로 내보내는 스필(spill)을 하며, 스필 비용은 보통 접근 횟수를 반복문 중첩 깊이로 가중한 값을 차수로 나눈 형태의 휴리스틱으로 추정한다. SSA 형태에서는 간섭 그래프가 chordal이라 최적 색칠이 다항 시간에 가능해, 현대 컴파일러는 SSA 기반 할당이나 JIT용 linear scan을 쓰기도 한다.

    Why핫 루프에서 성능이 안 나오는 원인이 알고리즘이 아니라 레지스터 압박에 의한 스필/리로드인 경우가 흔하고, 이를 알아야 인라이닝이나 변수 생존 구간을 줄이는 식의 소스 수준 대응을 할 수 있다.

  • 75Algorithms인라이닝·루프 변환·자동 벡터화

    인라이닝은 함수 호출을 피호출 함수의 본문으로 치환하는 변환으로, 호출 오버헤드 제거 자체보다 호출 경계를 없애 상수 전파·죽은 코드 제거 같은 후속 최적화를 열어 주는 효과가 더 크다. 대신 코드 크기가 늘어 명령어 캐시 압박이 생기므로 컴파일러는 함수 크기와 호출 빈도 휴리스틱으로 인라인 여부를 결정한다.

    How it works루프 변환에는 unrolling, 루프 불변식 끌어올리기(LICM), 루프 교환, 융합과 분할, 타일링이 있고 공통 목적은 데이터 의존성을 깨지 않으면서 지역성과 명령어 수준 병렬성을 높이는 것이다. 자동 벡터화는 반복 간 의존이 없는 루프를 SIMD 명령으로 묶는 변환인데, 포인터 앨리어싱 가능성, 불규칙한 제어 흐름, 부동소수점 결합법칙을 바꿔서는 안 된다는 제약 때문에 자주 실패한다.

    Why핫 루프가 기대만큼 안 빨라지는 원인은 대개 알고리즘이 아니라 벡터화가 걸리지 않았거나 인라인이 막혀 후속 최적화가 전부 무산된 것이기 때문이다.

  • 76AlgorithmsJIT 계층화·워밍업·역최적화(deopt)

    현대 VM은 모든 코드를 처음부터 최적화하지 않고 계층화(tiered) 전략을 쓴다. 처음에는 인터프리터나 빠르게 뱉는 베이스라인 컴파일러로 실행하면서 호출 횟수·루프 반복 수·타입 프로파일을 수집하고, 임계치를 넘은 hot 코드만 최적화 컴파일러로 다시 컴파일한다.

    How it works최적화 단계는 프로파일을 근거로 "이 인자는 항상 정수다", "이 호출 대상은 항상 같은 함수다" 같은 가정을 세워 인라인·특수화하고, 그 가정을 검사하는 guard를 코드에 심는다. guard가 깨지면 역최적화(deopt)가 일어나 최적화 프레임의 상태를 인터프리터 프레임으로 되돌리고 느린 경로에서 실행을 이어간다.

    Why워밍업을 무시한 마이크로벤치마크는 실제보다 훨씬 느리거나 빠른 값을 내놓아 잘못된 최적화 결정을 유도한다. 또 한 곳에서 다형적으로 쓰이는 객체 모양 하나 때문에 hot loop가 deopt에 빠져 처리량이 몇 배 떨어지는 일이 실제로 자주 생긴다.

  • 77Algorithms스택 머신 vs 레지스터 머신

    스택 머신은 피연산자를 명시하지 않고 암묵적으로 스택 상단에서 꺼내 쓰는 구조라 명령어 인코딩이 짧고 컴파일러 백엔드가 단순하지만, 같은 계산을 하는 데 필요한 명령어 수가 많고 DUP·SWAP 같은 스택 정리 연산이 추가된다. 레지스터 머신은 피연산자를 이름으로 지정하므로 명령어 수가 적고 값의 재사용이 명시적이라 레지스터 할당·JIT 같은 최적화에 유리한 대신, 인코딩이 길고 명령어 집합이 복잡해진다.

    How it worksEVM은 256비트 워드를 다루는 스택 머신이고 스택 깊이가 1024로 제한되며, 성능보다 명세의 단순함과 모든 노드에서의 결정론적 재현을 우선한 설계다. WebAssembly도 명세상으로는 스택 기반 검증 모델을 쓰지만, 함수 지역 변수와 구조화된 제어 흐름(블록·루프·분기 라벨)을 제공해 네이티브 레지스터 코드로 AOT/JIT 컴파일하기 쉽게 되어 있다.

    WhyEVM 바이트코드를 읽거나 가스를 다투다 보면 스택 조작 오버헤드가 비용에 그대로 잡히고, 대안 VM 논의를 따라가려면 두 모델의 트레이드오프가 전제 지식이 된다. 컴파일러 출력이 왜 그렇게 생겼는지도 여기서 설명된다.

  • 78Algorithms가스 회계 설계

    가스는 연산·상태 저장·대역폭 소비를 하나의 회계 단위로 정량화해 요금을 매기는 장치다. 각 opcode의 가스 값은 실제 자원 소비에 비례해야 하며, 저평가된 연산이 하나라도 있으면 그것이 곧 DoS 벡터가 된다(과거 이더리움에서 상태 접근·스토리지 비용이 여러 차례 재조정된 이유다).

    How it works상태를 늘리는 쓰기는 비싸게, 상태를 지우는 연산은 환급을 주는 식으로 상태 증가에 대한 유인을 설계한다. EIP-2929처럼 같은 슬롯·주소의 첫 접근(cold)과 재접근(warm)을 다르게 과금하는 것은 캐시 지역성까지 요금 모델에 반영한 예다.

    Why비용 모델이 실제 자원 소비와 어긋나면 공격자가 헐값에 노드를 마비시킬 수 있고, 반대로 과다 책정하면 정직한 사용자가 밀려난다.

  • 79AlgorithmsEVM 인터프리터 내부

    EVM 인터프리터는 바이트코드를 프로그램 카운터로 한 옵코드씩 읽어 스택 머신으로 실행하는 루프다. JUMP와 JUMPI의 목적지는 반드시 JUMPDEST 옵코드여야 하고, PUSH 명령의 즉시 데이터(immediate data) 안에 우연히 같은 바이트값이 들어 있는 위치는 유효한 목적지가 아니다.

    How it works그래서 구현체는 코드를 한 번 선형 스캔하며 PUSH의 데이터 길이만큼 건너뛰는 방식으로 유효 JUMPDEST 비트맵을 만들어 두고, 점프마다 O(1)로 검사한다. 메모리는 0에서 시작해 32바이트 워드 단위로만 확장되며, 확장 비용은 워드 수에 대해 선형 항과 2차 항의 합이라 크게 쓸수록 한계비용이 가파르게 오른다.

    Why메모리 비용의 2차 항 때문에 큰 calldata 복사나 대형 배열 처리가 예상보다 훨씬 비싸지고, JUMPDEST 규칙을 모르면 어셈블리나 코드 검사 로직에서 잘못된 가정을 하게 된다.

  • 80AlgorithmsWASM 실행 모델과 샌드박싱 경계

    WebAssembly는 스택 기반 가상 머신의 명령 집합으로, 제어 흐름이 임의 점프가 아니라 블록·루프·분기라는 구조적 형태로만 표현되어 검증기가 정적으로 타입과 흐름을 확인할 수 있다. 메모리는 선형 메모리라 불리는 하나의 연속된 바이트 배열이고 모든 접근이 경계 검사를 거치므로, 모듈은 자기 메모리 밖을 절대 읽거나 쓸 수 없다.

    How it works호출 스택과 함수 주소는 엔진이 관리하며 간접 호출은 타입이 검사된 테이블 인덱스로만 가능해서, 전통적인 스택 스매싱이나 임의 코드 주소로의 점프가 원천적으로 막힌다. 모듈은 명시적으로 import한 호스트 함수 외에는 파일, 네트워크, 시계 등 바깥세상에 닿을 수 없으므로 샌드박싱 경계는 곧 import 목록이 된다.

    Why신뢰할 수 없는 코드를 안전하게 실행해야 하는 플러그인 시스템, 엣지 런타임, 대체 스마트 컨트랙트 VM이 모두 이 모델 위에 서 있어서, 경계가 어디까지인지 정확히 알아야 위협 모델을 제대로 그릴 수 있다.

  • 81AlgorithmsGC 심화

    현대 GC는 "멈추고 전부 훑기"를 피하기 위해 작업을 잘게 쪼개거나(증분) 애플리케이션 스레드와 겹쳐서(병행) 수행한다. 병행 마킹은 마킹 중에 객체 그래프가 변하는 문제를 낳으므로, 쓰기 배리어로 변경을 기록해 삼색 불변식(검은 객체가 흰 객체를 직접 가리키지 않는다)을 유지한다.

    How it works리전 기반 GC는 힙을 균일한 크기의 리전으로 나누고 회수 효율이 높은 리전만 골라 처리해, 전체 힙 크기와 정지 시간의 결합을 끊는다. ZGC는 컬러드 포인터와 로드 배리어를 써서 재배치(compaction)까지 병행으로 수행하고, Go의 GC는 비이동·비세대형 병행 마크스윕이며 GOGC 목표에 맞춰 마킹 속도를 조절하는 페이싱을 쓴다.

    Why지연시간이 중요한 서버에서 GC는 코드가 아무리 빨라도 p99를 혼자 망칠 수 있는 요인이고, 튜닝 손잡이의 의미를 모르면 힙만 키우는 대증요법에 갇힌다.

  • 82AlgorithmsRust 소유권·차용 검사기 내부(NLL)와 우회 패턴

    Rust의 소유권은 모든 값에 유일한 소유자를 두고 소유자가 스코프를 벗어날 때 자원을 해제해, GC 없이 컴파일 타임에 메모리 안전을 보장하는 규칙이다. 차용 검사기는 여기에 aliasing과 mutation을 동시에 허용하지 않는 규칙을 더해, 같은 시점에 다수의 불변 참조 또는 단 하나의 가변 참조만 존재하도록 강제한다.

    How it worksNLL(Non-Lexical Lifetimes)은 차용의 유효 구간을 렉시컬 스코프 끝까지가 아니라 제어 흐름 그래프상 그 참조가 마지막으로 쓰이는 지점까지로 계산해, 안전한데도 거부되던 코드를 통과시킨다. 그럼에도 검사기가 증명하지 못하는 구조(자기 참조, 순환 그래프, 공유 가변 상태)가 남고, 이때는 참조 대신 인덱스를 쓰는 arena 방식, Rc와 RefCell로 검사를 런타임으로 옮기는 방식, 필드별 분리 차용, 마지막 수단으로 unsafe를 안전한 API 뒤에 캡슐화하는 방식을 쓴다.

    WhyRust로 노드, 인덱서, ZK 도구를 만들면 시간의 상당 부분이 로직이 아니라 차용 검사기와의 싸움에 들어가고, 우회 패턴을 알면 설계 단계에서 그 싸움 자체를 피할 수 있다.

  • 83Algorithms메모리 할당자 설계

    범용 메모리 할당자는 임의 크기 요청을 빠르게 처리하면서 단편화를 억제해야 하는데, 이를 위해 크기를 몇십 개의 size class로 반올림해 같은 클래스끼리 모아 관리하는 segregated free list 구조를 쓴다. jemalloc은 스레드마다 arena를 배정하고 tcache라는 스레드 로컬 캐시를 두어 대부분의 할당·해제가 락 없이 끝나게 하며, 메모리는 큰 단위(chunk 또는 extent)로 OS에서 받아 잘라 쓴다.

    How it worksmimalloc은 스레드마다 heap을, 페이지마다 free list를 두고 로컬 해제와 원격(다른 스레드에서의) 해제를 분리된 리스트로 처리해 원자 연산을 줄이는 free list sharding 아이디어를 쓴다. 두 설계가 공유하는 핵심은 스레드 로컬 캐싱으로 경합을 없애고, size class로 외부 단편화를 내부 단편화로 바꿔 관리 가능하게 만들고, 해제된 메모리를 OS에 돌려주는 시점(purge/decay)을 정책으로 다루는 것이다.

    Why멀티스레드 서버에서 처리량이 코어 수에 비례해 늘지 않을 때 원인이 할당자 경합인 경우가 흔하고, RSS가 실제 사용량보다 훨씬 크게 유지되는 현상도 할당자의 단편화·반환 정책으로 설명된다.

  • 84AlgorithmsFFI·ABI 경계와 안전성(패닉·정렬·수명)

    ABI는 컴파일된 코드끼리 지켜야 하는 이진 수준 계약으로 호출 규약(인자 전달 레지스터, 스택 정렬, 반환값 위치), 구조체 레이아웃과 패딩, 이름 맹글링 등을 규정한다. FFI는 서로 다른 언어가 이 ABI를 매개로 호출하는 방식이며, 보통 C ABI를 공통분모로 삼기 때문에 구조체에 명시적 C 레이아웃 지정이 필요하다.

    How it works안전성 문제는 세 축에서 생긴다. 첫째, 패닉이나 예외가 FFI 경계를 넘어 되감기(unwind)하면 상대 언어의 런타임이 이를 처리할 수 없어 정의되지 않은 동작이 되므로 경계에서 잡아 에러 코드로 변환해야 한다.

    Why암호 라이브러리나 DB 엔진을 네이티브로 붙일 때 대부분의 크래시는 로직이 아니라 이 경계 규약(패닉 누출, GC 이동, 해제 책임 불명확)에서 나온다.

  • 85Algorithms결정론적 실행

    결정론적 실행은 같은 입력과 같은 초기 상태에서 언제나 같은 출력과 같은 상태 전이를 얻는 성질이다. 이를 깨뜨리는 대표 요인은 부동소수점(연산 순서, 확장 정밀도, FMA, 라이브러리 구현 차이), 현재 시각과 타임아웃, 난수, 스레드 스케줄링, 해시맵 순회 순서, 그리고 파일·네트워크 같은 외부 입출력이다.

    How it works봉인하는 방법은 이 비결정성 원천을 전부 주입 가능한 입력으로 바꾸는 것으로, 부동소수점 대신 정수·고정소수점 산술을 쓰고, 시각과 난수 시드는 인자로 받아 기록하며, 순회 순서는 명시적 정렬로 고정한다. 이렇게 하면 리플레이 검증, 재현 가능한 테스트, 상태 머신 복제가 모두 성립한다.

    Why재현되지 않는 간헐 버그의 상당수가 시각·난수·순회 순서 같은 숨은 비결정성에서 오고, 리플레이 디버깅과 복제 실행은 결정론 위에서만 가능하기 때문이다.

  • 86Algorithms형식 검증

    형식 검증은 테스트처럼 몇 개 입력을 시험하는 대신, 명시한 성질이 정의된 입력 공간 전체에서 성립하는지를 논리적으로 판정한다. 바닥에는 명제 논리의 충족 가능성을 푸는 SAT 솔버(CDCL 기반)와 불리언 함수를 변수 순서에 대해 정규형으로 표현하는 BDD가 있고, 그 위에 비트벡터·배열·산술 같은 이론을 얹어 판정하는 SMT 솔버가 있다.

    How it works심볼릭 실행은 프로그램을 구체적 값 대신 심볼로 실행하며 분기마다 경로 조건을 모으고, 그 조건과 성질의 부정을 SMT에 던져 반례를 찾는다. 실무 도구는 성격이 다른데, Foundry의 invariant 테스트는 상태를 가진 랜덤 퍼징이라 반례를 찾으면 확실하지만 못 찾았다고 증명이 되진 않고, Halmos 같은 심볼릭 실행 도구는 루프 전개 깊이 등으로 제한된 범위 안에서 증명을 준다.

    Why스마트 컨트랙트는 배포 후 수정이 어렵고 실패 비용이 자금 손실이라, 단위 테스트가 커버하지 못하는 상태 공간을 성질 단위로 막아야 한다. 동시에 도구가 주는 보장의 범위를 오해하면 "검증했다"는 잘못된 안심을 사게 된다.

  • 87Algorithms[복습] 실행 계층 지도 한 장으로

    실행 계층은 소스 코드가 실제 하드웨어 동작이 되기까지의 단계 사슬로 볼 수 있다. 앞단은 렉싱·파싱으로 AST를 만들고 의미 분석으로 타입과 이름을 확정하는 프론트엔드이고, 가운데는 SSA 같은 중간 표현 위에서 상수 전파·인라이닝·죽은 코드 제거 등을 수행하는 최적화 단계다.

    How it works뒷단은 명령어 선택·레지스터 할당·코드 생성으로 타깃 명령어(네이티브 기계어 또는 VM 바이트코드)를 뽑고, 그 결과를 인터프리터나 JIT가 실행하며 런타임이 메모리·GC·예외를 관리한다. 이더리움에 대응시키면 Solidity가 Yul 같은 IR을 거쳐 EVM 바이트코드가 되고, 클라이언트의 EVM 인터프리터가 이를 실행하면서 각 opcode마다 가스를 차감하는 구조다.

    Why성능이나 동작 이상을 만났을 때 소스, 컴파일러 최적화, VM 실행, 런타임 중 어디를 봐야 하는지 즉시 좁히지 못하면 디버깅이 추측으로 흐른다. 계층 지도는 그 좁히기의 기준선이다.

Algorithms · C. 동시성·성능 엔지니어링 (Day 36–51)

  • 88Algorithms메모리 모델과 원자성 순서

    CPU와 컴파일러는 단일 스레드 의미가 보존되는 한 메모리 접근을 자유롭게 재배열하므로, 다른 스레드에 무엇이 어떤 순서로 보이는지는 메모리 모델이 규정한다. relaxed 원자 연산은 연산 자체의 원자성만 보장하고 주변 접근과의 순서는 보장하지 않는다.

    How it worksrelease 저장과 그 값을 읽은 acquire 로드가 짝을 이루면 release 이전의 모든 쓰기가 acquire 이후 코드에 보이는 happens-before 관계가 성립한다. seq_cst는 여기에 더해 모든 seq_cst 연산에 대한 단일 전역 순서를 보장하며 가장 비싸다.

    Why순서 지정을 잘못해도 x86에서는 대개 통과하고 ARM처럼 약한 메모리 모델이나 고부하에서만 드러나서, 재현이 극도로 어려운 버그가 된다.

  • 89Algorithms락프리·wait-free, ABA 문제, 해저드 포인터·에포크 회수

    논블로킹 알고리즘은 진행 보장의 강도로 나뉜다. lock-free는 어떤 스레드가 멈춰도 시스템 전체로는 누군가 반드시 전진함을 보장하고, wait-free는 모든 스레드가 유한한 단계 안에 자기 연산을 끝냄을 보장하며, obstruction-free는 경합이 사라지면 끝남만 보장한다.

    How it works대부분 CAS 같은 원자적 read-modify-write 위에 만들어지는데, 여기서 ABA 문제가 생긴다. 어떤 위치의 값이 A에서 B로 바뀌었다가 다시 A가 되면 CAS는 '변한 적 없다'고 착각해 성공하지만 실제 자료구조 상태는 달라져 있을 수 있다.

    Why락프리 큐나 맵을 직접 쓰거나 만들 때 ABA와 메모리 회수를 빠뜨리면 재현이 극히 어려운 use-after-free와 데이터 손상이 프로덕션에서만 터진다.

  • 90AlgorithmsRCU

    RCU는 읽기가 압도적으로 많은 자료구조에서 읽기 측이 락이나 원자적 쓰기 없이 데이터를 참조하도록 만드는 동기화 기법이다. 갱신자는 기존 노드를 제자리에서 고치는 대신 복사본을 만들어 수정한 뒤 포인터를 한 번의 원자적 발행으로 교체하므로, 독자는 항상 낡은 버전이거나 새 버전이거나 둘 중 하나의 일관된 상태만 본다.

    How it works발행 시점에는 새 노드의 초기화가 포인터 교체보다 먼저 보이도록 메모리 순서 보장이 필요하다. 낡은 버전을 즉시 해제하면 아직 그것을 읽고 있는 독자가 깨지므로, 모든 기존 독자가 임계 구역을 빠져나갔음이 보장되는 시점인 유예 기간이 지난 뒤에 회수한다.

    Why읽기 대 쓰기 비율이 크게 치우친 라우팅 테이블, 설정 스냅샷, 심볼 테이블에서 뮤텍스나 RW락은 캐시 라인 경합만으로 확장성을 무너뜨리고, RCU 계열 기법이 그 병목을 없앤다.

  • 91Algorithmsfalse sharing·캐시라인 정렬·NUMA 지역성

    CPU는 메모리를 캐시라인 단위(보통 64바이트)로 주고받으므로, 논리적으로 무관한 두 변수라도 같은 라인에 있으면 서로 다른 코어의 쓰기가 그 라인의 소유권을 계속 뺏고 뺏기는 상태가 된다. 이것이 false sharing이며, 락도 없고 데이터 경쟁도 없는데 처리량만 급락하는 형태로 나타난다.

    How it works해결책은 코어별로 갱신되는 카운터나 상태를 캐시라인 경계에 정렬하고 패딩으로 분리하는 것이다. NUMA 시스템에서는 한 걸음 더 나아가, 메모리가 어느 소켓에 붙어 있느냐에 따라 접근 지연과 대역폭이 달라지므로 스레드와 그 스레드가 만지는 데이터를 같은 노드에 두는 지역성이 중요해진다.

    Why코어를 늘렸는데 처리량이 오히려 떨어지는 전형적 원인이고, 프로파일러의 함수별 시간만 봐서는 원인이 보이지 않는다.

  • 92Algorithms브랜치 예측·프리페치·데이터 지향 설계

    현대 CPU는 파이프라인을 비우지 않으려고 분기의 방향과 목적지를 예측하며, 예측이 틀리면 잘못 진행한 명령을 버리고 다시 채우는 데 상당한 사이클을 낭비한다. 하드웨어 프리페처는 순차 접근이나 일정한 stride 패턴을 감지해 캐시 라인을 미리 가져오므로, 예측 가능한 접근은 포인터를 따라가는 접근보다 훨씬 빠르다.

    How it works데이터 지향 설계는 이 하드웨어 특성에 맞춰 자료 배치를 바꾸는 방법론으로, 객체 배열(AoS) 대신 필드별 배열(SoA)을 쓰거나 함께 접근되는 필드를 모아 가져온 캐시 라인에서 실제로 쓰는 바이트 비율을 높인다. 분기 자체를 없애는 기법(조건부 이동, 분기 없는 계산, 입력 정렬)도 같은 맥락에 있다.

    Why복잡도가 동일한데 실측이 몇 배 차이 나는 경우 원인은 대개 캐시 미스와 분기 오예측이며, 이걸 모르면 핫 루프 최적화의 방향을 처음부터 잘못 잡는다.

  • 93Algorithms커널 바이패스와 zero-copy

    전통적인 소켓 I/O는 시스템 콜마다 유저-커널 경계를 넘고 커널 버퍼와 유저 버퍼 사이에서 데이터를 복사하므로, 작은 요청이 매우 많은 워크로드에서는 이 오버헤드가 전체 비용을 지배한다. zero-copy는 그 복사를 제거하거나 줄이는 기법으로, 파일 전송의 sendfile이나 splice처럼 데이터가 유저 공간을 거치지 않게 하는 방식이 대표적이다.

    How it worksio_uring은 커널과 유저 공간이 공유하는 두 개의 링 버퍼(제출 큐와 완료 큐)를 두어 요청을 큐에 써 넣고 완료를 큐에서 읽는 비동기 인터페이스이며, 여러 요청을 한 번의 시스템 콜로 제출하거나 폴링 모드에서는 시스템 콜 없이도 진행시킬 수 있다. 커널 바이패스는 한 걸음 더 나아가 NIC 큐를 유저 공간 드라이버에 직접 매핑해 커널 네트워크 스택 자체를 건너뛰는 접근으로, 지연은 크게 줄지만 커널이 제공하던 프로토콜 처리와 보호를 애플리케이션이 떠안게 된다.

    Why지연이 마이크로초 단위로 중요한 매칭 엔진이나 초고빈도 RPC 게이트웨이에서는 애플리케이션 로직이 아니라 시스템 콜·복사 비용이 병목이 되므로, 어디까지가 커널 비용인지 구분할 줄 알아야 한다.

  • 94Algorithms이벤트 루프 vs 스레드 vs 액터 모델

    세 모델은 동시성을 어떤 단위로 쪼개고 상태를 어떻게 공유하느냐가 다르다. 이벤트 루프는 단일 스레드가 준비된 I/O 이벤트를 논블로킹으로 순회하며 콜백/태스크를 실행하므로 컨텍스트 스위치와 락이 거의 없지만, 하나의 CPU 바운드 작업이 루프를 막으면 전체가 멈춘다.

    How it works스레드 모델은 OS가 선점 스케줄링을 해주어 블로킹 코드를 그대로 쓸 수 있고 멀티코어를 자연히 활용하지만, 공유 메모리를 락으로 지켜야 해서 경합·데드락·false sharing 같은 비용이 생긴다. 액터 모델은 상태를 액터 내부에 가두고 오직 비동기 메시지로만 통신하게 해 공유 메모리 자체를 없애며, 대신 메시지 복사 비용과 메일박스 backpressure, 순서 보장 범위가 설계 이슈가 된다.

    Why동시성 버그와 지연 스파이크의 상당수는 선택한 모델의 전제(루프를 막지 마라, 공유 상태를 락으로 지켜라, 메일박스가 무한하지 않다)를 깨는 데서 나온다.

  • 95Algorithms백프레셔와 큐 이론

    큐 이론은 도착 과정과 서비스 과정을 확률적으로 모델링해 대기 길이와 지연을 예측하는 도구다. Little's law는 안정 상태에서 L = λW, 즉 시스템 안의 평균 항목 수가 평균 도착률과 평균 체류시간의 곱과 같다는 관계이며 분포에 대한 가정 없이 성립한다는 점이 강력하다.

    How it works이용률 ρ가 1에 가까워지면 대기시간은 대략 1/(1-ρ)에 비례해 급격히 커지므로, 시스템은 이용률 100%가 아니라 여유를 남긴 지점에서 운영해야 한다. 백프레셔는 소비자가 감당하지 못하는 유입을 생산자 쪽으로 되밀어 큐가 무한히 자라는 것을 막는 기법으로, 유계 큐, 블로킹, 크레딧 기반 흐름 제어, 부하 차단으로 구현한다.

    Why부하가 몰릴 때 서비스가 무너지는 경로는 대부분 큐가 무한히 커지며 지연이 타임아웃을 넘고 재시도가 폭증하는 형태이고, 이 지점은 용량 계산으로 미리 막을 수 있기 때문이다.

  • 96Algorithms테일 레이턴시

    테일 레이턴시는 평균이 아니라 p99·p999처럼 분포 꼬리에 있는 응답 시간을 말한다. 한 요청이 여러 백엔드로 fan-out되면 전체 응답은 가장 느린 하나에 묶이므로, 개별 서버의 드문 지연이 상위 레벨에서는 흔한 지연으로 증폭된다.

    How it workshedged request는 첫 요청이 예컨대 p95를 넘겨도 응답이 없을 때 다른 복제본에 같은 요청을 하나 더 보내고 먼저 오는 응답을 쓰는 기법으로, 추가 부하는 몇 퍼센트인데 꼬리는 크게 줄어든다. load shedding은 반대 방향으로, 용량을 넘는 요청을 큐에 쌓지 않고 입구에서 빨리 거절해 이미 받아들인 요청의 지연 목표를 지키는 전략이다.

    Why평균 응답 시간만 보는 대시보드는 사용자 체감 실패를 통째로 놓치고, 과부하 때 무한정 큐잉하는 서비스는 재시도까지 겹쳐 붕괴한다. 꼬리 관리와 부하 차단은 가용성 설계의 기본기다.

  • 97Algorithms프로파일링 심화

    프로파일링은 크게 코드에 훅을 심는 계측(instrumentation)과 주기적으로 실행 상태를 표본화하는 샘플링으로 나뉘고, perf는 커널의 perf_events를 통해 타이머나 PMU 이벤트 오버플로 시점에 인터럽트를 걸어 콜스택을 수집하는 샘플링 도구다. 플레임그래프는 수집된 스택들을 동일 접두사끼리 접어(fold) 그린 그림으로, y축은 스택 깊이이고 x축 너비는 그 스택이 표본에서 차지한 비율일 뿐 시간 축이 아니다.

    How it works따라서 넓은 프레임은 '오래 걸린 구간'이 아니라 '표본에서 자주 잡힌, 즉 CPU를 많이 점유한 코드'로 읽어야 한다. PMU는 CPU 내장 하드웨어 카운터로 cycles, instructions, cache-misses, branch-misses 같은 이벤트를 세며, 이로부터 IPC를 계산해 병목이 명령어 공급 쪽인지 메모리 접근 쪽인지 분기 예측 실패 쪽인지 구분할 수 있다.

    Why추측으로 최적화하면 대개 엉뚱한 곳을 고치게 되고, 특히 CPU 바운드와 메모리 바운드는 해법이 완전히 다르다. 카운터와 플레임그래프는 그 구분을 데이터로 강제한다.

  • 98Algorithms벤치마크 방법론

    벤치마크는 하나의 수치를 재는 일이 아니라 측정값의 분포를 추정하는 실험이다. JIT 컴파일, 캐시, 분기 예측기, 커넥션 풀 때문에 초기 실행은 정상 상태와 다르므로 워밍업 구간을 측정에서 제외해야 한다.

    How it works사용자 체감은 평균보다 중앙값과 꼬리 분위수(p95, p99)에 가깝고, 반복 실행 간 분산을 함께 보고해야 두 버전의 비교가 성립한다. 회귀 감지는 기준선 대비 차이가 노이즈 범위를 넘는지의 판단이므로, 공유 CI처럼 흔들리는 환경에서는 임계값을 넉넉히 잡거나 같은 실행 안에서의 상대 비교를 쓴다.

    Why워밍업과 분산을 무시한 벤치마크는 실제 성능 회귀를 통과시키고 무해한 변경을 회귀로 오탐해서, 결국 아무도 결과를 믿지 않게 된다.

  • 99AlgorithmseBPF로 프로덕션 관측

    eBPF는 커널 안에서 안전하게 실행되는 샌드박스 VM이다. 사용자가 작성한 작은 프로그램을 커널에 로드하면 verifier가 종료성과 메모리 접근 안전성을 정적으로 검증하고, 통과한 프로그램만 JIT 컴파일되어 kprobe, uprobe, tracepoint, perf 이벤트, 네트워크 훅 등에 붙어 실행된다.

    How it works프로그램과 유저스페이스는 map이라는 공유 자료구조(해시맵, 배열, 링버퍼 등)로 데이터를 주고받는다. 커널 모듈을 새로 짜거나 애플리케이션을 재시작·재컴파일하지 않고도 실행 중인 시스템의 내부 이벤트를 관측할 수 있다는 것이 핵심 이점이다.

    Why프로덕션에서 재현되지 않는 지연 스파이크나 특정 syscall 병목을 코드 수정·재배포 없이, 그리고 애플리케이션 로그에 없는 계층까지 내려가 볼 수 있는 거의 유일한 수단이다.

  • 100Algorithms분산 트레이싱과 샘플링 전략

    분산 트레이싱은 하나의 요청이 여러 서비스를 지나가는 경로를 트레이스라는 단위로 묶고, 각 작업 구간을 부모-자식 관계를 가진 스팬으로 기록하는 관측 기법이다. 서로 다른 프로세스에서 같은 트레이스로 묶이려면 트레이스 식별자와 부모 스팬 식별자를 요청 헤더에 실어 전파해야 하며, 이 전파 규약이 표준화되어 있어야 이종 시스템이 이어진다.

    How it works모든 요청을 저장하면 비용이 감당되지 않으므로 샘플링이 필요한데, 헤드 기반 샘플링은 트레이스 시작 시점에 확률적으로 결정을 내리고 그 결정을 하위로 전파해 트레이스가 조각나지 않게 한다. 테일 기반 샘플링은 트레이스가 끝난 뒤 전체를 보고 판단하므로 에러나 느린 요청을 선별해 남길 수 있지만, 완성될 때까지 버퍼링해야 해서 메모리와 구조적 복잡도를 요구한다.

    Why장애는 대개 평균이 아니라 꼬리에서 발생하는데, 순수 확률 샘플링만 쓰면 정작 필요한 느린 요청과 실패 요청의 트레이스가 남지 않아 사후 분석이 불가능해진다.

  • 101Algorithms용량 계획·SLO와 에러 예산

    SLO는 사용자 관점의 서비스 수준 지표(SLI)에 대해 정한 목표치이고, 에러 예산은 그 목표가 허용하는 실패의 총량이다. 1%가 한 기간 동안 쓸 수 있는 예산이며, 이 예산은 배포 속도와 안정성 사이의 명시적 교환 수단이 된다.

    How it works예산이 남으면 더 공격적으로 배포하고, 소진되면 기능 출시를 멈추고 신뢰성 작업에 투입하는 식의 정책으로 운영한다. 용량 계획은 여기에 부하 예측을 결합해, 목표 지연시간을 유지한 채 소화 가능한 최대 부하와 필요한 여유분을 정하는 작업이다.

    Why"얼마나 안정적이어야 하는가"를 숫자로 합의해 두지 않으면 장애 대응과 기능 개발의 우선순위 다툼이 매번 감정 싸움이 된다.

  • 102Algorithms카오스 엔지니어링·장애 주입 설계

    카오스 엔지니어링은 운영과 유사한 환경에 통제된 장애를 의도적으로 주입해, 시스템이 정상 동작을 유지한다는 가설을 실험으로 검증하는 방법론이다. 절차는 관측 가능한 지표로 정상 상태(steady state)를 정의하고, 특정 장애 하에서도 그 지표가 유지된다는 가설을 세우고, 실제 장애(인스턴스 종료, 지연 추가, 패킷 손실, 의존 서비스 오류 응답)를 주입한 뒤 가설이 깨지는지 관찰하는 순서다.

    How it works핵심 원칙은 폭발 반경을 작게 시작해 점진적으로 넓히고, 실험을 즉시 중단할 abort 조건을 미리 정해두는 것이다. 목적은 장애를 만드는 것이 아니라 이미 잠재해 있던 결함(타임아웃 미설정, 재시도 폭주, 순환 의존, 잘못된 폴백)을 통제된 시간에 드러내는 데 있다.

    Why분산 시스템의 실제 장애는 개별 컴포넌트보다 그 사이의 타임아웃·재시도·폴백 조합에서 나오고, 이런 상호작용은 단위 테스트로 절대 잡히지 않는다.

  • 103Algorithms[복습] 성능 예산 문서 쓰기

    성능 예산 문서는 시스템이 지켜야 할 성능 목표를 숫자와 조건으로 명시해 설계·리뷰·배포 판단의 기준으로 삼는 문서다. 최소한 대상 워크로드(요청 종류와 비율), 부하 수준(초당 요청 수, 동시성), 지표와 목표치(평균이 아니라 p95·p99 같은 꼬리 지연, 처리량, 자원 사용량), 측정 방법과 환경이 들어가야 재현 가능한 기준이 된다.

    How it works예산은 전체 목표를 구간별로 쪼개 배분할 때 실효성이 커지는데, 예를 들어 종단 지연 목표를 네트워크·큐 대기·핸들러·DB 호출로 나누어 각 구간의 상한을 정하면 어느 구간이 예산을 초과했는지 바로 드러난다. 목표치는 근거 있게 정해야 하며, 사용자 체감이나 상류 시스템의 타임아웃처럼 외부 제약에서 역산하는 것이 임의로 정한 숫자보다 방어 가능하다.

    Why성능은 목표가 문서화되어 있지 않으면 '느리다/빠르다'는 주관적 논쟁이 되고, 회귀가 누적된 뒤에야 발견되어 원인 추적이 어려워진다.

Algorithms · D. 분산시스템·합의 (Day 52–68)

  • 104Algorithms일관성 모델 지도

    일관성 모델은 동시 접근이 있을 때 시스템이 어떤 실행 순서까지 허용하는지를 정하는 계약이다. 선형화 가능성(linearizability)은 단일 객체에 대한 개별 연산이, 각자의 호출과 응답 사이 어느 시점에 원자적으로 일어난 것처럼 보이고 그 순서가 실시간 순서를 존중할 것을 요구한다.

    How it works직렬성(serializability)은 다중 객체 트랜잭션에 대한 성질로, 동시 실행 결과가 어떤 순차 실행과 같기만 하면 되고 실시간 순서는 요구하지 않는다. 인과 일관성(causal)은 인과적으로 선행하는 쓰기들만 순서를 보장하고 동시(concurrent) 쓰기는 노드마다 다른 순서로 봐도 되며, 최종 일관성(eventual)은 새 갱신이 멈추면 언젠가 복제본이 수렴한다는 것만 약속한다.

    Why"읽었는데 방금 쓴 값이 없다" 류의 버그는 대개 시스템이 약속한 모델을 실제보다 강하게 가정한 결과이고, 반대로 필요 이상으로 강한 모델을 고르면 지연과 비용을 그냥 낭비한다.

  • 105Algorithms논리 시계·벡터 시계·하이브리드 논리 시계(HLC)

    분산 환경에서는 완전히 동기화된 전역 물리 시계를 가정할 수 없으므로 사건의 순서를 인과관계로 정의한다. Lamport 논리 시계는 각 노드가 카운터를 유지해 로컬 이벤트마다 증가시키고 메시지 수신 시 max(내 값, 받은 값)+1로 갱신하며, a가 b의 원인이면 C(a) < C(b)를 보장하지만 역은 성립하지 않아 동시성을 구분하지 못한다.

    How it works벡터 시계는 노드 수만큼의 카운터 배열을 들고 다녀 두 사건이 인과적으로 앞뒤인지 아니면 동시(concurrent)인지를 정확히 판별하지만, 메타데이터 크기가 노드 수에 비례해 확장성이 떨어진다. 하이브리드 논리 시계(HLC)는 물리 시각과 논리 카운터를 한 값으로 결합해, 인과성을 어기지 않으면서도 물리 시각에 가깝게 유지되는 단조 증가 타임스탬프를 만든다.

    Why여러 노드의 로그를 물리 시각으로 정렬하면 원인과 결과가 뒤집혀 보이고, 동시 갱신 충돌을 탐지할지 말지도 결국 어떤 시계를 쓰느냐에서 갈리기 때문이다.

  • 106AlgorithmsRaft 심화

    Raft의 기본 골격은 리더 선출과 로그 복제지만, 실운영에서 어려운 부분은 그 바깥의 세 가지다. 멤버십 변경은 옛 구성과 새 구성이 동시에 서로 다른 과반을 만들어 두 리더가 생기는 상황을 막아야 하므로, 두 구성의 과반을 동시에 요구하는 joint consensus를 거치거나 한 번에 한 노드만 더하고 빼는 방식으로 제한한다.

    How it works로그 압축은 로그가 무한히 자라는 것을 막기 위해 상태 머신을 스냅샷으로 저장하고 그 이전 로그를 버리는 것이며, 뒤처진 팔로워에게는 로그 대신 스냅샷을 통째로 전송하는 별도 RPC가 필요하다. 읽기 보장은 리더가 자신이 아직 리더인지 모른 채 옛 상태를 반환할 수 있다는 문제에서 온다.

    Why논문 수준의 Raft만 구현하고 운영에 들어가면 노드 교체 중 스플릿 브레인, 무한히 커지는 로그, 리더 교체 직후의 stale read가 차례로 터진다. 이 세 가지가 실제 장애의 대부분이다.

  • 107AlgorithmsMulti-Paxos·Flexible Paxos

    기본 Paxos는 하나의 값을 합의하는 데 prepare와 accept 두 단계를 거치며, 각 단계마다 과반 정족수의 응답이 필요하다. Multi-Paxos는 연속된 여러 인스턴스를 합의할 때 안정적인 리더가 prepare 단계를 인스턴스마다 반복하지 않고 한 번에 미리 확보해 두어, 정상 상태에서는 accept 한 라운드만으로 값을 확정한다.

    How it works전통적으로는 모든 정족수가 서로 교차해야 한다고 여겨졌지만, Flexible Paxos는 안전성에 실제로 필요한 조건이 1단계 정족수와 2단계 정족수가 교차하는 것뿐임을 보였다. 즉 |Q1| + |Q2| > N만 만족하면 되고, Q1끼리 또는 Q2끼리는 교차하지 않아도 된다.

    Why합의 시스템의 지연과 장애 내성은 대부분 정족수 크기 선택에서 결정되는데, '무조건 과반'이라는 통념만 갖고 있으면 그 조정 여지를 놓친다. 리더 기반 프로토콜의 정상 경로가 왜 1 RTT인지도 여기서 나온다.

  • 108Algorithms비잔틴 정족수(3f+1)와 PBFT

    부분 동기 환경에서 f개의 비잔틴 노드를 견디려면 전체 노드 수가 3f+1 이상이어야 하고, 정족수를 2f+1로 잡으면 임의의 두 정족수가 최소 f+1개 노드에서 겹친다. 그 교집합에는 정직한 노드가 반드시 하나 이상 포함되므로, 서로 상충하는 두 값이 동시에 확정될 수 없다는 안전성이 나온다.

    How it worksPBFT는 pre-prepare, prepare, commit 3단계로 합의를 이루지만 뷰 체인지 비용이 노드 수에 대해 크게 증가한다. HotStuff는 투표를 임계 서명으로 집계하고 리더를 통해 중계해 통신량을 선형으로 줄이고, 연속된 체인 규칙으로 뷰 체인지를 단순화했다.

    Why지분증명 체인, 롤업 시퀀서, 사이드 인프라가 모두 이 계열이라 완결성이 어떤 가정 위에서 보장되는지, 리더가 죽었을 때 진행성이 어떻게 회복되는지를 알아야 장애를 해석할 수 있다.

  • 109AlgorithmsDAG 합의

    DAG 기반 합의는 '데이터를 퍼뜨리는 일'과 '순서를 정하는 일'을 분리한다. Narwhal은 멤풀 계층으로, 각 검증자가 트랜잭션 배치를 만들고 다른 검증자들의 서명(가용성 증명)을 모아 이전 라운드 배치들을 참조하는 정점을 만들며, 그 결과 모든 검증자가 거의 같은 DAG를 갖게 된다.

    How it works이 DAG는 이미 데이터가 전파·저장되었음을 보장하므로, 합의 계층은 실제 트랜잭션이 아니라 DAG의 메타데이터만 다루면 된다. Bullshark 같은 순서화 프로토콜은 추가 메시지를 거의 주고받지 않고, 각 검증자가 자기 로컬 DAG를 정해진 규칙으로 해석해 결정적으로 같은 전체 순서를 뽑아낸다.

    Why리더 하나가 모든 트랜잭션을 브로드캐스트하는 고전 BFT는 리더의 대역폭이 곧 시스템 처리량 상한이 되는데, 이 분리 구조가 그 병목을 어떻게 푸는지가 최신 고성능 체인 설계의 핵심 아이디어다.

  • 110Algorithms나카모토 합의의 확률적 최종성과 selfish mining

    나카모토 합의는 작업증명으로 블록을 생성하고 가장 누적 작업량이 큰 체인을 정본으로 삼는 규칙이며, 여기서 최종성은 절대적이지 않고 확률적이다. 어떤 블록 위에 정직한 블록이 더 쌓일수록 공격자가 그 블록을 되돌리기 위해 따라잡아야 할 격차가 커지므로, 되돌림 확률은 확인 수가 늘어남에 따라 지수적으로 감소한다.

    How it works이 보장은 공격자의 해시파워가 정직한 쪽보다 작다는 가정과 네트워크 전파가 충분히 빠르다는 가정 위에서만 성립한다. selfish mining은 채굴한 블록을 즉시 공개하지 않고 비밀 체인을 유지하다가 정직한 블록이 나오면 전략적으로 공개해, 정직한 채굴자들의 작업을 무효화시키는 전략이다.

    Why몇 확인을 기다려야 하는가는 안전 파라미터를 돈으로 환산하는 결정이며, 인센티브 공격이 존재한다는 사실은 다수 정직 가정만으로 시스템을 정당화할 수 없음을 뜻한다.

  • 111AlgorithmsCasper FFG + LMD-GHOST

    이더리움의 합의는 두 요소로 나뉘는데, LMD-GHOST는 어느 체인을 따를지 고르는 포크 선택 규칙이고 Casper FFG는 그 위에서 최종성을 부여하는 규칙이다. LMD-GHOST는 각 검증자의 가장 최근 투표만 세어 가중치가 가장 큰 서브트리를 따라 내려가며 헤드를 정한다.

    How it worksCasper FFG는 에포크 경계의 체크포인트를 대상으로 투표하며, 스테이크의 3분의 2 이상이 어떤 링크를 지지하면 그 체크포인트가 justified 되고, 연속된 justification이 성립하면 finalized 된다. 재조직은 아직 finalize되지 않은 구간에서만 자연스럽게 일어나며, 네트워크 지연·검증자 이탈·투표 타이밍 때문에 다수 가중치가 늦게 드러날 때 발생한다.

    Why"몇 블록 기다려야 안전한가"라는 질문의 답이 여기서 나오고, 확정 전 데이터를 확정된 것처럼 다루면 reorg 때 상태가 어긋난다.

  • 112Algorithms싱글슬롯 파이널리티와 서명 집계 병목

    이더리움의 파이널리티는 현재 여러 슬롯에 걸친 에폭 단위 투표 누적으로 확정되므로, 블록이 포함된 뒤 최종 확정까지 수 분 수준의 시간이 걸린다. 싱글슬롯 파이널리티(SSF)는 한 슬롯 안에서 전체 검증자 집합의 투표를 모아 그 슬롯의 블록을 즉시 확정하려는 연구 방향이다.

    How it works병목은 합의 규칙 자체보다 시스템 공학 쪽에 있는데, 검증자 수가 매우 많을 때 슬롯 시간 안에 모든 서명을 수집·집계·검증하고 전파해야 하기 때문이다. BLS 서명은 다수를 하나로 집계할 수 있지만, 집계 트리를 통과하는 네트워크 전파와 누가 참여했는지를 나타내는 비트필드 처리 비용이 그대로 남는다.

    Why파이널리티 지연은 브리지 확정, 거래소 입금 인정, 온체인 정산의 안전 기준을 직접 결정하는 값이라 서비스 설계에 그대로 반영된다.

  • 113Algorithms데이터 가용성 샘플링과 소거부호(Reed-Solomon)

    Reed-Solomon 부호는 k개의 데이터 심볼을 다항식의 계수(또는 평가값)로 보고 서로 다른 n개의 점에서 평가해 n개의 심볼을 만드는 소거부호로, 차수 k-1 다항식은 서로 다른 k개의 점으로 유일하게 복원되므로 임의의 k개 조각만 있으면 원본을 되살릴 수 있다. 데이터 가용성 문제는 블록 생산자가 데이터를 실제로 공개했는지를 전체를 내려받지 않고 확인해야 한다는 데서 생기며, 소거부호로 확장해 두면 '데이터를 감추려면 최소한 상당 비율의 조각을 감춰야 한다'는 성질이 만들어진다.

    How it works데이터 가용성 샘플링(DAS)은 이 성질을 이용해 각 라이트 노드가 무작위 위치의 조각 몇 개를 요청하고 모두 받으면 통과시키는 방식이며, 숨겨진 조각의 비율이 일정 이상이므로 샘플 수를 늘리면 감지 실패 확률이 지수적으로 줄어든다. 여기에 각 조각이 약속된 데이터와 일치하는지 검증하는 수단(예: KZG 같은 다항식 약속 또는 사기 증명)이 함께 필요하며, 그렇지 않으면 생산자가 잘못 부호화한 조각을 낼 수 있다.

    Why롤업의 안전성은 결국 '데이터가 공개되었는가'에 달려 있고, 라이트 클라이언트가 풀 노드 없이도 이를 확률적으로 검증할 수 있게 해 주는 것이 DAS이므로 L2 위 서비스의 신뢰 가정을 이해하려면 필수다.

  • 114Algorithms라이트 클라이언트와 상태 없는(stateless) 검증

    라이트 클라이언트는 전체 블록과 상태를 보관·실행하지 않고, 블록 헤더 체인만 따라가면서 특정 사실을 Merkle 증명으로 검증하는 노드다. 헤더의 상태 루트를 신뢰의 앵커로 삼아, 어떤 계정 잔액이나 스토리지 값이 그 루트에 포함된다는 포함 증명을 받아 로컬에서 해시로 재계산해 확인한다.

    How it works여기서 헤더 자체의 정당성은 합의 계층에서 얻어야 하며, PoS 체인에서는 검증자 서명 집합에 대한 경량 증명을 통해 헤더를 따라간다. 상태 없는(stateless) 검증은 여기서 한 걸음 더 나아가, 블록 실행에 필요한 상태 조각과 그 증명을 witness로 블록과 함께 받아 상태 DB 없이도 블록을 재실행·검증하는 방식이다.

    Why모바일·브라우저·크로스체인 브리지처럼 풀노드를 돌릴 수 없는 환경에서 신뢰 가정을 최소화하려면 라이트 클라이언트 검증이 유일한 현실적 수단이다.

  • 115Algorithms크로스체인 신뢰 가정 분류

    크로스체인 시스템은 상대 체인에서 일어난 사실을 무엇을 근거로 믿는지에 따라 분류된다. 외부 검증형 브릿지는 멀티시그나 별도 검증자 집합의 증언에 의존하므로 신뢰 근거가 그 집합의 정직성과 키 관리에 있고, 그래서 대형 탈취 사고의 단골 표적이 되어 왔다.

    How it works라이트클라이언트 방식은 상대 체인의 합의 규칙을 직접 검증해 상대 체인의 합의 안전성 외에 추가 신뢰를 요구하지 않지만, 구현 복잡도와 온체인 검증 비용이 크고 이를 줄이기 위해 ZK 증명을 쓰는 방향이 활발하다. 인텐트·솔버 기반은 사용자가 원하는 결과만 선언하고 솔버가 자기 자금으로 먼저 채워 준 뒤 나중에 정산에서 회수하는 구조라, 신뢰 가정이 메시지 전달의 진위에서 솔버의 담보와 정산·분쟁 절차로 옮겨간다.

    Why체인 간 자산이나 데이터를 붙일 때 실제 위험은 코드 버그보다 이 다리가 결국 누구를 믿는 구조인가에서 나오고, 그 신뢰 가정이 서비스 전체의 최악 손실 범위를 정하기 때문이다.

  • 116Algorithms시퀀서 분산화와 강제 포함(force inclusion)

    대부분의 롤업은 트랜잭션 순서를 정하는 시퀀서를 단일 주체가 운영한다. 이 구조는 빠른 확정감과 낮은 지연을 주지만, 그 주체가 특정 사용자의 트랜잭션을 배제하거나 멈추면 사용자가 체인을 쓸 수 없다는 검열·가용성 위험을 남긴다.

    How it worksforce inclusion은 이 위험의 하한을 정하는 장치로, 사용자가 시퀀서를 거치지 않고 L1의 inbox 컨트랙트에 트랜잭션을 직접 제출하면 일정 지연 창이 지난 뒤에는 롤업이 그것을 반드시 포함해야 유효한 상태 전이로 인정되게 만든다. 덕분에 시퀀서가 검열해도 사용자는 최소한 출금 같은 탈출 경로를 확보한다.

    WhyL2에 올린 서비스의 최악 시나리오는 시퀀서가 멈추거나 우리 트랜잭션만 배제하는 경우인데, force inclusion 경로의 존재 여부와 지연 창 길이가 그때 자금이 묶이는 시간을 결정한다. 이는 배포 체인을 고르는 실질적 기준이다.

  • 117Algorithms사기 증명 vs 유효성 증명의 게임 이론

    사기 증명(fraud proof) 방식은 제출된 상태 전이를 일단 유효하다고 가정하고, 챌린지 기간 안에 누군가 잘못을 지적하면 온체인 검증으로 되돌리는 구조다. 이 방식의 안전성은 암호학이 아니라 게임이론 가정에 의존하는데, 정직한 챌린저가 최소 한 명 존재하고(1-of-N) 그가 챌린지 기간 내에 검열당하지 않고 L1에 트랜잭션을 넣을 수 있어야 한다.

    How it works여기서 verifier's dilemma가 생기는데, 검증에는 항상 비용이 들지만 보상은 사기가 실제로 일어났을 때만 발생하므로 합리적 참여자는 검증을 게을리할 유인을 갖고, 이를 본드와 슬래싱으로 보정한다. 유효성 증명(validity proof) 방식은 상태 전이가 규칙을 따랐음을 암호학적 증명으로 보여 주므로 정직한 감시자 가정도 챌린지 기간도 필요 없다.

    WhyL2 위에서 자산을 다루면 출금 지연 기간, 챌린저 존재 가정, 검열 저항 같은 조건이 곧 사용자 자금의 안전 조건이 된다. 이를 모르면 브리지나 정산 설계에서 실제 신뢰 가정을 잘못 잡는다.

  • 118AlgorithmsPBS·MEV 경매·타이밍 게임

    MEV는 블록 안에서 트랜잭션의 포함 여부·순서·검열을 조정해 뽑아낼 수 있는 초과 가치를 말한다. Proposer-Builder Separation은 블록을 조립하는 빌더와 블록을 제안하는 검증자를 분리해, 제안자가 블록 내용을 보지 않은 채 헤더에 서명하고 가장 높은 입찰가의 블록을 받도록 하는 구조다(이더리움에서는 릴레이를 거치는 오프체인 형태로 널리 쓰인다).

    How it works빌더는 서처들이 보낸 번들을 모아 블록 가치를 최대화하고 그 상당 부분을 입찰가로 제안자에게 지급하는 경매가 형성된다. 타이밍 게임은 제안자가 슬롯 안에서 제안을 최대한 늦춰 MEV를 더 모으려는 행위로, 블록 전파 여유를 깎아 네트워크 안정성을 해치는 유인 문제다.

    WhyDEX와 예측시장의 사용자 주문은 샌드위치·백런의 표적이고 정산 트랜잭션도 포함 시점이 조작될 수 있어, 프로토콜 설계 단계에서 방어를 넣지 않으면 나중에 막을 수 없다.

  • 119Algorithms멱등성과 "정확히 한 번"

    분산 시스템에서 메시지 전달은 실질적으로 at-most-once 아니면 at-least-once이며, 순수한 exactly-once 전달은 불가능하다. 대신 현실적인 목표는 '재시도는 얼마든지 일어나되 효과는 한 번'인 exactly-once 처리이고, 이는 수신 측이 멱등해야 달성된다.

    How it works멱등성은 보통 요청마다 고유한 멱등 키를 붙이고, 처리 결과를 그 키로 저장해 두었다가 같은 키가 다시 오면 새로 처리하지 않고 저장된 결과를 돌려주는 식으로 구현한다. 아웃박스 패턴은 '상태 변경'과 '메시지 발행'이 서로 다른 시스템이라 원자적으로 묶이지 않는 문제(이중 쓰기)를 해결한다.

    Why결제·정산처럼 중복 실행이 곧 금전 손실인 흐름에서, 재시도와 장애 복구가 있는 한 멱등 키와 아웃박스 없이는 언젠가 반드시 중복이나 유실이 발생한다.

  • 120Algorithms[복습] 장애 모델과 신뢰 가정을 먼저 쓰는 습관

    분산 시스템 설계에서 어떤 알고리즘이 무엇을 보장하는지는 항상 가정의 함수이므로, 설계 문서의 첫 줄은 장애 모델과 신뢰 가정이어야 한다. 장애 모델은 노드가 멈추고 끝나는 crash-stop, 멈췄다 복구되는 crash-recovery, 메시지를 흘리는 omission, 임의로 거짓말하는 Byzantine 등으로 구분되며 뒤로 갈수록 필요한 정족수와 비용이 커진다.

    How it works타이밍 모델은 동기, 부분 동기, 비동기로 나뉘고, 완전 비동기에서는 하나의 크래시만 있어도 결정론적 합의가 불가능하다는 것이 알려져 있다. 신뢰 가정에는 정직한 노드 비율, 인증된 채널과 서명의 존재, 시계 오차 한계, 그리고 어떤 주체를 신뢰할 수 있다고 보는지가 들어간다.

    Why실제 장애는 대부분 코드 버그가 아니라 문서화되지 않은 가정이 조용히 깨질 때 발생하고, 가정이 적혀 있지 않으면 리뷰에서 그 위반을 지적할 방법 자체가 없다.

Algorithms · E. 데이터·스토리지 엔진 (Day 69–81)

  • 121AlgorithmsMVCC 내부와 스냅샷 격리의 이상현상(write skew)

    MVCC는 갱신 시 기존 행을 덮어쓰지 않고 새 버전을 만들어, 각 트랜잭션이 자신의 스냅샷에 보이는 버전만 읽게 하는 기법이다. 덕분에 읽기가 쓰기를 막지 않고 쓰기도 읽기를 막지 않으며, 어떤 버전이 보이는지는 트랜잭션 ID와 가시성 규칙으로 판정한다.

    How it works스냅샷 격리는 이 위에서 더티 리드·논리피터블 리드·로스트 업데이트를 막지만 직렬화 가능성을 보장하지는 않는다. 대표적 이상현상이 write skew로, 두 트랜잭션이 같은 집합을 읽고 각자 겹치지 않는 서로 다른 행을 갱신해, 개별적으로는 제약을 지키지만 합쳐 놓으면 불변식이 깨지는 경우이다.

    Why격리 수준 이름만 믿고 애플리케이션 불변식을 DB에 맡기면, 부하가 올라가 동시 실행이 겹치는 순간에만 조용히 깨지는 버그가 생긴다.

  • 122AlgorithmsWAL·그룹 커밋·fsync 비용

    WAL은 데이터 페이지를 수정하기 전에 변경 내역을 로그 파일에 먼저 순차 기록해 내구성과 크래시 복구를 보장하는 기법이며, 무작위 쓰기를 순차 쓰기로 바꾸는 부수 효과도 크다. 커밋이 진짜 내구적이 되려면 로그 레코드가 저장장치에 도달해야 하고, 이를 위해 fsync 또는 fdatasync로 OS 페이지 캐시와 장치 캐시를 강제로 비워야 하는데 이 호출이 커밋 지연의 지배적 비용이다.

    How it works그룹 커밋은 짧은 시간 창 안에 도착한 여러 트랜잭션의 로그를 모아 한 번의 fsync로 함께 내구화해, fsync 횟수를 트랜잭션 수가 아니라 시간 단위에 비례하게 만든다. 그 결과 개별 트랜잭션의 지연은 조금 늘지만 전체 처리량은 크게 오르며, 이는 지연과 처리량을 맞바꾸는 전형적인 배칭이다.

    WhyDB가 갑자기 느려질 때 원인이 쿼리 플랜이 아니라 커밋당 fsync인 경우가 많고, 반대로 빨라 보이는 설정이 사실은 내구성을 포기한 것일 수도 있다.

  • 123AlgorithmsLSM 트리 튜닝

    LSM 트리는 쓰기를 메모리의 memtable에 모았다가 정렬된 불변 파일(SSTable)로 flush하고, 레벨별로 쌓인 파일들을 컴팩션으로 병합해 정리하는 구조로, 랜덤 쓰기를 순차 쓰기로 바꾸어 쓰기 처리량을 얻는다. 대가로 세 가지 증폭이 생긴다.

    How it works쓰기 증폭은 하나의 논리적 쓰기가 컴팩션을 거치며 여러 번 디스크에 다시 쓰이는 배수이고, 읽기 증폭은 하나의 조회가 여러 레벨·파일을 확인해야 하는 비용이며, 공간 증폭은 아직 정리되지 않은 옛 버전과 삭제 마커 때문에 실제 데이터보다 저장 공간이 커지는 비율이다. 레벨드 컴팩션은 레벨마다 키 범위가 겹치지 않게 유지해 읽기·공간 증폭을 낮추는 대신 쓰기 증폭이 크고, 티어드(사이즈 계층) 컴팩션은 반대로 쓰기 증폭이 작지만 겹치는 파일이 많아 읽기·공간 증폭이 커진다.

    Why체인 노드의 상태 DB나 인덱서 백엔드가 대개 LSM 기반이라, 디스크 쓰기량이 폭증하거나 컴팩션이 밀려 읽기 지연이 튀는 장애를 만나면 이 세 증폭의 관점 없이는 원인을 못 잡는다.

  • 124AlgorithmsB+트리 vs LSM

    B+트리는 정렬된 키를 페이지 단위 노드에 유지하며 갱신을 제자리(in-place)로 수행하므로 읽기 증폭이 작고 범위 스캔이 자연스럽지만, 랜덤 쓰기가 랜덤 페이지 쓰기로 이어져 쓰기 증폭과 페이지 분할 비용이 크다. LSM 트리는 쓰기를 메모리 테이블에 모아 순차적으로 SSTable로 flush하고 백그라운드 compaction으로 정리하므로 쓰기 처리량이 높은 대신, 하나의 키가 여러 레벨에 흩어져 읽기 증폭이 생기고(블룸 필터로 완화) compaction이 지연 스파이크와 공간 증폭을 만든다.

    How it works이더리움의 상태는 Merkle Patricia 트리를 키-값 저장소 위에 얹는 구조라, 블록마다 루트까지의 경로 노드가 통째로 새로 쓰이는 무작위·쓰기 편중 패턴이 나온다. 그래서 Geth 계열은 LSM 기반 저장소(LevelDB, 이후 Pebble)를 써 왔고, Erigon은 평탄한 키 배치와 B+트리 기반 MDBX로 상태를 재구성해 읽기 증폭과 디스크 사용량을 줄이는 방향을 택했다.

    Why노드 동기화가 느리거나 디스크가 폭증하는 문제는 대개 애플리케이션 로직이 아니라 스토리지 엔진의 증폭 특성과 접근 패턴의 불일치에서 온다.

  • 125Algorithms상태 트리 저장 문제

    이더리움 상태는 논리적으로 Merkle Patricia Trie지만, 이 구조를 그대로 키-값 DB에 담으면 계정 하나를 읽는 데 루트부터 리프까지 여러 번의 랜덤 조회가 필요하고 노드가 해시로 키잉되어 저장 지역성이 없다. 그래서 실행 클라이언트들은 계정과 스토리지 슬롯을 평평한 키로 직접 저장하는 flat/snapshot 레이아웃을 따로 두어 읽기를 한 번의 조회로 만들고, 트리는 루트 계산과 증명 생성 용도로 유지한다.

    How it works트리 노드 저장 방식은 노드 내용의 해시를 키로 쓰는 hash 기반과 트리 안에서의 경로를 키로 쓰는 path 기반으로 나뉘며, path 기반은 같은 경로의 이전 버전을 덮어써서 디스크 증가를 억제하는 대신 과거 상태 조회를 위해 별도의 되돌리기 저널이 필요하다. 결국 설계는 읽기 속도, 디스크 증가량, 과거 상태 보존, 증명 생성 능력 사이의 트레이드오프다.

    Why노드 동기화 속도, 디스크 사용량, 아카이브 노드 운영 비용이 전부 이 레이아웃 선택에서 결정되고, 인프라 비용 논의가 실은 이 얘기이기 때문이다.

  • 126Algorithms프루닝·아카이브·스냅 싱크

    노드는 블록·영수증 같은 히스토리와 각 시점의 상태 트라이를 모두 저장할 수 있지만, 전체를 영구 보관하면 디스크가 감당되지 않는다. 프루닝은 최신 상태를 유지하는 데 필요 없는 과거 상태 트라이 노드를 지우는 것으로, 이 노드는 현재 잔고·스토리지 조회는 되지만 오래된 블록 시점의 상태 조회는 못 한다.

    How it works아카이브 노드는 모든 과거 상태를 보존해 임의 블록 시점의 조회와 재실행이 가능한 대신 저장 비용이 훨씬 크다. 동기화 방식도 갈리는데, 모든 블록을 재실행하는 full sync와 달리 snap sync는 상태를 트라이 노드 단위가 아니라 평면 키-값 구간 단위로 내려받고 각 구간을 상태 루트에 대한 range proof로 검증한 뒤, 동기화 중 변한 부분을 healing 단계에서 메운다.

    Why"과거 블록 시점의 잔고나 포지션을 조회하라"는 요구가 뒤늦게 들어오면 아카이브 노드나 별도 인덱서가 없어 대응이 불가능해진다. 노드 운영 비용과 조회 가능 범위는 처음부터 같이 결정해야 한다.

  • 127Algorithms인덱싱 파이프라인 설계

    인덱싱 파이프라인은 체인의 블록·로그·트레이스를 읽어 쿼리 가능한 형태로 변환해 저장하는 시스템이고, 재생 가능성은 원본 데이터로부터 언제든 처음부터 다시 돌려도 동일한 결과에 도달하는 성질을 뜻한다. 이를 얻으려면 변환 로직이 결정론적 순수 함수여야 하며, 현재 시각·난수·외부 API 응답처럼 재실행 시 달라지는 입력이 변환 안에 들어가면 안 된다.

    How it works진행 상태는 (블록 번호, 로그 인덱스) 같은 커서로 표현하고 쓰기는 멱등해야, 중단 후 재시작이 중복이나 누락 없이 이어진다. 체인은 재구성(reorg)이 일어나므로 확정되지 않은 구간의 결과는 블록 해시를 함께 저장해 되돌리거나 재처리할 수 있어야 하고, 확정 이후 구간만 불변으로 취급한다.

    Why인덱서는 버그 수정이나 스키마 변경이 잦은데, 재생이 불가능하면 과거 데이터를 손으로 패치하는 지옥에 들어간다. reorg 처리를 빠뜨리면 조용히 틀린 데이터가 남는다.

  • 128Algorithms컬럼 스토어와 벡터화 실행(OLAP)

    로우 스토어가 레코드를 통째로 붙여 저장하는 반면 컬럼 스토어는 같은 컬럼의 값을 연속 배치해, 질의에 필요한 컬럼만 읽어 I/O를 크게 줄인다. 같은 타입에 값 분포도 비슷한 데이터가 모이므로 RLE, 딕셔너리, 델타, 비트팩킹 같은 압축이 훨씬 잘 듣고 압축된 상태로 연산하는 것도 가능해진다.

    How it works실행 엔진도 튜플 하나씩 넘기는 volcano 모델 대신 수천 개 값 묶음(벡터) 단위로 처리해 함수 호출 오버헤드를 줄이고 캐시 지역성과 SIMD를 살린다. 대신 단건 조회나 잦은 갱신에는 불리하므로 OLTP 경로는 여전히 로우 스토어가 맞다.

    Why분석 질의를 운영 DB에 그대로 던지면 수십 배 느리고 비싸며, 워크로드 성격과 저장 방식을 맞추지 못하면 인덱스 튜닝으로는 회복되지 않는다.

  • 129Algorithms스트리밍 처리 의미론

    스트리밍 처리에서는 이벤트가 실제 발생한 시각(event time)과 시스템이 처리한 시각(processing time)이 다르고, 네트워크 지연이나 재시도 때문에 순서도 뒤섞인다. 워터마크는 '이 타임스탬프보다 이른 이벤트는 사실상 모두 도착했다'는 시스템의 추정치로, 이벤트 시간 윈도우를 언제 닫고 결과를 낼지 결정하는 신호다.

    How it works워터마크는 추정이므로 늦게 온 데이터(late data)가 있을 수 있고, 허용 지연 시간을 두어 결과를 갱신하거나 별도 경로로 빼내는 정책이 필요하다. 여기서 완결성과 지연 사이의 트레이드오프가 생긴다.

    Why집계 값이 '왜 조금씩 틀리냐'는 문제의 대부분은 버그가 아니라 이벤트 시간과 워터마크 정책을 명시하지 않은 데서 나온다.

  • 130Algorithms벡터 DB와 ANN 인덱스(HNSW·IVF-PQ)

    벡터 검색은 임베딩 공간에서 질의 벡터와 가까운 항목을 찾는 문제이며, 고차원에서는 정확한 최근접 탐색이 사실상 전수 비교로 퇴화하므로 근사 최근접 탐색을 쓴다. ANN 인덱스의 품질은 정확도인 recall과 지연·메모리 사이의 트레이드오프 곡선으로 평가하며, 어떤 인덱스도 이 곡선을 벗어나 공짜로 좋아지지 않는다.

    How it worksHNSW는 계층적 근접 이웃 그래프를 만들어 위층의 성긴 연결로 멀리 점프하고 아래층에서 정밀 탐색하는 그리디 탐색을 수행하며, 탐색 폭 파라미터로 recall과 속도를 조절한다. IVF-PQ는 먼저 벡터 공간을 클러스터로 나눠 질의와 가까운 몇 개 리스트만 조사하고, 벡터를 부분 공간별 코드북 인덱스로 압축해 메모리를 크게 줄이면서 근사 거리로 비교한다.

    WhyRAG나 유사 항목 추천의 체감 품질은 대개 생성 모델이 아니라 리트리버의 recall에서 갈리므로, 인덱스 파라미터가 정확도에 미치는 영향을 모르면 원인을 엉뚱한 데서 찾게 된다.

  • 131Algorithms캐시 일관성·무효화·스탬피드 방지

    캐시는 원본과 사본이 갈라지는 순간부터 일관성 문제를 안고 시작하며, 정책은 크게 만료 기반(TTL)과 무효화 기반(쓰기 시 삭제·갱신)으로 나뉜다. 쓰기 경로에서 캐시를 갱신하면 동시 쓰기 순서가 뒤바뀌어 오래된 값이 남을 수 있어, 보통은 갱신보다 삭제가 더 안전하다.

    How it works캐시 스탬피드는 인기 키가 만료되는 순간 다수 요청이 동시에 원본으로 몰리는 현상으로, 원본이 순간적으로 무너질 수 있다. 대응은 단일 비행(single-flight)으로 한 요청만 원본을 조회하게 하거나, 만료 시각에 무작위 지터를 주거나, 만료 전에 미리 갱신하는 조기 재계산, 그리고 갱신 중 낡은 값을 잠시 제공하는 stale-while-revalidate이다.

    Why장애의 상당수는 캐시가 없어서가 아니라 캐시가 한꺼번에 비면서 뒤쪽 시스템이 무너지는 형태로 발생한다.

  • 132Algorithms외부 정렬·병합 전략과 병렬 정렬 (TAOCP 3권)

    외부 정렬은 데이터가 메모리보다 클 때 쓰는 방법으로, 메모리에 들어가는 크기의 런(run)을 만들어 정렬해 디스크에 쓰는 단계와 이 런들을 다방향 병합으로 합치는 단계로 나뉜다. 병합 차수 k를 키우면 필요한 패스 수가 런 개수에 대한 log_k로 줄지만, 런마다 입력 버퍼를 나눠 가져야 해서 버퍼가 작아지면 순차 읽기 효율이 떨어지는 트레이드오프가 있다.

    How it works런 생성 단계에서 replacement selection을 쓰면 평균적으로 메모리 크기보다 긴 런을 만들 수 있어 런 개수 자체를 줄일 수 있다. 병렬 정렬은 데이터를 나눠 각각 정렬한 뒤 병합하거나, 샘플링으로 분할 경계를 정해 각 파티션을 독립적으로 정렬하는 sample sort 방식을 쓰며, 이때 실제 병목은 비교 연산이 아니라 메모리 대역폭과 데이터 이동량이다.

    Why인덱스 재구축, 대용량 조인, 로그 재처리처럼 메모리를 넘는 정렬은 실무에서 자주 나오고, 여기서 성능을 가르는 것은 알고리즘 선택보다 버퍼 크기와 병합 차수 설정이다.

  • 133Algorithms[복습] 데이터 모델이 성능을 정한다

    데이터 모델은 논리적 표현이 아니라 물리적 접근 경로를 결정하기 때문에 성능의 상한을 먼저 정한다. 키 설계는 어떤 조회가 단일 탐색으로 끝나고 어떤 조회가 전체 스캔이 되는지를 정하고, 정규화 정도는 쓰기 시 중복 비용과 읽기 시 조인 비용 사이의 배분을 정하며, 파티셔닝·클러스터링 키는 어떤 범위 질의가 인접한 디스크 블록에서 처리되는지를 정한다.

    How it works인덱스는 이 구조를 사후에 보정하는 수단이지만 쓰기 증폭과 저장 공간을 늘리므로 무한정 늘릴 수 없고, 근본적으로 잘못된 모델을 인덱스로 완전히 구제하지는 못한다. 그래서 실무 순서는 '어떤 질의를 어떤 빈도와 지연 목표로 처리할 것인가'를 먼저 적고 그 접근 패턴에 맞춰 모델을 정하는 것이며, 반대로 모델을 먼저 정하고 질의를 끼워 맞추면 나중에 마이그레이션 비용을 치르게 된다.

    Why성능 문제 대부분은 코드 최적화가 아니라 접근 패턴과 어긋난 스키마에서 오고, 이 결정은 데이터가 쌓인 뒤에 되돌리기가 가장 비싼 결정이기도 하다.

Algorithms · F. 암호학·ZK (Day 82–96)

  • 134Algorithms랜덤 오라클·길이 연장 공격·도메인 분리

    랜덤 오라클 모델은 해시 함수를 모든 입력에 대해 균일 랜덤한 출력을 돌려주는 이상적인 함수로 가정하고 안전성을 증명하는 방법론이며, 실제 해시는 이 이상과 다르기 때문에 증명은 휴리스틱한 보증에 그친다. 그 간극의 대표 사례가 길이 연장 공격으로, Merkle-Damgård 구조 해시(SHA-256 등)의 출력은 사실상 내부 상태이므로 공격자는 원문을 몰라도 H(m)과 길이만 알면 H(m || padding || m')을 계산할 수 있다.

    How it works따라서 secret을 앞에 붙인 H(k || m)을 MAC으로 쓰면 위조가 가능하고, 대신 두 단계 구조인 HMAC이나 스펀지 구조인 Keccak/SHA-3을 써야 한다. 도메인 분리는 서로 다른 용도의 해시 입력이 절대 겹치지 않도록 용도 태그나 접두사를 넣어 한 문맥의 서명·커밋먼트가 다른 문맥에서 재사용되지 못하게 하는 원칙이다.

    Why서명 대상 메시지를 임의로 이어 붙여 해시하는 코드는 재사용 공격이나 위조로 이어지며, 이는 라이브러리가 아니라 애플리케이션이 만드는 취약점이다.

  • 135AlgorithmsHMAC·AEAD와 nonce 오용 저항

    HMAC은 해시 함수와 비밀키로 만드는 메시지 인증 코드로, 키를 모르면 유효한 태그를 만들 수 없어 메시지의 무결성과 출처를 함께 보장한다. AEAD는 암호화와 인증을 한 번에 처리하는 모드로, 평문의 기밀성에 더해 암호문과 추가 인증 데이터(AAD)의 무결성까지 보장한다.

    How it worksAES-GCM이나 ChaCha20-Poly1305 같은 대표적 AEAD는 같은 키로 nonce를 재사용하면 인증 키가 노출되거나 평문이 복구될 수 있어 치명적이며, 그래서 nonce 오용 저항 모드는 nonce가 반복되더라도 피해를 같은 평문이 같은 암호문으로 보인다는 수준으로 제한한다. 웹훅 검증은 기밀성이 아니라 인증 문제이므로 보통 HMAC을 쓰고, 서명 대상에 타임스탬프를 포함한 뒤 수신 측에서 허용 시간 창을 검사해 재전송 공격을 막는다.

    Why웹훅 엔드포인트는 인터넷에 열려 있어 서명 검증이나 재전송 방어가 없으면 아무나 결제·정산 이벤트를 위조해 밀어 넣을 수 있기 때문이다.

  • 136Algorithms난수 생성과 CSPRNG 품질 (TAOCP 2권)

    난수 생성기는 시드에서 결정적으로 수열을 만드는 PRNG와, 예측 불가능성을 보장하도록 설계된 CSPRNG로 나뉜다. 통계적 검정 묶음은 출력이 균등성·독립성 면에서 이상한 구조를 보이는지 검사하지만, 검정을 통과했다는 사실이 암호학적 안전성을 뜻하지는 않는다.

    How it works선형 합동법이나 메르센 트위스터처럼 통계적으로 무난한 생성기도 출력을 조금만 관측하면 내부 상태를 복원해 이후 값을 전부 예측할 수 있다. CSPRNG는 이전 출력을 알아도 다음 비트를 유의미하게 예측할 수 없어야 하고, 상태가 노출돼도 과거 출력을 되돌릴 수 없어야 하며, 시드는 OS 엔트로피 소스에서 받아야 한다.

    Why서명 nonce, 세션 토큰, 키 생성이 모두 여기에 의존하며, 재현되는 난수 하나가 곧바로 개인키 노출로 이어진다. 특히 ECDSA는 서로 다른 두 서명에서 같은 nonce를 쓰면 대수적으로 개인키가 복원된다.

  • 137Algorithms서명 스킴 비교

    ECDSA는 타원곡선 위의 서명 스킴으로 서명마다 비밀 난수 nonce가 필요하고, 이 nonce가 재사용되거나 편향되면 서명 두 개만으로 개인키가 복원된다. 또 (r, s)와 (r, -s mod n)이 모두 유효해 서명 가변성(malleability)이 생기므로 이더리움은 s를 낮은 절반으로 제한하는 규칙을 두었고, 대신 서명에서 공개키를 복원할 수 있다는 특성 덕에 ecrecover 패턴이 가능하다.

    How it worksEdDSA는 Schnorr 계열로 nonce를 비밀키와 메시지의 해시로 결정론적으로 만들어 nonce 재사용 사고를 구조적으로 없앴지만, 구현마다 cofactor 처리나 인코딩 정규성 검사 기준이 달라 같은 서명을 어떤 라이브러리는 받고 어떤 라이브러리는 거부하는 합의 위험이 있다. Schnorr 서명은 선형 구조 덕분에 여러 키와 서명을 하나로 집계할 수 있고, BLS는 페어링을 이용해 서명이 짧고 다수 서명을 무제한 집계할 수 있어 검증자 집합 서명 취합에 적합하지만 검증 연산이 상대적으로 무겁다.

    Why서명 검증 코드의 미묘한 차이가 자금 도난이나 노드 간 합의 분기로 직결되고, nonce·malleability·rogue-key는 실제로 반복해서 사고를 낸 지점이다. 스킴을 고르는 일은 곧 어떤 함정을 떠안을지 고르는 일이다.

  • 138Algorithms임계 서명·MPC·분산 키 생성(DKG)

    (t,n) 임계 서명은 비밀키를 n개 지분으로 나눠 t개 이상이 모여야 유효한 서명을 만들 수 있게 하는 방식으로, 어떤 시점에도 완전한 키가 한 곳에 존재하지 않는다. 원리는 Shamir 비밀 분산으로, t-1차 다항식 위의 점들을 배포하면 t개 점으로만 상수항(비밀)을 복원할 수 있고 t-1개로는 아무 정보도 얻지 못한다.

    How it worksDKG는 신뢰할 딜러 없이 참가자들이 상호작용만으로 공동 공개키와 각자의 지분을 만들어내는 프로토콜이며, 검증 가능한 비밀 분산을 써서 부정 참가자를 걸러낸다. BLS 서명은 키와 서명이 그대로 더해지는 성질 덕분에 임계화가 자연스럽지만, ECDSA는 곱셈 구조 때문에 훨씬 복잡한 MPC 프로토콜이 필요하다.

    Why브리지·커스터디·오라클 서명자 집합의 보안은 결국 키를 어떻게 나눠 갖느냐에 달려 있고, 실제 사고 상당수가 단일 키 유출에서 시작된다.

  • 139Algorithms커밋먼트

    커밋먼트는 값을 봉인해 공개하되 나중에 그 값을 밝힐 수 있게 하는 원시 도구이며, 봉인된 값을 바꿔치기할 수 없는 binding과 봉인만 봐서는 값을 알 수 없는 hiding을 요구한다. Pedersen 커밋먼트는 두 생성원과 무작위 블라인딩 값을 써서 이산로그 가정 위에 세워지며, 정보이론적으로 완벽한 hiding과 계산적 binding을 가지고 덧셈에 대해 준동형이라 값들의 합을 커밋먼트끼리 더해 검증할 수 있다.

    How it worksKZG는 다항식 커밋먼트로, 페어링을 이용해 커밋먼트와 임의 점에서의 평가 증명을 모두 상수 크기로 만들지만 구조화된 참조 문자열(trusted setup)이 필요하다. FRI는 해시와 리드-솔로몬 부호의 근접성 검사에 기반해 신뢰 셋업 없이 동작하고 증명 크기가 폴리로그로 커지지만, 가정이 해시 기반이라 양자 내성 관점에서 선호된다.

    Why롤업과 ZK 시스템의 비용 구조, 데이터 가용성 설계, 신뢰 가정이 사실상 어떤 커밋먼트를 쓰느냐로 결정되기 때문에 이 트레이드오프를 모르면 아키텍처 선택 근거를 세울 수 없다.

  • 140Algorithms다중정밀 산술(bignum)

    다중정밀 산술은 기계어 워드보다 큰 정수를 워드 배열로 표현해 연산하는 기법이며, 암호 구현에서 가장 비싼 연산은 모듈러 곱셈이다. 나눗셈은 곱셈보다 훨씬 느리므로 모듈러 리덕션에서 실제 나눗셈을 피하는 것이 핵심 최적화다.

    How it worksMontgomery 리덕션은 모듈러스와 서로소인 2의 거듭제곱 R을 잡아 수를 Montgomery 표현으로 옮긴 뒤, 곱셈과 시프트만으로 R의 역원을 곱한 결과를 얻어 리덕션을 수행한다. 표현 변환에 비용이 들기 때문에 지수승처럼 같은 모듈러스에서 곱셈을 연달아 할 때 유리하다.

    Why타원곡선 서명 검증이나 ZK 증명 생성 시간의 상당 부분이 필드 곱셈에 들어가므로, 이 계층의 표현과 리덕션 선택이 곧 처리량과 가스 비용을 결정한다.

  • 141Algorithms고정소수점 산술과 반올림 정책

    EVM에는 부동소수점이 없으므로 비율과 가격은 고정소수점, 즉 정수에 암묵적 스케일(예: 1e18)을 곱한 표현으로 다룬다. 곱셈은 스케일이 두 배가 되므로 나누어 되돌려야 하고, 이 나눗셈마다 절사 오차가 생기며 그 방향이 시스템의 불변식을 지키거나 깨뜨린다.

    How it works원칙은 항상 프로토콜(풀·컨트랙트)에 유리한 방향으로 반올림하는 것으로, 사용자가 받는 양은 내림, 사용자가 내는 양은 올림으로 처리해 반복 거래로 잔여분을 긁어가는 dust leak을 막는다. LMSR처럼 exp와 ln이 필요한 비용함수는 정수 근사로 구현해야 하고, 근사 오차의 상한과 그 오차가 비용함수의 단조성·볼록성을 깨지 않는지를 함께 따져야 한다.

    Why반올림 방향 하나를 반대로 잡으면 수학적으로는 미미한 오차가 무한 반복 가능한 무료 인출 경로가 된다.

  • 142Algorithms유한체·다항식 산술과 NTT 구현 관점

    유한체는 원소가 유한개이면서 덧셈과 곱셈, 그리고 0을 제외한 나눗셈이 모두 정의되는 대수 구조이고, 암호와 ZK에서는 주로 큰 소수 p에 대한 소수체 F_p를 쓴다. 이 위의 다항식 곱셈은 정의대로 하면 O(n^2)이지만, 곱셈군 안에 크기가 2의 거듭제곱인 부분군(즉 적당한 차수의 단위근)이 존재하도록 소수를 고르면 FFT와 같은 구조의 변환을 정수 위에서 오차 없이 수행할 수 있으며 이것이 NTT다.

    How it worksNTT는 부동소수점 반올림 오차가 없고 결과가 체 원소로 정확히 떨어지므로 증명 시스템에 적합하고, 곱셈은 평가 도메인에서의 원소별 곱으로 바뀌어 전체가 O(n log n)이 된다. 구현에서는 Montgomery나 Barrett 축약으로 모듈러 곱 비용을 줄이고 버터플라이 연산에서 지연 축약을 적용해 나머지 연산 횟수를 줄이는 것이 핵심 최적화다.

    WhyZK 증명 생성 시간의 큰 몫이 NTT와 다항식 연산에서 나오므로, 증명 비용을 추정하거나 튜닝하려면 이 계층을 이해해야 한다.

  • 143Algorithms산술화

    산술화는 '이 프로그램을 올바르게 실행했다'는 명제를 유한체 위의 다항식 제약 만족 문제로 바꾸는 단계로, 모든 ZK 증명 시스템의 첫 관문이다. R1CS는 계산을 A·z ∘ B·z = C·z 형태의 제약 집합으로 표현하는데, 여기서 z는 공개 입력과 witness를 담은 벡터이고 각 제약은 곱셈 게이트 하나에 대응하므로 표현이 단순한 대신 제약 수가 곱셈 개수에 비례해 커진다.

    How it worksAIR는 계산을 실행 트레이스 표로 보고 '인접한 두 행 사이에 성립해야 하는 전이 제약'과 경계 제약으로 표현하며, 같은 연산이 반복되는 VM 실행에 특히 잘 맞아 제약 기술이 매우 간결해진다. PLONKish는 열(column)과 행(row)으로 이루어진 표에 임의 차수의 커스텀 게이트, 서로 다른 셀을 동일하게 강제하는 copy constraint(순열 논증), 그리고 lookup 논증을 얹은 산술화로, 비싼 비트 연산 같은 것을 미리 계산된 테이블 조회로 대체할 수 있다는 점이 큰 장점이다.

    WhyZK 시스템의 증명 비용은 대부분 산술화 단계에서 회로가 얼마나 커지느냐로 결정되므로, 같은 로직도 어떤 산술화에 올리느냐에 따라 실용성이 갈린다.

  • 144Algorithms다항식 IOP

    다항식 IOP(Interactive Oracle Proof)는 증명자가 다항식을 오라클로 제출하고 검증자가 무작위 점에서의 평가를 질의하는 추상 프로토콜로, 계산의 정당성을 다항식 항등식 검사로 환원한다. 이 추상 계층은 실제 암호를 쓰지 않고 완전성·건전성만 논하며, 오라클을 실제 다항식 커밋먼트 스킴(PCS)으로 바꾸고 Fiat-Shamir로 비대화형화하면 구체적인 SNARK/STARK가 된다.

    How it works그래서 산술화(R1CS, PLONKish, AIR)와 커밋먼트 방식이 분리되고, 시스템의 증명 크기·검증 시간·증명 시간·신뢰 설정 여부는 대부분 PCS 선택에서 갈린다. 페어링 기반 KZG는 커밋먼트와 평가 증명이 상수 크기이고 검증이 매우 빠르지만 구조화된 신뢰 설정이 필요하고 양자 내성이 없다.

    Why온체인 검증 비용은 증명 크기와 검증자 연산량에 거의 비례하므로, 어떤 증명 시스템을 쓰느냐가 곧 가스비와 신뢰 가정의 선택이 된다.

  • 145Algorithms재귀 증명과 증명 집계

    재귀 증명은 어떤 증명이 검증을 통과했다는 사실 자체를 다시 증명하는 기법으로, 증명 검증 알고리즘을 회로로 표현한 뒤 그 회로의 실행을 증명하는 방식으로 구현한다. 이렇게 하면 임의로 긴 계산이나 여러 블록의 상태 전이를 하나의 작은 증명으로 접을 수 있어, 검증 비용이 원래 계산의 길이와 무관해진다.

    How it works증명 집계는 여러 개의 독립적인 증명을 묶어 검증 비용을 줄이는 것으로, 재귀로 구현하기도 하고 배치 검증이나 커밋먼트의 선형 결합 같은 더 값싼 방법을 쓰기도 한다. 실무의 핵심 제약은 그 증명 시스템의 검증기를 회로 안에서 얼마나 싸게 표현할 수 있는가이며, 그래서 곡선 선택이나 증명 친화적 해시 함수 선택이 중요해진다.

    Why롤업이 수많은 트랜잭션을 L1에서 한 번의 검증으로 정산하고 라이트클라이언트가 긴 히스토리를 작은 비용으로 따라잡을 수 있는 근거가 바로 이 구조이기 때문이다.

  • 146Algorithms프라이버시 프리미티브

    프라이버시 프리미티브의 공통 목표는 "권한이 있음"을 증명하는 일과 "누구인지"를 드러내는 일을 분리하는 것이다. 링 서명은 여러 공개키로 이루어진 집합 중 하나의 비밀키 소유자가 서명했음을 증명하되 어느 것인지는 숨기며, 익명성의 강도는 그 집합(anonymity set)의 크기와 구성에 달린다.

    How it worksnullifier는 비밀값에서 결정적으로 유도한 고유 태그로, 이를 공개해 중복 사용을 막으면서도 어떤 예치·커밋먼트에서 나왔는지는 연결되지 않게 한다. 같은 비밀에서는 항상 같은 nullifier가 나오므로 두 번째 사용 시도는 즉시 검출된다.

    Why공개 원장에서는 주소 하나가 전체 거래 이력과 잔고를 노출해 상대 포지션을 읽고 앞서 거래하는 것이 가능하며, 이는 개인정보 문제이자 곧바로 경제적 손실이다. 프라이버시 설계를 알아야 어느 정보를 굳이 온체인에 남길지 판단할 수 있다.

  • 147Algorithms포스트퀀텀 전환은 암호가 아니라 조정(coordination) 문제

    양자 컴퓨터는 Shor 알고리즘으로 이산로그와 소인수분해를 깨므로 현행 타원곡선 서명이 위협받고, Grover 알고리즘은 해시의 탐색 난이도를 낮추지만 출력 길이를 늘리는 것으로 비교적 쉽게 대응된다. 대체 알고리즘 자체는 격자·해시 기반 등으로 이미 표준화 과정을 거쳐 왔기 때문에 남은 어려움은 수학이 아니라 배포와 조정에 있다.

    How it works블록체인에서 서명 스킴을 바꾸는 일은 합의 규칙 변경이라 하드포크가 필요하고, 지갑·하드웨어 서명기·브리지·인덱서·감사받은 컨트랙트가 동시에 움직여야 하며, 키와 서명이 커지면 블록 공간과 검증 비용도 함께 늘어난다. 이미 공개키가 체인에 노출된 계정이나, 지금 수집해 두었다가 나중에 해독하는 harvest-now-decrypt-later 위협 때문에 '위험이 현실화된 뒤에 옮긴다'는 전략이 성립하지 않는다는 점도 조정 압박을 키운다.

    Why암호 전환의 실패 지점은 알고리즘 선택이 아니라 마이그레이션 경로가 없는 설계에 있고, 이는 지금 짜는 시스템의 키 관리와 업그레이드 가능성 설계에 바로 영향을 준다. 특히 키가 영구적으로 박제되는 온체인 시스템에서 치명적이다.

  • 148Algorithms[복습] 검증 가능한 시스템 설계 체크리스트

    검증 가능한 시스템은 결과를 믿어달라고 요구하는 대신 상대가 스스로 결과의 정당성을 확인할 수 있게 만드는 것을 설계 목표로 삼는다. 핵심 축은 결정성(같은 입력에 같은 출력), 커밋먼트(머클 루트나 해시로 상태를 고정), 증명 방식(유효성 증명, 머클 증명, 사기 증명 중 무엇인지), 그리고 신뢰 가정과 데이터 가용성이다.

    How it works검증 비용이 재실행 비용보다 확실히 작아야 검증 가능성이 실질적 의미를 가진다. 마지막으로 실패했을 때의 회복 경로 — 이의제기 기간, 에스컬레이션 절차, 최종 폴백 권한이 누구에게 있는지 — 까지 명시되어야 설계가 완결된다.

    Why증명 시스템을 붙였다는 사실만으로 안전해지지 않으며, 신뢰 가정과 폴백 경로를 문서로 고정해두지 않으면 실제 사고 순간에 누가 무엇을 할 수 있는지 아무도 모른다.

Algorithms · G. AI 엔지니어링 (Day 97–100)

  • 149Algorithms트랜스포머 계산 구조·KV 캐시·추론 서빙(연속 배칭·PagedAttention)…

    트랜스포머 추론은 프롬프트 전체를 한 번에 처리하는 prefill 단계와 토큰을 하나씩 만들어내는 decode 단계로 나뉘고, 두 단계의 병목이 다르다. decode에서는 과거 토큰의 key/value를 매번 다시 계산하지 않도록 KV 캐시에 보관하는데, 이 캐시 크기가 시퀀스 길이와 동시 요청 수에 비례해 커져 GPU 메모리가 곧 동시성 한계가 된다.

    How it worksPagedAttention은 KV 캐시를 연속된 큰 블록이 아니라 페이지 단위로 관리해 단편화와 과다 예약을 없애 동시 처리 요청 수를 늘린다. 연속 배칭은 요청 단위로 배치를 고정하지 않고 토큰 생성 스텝마다 끝난 요청을 빼고 새 요청을 넣어 GPU 유휴를 줄인다.

    WhyLLM 서빙 비용과 지연은 모델 선택보다 KV 캐시 관리와 배칭 전략에서 훨씬 크게 갈리므로, 이 구조를 모르면 GPU를 더 사는 방식으로만 문제를 풀게 된다.

  • 150AlgorithmsRAG 설계·리트리버 품질 지표와 평가 하네스(골든·프로퍼티·회귀)

    RAG는 질의에 대해 외부 지식 저장소에서 관련 문서를 검색한 뒤 그 근거를 붙여 답을 생성하는 구조이며, 품질은 검색 단계와 생성 단계로 분리해 평가해야 한다. 검색 품질은 정답 문서가 상위 k개 안에 들어왔는지를 보는 recall@k, 첫 정답의 순위를 보는 MRR, 순위별 가중치를 반영하는 nDCG 같은 지표로 측정한다.

    How it works생성 품질은 답이 제시된 근거에 실제로 뒷받침되는가를 보는 근거성과 질의에 대한 적합성으로 나누어 보며, 근거 없는 진술은 검색이 아니라 생성 단계의 실패다. 평가 하네스는 고정된 질의와 기대 근거를 담은 골든 데이터셋, 근거가 없으면 답을 만들지 않는다는 식의 불변식을 검사하는 프로퍼티 테스트, 그리고 청킹·임베딩·프롬프트를 바꿀 때마다 기존 통과 케이스를 다시 돌리는 회귀 테스트로 구성한다.

    WhyRAG 시스템의 성능 저하는 대개 조용히 일어나서, 회귀 하네스 없이는 청킹 크기 하나 바꾼 것이 특정 질의군을 망가뜨렸다는 사실을 사용자 불만이 쌓인 뒤에야 알게 된다.

  • 151Algorithms에이전트 루프 설계

    에이전트 루프는 모델이 도구를 호출하고 결과를 다시 입력으로 받아 목표에 도달할 때까지 반복하는 제어 구조이다. 이 루프는 본질적으로 비결정적이므로, 안전성은 모델의 판단이 아니라 루프를 감싸는 시스템 쪽 제약으로 확보해야 한다.

    How it works구체적으로는 도구별 최소 권한 부여, 되돌릴 수 없는 행위 앞의 명시적 게이트(승인·드라이런·한도), 반복 횟수와 비용 상한, 그리고 실패 유형을 구분한 재시도 정책이 필요하다. 재시도는 멱등성이 보장되는 도구에만 자동으로 적용해야 하며, 그렇지 않으면 같은 부작용이 중복 실행된다.

    Why에이전트가 틀리는 것 자체는 막을 수 없고, 틀렸을 때 되돌릴 수 있는지와 무엇 때문에 틀렸는지 알 수 있는지가 실제 운영 가능 여부를 가른다.

  • 152Algorithms[Final] 내 스택의 ADR + 위협 모델 한 편 쓰기

    ADR(Architecture Decision Record)은 하나의 아키텍처 결정을 맥락, 검토한 대안, 선택과 근거, 그리고 그로 인한 결과와 감수한 트레이드오프로 짧게 기록하는 문서이며, 이런 기록을 시간순으로 누적해 시스템이 왜 지금 모습인지를 보존한다. 위협 모델은 보호해야 할 자산과 신뢰 경계를 그린 뒤, 각 경계에서 공격자가 무엇을 할 수 있고 무엇을 노리는지 열거하고 대응책과 남는 잔여 위험까지 명시하는 문서다.

    How it works두 문서의 공통점은 결론만이 아니라 전제와 대안을 남긴다는 점이고, 덕분에 전제가 바뀌면 그 결정을 다시 봐야 한다는 신호가 자동으로 생긴다. 형식보다 중요한 것은 범위를 결정 하나, 시스템 하나로 좁혀 실제로 끝까지 읽히는 분량을 유지하는 것이다.

    Why기록되지 않은 결정은 몇 달 뒤 이유 없는 제약으로 취급되어 조용히 뒤집히고, 그때 그 결정이 막고 있던 위협도 함께 되살아난다.

Economics

  • 153EconomicsAutomation and Repression — when control gets cheaper than sharing

    Acemoglu, Gitmez & Shadmehr (NBER w35336, June 2026) model automation inside a polity: decentralized automation raises capital's income share and the odds of a successful revolt, so an owner-state chooses among regulating automation, redistributing via taxes, or repressing. The result is a complementarity — unless the revolt threat is weak or capital low, the state prefers repression. (A viral post overstated this as 'proof AI will destroy democracy' to sell a guide; the paper is a conditional model, not a prophecy.)

    How it worksThe mechanism (as the paper models it) · What the viral post added (flag it) · Source

    WhyThe mechanism is genuine; the discipline is separating it from its packaging. The paper models automation inside a polity: decentralized automation raises capital's income share, which raises the odds of a successful revolt, so an owner-state chooses among regulating automation, redistributing through taxes, or paying for repression.

  • 154EconomicsInvesting for Programmers — understanding markets through data and code

    A saved reading pointer: Stefan Papp's Manning book (surfaced by Kirk Borne) that teaches markets and investing to programmers through data and code rather than finance-first. Kept as the catalogue's marker for the engineer's on-ramp to markets — the same lens jayverse-number (Math & Investment) and Verex already work in.

    How it worksThe reference · Why it earns a slot in the catalogue · Status of this card

    WhyThe value of a 'for programmers' markets book is the inversion. Most investing material assumes finance fluency and bolts tooling on; this assumes code fluency and bolts markets on — the right direction for a builder-first stance, and for jayverse-number (Math & Investment) specifically, which enters investing from the engineering side.

  • 155EconomicsETH ETF outflows — read which window, not the size

    On 2026-09-08 US spot ETH ETFs saw −$24.29M, the second outflow day after a record +$824M week. The outflow was Grayscale-concentrated; Fidelity FETH took +$9.89M and BlackRock ETHA was exactly zero. Yet ETH rose 3.1% over 7 days, beating BTC (+1.3%). The headline number hides which door the money moved through.

    How it worksThe same red number, two different meanings · The price cross-check · The rule this card enforces

    WhyErasing 3% of a record week in a single day is too small to call a reversal — the first mistake is treating any red print as a turn. The second is treating one venue's flow as the market's.

  • 156EconomicsReading a PPI print — services is the bridge to core, not the headline

    August US PPI consensus was +0.4% m/m (prior 0.0%), y/y 4.7%→5.3%, lifted by roughly +2.2% energy and unfavorable base effects from 2025's energy decline. The energy and base-effect part of a PPI rise does not pass through to core CPI — so the line that actually connects to core is services PPI, the only bridge between the two prints.

    How it worksWhich part of a PPI rise reaches core CPI · The two-line measurement · The confounder to name

    WhyA PPI headline and a CPI core are not the same animal, and the trap is judging tomorrow's core from today's headline. Most of an energy-driven, base-effect-driven PPI jump is exactly the part that does not reach core consumer inflation — so a big headline can sit on top of a calm core, and reacting to the headline is reacting to the part that will not transmit.

  • 157EconomicsThe ₩5T card-fee 'saving' is one optimistic cell — and a transfer, not free money

    Korea's National Assembly Budget Office modeled won-stablecoin card-fee savings at up to ₩5.15T. The honest read: that headline is the single most-optimistic cell of a sensitivity table (the conservative corner is ₩0.37T — a 14× spread), and the 'saving' is a fee transferred from card issuers to merchants, not value created. Build the model; show the range, not the corner.

    How it worksThe formula is the whole model · The grid, not the headline · 'Saving' names a transfer, and the transfer is not net

    WhyA '₩5 trillion saved' headline is the kind of number a PoC exists to take apart rather than repeat. 1% stablecoin).

  • 158EconomicsOn-chain settlement funding — the card issuer's working capital, not the cardholder's payment

    Visa's stablecoin-card growth moved the interesting part one layer up: not users paying in stablecoins, but the card issuer borrowing stablecoins on-chain to fund Visa's daily settlement, underwritten by its own settlement history and repaid automatically as receipts arrive. Model that loop.

    How it worksThe daily gap the funding fills · What is actually novel — two things, not the stablecoin · Just-in-time settlement funding

    WhyA stablecoin card where the user pays in stablecoins is the obvious story and the boring one. The load-bearing move sits one layer up, on the issuer's balance sheet: a card program must fund Visa's daily net settlement before it has collected a cent from cardholders, so it needs short-term working capital every single day.

  • 159EconomicsWhen nobody needs to hold ETH, is ETH money or fuel?

    David Hoffman's bull case for EIP-8141 (Frames): every token becomes a way to buy ETH-denominated blockspace, so the hardest onboarding step — needing ETH to spend USDC — goes away, which he reads as "ETH is Money" and "strictly bullish": more commerce, higher dominance, more ETH bought and burnt. The claim fuses two different ETH demands — ETH consumed as fuel (burn) and ETH held as money — and the very abstraction that removes the need to hold ETH is what could weaken the second even as it raises the first.

    How it worksTwo ETH demands the slogan fuses · Where holding demand goes (it migrates, it doesn't vanish) · The verdict is one comparison

    WhyThe bull case does a real sleight-of-hand, and naming it is the card. "ETH is Money" is a claim about ETH being held — a store of value with a monetary premium.

  • 160EconomicsA rising stablecoin cap is repackaged M2, not new money

    A Fed staff paper on classifying stablecoins in the money supply notes their reserves — bank deposits and Treasury money-market funds — are already counted in M2. So a rising stablecoin market cap is not new dollars entering; it is existing dollars repackaged. What changes is velocity, not the total.

    How it worksReading note, not a demo. Because both halves change how you price a number you will see constantly.

    WhyMeasurement comes before regulation, always, and this report is the measurement step for stablecoins. A regulator deciding where a new instrument sits in M1 vs M2 is not yet regulating it — it is learning to see it.

  • 161EconomicsA good bet that lost looks exactly like a bad bet that lost

    Poker is the widely played game whose practitioners had to build a vocabulary for the gap between a good decision and a good outcome. Three ideas transfer to anything that bets on a probability — the threshold is arithmetic on costs, the objective is the bankroll rather than expected value, and a record means nothing until it is long enough. The fourth is where the analogy stops, and that is the useful half.

    How it worksThree ideas that transfer, and their form here · The threshold, written out · Why expected value is the wrong objective

    WhyPoker had to invent a word for judging a decision by its outcome, and the word is "resulting". It needed one because the correct play loses often enough that a player who learns from results learns the wrong lesson — folds a hand that was right to call because the last one lost, calls a hand that was wrong because the last one hit.

  • 162EconomicsEvery yield is somebody's cost — the three places it can come from

    A quoted APY tells you nothing until you can name who pays it. There are only three answers — fees, emissions, or leverage — and two of them are not income. Asking the question takes a minute and disqualifies most of what is advertised.

    How it worksThe three sources, and what each one survives · The one-minute test · Fees over TVL is the clean version

    WhyA yield is a transfer, not a property. Something that pays 12% is receiving 12% from somebody, and the entire question is who.

  • 163EconomicsGross over net — the recycling multiple

    When a protocol pays incentives on both deposits and borrows, the same capital loops. Total deposits inflate, outside money does not — and net TVL turns out to equal external capital exactly. The ratio between the headline and the net is a number you can compute today.

    How it worksThe identity · Worked example · Why fees move superlinearly

    WhyThe identity is short enough to hold in your head, which is what makes it useful. Outside money X, collateral ratio c.

  • 164EconomicsThe risk-free rate is the floor under every yield

    A short-dated government bill pays something for taking almost no risk. Any yield that takes real risk has to beat it before it is interesting at all — which means the entire on-chain yield landscape is priced relative to a number set by a central bank, not by crypto.

    How it worksThe subtraction, done properly · What moves when the floor moves · Why the issuer's business is this line

    WhyEvery yield in existence is quoted against an implicit alternative, and the alternative is a government bill. If a short-dated bill pays 5% for something close to no risk, then a protocol paying 6% is offering one percentage point for smart-contract risk, oracle risk, custody risk and the risk that you cannot get out on the day you want to.

  • 165EconomicsM2, the dollar, and why crypto is a liquidity trade

    Money supply is the quantity side and the policy rate is the price side of the same thing. Assets with no cash flow are priced almost entirely off that pair — which makes "crypto is a macro asset" a checkable claim rather than a slogan.

    How it worksThe two axes, and what each explains · The dollar leg, which is a denominator not a demand signal · What to plot, and what to report

    WhyMoney supply and the policy rate are the quantity and the price of the same commodity, and almost everything with no cash flow is priced off them. A bond has coupons, an equity has earnings; a monetary asset has neither, so its price is nearly pure discount rate and liquidity.

  • 166EconomicsProviding liquidity is selling volatility, and the loss is not impermanent

    An automated market maker pays you fees and takes the other side of every move. That is the payoff of a short option, and the standard name for the cost — impermanent loss — implies a reversal that is not owed to you.

    How it worksThe payoff, in one table · The two positions, side by side · The break-even, which is the number to compute

    WhyThe name is the problem. Impermanent loss suggests something that goes away if you wait, and the mechanism offers no such promise.

  • 167EconomicsAn indicator adds no information — it adds a decision

    A moving average is a low-pass filter over closes. Bollinger Bands are that same average plus and minus k standard deviations. Both are functions of the price series already on the screen, so neither can contain anything the chart did not. What an indicator supplies is a rule — a way to turn a continuous line into act or do not act — and its worth is that the rule is repeatable and testable, not that it predicts.

    How it worksWhat each one actually computes · The line that matters: derived vs. independent · What a Bollinger squeeze does and does not say

    WhyEvery price-derived indicator is a transformation of one column, so it cannot add information. An SMA is a low-pass filter that lags by roughly half its window; an EMA buys back some of that lag and pays for it in noise; MACD is the difference of two EMAs, so it is a statement about change in trend; RSI is a bounded momentum ratio.

  • 168EconomicsDoes a chain pay for its own security?

    A chain pays validators to protect it and collects fees from users to fund that. The ratio between the two is the closest thing crypto has to an income statement — and almost nobody publishes it.

    How it worksThe two funding sources · The ratio, and how to read it · Why it beats the usual comparisons

    WhySecurity is not free and it is not a property of the code &mdash; it is a payroll. A proof-of-stake chain is secure because attacking it costs more than it yields, and that cost is maintained by paying validators enough to keep capital staked.

  • 169EconomicsWar headlines, falling gold — a geopolitical shock arrives on two wires

    US strikes on IRGC targets sent Brent up 4% past $94 — and gold fell 2.35%. "Geopolitics = gold up" is half the wiring: a supply shock raises oil, oil raises expected inflation, expected inflation raises hike odds, and higher real rates punish the zero-yield asset. The safe-haven wire and the real-rate wire pull in opposite directions, and today the second one won. Bitcoin fell on the same wire.

    How it worksThe two wires · Today's tape (2026-09-01/02) · The regime table

    WhyThe headline says "war," the market prices a rate path. The intuitive model — conflict, fear, gold bid — assumes the shock reaches assets through risk appetite.

  • 170EconomicsKalshi passes Polymarket — and 80% of the win is sports

    Kalshi overtook Polymarket in global volume (~$50.6B combined in July) — but 80% of Kalshi's volume is sports, versus 39% for Polymarket, whose crypto-plus-politics share is 52%. "Prediction markets are growing" splits into two sentences today: what's growing fastest is a regulatory side-door for sports betting, and quoting the combined total as the market's TAM inflates it four to five times.

    How it worksOne total, two businesses (July, combined ~$50.6B) · What each slice requires from the platform · The honest TAM arithmetic

    WhyA composition split is a category question wearing a growth headline. 6B is one industry in a press release and two in the data: an event-contract exchange, and a sportsbook that found a federal license.

  • 171EconomicsOLS regression — the line that assumes it caused something

    Least-squares regression is the workhorse everyone reaches for first; the danger is that a fitted coefficient reads like a cause when it is only a correlation under stated assumptions.

    How it worksNot yet built.

    WhyThe point is not the fit but the assumptions behind it — linearity, independent errors, no omitted variable — and the PoC would show the same dataset giving opposite conclusions when one assumption is quietly violated.

  • 172EconomicsTime-series forecasting — ARIMA and why most series are not stationary

    ARIMA and its relatives forecast a series from its own past, but the whole method rests on stationarity — a property financial and on-chain series almost never have without differencing.

    How it worksNot yet built.

    WhyThe lesson is diagnostic before predictive: test for stationarity, difference until it holds, and see how a naive forecast on a trending series manufactures confidence it has not earned.

  • 173EconomicsBayesian inference — a prior is an assumption you have to write down

    Bayesian methods turn belief-plus-evidence into a posterior distribution; their honesty is that the prior is explicit, and their trap is that a confident prior can survive weak data.

    How it worksNot yet built.

    WhyThe PoC would show the same likelihood yielding different conclusions under a flat versus an opinionated prior — making the modeler's assumption visible instead of hiding it in a point estimate.

  • 174EconomicsMonte Carlo — simulating the distribution you cannot solve for

    When a payoff has no closed form, Monte Carlo samples thousands of random paths and reads the answer off the distribution; the quality of the answer is exactly the quality of the assumed randomness.

    How it worksNot yet built.

    WhyThe instructive case is tail risk: a simulation with thin-tailed inputs will systematically underprice the disaster, so the PoC pairs a Gaussian and a fat-tailed generator on the same portfolio.

  • 175EconomicsA/B testing — the p-value that a peeked experiment inflates

    A/B tests promise a clean causal read from randomization, but stopping early when the result looks good — peeking — silently multiplies the false-positive rate the test claims to control.

    How it worksNot yet built.

    WhyThe PoC replays a null experiment with daily peeking and shows how often it 'wins', then contrasts fixed-horizon and sequential designs that actually hold the error rate.

  • 176EconomicsCausal inference — DiD, IV, and RDD when you cannot randomize

    Difference-in-differences, instrumental variables, and regression discontinuity recover causal effects from observational data, each buying identification with an assumption that is untestable and load-bearing.

    How it worksNot yet built.

    WhyThe value is knowing which assumption each method rests on — parallel trends, exclusion, continuity — so a policy claim can be graded by whether its assumption is plausible, not by its p-value.

  • 177EconomicsClustering — k-means finds groups even when there are none

    k-means and friends partition data into groups, but they will always return groups, whether or not the data has any — so the hard part is validating that a cluster means something.

    How it worksNot yet built.

    WhyThe PoC clusters random noise to show spurious structure, then uses silhouette and stability checks to separate a real segmentation from an artifact of the chosen k.

  • 178EconomicsPCA — compressing dimensions and the meaning that leaks out

    Principal component analysis rotates many correlated variables into a few uncorrelated ones, trading interpretability for compactness — the components explain variance but rarely name anything you can act on.

    How it worksNot yet built.

    WhyThe PoC would show PCA on a market factor set, then ask the harder question the technique cannot answer alone: whether a top component is a risk factor or just the scaling of the inputs.

  • 179EconomicsGradient boosting — XGBoost wins the leaderboard and hides the reason

    Boosted trees are the default winner on tabular data, but their accuracy comes wrapped in opacity — a strong model whose decisions need a second tool (SHAP) just to be explained.

    How it worksNot yet built.

    WhyThe PoC pairs an XGBoost model with SHAP attributions on a credit-style dataset, and treats the gap between accuracy and explainability as the real deliverable.

  • 180EconomicsCross-validation — the honest way to fail before you ship

    Cross-validation estimates out-of-sample error before deployment, but time-series and grouped data break the i.i.d. assumption behind vanilla k-fold, leaking the future into the past.

    How it worksNot yet built.

    WhyThe PoC contrasts random k-fold with time-aware splitting on the same forecasting task and shows the optimism that leakage manufactures.

  • 181EconomicsAnomaly detection — the alert that fires on everything or nothing

    Anomaly detectors flag points that do not fit a learned normal, and the entire product is the threshold: too tight and it is noise, too loose and it misses the one event that mattered.

    How it worksNot yet built.

    WhyThe PoC runs isolation-forest and statistical detectors on transaction data and reports precision/recall at several thresholds, because the ROC curve is the honest deliverable.

  • 182EconomicsSurvival analysis — churn is a time-to-event, not a yes/no

    Survival models estimate when an event happens, correctly handling subjects who have not churned yet (censoring) — the thing a plain classifier throws away and biases itself by discarding.

    How it worksNot yet built.

    WhyThe PoC fits a Kaplan-Meier curve and a Cox model to a subscription or wallet-activity dataset and shows why censoring makes the naive churn rate wrong.

  • 183EconomicsCohort analysis — the retention curve a single average hides

    Cohort analysis groups users by join period and tracks each group over time, revealing decay and improvement that a blended metric averages into a flat, misleading line.

    How it worksNot yet built.

    WhyThe PoC builds a retention triangle from event data and shows how a rising blended number can hide worsening new-cohort retention.

  • 184EconomicsCointegration — two prices that wander together are a trade

    Vector autoregression and cointegration test whether two non-stationary series share a long-run equilibrium, which is the statistical basis of pairs trading and a common false-positive under spurious regression.

    How it worksNot yet built.

    WhyThe PoC runs an Engle-Granger test on a real pair and a random pair, showing how spurious regression fakes a relationship that a cointegration test correctly rejects.

  • 185EconomicsExtreme value theory — the tail is a different distribution

    Extreme value theory models the maxima and tails directly instead of assuming a bell curve, which is why VaR built on a normal distribution understates exactly the losses that end firms.

    How it worksNot yet built.

    Why9% quantile against a Gaussian VaR to size the gap the normal assumption creates.

  • 186EconomicsDune — on-chain analytics is SQL over a decoded ledger

    Dune turns raw chain data into SQL-queryable tables and shareable dashboards, and the real skill is not the query but knowing which decoded table answers the question without double-counting.

    How it worksNot yet built.

    WhyThe PoC builds one dashboard — protocol volume, unique users, fee revenue — and documents the join and dedup decisions that separate a correct metric from a plausible-looking wrong one.

  • 187EconomicsThe Graph — a subgraph is an index you have to design

    The Graph indexes chain events into a GraphQL API via a subgraph, moving the modeling work upstream: what you fail to index at deploy time you cannot query later without a re-sync.

    How it worksNot yet built.

    WhyThe PoC writes and deploys one subgraph for a sample contract and contrasts its query ergonomics with raw RPC, making the index-design tradeoff explicit.

  • 188EconomicsAddress labeling — analytics is only as good as its entity map

    Nansen and Arkham turn anonymous addresses into named entities, and every on-chain metric downstream inherits the accuracy — and the mistakes — of that labeling layer.

    How it worksNot yet built.

    WhyThe PoC clusters addresses by heuristics (funding source, interaction graph) and measures how a wrong label propagates into a wrong 'whale accumulation' conclusion.

  • 189EconomicsFlipside and dbt — modeling on-chain data like a warehouse

    Flipside exposes curated chain tables and dbt turns ad-hoc queries into versioned, tested data models — the difference between a one-off chart and a metric a team can trust twice.

    How it worksNot yet built.

    WhyThe PoC builds a small dbt project (staging → marts) over on-chain data with tests on row counts and uniqueness, treating reproducibility as the deliverable.

  • 190EconomicsFeature engineering — the model is mostly the features

    Most of a model's performance comes from the features fed to it, not the algorithm, and a feature store exists to stop the same feature being computed three inconsistent ways across a team.

    How it worksNot yet built.

    WhyThe PoC builds a handful of engineered features (rolling windows, ratios, lags) for one prediction task and shows the accuracy delta from feature work versus model swaps.

  • 191EconomicsThe fourth column: the −23,000 that a dozen notes cited never existed

    Friday's employment lesson has three columns — consensus, surprise, guidance. There is a fourth: revision. The July print of −23,000 that several notes had cited for a month as a "shock" was revised to +21,000 in the same release that showed August at +162,000. The number a whole narrative rested on was a draft, and first estimates are wrongest exactly at the turning points, where response rates and seasonal adjustment fill in later.

    How it worksThe four columns of a data print · The 2026-09-04 release, in the two values that matter · The discipline, in one habit

    WhyA first estimate is a draft, and the market reads it as a verdict. The monthly jobs number is a survey with an incomplete response rate at publication; the missing responses arrive over the next two releases, and seasonal-adjustment factors are re-fit as more data lands.

  • 192EconomicsWhen a chain can't defend itself, it becomes a token on one that can

    Harmony announced it will sunset its mainnet and migrate its native token ONE to Ethereum (via The Block, 2026-09-07), citing threats from state actors and AI agents — a month after an exploit that minted 4 billion ONE without authorization. This is fees-over-security-budget playing out to its endgame: when the cost to attack a chain drops below the value it secures, staying sovereign is negative EV, and the honest move is to stop paying for your own security and rent Ethereum's by becoming an ERC-20.

    How it worksThe security-budget inequality · What migration keeps and what it surrenders · The three inputs that moved the number

    WhyThis is fees-over-security-budget reaching its terminal value in public. That card asks whether a chain pays for its own security — validators are paid to defend it, fees are supposed to fund that, and the ratio is the closest thing crypto has to an income statement.

Source: lib/poc-cards.ts, lib/algorithm-cards.ts (auto-generated by scripts/generate-pocs-html.mjs — edit the card data, not this file)