From Hash Trees to BLS Signatures: The Stack Behind On-Chain Validator Proofs
You want your smart contract to know if msg.sender is actually a real Ethereum validator. Here's the full stack that makes that possible, built up from scratch.
On building DeFi protocols and navigating tech and life.
You want your smart contract to know if msg.sender is actually a real Ethereum validator. Here's the full stack that makes that possible, built up from scratch.
Upgradeable contracts can't use constructors. Initializers replace them, but what happens when your V2 upgrade needs new storage? That's where reinitializer comes in.
I hit the EIP-170 size limit after adding two features to a lending protocol. External Solidity libraries, compile-time linking, and a double-DELEGATECALL chain got it back under 24 KB.
A deep dive into building a callback-based liquidation system on Base using Aerodrome Slipstream, where the protocol sends collateral first and the liquidator swaps it for repayment in a single atomic transaction.
Your order has a price, an amount, a maker index, and 8 flags. All of it fits in a single uint256. Here's how to pack it, extract it, and not corrupt it.
Three standards that handle token approvals in completely different ways. Here's what each one does, when to use it, and where things break.
You need 10,000 wallets to claim tokens once. Storing all addresses on-chain costs a fortune. Here's how protocols actually solve it.
Vaults are becoming the infrastructure connecting traditional finance to DeFi. Here's what they are, how they work, and why BlackRock and Apollo are paying attention.
You have a buffer that fills from one end and drains from the other. Vec works, but it's doing invisible work behind your back. Here's what that costs and how to fix it.
Smart contracts are immutable. So how do you fix bugs after deployment? The proxy pattern, delegatecall, and namespaced storage make it possible.
How do you track 365 days of user trading volume on-chain without burning gas? The answer is a data structure that overwrites itself.
You're estimating gas costs on Base. The RPC says 0.12 gwei. The actual transaction paid 0.002 gwei. Here's the difference between eth_gasPrice and baseFeePerGas on L2s.
You committed an API key. GitHub Copilot flagged it. Now what? Here's how to rewrite git history safely, the difference between --force and --force-with-lease, and why you should rotate the key anyway.
Blockchain data is painful to query directly. Here's how to build an indexer with Envio, what you need to know about indexing, the gotcha that breaks hosted deploys, and how to avoid it.