§ The Codex
Everything in plain wordsWhat is Knightmares
Knightmares is an ERC-20 token (ticker KNIGHT) paired with ETH on a Uniswap V4 pool, with two on-chain mechanics that work together. The Forge is a staking contract where you deposit KNIGHT to earn rewards from a fixed 80,000 reserve that halves every 28 days. The Hook prices your swap fee off your battle honor, which falls when you trade and rises when you wait.
Born from the ashes, forging into something unique.
Tokenomics
The entire 1,000,000 supply is minted to the deployer in the constructor and never grows. The owner pairs 900,000 with ETH to seed the LP, transfers 80,000 to the Forge as the reward reserve, and uses the on-chain airdrop function to send the last 20,000 to early supporters. After that there is no mint, no presale, no team vesting and no bonding curve.
The Forge in detail
The Forge is a standard staking pool where you deposit KNIGHT to earn KNIGHT. What makes it different is the halving emission schedule that mirrors Bitcoin's reward curve on a much shorter timeline.
Era 1, days 0 to 28
The Forge emits 0.015 KNIGHT every second, which works out to roughly 1,296 KNIGHT per day shared between every staker by share of total stake.
Halvings
Every 28 days the rate halves on its own:
| Era | Rate / second | Rate / day |
|---|---|---|
| 1 | 0.015 | 1,296 |
| 2 | 0.0075 | 648 |
| 3 | 0.00375 | 324 |
| 4 | 0.001875 | 162 |
| 5 | 0.0009375 | 81 |
| 6+ | keeps halving | ... |
What you earn
If you stake 5,000 KNIGHT into a pool that has 50,000 total staked, your share is 10% and you earn about 130 KNIGHT per day in era 1. By era 2 that share earns 65 per day, and so on as the halvings stack.
Pending rewards are calculated live so you can harvest anytime and unstake anytime. Nothing about the deposit locks you in.
What if the reserve runs out
The contract only pays out what is actually in its balance minus the currently-staked KNIGHT. If the 80,000 reserve runs dry, emissions just stop and the token keeps trading on Uniswap forever.
The Battle hook in detail
Every swap on the V4 pool is treated as a battle. The hook reads your honor before the swap clears, picks a fee from a 3-band table, and writes the new honor back to storage. The honor refills one point per hour, capped at 100.
Fee bands
| Rank | Honor | Fee |
|---|---|---|
| Noble | 70 to 100 | 0.30% |
| Knight | 30 to 69 | 1.00% |
| Outcast | 0 to 29 | 3.00% |
Honor cost
Bigger swaps drain more honor, so a single emergency exit costs a lot more than a string of small trades:
| Swap size | Honor lost |
|---|---|
| under 0.01 ETH | 1 |
| 0.01 to 0.1 ETH | 5 |
| 0.1 to 1 ETH | 15 |
| 1 to 5 ETH | 35 |
| 5+ ETH | 70 |
Refill
Honor refills at one point per hour up to the cap of 100. A drained vessel that does nothing for four days returns to full noble standing.
Airdrop
The token contract ships with a built-in batch airdrop that the owner runs from outside. You pass an array of recipient addresses and an array of amounts (or one shared amount when everyone gets the same), and the function moves tokens directly from the owner balance without touching the trading gate. This is how the 20,000 KNIGHT allocation gets distributed at launch.
Two variants exist: airdrop(addresses, amounts) for custom amounts per address, and airdropEqual(addresses, amount) for the common case.
Trust assumptions
The token has an owner address that holds a few launch powers. The owner can enable trading once (one-way), run the airdrop to distribute the 2% allocation, set the hook and forge addresses on the token, mark addresses as limit-exempt (used for the LP pool, the router and the V4 pool manager), and finally renounce ownership.
The owner cannot mint more KNIGHT, drain LP, change the halving math, redirect forge rewards, or stop trading after it has been enabled. Total supply is hard-coded at 1,000,000 in the constructor.
Why it works
The loop is straightforward: buy KNIGHT on the V4 pool (your first swap pays the noble fee because you start with full honor), stake the bag in the Forge to draw embers from the 80,000 reserve, and let it compound by harvesting and re-staking. When you eventually want to leave, you harvest, unstake, and sell back into the pool at whatever tier your remaining honor permits.
The halving makes early stakers earn more than latecomers, and the honor system makes flipping more expensive than holding. Both mechanics push the same way and both reward patience.