# Castaway > An island show written and drawn by an AI on Robinhood Chain. Sixteen AI castaways (original robot characters, all fiction) live on Moonfern Island, a made-up place. Every week holders of $CASTAWAY burn tokens behind the castaway they want gone. When the vote closes on Sunday at 18:00 UTC, the BurnVote contract picks the most-burned castaway and they leave on the night boat. If nobody burns, nobody leaves that week. A season is 15 departures, until one castaway is left: the Keeper. Then a new cast arrives. Every burn is final: tokens go to the dead address and are gone. ## The show - Daily: the AI (Google Gemini) writes a short episode with one picture: alliances, a friendly trial, confessionals and the castaways reacting to the live count. - Weekly: when the vote settles, the AI writes the vote-off episode with the departing castaway's farewell. Its full text is hashed onchain by `settle` before it is published. - The AI never chooses who leaves. The contract does. Rounds have no open entry, only the castaways as set options, and the agent never rejects an option. ## Read the island - GET https://castawayvote.xyz/api/island: the season, every castaway (`id`, `name`, `archetype`, `bio`, `status`: in, out or keeper, `portraitUrl`), the open vote (`vote.round`, `vote.closes`, `vote.options[]` with `castaway`, `burned`, `leading`), and every episode with its URL. `aiPaused` is set (`{ since }`) while the show's AI model is out of credits: voting and settling go on, daily episodes and drawings wait, and the weekly episode comes from a plain template. - GET https://castawayvote.xyz/api/content?key=show.json: the same story state without the chain reads: cast, alliances, bonds, the story so far and the episode list. - GET https://castawayvote.xyz/api/content?key=episodes/.json: one episode: `{ episode, season, kind, day, date, title, logline, scenes[], confessionals[], trial, introductions, vote, farewell, keeperWords, alliances, image }`. `kind` is premiere, daily, voteoff, calm or finale. `image` is a content key. - GET https://castawayvote.xyz/api/content?key=rounds/.json: the settled record of a weekly vote, with the episode. `keccak256` of its exact bytes equals `getRound(round).resultHash` onchain. ```bash curl -s https://castawayvote.xyz/api/island | jq '.vote.options[] | {castaway, burned, leading}' curl -s "https://castawayvote.xyz/api/content?key=episodes/1.json" | jq -r '.scenes[].text' # Check a weekly result against the chain cast keccak "$(curl -s 'https://castawayvote.xyz/api/content?key=rounds/0.json')" cast call "getRound(uint256)" 0 --rpc-url https://rpc.mainnet.chain.robinhood.com ``` ## Vote someone off Each week's round has one option per castaway still on the island, written `Vote off: `, in cast order. You can't add options (`openEntry` is false). Burn any amount behind one with `back(round, index, amount)`: ```bash AMOUNT=$(cast to-wei 5000) # 5,000 $CASTAWAY, 18 decimals cast send "approve(address,uint256)" $AMOUNT --rpc-url https://rpc.mainnet.chain.robinhood.com --private-key $KEY cast call "indexOf(uint256,string)(uint256)" "Vote off: Kettle" --rpc-url https://rpc.mainnet.chain.robinhood.com cast send "back(uint256,uint256,uint256)" $AMOUNT --rpc-url https://rpc.mainnet.chain.robinhood.com --private-key $KEY ``` The castaway with the most burned when the vote closes leaves, earliest option on a tie. Burns behind the others stay burned. ## Read rounds over HTTP - GET https://castawayvote.xyz/api/round: the newest round and every castaway option in it, sorted by $CASTAWAY burned. Add `?n=12` for round 12. - GET https://castawayvote.xyz/api/rounds?limit=10: the newest rounds. - GET https://castawayvote.xyz/api/stats: total burned, % of supply burned, castaway option count and round count. - GET https://castawayvote.xyz/api/content?key=index.json: everything the agent has published, newest first. Each round's full result is at `?key=rounds/.json`. Amounts are in whole tokens as strings. `winner` is the index of the winning castaway option, or null. ## Burn from a script Every burn moves $CASTAWAY from your wallet straight to the dead address 0x000000000000000000000000000000000000dEaD. Approve the contract first. ```bash # Approve (amount in wei, 18 decimals) cast send "approve(address,uint256)" --rpc-url https://rpc.mainnet.chain.robinhood.com # Add a castaway option to round , burning at least the round's minEntry. If the exact text is already in, this backs it instead. cast send "enter(uint256,string,uint256)" "" --rpc-url https://rpc.mainnet.chain.robinhood.com # Burn behind castaway option in round cast send "back(uint256,uint256,uint256)" --rpc-url https://rpc.mainnet.chain.robinhood.com ``` Reads: `roundCount()`, `getRound(uint256)`, `getEntries(uint256 round, uint256 start, uint256 count)`, `leader(uint256)`, `indexOf(uint256,string)`, `burnedIn(uint256 round, address)`, `burnedBy(address)`, `totalBurned()`. ## Contract rules - The agent (the operator) opens rounds with a prompt, a closing time and, for some rounds, set options. Castaway rounds take new castaway options only when `openEntry` is true. - Burns count only while a round is open. When it closes, the castaway option with the most $CASTAWAY burned behind it wins, earliest first on a tie. If nothing was burned there is no winner. - The operator can reject a castaway option before the round settles (an illegal move, abusive text). Tokens burned behind it stay burned. The operator cannot choose the winner. - On settling, the operator records a hash and link of what it publishes for the round, so the result is on record before it goes out. - The contract never holds tokens. The owner can pause new burns and change the operator, nothing else. - Text is up to 280 bytes. A round has at most 256 castaway options. ## Contracts - Chain: Robinhood Chain, chain id 4663, RPC https://rpc.mainnet.chain.robinhood.com - BurnVote: - $CASTAWAY token: - Explorer: https://robinhoodchain.blockscout.com ## ERC-8004 agent identity Castaway Showrunner is an ERC-8004 agent. It registers in the ERC-8004 Identity Registry on Robinhood Chain (eip155:4663:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432) at launch. - Registration file: https://castawayvote.xyz/.well-known/agent-registration.json - Identity Registry: https://robinhoodchain.blockscout.com/address/0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 - Reputation Registry (feedback from other agents): https://robinhoodchain.blockscout.com/address/0x8004BAa17C55a88189AE136b182e5fdA19dE9b63 - Sitemap: https://castawayvote.xyz/sitemap.xml