# CHOW > CHOW is a plain ERC20 on Robinhood Chain (chain id 4663). The whole supply went > into two Uniswap v4 pools at launch. Swap fees from those pools stream to CHOW > stakers. No owner, no admin, no upgrade, no mint, no tax. Anyone can build a > frontend and register an immutable referral fee of up to 10% on the claims it > serves. The chain is the source of truth; this file is a map. ## Why build on it - The referral fee is in the contract, not in a deal. Register once, from any address, and every claim or compound routed through your frontend pays you up to 10% of the reward, forever, with no one able to change or revoke it. - Fees are paid in ETH and USDG as well as CHOW. Bucket 1 and bucket 2 pay real assets, so a frontend earns hard currency, not only the token. - There is nothing to negotiate and nobody to ask. No team, no admin, no token list to get on, no API key. Everything is public view calls and a few write functions. - No backend needed. The contract lands hops, pops the queue and settles rewards inside the user's own transaction. A static page with a wallet connector is a complete frontend. - Users are never locked in. They can claim through any frontend, so the one with the best UX wins the fee. Good frontends compound: the more claims they route, the more they earn, and stats are public on chain. - The supply cannot be pulled. All CHOW liquidity sits in holders with no remove function, so a frontend is building on pools that will exist as long as the chain does. - collect() pays 0.05% of everything it collects to whoever calls it. A frontend that calls it before its users claim gets paid twice. ## Addresses - CHOW: 0x05D8024AB2Cf9c1CfbCdB1Ac755790d406A0DfF6 (18 decimals, 1,000,000,000 fixed supply) - Staking: 0x584FdC51811D9a53e18cd0673027C0A27c2b5eb6 - LiquidityHolder, CHOW/ETH pool: 0x1fEb2Ba503e73690Ce8525a0a36C7836B37d87A8 - LiquidityHolder, CHOW/USDG pool: 0x00265BEa2F0FbCc5766D3F59F3Ac40e5261608C3 - Uniswap v4 PoolManager: 0x8366a39CC670B4001A1121B8F6A443A643e40951 - Uniswap v4 StateView: 0xf3334192d15450cdd385c8b70e03f9a6bd9e673b - WETH: 0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73 - USDG: 0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168 (6 decimals) - Pool CHOW/ETH, 1% fee, spacing 200, no hook: 0xe23a77dc6c3c93947db77fa9319178ee2d1a0de141f80a09800a1360d78675f6 (currency0 ETH, currency1 CHOW) - Pool CHOW/USDG, 1% fee, spacing 200, no hook: 0x96c585e729b1f429815a98a17c62d701c85977757d1da0fc1350e2500a91c3dc (currency0 CHOW, currency1 USDG) Source for every contract above is verified (exact match) on the chain's block explorers. Look up the address. ## How the money moves 1. Every swap pays a 1% fee to the pool's liquidity position. 2. Each position is owned by a LiquidityHolder with no function to remove liquidity. CHOW in the pools leaves only when someone buys it. 3. Anyone can call collect() on a holder. It pulls accrued fees out of the pool, pays the caller 0.05%, and pushes the rest to Staking. 4. Staking has three buckets. Bucket 0 pays CHOW, bucket 1 pays ETH, bucket 2 pays USDG. CHOW-side fees from both pools feed bucket 0. 5. Rewards stream over 7 days. A refill smaller than the running stream keeps the rate and extends the window; a bigger one raises the rate and restarts 7 days. A bucket with no stakers banks rewards until someone stakes. 6. Nothing streams until collect() is called. ## Staking interface Write: - stake(uint8 bucket, uint256 amount), approve CHOW first - claim(uint8 bucket): bucket 1 pays native ETH, WETH if the receiver rejects ETH - claim(uint8 bucket, address frontend): same, minus the frontend's fee - compound(uint8 toBucket, address frontend): restakes bucket 0 rewards - hop(uint8 from, uint8 to, uint256 amount): 24 h in transit, lands on the next action or on land(user) / crank(); max 10 open hops - requestExit(uint8 bucket, uint256 amount): 3-day cooldown, stops earning at once; a second request merges and resets the timer - cancelExit(uint8 bucket), withdraw(uint8 bucket) - registerFrontend(uint16 feeBps, string url): once per address, immutable, feeBps <= 1000, url <= 256 bytes, stored raw - land(address user), crank() Read: - totalStaked(), bucketSupply(uint8), balanceOf(address, uint8), earned(address, uint8) - bucketState(uint8) -> (supply, rewardRate, periodFinish, lastUpdateTime, rewardPerTokenStored, pendingRewards); reward units per second = rewardRate / 1e18 - cooldownOf(address, uint8), transitsOf(address), rewardToken(uint8) - frontendFeeBps(address), frontendUrl(address), frontendStats(address) Events: Staked, Hopped, Landed, ExitRequested, ExitCancelled, Withdrawn, Claimed, Compounded, RewardNotified, RewardPended, FrontendRegistered, ReferralFeePaid. Claimed carries the gross reward; the fee is inside it. ## Frontends - Register from the address that should receive fees. Fee and URL never change. - Pass that address as `frontend` in claim and compound. The fee is paid in the bucket's token: CHOW, WETH (not ETH), or USDG. - A failed fee transfer leaves the user the full reward and does not count in stats. - Call collect() on both holders before users claim, or leave it to bots. - Gas: add about 400k over eth_estimateGas; a hop maturing between estimate and inclusion makes the bare estimate short. Unused gas is refunded. - Escape the URL before rendering it. ## Recipes Fees waiting in a pool: (L, last0, last1) = StateView.getPositionInfo(poolId, holder, holder.tickLower(), holder.tickUpper(), bytes32(0)) (now0, now1) = StateView.getFeeGrowthInside(poolId, tickLower, tickUpper) fees0 = ((now0 - last0) mod 2^256) * L / 2^128 fees1 = ((now1 - last1) mod 2^256) * L / 2^128 APR now: rate = bucketState(b).rewardRate / 1e18 apr = rate * 31557600 * price(rewardToken) / (bucketState(b).supply * price(CHOW)) Valid until periodFinish. Sustainable APR = last 7 days of collected fees, annualised, over the same staked value. Supply split: locked = CHOW inside the two holders' positions (from getPositionInfo liquidity and the pool sqrtPrice) staked = Staking.totalStaked() rewards = CHOW.balanceOf(Staking) - Staking.totalStaked() rest = wallets ## Chain - Chain id 4663. Gas is paid in ETH. Use any public RPC for the chain.