Chapter 05
Trading
The market is a Uniswap V2 pair against ETH, with every property — good and bad — that constant-product pools have. The one thing this protocol adds sits in front of it: a router that takes a slice of each trade and pays it into the token's vault.
The pair
One pool per token, holding the token and WETH, created by Uniswap's own factory during the launch. INFERNO does not own it and cannot pause it. The same pair is reachable from any Uniswap interface, and a trade made there is a trade on the same pool.
The fee
TradeRouter is a wrapper. Buy through it and 1% of the ETH you send goes to the token's RevenueVault before the rest is swapped; sell through it and 1% of the ETH the pool gives up goes there before the rest reaches you.
function buy(address token, uint256 minOut, uint256 deadline)
external payable returns (uint256 amountOut);
function sell(address token, uint256 amountIn, uint256 minOut, uint256 deadline)
external returns (uint256 ethOut);- It is avoidable, on purpose. Trade the pair directly on Uniswap and you pay nothing and fund nothing. A fee nobody can escape would have to be a transfer tax on the token, and a token with a hook in
transferbreaks every integration that assumes an ERC-20 behaves like one — and would tax the vault's own buyback. - The rate is fixed at deploy for a given router, with a ceiling of 300 bps written into the constructor. A different rate means a different contract at a different address.
- The router keeps nothing. It holds no balance between transactions and has no owner. ETH passes through it during a sell and leaves in the same call.
- It refuses tokens it does not know. A token this factory did not launch has no vault, and a fee with nowhere to go would be a fee quietly kept.
Buying and selling
- Buying. Send ETH with the call. One transaction, no approval — you are not spending an ERC-20.
minOutis the tokens you receive. - Selling. Two transactions the first time: an approval letting the router move your tokens, then the sell.
minOuthere is measured after the fee — it is what lands in your wallet, not what the pool gave up.
Quote both directions with quoteBuy and quoteSell, which return the amount out and the fee together. Quoting Uniswap and subtracting afterwards is how an interface ends up showing a figure nobody is paid.
Where price comes from
Every price and market-cap figure on an INFERNO surface is computed from the pair's reserves at the block it was read. There is no oracle, no off-chain feed and no time-weighted average.
| Figure | Computed as |
|---|---|
| Price | ETH reserve ÷ token reserve |
| Market cap | Price × totalSupply |
| Vault balance | The vault's ETH balance, read directly |
| Burned | One billion minus totalSupply |
| Backing | Vault balance ÷ market cap |
What a constant product cannot do
- It cannot resist a large sell. Price impact grows with size relative to reserves, and a creator who bought a large stake at launch can move the price a long way.
- It cannot stop sandwiching. Your transaction is public before it is mined. A tight
minOutlimits the damage; it does not prevent the attempt. - It does not know about the vault. A pending buyback is not priced in. The pool sees a swap arrive and nothing else.
- It cannot be paused. Not by us, not by the creator. If something is wrong, the market keeps running.