UNIHOOK

Not everything in one hook. One thing that is everything.

A burn, a reward, a buyback and a price floor are not four features here. They are four descriptions of the same event — and that event is one function call.

$UHK · 1,000,000,000 fixed Uniswap v4 · 0x20CC 1% of every swap → the pot No owner · no mint · no keeper

The collapse

Why "everything" is usually a warning

Every token that promises rewards and burns and buybacks ships four systems: four pots, four sets of accounting, four admin keys. Four things to go wrong, and four places to be rugged from.

A singularity is not where many things are collected. It is where separate quantities collapse into one. That is the whole design here, taken literally.

The entire protocol

One pot. One number — the floor, being the pot divided by the supply. And one operation: redeem(). Everything else this protocol is said to do is a consequence of those three facts, not a separate feature bolted beside them.


Four faces, one event

The same call, described four ways

When you burn UHK and take your share of the pot, four different things are true about that single transaction at the same time. Pick one:

redeem() — the burn

Redemption destroys the tokens it consumes. Supply falls, permanently, and there is no mint anywhere in the protocol that could ever put them back.

Notice what is not on that list: a treasury, a distributor, a keeper bot, a reward ledger, a multisig. None of them exist, because none of them are needed once the four faces are the same face.


The floor

One number, derived not decreed

Every swap sends 1% in ETH to the pot. Not to a treasury, not to a multisig, not to the deployer — to a contract whose only exit is redeem(), paid to whoever burns their own tokens for it.

// the only number the protocol has
floor = potETH / totalSupply

The pot only grows. The supply only shrinks. So the floor ratchets — and the two properties below are what make that a guarantee rather than a hope.


Property 1 — invariance

Redeeming cannot dilute the holders who stayed

The obvious fear with a redeemable pot is that a whale drains it and leaves everyone else with a worse floor. Here that is arithmetically impossible. Let the pot be B and the supply S, so the floor is R = B/S. Redeem a tokens:

B' = B − a·B/S = B·(S−a)/S
S' = S − a

R' = B'/S' = [B·(S−a)/S] / (S−a) = B/S = R

The floor comes out exactly where it went in. A whale exiting through the pot takes their share and nothing else — the number every remaining holder is backed by does not move. Integer division rounds the payout down, so in practice the floor ticks fractionally up, never down.

Measured on a mainnet fork

A 500,000 UHK redemption moved the floor by 0 wei. Not approximately — the before and after values were identical to the last digit.


Property 2 — monotonicity

The floor has no downward path

ETH enters the pot from trading fees and never leaves except through redemption, which by Property 1 leaves the floor unchanged. Supply never grows, because there is no mint. Therefore:

The guarantee

The floor is monotonically non-decreasing for the life of the protocol. Every trade that ever happens ratchets it upward, and nothing that can happen ratchets it back. This is not a policy anybody enforces — it is a consequence of there being no withdrawal function and no mint function.

On the fork: eighteen consecutive trades and redemptions in mixed order. Twelve raised the floor. Zero lowered it.


Run it yourself

Both properties, live

Trade volume feeds the pot. Redemptions burn supply and pay out. Move both and watch what the floor does — and, more importantly, what it never does.

Pot
4.000 ETH
Supply
1,000,000,000
Floor · ETH per UHK
0.000000004
Floor · per 1M UHK
0.0040 ETH
Redeem anything you like — the floor does not move.

The redemption slider changes the pot and the supply together, in exactly the proportion that leaves their ratio alone. That is Property 1, and it is why the second slider cannot hurt you.


Singularity

The pot — 2,427 bytes, one exit

Holds the ETH. Computes the floor. Executes redemption. That is the entire contract.

function redeem(uint256 amount) returns (uint256 ethOut) {
    uint256 supply = token.totalSupply();
    uint256 pot    = address(this).balance;

    ethOut = (pot * amount) / supply;   // supply BEFORE the burn

    token.transferFrom(msg.sender, address(this), amount);
    token.burn(amount);                  // gone, permanently

    (bool ok, ) = msg.sender.call{value: ethOut}("");
}

Computing the payout against the supply before the burn is the line that makes the floor invariant. Do it after and the arithmetic breaks.

What it cannot do

No owner, no admin, no pause, no upgrade, no fee setter, no withdrawal. ETH leaves this contract in exactly one place — the line above — and only to an address that just burned its own tokens to earn it. The fork test enumerates every function in the ABI and confirms it: twelve functions, zero withdrawal paths.


The hook

0x20CC — the accretion

Takes 1% of every swap, in ETH, on both sides, and forwards it to the pot inside the same call. It never holds a balance between transactions.

A v4 return-delta can only move one leg of a swap, so the fee comes off whichever leg is ETH: the specified side on an exact-input buy, the unspecified side everywhere else. Both paths are implemented, so there is no cheaper direction to trade in.

Why the fee is not an LP fee

An LP fee pays liquidity providers and disappears into positions. This one funds a pot every holder can redeem against. It is the difference between paying rent and paying down a backstop.

Why there is no buyback function

The buyback nobody runs

Every buyback bot is a discretionary spender waiting to be abused. There isn't one here, because it would be redundant: when UHK trades below the pot's floor, buying it and redeeming it is profitable for anyone who notices. The arbitrage is the buyback — self-financing, permissionless, and needing no gas budget, no keeper and nobody's permission.

Why there is no reward ledger

Because the pot already is one. Distributing pro-rata means tracking every holder on every transfer — which is where per-transfer taxes and unbounded loops come from. Here a holder takes their share when they choose, in one O(1) call, and pays gas only then.


Collapse

The forge — 623 bytes

A v4 hook does not choose its permissions. Its address is its permissions — the PoolManager reads the low 14 bits and calls only the callbacks encoded there. So the hook has to be brought into existence at one exact point and nowhere else.

function collapseInto(bytes32 salt, bytes memory bytecode, address expected)
function predict(bytes32 salt, bytes32 initCodeHash) returns (address)

error MissedTheHorizon(address landed, address expected);
event Singularity(address indexed hook, bytes32 salt);

Miss by a single bit and it reverts. That matters more than it sounds: a hook deployed to the wrong address does not fail loudly — it deploys, initialises, and then silently stops being called, with fees going nowhere and nothing visibly wrong from the outside. predict() lets you check the landing site before spending anything.


The token

$UHK — deliberately dull

No transfer tax, no reflection, no rebase, no blacklist, no max wallet, no cooldown, no mint, and no owner once trading is open. It does not know the pot or the hook exist.

burn() destroys the caller's own tokens and nobody else's. The pot uses it on itself after pulling in what a redeemer approved — which is why the pot needs no special power over the token. It burns what it now owns, exactly as any holder could.


Parameters

Every number, and whether it can move

ParameterValueMutable
Total supply1,000,000,000 UHKNo — no mint exists
Swap fee to the pot1.00% (100 bps)No — mined into the hook address
Hard ceiling on that fee5.00%No — a constant
Pool fee tier3000 (0.30%)Fixed at initialise
Tick spacing200Fixed at initialise
Hook flags0x20CCNo — it is the address
ContractSizeRole
UnihookToken2,999 BUHK — fixed supply, burnable, no owner after launch
Singularity2,427 BThe pot, the floor, and redeem()
UnihookHook4,884 B1% of every swap, forwarded on the spot
Collapse623 BThe forge

API

Everything an interface needs

Singularity

redeem(uint256)      -> uint256   // burn UHK, take your share
floor()              -> uint256   // ETH per UHK, 18dp
quote(uint256)       -> uint256   // payout, without sending
state()              -> (pot, supply, floor)
lifetimeFed()        -> uint256
lifetimePaid()       -> uint256
lifetimeBurned()     -> uint256
redemptions()        -> uint256

UnihookHook · UnihookToken

quote(uint256 ethIn) -> (toPot, floorNow)
FEE_BPS()            -> uint256   // 100 = 1.00%
lifetimeTaken()      -> uint256
swaps()              -> uint256

burn(uint256)                    // destroy your own UHK
totalBurned()        -> uint256
openTrading()                    // once; deletes the launcher

Verify it yourself

Do not take this page on faith

Everything above is a claim about state you can read. Check the floor twice, a week apart, and the monotonicity claim either held or it didn't.

# the pot, the supply and the floor, in one call
cast call $SINGULARITY "state()(uint256,uint256,uint256)"

# what would my UHK pay right now?
cast call $SINGULARITY "quote(uint256)(uint256)" $AMOUNT

# the fee is immutable — read it, then read it again in a year
cast call $HOOK "FEE_BPS()(uint256)"

# supply only falls
cast call $TOKEN "totalSupply()(uint256)"
cast call $TOKEN "totalBurned()(uint256)"

The hook's permissions are not a claim either — they are its address. The low 14 bits of 0x…20CC encode exactly which callbacks Uniswap will make, which is why the address had to be mined and why it cannot silently gain a permission later.


Fork results

Mainnet fork · every check passing

PASS
Collapsing to the wrong address reverts
PASS
predict() agrees with the mined address
PASS
The wrong fee tier is rejected at initialise
PASS
A 10 ETH buy sent exactly 0.1 ETH to the pot
PASS
A sell feeds it too — no cheaper direction
PASS
A 500,000 UHK redemption moved the floor by 0 wei
PASS
18 mixed trades and redemptions: 12 raised the floor, 0 lowered it
PASS
Supply is exactly the cap minus everything ever burned
PASS
No withdrawal path in the ABI — 12 functions, 0 dangerous
PASS
feed() is hook-only; bindHook cannot be called twice

Gas: buy 209,973 · sell 164,332 · redeem 149,686.


Honest limits

Stated here rather than discovered later

  • The floor starts at zero. It is funded entirely by trading. On day one the pot is empty and the floor is nothing — it becomes meaningful only with real volume behind it, and anyone telling you the token is "backed from launch" is wrong.
  • The floor is a floor, not a promise of profit. Buying at the market price and redeeming immediately loses money, by design — otherwise the pot would be a faucet. It only pays to redeem when the market is priced below the pot.
  • It grows slowly at first. 1% of volume against a billion tokens takes real turnover before the number is large. That is arithmetic, not pessimism.
  • Redemption is one-way. Burned tokens do not come back, and there is no mint that could recreate them.
  • No external audit. The contracts are fork-tested, and the two properties above are proven arithmetically and measured on chain — but that is not the same thing as a professional review, and it has not been done.