Most of my protocol experiments around EigenLayer, Uniswap v4, and related hackathon tracks have lived as decks, repos, and private notes instead of public write-ups. This is a first pass at turning one of those hacks into a reusable artifact.
The project was a Uniswap v4 hook for fixed-fee gas abstraction: instead of making users think in ETH-denominated gas, the swap charges a predictable USDC fee and handles the actual gas payment behind the scenes.
What We Built
The pitch was simple: make swap execution feel like a fixed operating cost.
Users pay a flat USDC fee, such as $0.99 or $2.99 per swap. A paymaster pays the real ETH gas. The hook tracks the difference between the fixed fee and the actual execution cost.
During low congestion, the user builds credits. During gas spikes, the system draws against those credits. The goal is not to make gas disappear. The goal is to convert an unpredictable commodity cost into an account-level hedge over time.
The live test deployment was on Unichain Sepolia:
0xA24fEe104Fe00987AfC2714469159Cd3D8b840c0
Constraint
Gas abstraction is usually framed as UX: “the user should not need ETH.” That is true, but incomplete.
For regular traders, treasuries, and products that batch many swaps, the harder problem is budgeting. If execution cost changes wildly with congestion, every swap carries an uncertain operating expense. A product can hide ETH from the user and still expose them to volatile cost.
The hook reframed that volatility as a financial primitive: fixed-fee execution, funded by accumulated surplus during cheap blocks and drawn down during expensive blocks.
Reusable Idea
A Uniswap v4 hook does not have to be only a pricing tweak. It can wrap market mechanics with product policy.
In this case, the policy is:
- charge users in a stable unit,
- account for gas deltas per user,
- avoid an undifferentiated mutualized pool,
- let cheap execution subsidize future expensive execution,
- and enforce credit limits so the system does not become open-ended insurance.
That turns “gasless swap” from a UI feature into a small treasury system.
What Carries Forward
- Fixed fees are most viable on low-cost L2s where the spread between USDC fee and actual gas can fund reserves.
- Per-user credit accounting is cleaner than a shared pool when usage patterns are uneven.
- ERC-4337 paymasters and Uniswap v4 hooks compose naturally: one pays execution, the other enforces protocol policy.
- The institutional version is not “free gas.” It is predictable OpEx for teams that execute many swaps.
- The same pattern can apply to DCA, remittances, and stablecoin products where cost certainty matters more than perfect spot pricing.