twofold×2Docs
Documentation Range maintenance

Range maintenance

A Twofold pool keeps its depth in a band around the current price rather than spread across every price from zero to infinity. That band is the pool's liquidity shape: a set of price buckets telling the hook where to put liquidity when a swap arrives. Around 70 percent of the depth sits within 13 percent of the center, and the remainder reaches out to roughly 52 percent on either side.

Concentration is what makes the capital productive. A dollar stretched across all prices backs almost no trade at any single price. The same dollar inside a tight band fills many times as much, and those fills are where your swap fees come from. It is also why a Twofold pool quotes a tighter spread than a full-range pool holding the same reserves.

The band earns while the market trades inside it. Let the price walk out and your depth stays put, parked at prices nobody is trading. That is the problem range maintenance solves.

How the range follows the price

Twofold moves the band back over the market on its own, with no action from you. Once a minute the protocol reads where each pair trades on the wider market and compares that against the center of the pool's shape. Once the gap passes about 5 percent, the range starts walking toward the price.

The move is a step, never a jump, and the size and pace are capped in the contract call itself. A price spike that lasts one block cannot drag a range anywhere.

What this looks like on a stock pool

Tokenized stocks are where the difference shows. An equity token reprices in jumps rather than drifts: an earnings print, a downgrade, a gap between one session and the next. One of those moves can put the token several percent from where it traded an hour earlier, and it stays there.

A conventional concentrated pool has no answer. Somebody chose its range at deposit time and it sits at that price until a person notices and rebuilds the position by hand. After a jump the pool is quoting into empty space. The first trader through takes whatever thin depth is left at the old price, everyone after that sees a spread wide enough to walk away from, and the liquidity provider earns nothing while the market trades somewhere else.

A Twofold pool reads where the token is actually trading, on the deepest market for that pair on Robinhood Chain, and starts walking its band there inside a minute. Once the new price holds, the full shape sits underneath it: 70 percent of the depth within 13 percent of where the token now trades, the rest reaching out behind it. Traders get the same tight quote they had before the move. You did nothing, and your reserves never left the pool.

What recentering can and cannot do

  • Approved shapes only. The controller owner signs every shape a pool may use on-chain, in advance. Recentering picks one of those or pauses. There is no third option.
  • It never reaches your money. The function cannot withdraw liquidity, change a fee, or touch a pool's vault.
  • A strange price gets ignored. A market price more than 20 percent from the pool's own price has to hold for five straight minutes before it counts, so one manipulated block moves nothing.
  • Silence beats guessing. A failed price read, a low balance, or a price outside the approved set stops recentering. The pool is left alone.
  • Nothing here is discretionary. The rules above run the same way on all 29 pools, every minute.

Every recenter is an on-chain transaction from the controller listed under Contracts, so the full history of range moves on every pool is readable on Blockscout. You do nothing and you lose nothing to the move. Shares are proportional to reserves, so re-bucketing the same reserves leaves a share worth what it was worth a second earlier.

This is one section of the Twofold documentation. Read all of it.