Skip to main content

Blog

Latest Articles

Blockchain

Deep EVM #17: Testing Huff Contracts — Foundry Fork Tests and Gas Assertions

A comprehensive guide to testing Huff smart contracts using Foundry's fork testing, gas snapshots, and differential testing against Solidity reference implementations.

Read More
Engineering

Deep EVM #16: Bundling and Conflict Resolution — Packing Profitable Transactions

Pack multiple arbitrage transactions into conflict-free bundles. Use bitmask conflict detection, tiered batching strategies, and submit via Flashbots, MEV-Share, and direct builder APIs.

Read More
Engineering

Deep EVM #15: MEV Simulation — Binary Search, State Forks, and the 12-Second Deadline

Build the MEV simulation pipeline: fork EVM state, simulate arbitrage executions, binary search for optimal borrow amounts, and manage the 12-second block deadline.

Read More
Engineering

Deep EVM #14: Building an Arbitrage Cycle Finder — DFS on a Pool Graph

Build a production arbitrage cycle finder in Rust using depth-first search on a token-pool graph. Handle thousands of pools, millions of cycles, and deduplicate with keccak256.

Read More
Blockchain

Deep EVM #13: What Is MEV — Extractable Value, Searchers, and Block Builders

A comprehensive guide to Maximal Extractable Value: what it is, how searchers find it, the role of block builders, and the ethical landscape of MEV extraction.

Read More
Blockchain

Deep EVM #12: Advanced Huff — Adaptive Execution and On-Chain Computation

Production Huff patterns from real MEV contracts: adaptive execution with on-chain balance fallbacks, multi-operator auth via priority fee entropy, USDT safe approve, and memory layout tricks.

Read More
Blockchain

Deep EVM #11: Huff Jump Tables — O(1) Function Dispatch Without Solidity Overhead

Build an O(1) function dispatcher in Huff using packed jump tables. Compare Solidity's if-else chain with a hand-crafted jump table that saves thousands of gas.

Read More
Blockchain

Deep EVM #10: Huff Stack Management — takes(), returns(), and the Art of dup/swap

Master the EVM stack machine: visualize stack state, use dup1-16 and swap1-16 effectively, and build patterns for keeping values, rotating, and cleaning up.

Read More
Blockchain

Deep EVM #9: Huff Language Primer — Macros, Labels, and Raw Opcodes

A hands-on introduction to Huff, the low-level EVM assembly language that gives you direct control over every opcode, every byte of bytecode, and every gas unit.

Read More
Blockchain

Deep EVM #8: Building a Token Swap in Pure Yul

Build a complete Uniswap V2 token swap contract in pure Yul: calldata parsing, external calls, return data handling, and a line-by-line gas comparison with the Solidity equivalent.

Read More
Blockchain

Deep EVM #7: Gas-Efficient Loops and Conditionals in Yul

Optimize EVM loops and conditionals in Yul: for-loop gas anatomy, switch vs if, unchecked arithmetic, loop unrolling, and benchmarks comparing Solidity and Yul iteration patterns.

Read More
Blockchain

Deep EVM #6: Yul Memory Management — mstore, mload, and Free Memory Pointer

Master EVM memory management in Yul: the free memory pointer, manual ABI encoding, building external call data, and memory-efficient patterns for gas-critical contracts.

Read More