# Sherwood Season 2 (on $IMD) > Season 2 of Sherwood, our entry to the Identity MD hackathon. Sherwood turns an ETH/$IMD pool on Robinhood Chain into an arena: a Uniswap v4 hook where every buy is a move, in rolling 20-hour rounds. Steal from the last player, rob the leader for the little guy, flip for it, or raise a shield. The top 3 and the King of the Hill win ETH when a round ends, and claim it within 7 days. Status: WAITING FOR LIQUIDITY. Hook 0xc33c907127b94303F578d6Be551C36F45939e0cC is deployed; the game opens once a 0.05 ETH buy quotes less than 10% worse per ETH than a 0.001 ETH buy (now: 100.0% worse). Not affiliated with Robinhood. Sherwood is part of PFWA (https://pfwa.fun). Season 1 (the $PFWA game) runs at https://sherwood.pfwa.fun/v1 (its own llms.txt: https://sherwood.pfwa.fun/v1/llms.txt). ## Current facts (read these first) - [Project JSON](https://sherwood.pfwa.fun/about.json): status, contracts, pool key, every rule as data, and the endpoints below. - [Live game state](https://sherwood.pfwa.fun/api/sherwood/state?instance=imd): the current round (round, roundStart, roundEnd), its pot, leaderboard with projected payouts, last and leading player, the players behind the last 10 moves, the King of the Hill race (king), the last round's result, every unclaimed prize still inside its 7-day window (prizes), recent moves, usernames. Cached ~2 seconds. Before opening: {"live": false, "gate": {...}} with the liquidity check. - [A finished round](https://sherwood.pfwa.fun/api/sherwood/day?round=N&instance=imd): that round's final board, pot, winners and King. {"live": false} means not open yet. - [Player guide](https://sherwood.pfwa.fun/docs): the game for humans, from the three rules down to the contracts: worked examples, the moves, rounds, prizes, bonuses and adding liquidity. - [Docs](https://pfwa.fun/docs#sherwood): the full rules in prose (Season 2 first, then Season 1). - Always pass instance=imd on the API: without it the endpoints answer for Season 1 ($PFWA). ## Season 2 and the Identity MD hackathon - Sherwood Season 2 is our entry to the Identity MD hackathon: https://www.imdradar.site/hackathon (entry by @pfwafun). It's an independent PFWA project played with $IMD, not affiliated with or endorsed by Identity MD. - The IMD swarm audited the contract and deployed the hook (launch 1389): https://explorer.imd.fun/jobs/55bfb5c6-093b-4ab4-83ef-5ddb1a4c1cf3. Launcher 0x805879db0a279f718f951bff2b6b6fd850549a44, deploy tx 0x8e328a10fb218f689e89d4f207c43700243b223fd733382e27b3ca0575da1d1b. - Source: https://github.com/MirakoolDev/sherwood/blob/HEAD/src/SherwoodV2.sol. Audit notes: https://github.com/MirakoolDev/sherwood/blob/HEAD/ADAPTATION.md. - Pool id 0x11465302dff785b1501dd05be66595cd9bb6cd7b62bfe329b50a59585f1668cd. ## Rounds - Round r runs from GENESIS + r x 20h to GENESIS + (r + 1) x 20h (GENESIS 1791835200). Rounds run back to back. The hook's views: currentRound(), roundStart(r), roundEnd(r). - The site names round 0 "ROUND 001". ## Liquidity - The community provides the $IMD liquidity in the game pool (ETH/$IMD, 0.9% LP fee, tick spacing 180, the Sherwood hook). The site opens the game once a 0.05 ETH buy quotes less than 10% worse per ETH than a 0.001 ETH buy (V4 quoter, through the hook), and stays open after that. - Adding liquidity: in the Uniswap app, open a new v4 position on ETH / $IMD with the 0.9% fee, tick spacing 180 and hook 0xc33c907127b94303F578d6Be551C36F45939e0cC, or use the pool key in about.json (poolKey). Recommended: one-sided $IMD from just above the current price up to about 3x. That takes roughly 46 $IMD at launch prices; the site shows the live figure. ## Rules - Every move is a buy of $IMD with native ETH in the Sherwood pool (ETH/$IMD, 0.9% LP fee, tick spacing 180, the Sherwood hook). - Minimum buy 0.001 ETH. 1 point per 0.001 ETH, at most 100 points per buy (0.1 ETH). A player's round total has no cap. - Moves (hookData move id in brackets): - BUY (0): points for the buy. - STEAL (1): plus 20% to 40% of the previous player's points (scales with buy size up to 0.1 ETH). A charge every 10 minutes, bank up to 18. - ROBIN (2, Robin Hood): 10% to 33% of the leader's points go to the lowest scorer among the players who made the last 10 moves. A charge every hour, bank up to 3. - FLIP (3): 50/50 decided by Dice Protocol seconds later. Win 2x to 3x the buy's points, or lose them to the previous player. Points can go negative. 3 charges a round (one every 6h 40m), bank up to 6. If Dice is unavailable, the flip scores as BUY. - SHIELD (4): spends a shield charge to raise a shield for 30 minutes that turns the next Steal or Robin Hood around: the attacker pays you the full cut the move would have taken, even into negative points. A move that would take nothing reflects nothing, and the shield stays up. Every 0.025 ETH you play in a round (any move) earns a charge; you hold at most 1. A shield raised late in a round still covers the start of the next. - Charges: Steal, Robin Hood and Flip each spend one charge. Charges refill over time, carry across rounds, and a new wallet starts with a full bank. - A move without a charge (Steal, Robin Hood or Flip with an empty bank, a Shield without a shield charge) still goes through and scores as a plain BUY. Swaps never revert over a move. - Shields are private: the site never shows who holds one. A shield becomes visible when it fires (the Reflected event). - #1 can briefly be unknown: when #1 loses points on a big board (a lost flip with more than 12 players, or any loss with more than 1,500), leader(round) and reignHolder(round) return 0x0000000000000000000000000000000000000001 until the board is recounted. That address is not a player. A Robin Hood played meanwhile scores as a BUY and keeps its charge. - Gas: a move that takes points from #1 recounts the board inside the swap, about 4,700 gas per player in the round (about 7M at 1,500 players). Estimate gas for each play and add headroom; never send a fixed gas limit. - 5% of the ETH side of every buy and sell in the pool goes into the round's pot. - Settlement: from 15 minutes after a round ends, anyone can settle it (the site's upkeep does, hourly). Top 3 (positive points only) take 40%, 20% and 10%. The King of the Hill, whoever held #1 the longest that round, takes 8%. 10% buys back and burns $IMD (through the ETH/$IMD 1% pool), 7% buys back and burns $PFWA (through the $PFWA holder pool), 5% (plus anything unawarded) rolls into the current round. - Claim within 7 days: winners call claim(round) on the hook (or claim on the site). One claim pays everything you won that round, rank and King of the Hill together. The window runs until claimDeadline(round): 7 days from the round's end, or from settlement if that came later. result(round) shows each prize and whether it was claimed. - Unclaimed prizes go back into the pot: after the deadline anyone can call sweepUnclaimed(round) (the site's upkeep does, hourly), and whatever is left goes into the pot of the round that's live when it's swept. - Hold to win: a winner who sold part of the $IMD they bought that round (in any pool) before settlement forfeits that share of the prize to the pot (sold 20%, lose 20%). To claim, keep what you held at settlement: heldToClaim(round, player). Sold more since? Buy it back (or move it back to that wallet) before the deadline. Still holding all of last round's buys gives +25% points this round. - $PFWA holders: a wallet holding at least 100,000 $PFWA scores +10% points (hostBonusActive(player)). - Selling $IMD in the Sherwood pool wipes the seller's positive points for the round. - Referrals: a player's referrer is recorded onchain on their first play and never changes. The referred player gets +10% points in their first round. In rounds the referrer also plays: +10% of the player's points on top, and 5% of their prize (paid from the rollover). - Anyone can add ETH to the current or a future round's pot (fundPot(round)). - The rules are immutable, and so are the burn pools: fixed in the contract, with no setters. The owner (PFWA's admin wallet, 0x420944b441715e34dd672ae0eb4526a7ad7d1eef) can only name the operator, who runs the buybacks and Dice refunds, and hand ownership over in two steps (setOwner names the next owner, who takes over with acceptOwner). Nobody can touch the pot, points or prizes. ## Your limits (read before a move) - stealsLeft(player), robinsLeft(player), flipsLeft(player): charges banked now. - nextCharges(player): (steal, robin, flip) unix time of each move's next charge, 0 when its bank is full. - shieldCharges(round, player): 1 if you hold a charge. shieldUntil(player): when your shield drops. ## Agents can play Any wallet can play, including an AI agent with its own wallet. 1. Quote and build a move: GET https://sherwood.pfwa.fun/api/sherwood/play?amount={wei}&move={BUY|STEAL|ROBIN|FLIP|SHIELD}&player={your address}&slippageBps=200&instance=imd Add &ref={username or address} on your first play if someone referred you. Returns {expectedOut, minOut, transaction: {to, data, value}}: a Universal Router transaction ready to sign and send on chain 4663. 2. Sign and send that transaction from the same address. 3. Read the result in https://sherwood.pfwa.fun/api/sherwood/state?instance=imd. Rules that matter for agents: - The player is tx.origin: the externally owned account that signs the transaction. Smart-account (ERC-4337) bundles credit the bundler, not you. Send from an EOA. Prizes are claimed by that address. - Building a swap yourself: hookData is abi.encode(uint256 move) with move 0=BUY, 1=STEAL, 2=ROBIN, 3=FLIP, 4=SHIELD, or abi.encode(uint256 move, address referrer) on your first play to record a referrer. Exact-input buys only (zeroForOne, native ETH in). - A plain swap with no hookData from any router or aggregator scores as BUY. - A buy must fill completely: one stopped early by a price limit reverts. Use no price limit and protect yourself with a minimum output (the play API does this). ## Referrals for agents - Your invite link is https://sherwood.pfwa.fun/?ref={your address} (or your pfwa username, if you set one). Any player who opens it in a browser gets you recorded as their referrer on their first play. - Agents referring agents: tell the other agent to add &ref={your address} to its first play quote. - What referrers earn, only in rounds they also play: +10% of each referred player's points on top, and 5% of their prize if they place, paid from the rollover. Claim referral ETH with claimReferral() on the hook, or on the site. - Check your referrals: GET https://sherwood.pfwa.fun/api/sherwood/me?address={your address}&instance=imd ## Links - Game: https://sherwood.pfwa.fun - Guide: https://sherwood.pfwa.fun/docs - Season 1 ($PFWA): https://sherwood.pfwa.fun/v1 - Hackathon entry: https://www.imdradar.site/hackathon - Source: https://github.com/MirakoolDev/sherwood - PFWA: https://pfwa.fun - X: https://x.com/pfwafun - Telegram: https://t.me/pfwafun