getting started
what is lode
lode is the uniswap v4 hook that turns the largest unsolved leak in defi — top-of-block lvr — into recurring revenue for liquidity providers and a continuous, on-chain buyback for the lode token. every twelve seconds, on every pool we touch, the protocol clips the single most valuable transaction in the block and routes the proceeds straight back to the people who actually deserve them.
the one-paragraph version
every twelve seconds, a uniswap pool reopens with a stale price. for years, the first informed trader of the next block has captured that mispricing as arbitrage profit — a recurring, multi-billion-dollar drain on liquidity providers known as loss-versus-rebalancing (lvr). lode ends it. our v4 hook intercepts that very first swap, charges it a premium scaled to the captured arbitrage, and instantly splits the proceeds three ways: 20% funds a perpetual open-market lode buyback & burn, 0–30% rewards the pool's builder, and the remainder flows to lps. arbitrageurs still profit. lps stop subsidising them. the token compounds on every block.
lvr is the single largest source of underperformance for amm liquidity in existence — bigger than gas, bigger than impermanent loss, bigger than fee competition. independent academic studies (milionis et al. 2022, heimbach & wattenhofer 2024) put the addressable leak across major eth pools at $500m+ per year. lode is the first protocol to capture it inside the existing uniswap surface, with no new wallet, no new router, no off-chain auction, and no oracle. the token accrues every dollar of value the protocol creates.
how it differs from vanilla v4
| property | vanilla v4 | lode-enabled v4 |
|---|---|---|
| top-of-block arb | captured by mev searchers | captured by the pool |
| lp returns | fees − lvr | fees − lvr + ~80% of recaptured premium |
| token sink | none | 20% of premium → lode buyback & burn |
| builder rewards | n/a | 0–30% to whitelisted builders |
| orderflow trust | public mempool | public mempool (no off-chain trust) |
| wallet changes | none | none |
arbitrageurs keep the price-realignment profit above their cost basis. lode extracts only the priority tip they were going to burn on validators anyway, and redirects it to the pool. nobody who matters loses anything; one rent-extracting middleman gets bypassed. that is why this works at scale.
the mechanism in three steps
- detect. on the first swap of a new block, the hook checks the size against
minAuctionInputSizeto disarm dust spam, then computes the per-block premium. - charge. the swap proceeds at uniswap's quoted price plus the premium. the premium is collected by the hook before the swap settles.
- split.
lodesplitterroutes the premium: lps get the largest share, the builder gets up to 30%, and the protocol vault accumulates 20% for buyback.
solidity// simplified — see lodehook on etherscan for the full contract
function beforeSwap(PoolKey calldata key, SwapParams calldata p)
external override returns (bytes4, BeforeSwapDelta, uint24)
{
if (block.number == lastSwapBlock[key.toId()]) return _passthrough();
if (absSize(p) < minAuctionInputSize[key.toId()]) return _passthrough();
uint256 premium = computePremium(key, p);
splitter.deposit{value: premium}(key.toId());
lastSwapBlock[key.toId()] = block.number;
return (BaseHook.beforeSwap.selector, toBeforeSwapDelta(premium, 0), 0);
}
key numbers
- token
- lode · 100,000,000 fixed supply
- protocol-owned liquidity
- 44% of supply (44,000,000 lode) — seeded at tge, no airdrop
- builder stake
- 100,000 lode locked per pool
- protocol share
- 20% of premium → buyback & burn
- builder share
- 0 – 30% of premium (set per pool)
- lp share
- ≈ 80% of premium (residual after protocol & builder)
- burn destination
- 0x000…dead (irreversible)
- buyback venue
- cowswap intent batches