how a keg works

Steep, then pour. Then froth.

Every Brewly keg is tapped and left to steep. For one minute after it is tapped no trade can reach it — from the tapper, from a bot in the same block, from anyone, through any router. The hook refuses every swap with the seconds still to wait. When the minute is up the keg pours, and from then on every trade leaves the same froth, in ETH, for the rest of the keg's life.

The steep minute

the same minute for every keg

1:00

The steep is set in the block the keg is tapped, from the chain's own clock. It is a constant with no setter: nobody can shorten it, skip it, or extend it. By the time it ends the keg has been visible on chain and in this taproom for a full minute, and everyone is looking at the same start line.

Above: a keg steeping its minute, over and over. A real keg steeps once, and never again.

Frothed

read from the froth

—
Frothed

held, not yet skimmed

—
Skimmed

over the taproom's life

—
Goes to

the brewer · immutable

Whoever presses this pays the gas. The ETH goes to the brewer regardless — there is no recipient argument to give it.

Recent froth

every router, every keg

Nothing has poured yet.

Why a steep minute

The block a pool is born in belongs to whoever has the fastest wire, and on most launchpads that is also the block the first buy lands in. Here it cannot be. The block a keg is tapped in is never the block somebody buys in.

Why a cask

The pool's share of the supply goes into one position across the whole range, held by the hook. The hook has no function that removes it, and it refuses anyone else who tries to add or take liquidity. The ETH buyers put in stays inside and is what sellers are paid from.

Why ETH

A launchpad paid in the tokens it launches has to sell them, and the only place to sell them is the pool it just charged. This one is paid in ETH on both sides, so the brewer never holds a single token it would need to dump.

The four pours

  • Buy, exact input. ETH is named. The froth comes off the top before the curve sees it.
  • Sell, exact input. Tokens are named; ETH comes out. The froth comes off what the curve paid.
  • Buy, exact output. Tokens are named; ETH goes in. The froth is laid on top of what the curve charged.
  • Sell, exact output. ETH is named. The curve is asked for that and the froth besides.