nox.fun Open App

How it works

A vault of USDC, a supply of tokens, and a redemption that pays exactly pro rata. Ten short parts, one picture each, with the contract lines behind them.

uniswap v4 hook
vault asset: USDC
one storage slot
no admin key
01

The floor only goes up

There is a vault of USDC and a supply of NOX. The floor is the vault divided by the supply: what one token redeems for, right now.

Every swap adds USDC to the vault. Redeeming takes out exactly your share. So the floor goes up, or it stays. It never comes down.

Vault R USDC only ÷ Supply S NOX = Floor F 0.028800 USDC per NOX
derived, never storedµUSDC
F = R / S        // 951,321.600000 / 33,032,000 = 0.028800
02

What a swap pays

The hook takes a fee in USDC on every swap, in both directions, and puts all of it in the vault. It does this after the swap has been decided: it cannot refuse a swap, delay it or reverse it.

The supply does not change. Tokens moved, none were created or destroyed. So the vault grows over the same supply, and the floor rises.

Buy Sell fee in USDC fee in USDC Vault R goes up S same F up
the only write on a swap1 SSTORE
s.reserve += uint128(fee);   // R goes up
s.paidIn  += uint120(fee);   // V goes up, forever
s.step     = _stepOf(s.paidIn);
v = s;                       // one slot
03

Why redeeming costs nobody

Redemption is not a swap. It is a direct call on the vault: always open, no allowlist, no queue, no delay, no fee. You send n tokens, they are burned, and you receive exactly n times the floor.

That removes value from the vault and tokens from the supply in exactly the proportion that leaves the ratio untouched. Taking one slice from a cake cut into equal slices does not change the size of the remaining slices.

before F = 0.028800 redeem n after paid F = 0.028800
redeem.solmsg.sender is the caller
payout = FullMath.mulDiv(uint256(s.reserve), amount, supply);  // rounds down
NOX.burnFrom(msg.sender, amount);
s.reserve -= uint128(payout);
USDC.safeTransfer(msg.sender, payout);
04

The gap

The floor is arithmetic. The market is opinion. They are two independent numbers, and the gap between them is a quantity of USDC that has not been paid into the vault yet.

Every single USDC of swap fee removes exactly one USDC from that number. The market can trade below the floor; when it does, anyone can buy on the pool and redeem from the vault, and that buying pushes it back up.

market 0.041300 floor 0.028800 gap coverage 69.73% missing 412,900.000000 USDC
derived quantitiesdisplay only
gap       = P·S − R          // 412,900.000000 USDC
coverage  = F · 10,000 / P    // 6973 bps
05

The fee only goes down

The fee is not a curve and not a parameter. It is a table of five steps, written into the contract as constants. The step is chosen by one number: how much USDC has ever been paid into the vault.

That number cannot decrease. Redemption takes USDC out of the vault, but it does not un-pay a fee. Early swaps pay 200 basis points; once 2,000,000 USDC has been paid in, every swap forever after pays 40.

200 bps1601208040 200k600k1.2M2M USDC paid in
state.solconstant, inlined in bytecode
uint16  internal constant MAX_FEE_BPS = 200;   // hard cap, both directions
uint16  internal constant FEE_STEP_0  = 200;   // … FEE_STEP_4 = 40
uint120 internal constant THRESHOLD_4 = 2_000_000_000_000;   // 2,000,000 USDC
06

Where the fees go

100% to the vault. Nothing anywhere else. The pool's own fee is set to 0. There is no treasury address, no fee recipient, no vesting schedule, no allocation reserved for anyone.

The supply is minted once, 40,000,000 NOX, and all of it goes into the pool as a single locked liquidity position. The hook reverts every later add and every remove. Nobody can withdraw it, including its author.

100% to the vault 0% to liquidity providers 0% to a team
genesisconstructor, once
uint256 internal constant GENESIS_SUPPLY = 40_000_000e18;   // all of it into locked liquidity
07

What the contract knows

The hook stores one 32-byte slot: the vault balance, the total ever paid in, and the current step. It reads the supply from the token. Everything else is derived from those three.

No mapping, no array, no history, no per-address record. A swap costs the same at the first trade and at the billionth.

reserve, 128 bits paidIn, 120 bits step, 8 slot 0, 256 bits

The three excerpts below are the contract itself: the state and its constants, the redemption, and the fee taken on a swap.


      
08

What it cannot do

These are not policies. They are properties of code with no admin key, no proxy and no mutable parameter.

revertIt cannot revert your swap.
blockIt cannot block redemption: no pause, no allowlist, no cap, no owner.
MAX_FEE_BPSIt cannot charge more than 200 basis points, in either direction.
constantIt cannot change the fee table.
vaultIt cannot move USDC out of the vault except through redemption.
mintIt cannot mint NOX. Minting happens once, in the constructor.
upgradeIt cannot be upgraded: no proxy, no delegatecall to a stored address.
senderIt cannot tell who you are. The address it receives is the router, and nothing depends on it.

It also cannot loop: every path is a fixed number of operations. And it cannot stop Circle from freezing the vault. That is the next part.

09

The flaw: Circle can freeze the vault

The vault holds USDC and nothing else. USDC is issued by Circle, and its contract contains a blacklist. An address on that blacklist can neither send nor receive USDC. Nothing in nox.fun can prevent this, detect it in advance, or work around it afterwards.

If the vault were blacklisted, redemption would fail on every call. The floor would still be readable, but not collectible: 100% of it, with no recourse, no insurance, and no key that could move the funds, because there is no key.

Every alternative is worse. A vault in ETH or a basket would move with prices, and then the floor would no longer be a floor. Holding one asset whose unit does not move is what buys the invariant, and this exposure is what it costs.

Vault 951,321.600000 USDC redeem() if blacklisted: readable, not collectible
10

A few words

The value in the vault comes from the people swapping. It is a transfer, not a return: it moves value from people who trade to people who hold, at a stated, capped, symmetric rate.

The floor gets close to the market only through volume, and only slowly. Rising markets widen the gap; falling markets close it from the other end. The numbers here are measurements, not forecasts.