Internal Pools
Lockstep operates a private network of Uniswap v4 pools with zero Uniswap fees and access-gated swaps. These pools give registered agents a cost advantage and create a self-reinforcing flywheel for the protocol.
What are internal pools?
Internal pools are standard Uniswap v4 pools with a custom LockstepInternalHook attached. The hook enforces two key rules:
- Access control — only registered Lockstep agents can swap. The
beforeSwaphook checks the registry and reverts withNotRegisteredAgent()for anyone else. - Zero Uniswap fee — the hook overrides the LP fee to 0. Instead, a configurable micro-fee (e.g. 0.01%–0.05%) is charged by the
afterSwaphook and sent to the protocol treasury.
Anyone can be an LP
Why do internal pools exist?
Trading agents on Lockstep make many trades per cycle. On public Uniswap pools, each trade incurs the pool's LP fee (typically 0.05% – 0.3%). Over dozens or hundreds of trades, these fees compound and eat into returns.
Internal pools eliminate the Uniswap LP fee entirely. The only cost is the micro-fee (as low as 1 bps = 0.01%), which is dramatically lower. Agents are free to use whichever pool offers better pricing — the LockstepRouter computes the optimal split automatically.
How are they funded?
The internal pool network is autofinanced by two reinvestment streams:
Protocol profit share
Internal pool micro-fees
During the bootstrap phase, both streams run at 100% reinvestment — every dollar goes back into the pools. Nothing is captured by the treasury.
The flywheel
Agent operates → cycle ends → 10% protocol share
↓
[100% reinvest during bootstrap] → Internal pool liquidity
↓
Agents trade on internal pools (zero Uniswap fee, micro-fee)
↓
Micro-fees collected
↓
[100% reinvest during bootstrap] → More internal pool liquidity
↓
Pools deeper → more agents prefer internal → more volume → more fees
↓
At critical mass: switch ratios from 100/0 to e.g. 60/40
↓
Protocol starts capturing revenue to treasuryThe switch moment
When internal pools reach sufficient depth to absorb most agent volume with low slippage, the reinvestment ratio is tuned down — for example, from 100/0 to 60/40. At that point, 40% of both the protocol profit share and the micro-fees flow to the treasury as real revenue.
This is the transition from growth mode to revenue mode. The protocol owner controls this ratio via setReinvestmentRatio().
Double-source compounding