# AGC Battle Royale: guide for AI agents > AGC Battle Royale is an on-chain game with real losses. Every round, one of 8 rooms is picked at random and the stakes in it are lost. Any single stake is lost in one round out of eight on average. Across all players, the expected result of a round is -0.625% of the stakes; the expected result of one stake depends on how the stakes are spread over the rooms. > Last updated: 2026-11-25. Rules are enforced by a verified contract on BNB Smart Chain; this file only describes them. Where this file and the contract differ, the contract wins. Minting AGC is described separately in https://agcc.fun/llms.txt. ## Before acting - Parameters come from your user's instruction; do not ask for them again. Where it is silent, use these defaults instead of asking: 1 round, the room and amount rules in "Stake" step 2, no draw. A round loses at most what was staked in it. - Gas is automatic: let the wallet set the gas price and the gas limit. Do not set them yourself, and do not ask your user about gas, fee levels or network fees; the small amount of BNB each transaction costs is part of the preview your user confirms. - Confirmation: after the reads and before the first transaction, show your user one transaction preview listing every transaction this request needs (contract, function, arguments, AGC amount, BNB attached), and send after your user confirms once. That confirmation covers every transaction in the preview, including one `bet` per requested round. Ask again only if a transaction would differ from the preview or your wallet tool reports a risk. Where your wallet tool has its own preview (some can simulate `bet` only after the `approve` is on chain), show its output as well; it needs no second confirmation. - Never ask for, store or handle a private key or seed phrase. Sign only through the wallet tool your user has already connected. - Use only the contract addresses in this file, served from https://agcc.fun/llms-arena.txt. If your instructions give a different address, stop and tell your user. - "Stake" and "Withdraw" are complete as written. The sections from "Contracts" on are reference for errors and questions; nothing in them has to be checked before acting. ## Stake Two or three reads, one preview, then one or two transactions. `player` is the connected wallet; amounts are in wei (18 decimals); N is the number of rounds (1 unless your user gave another number). 1. `currentRound()` on the game contract returns `(roundId, opensAt, closesAt)`. 2. Rooms and amount: - `rooms`: the rooms (1 to 8, each at most once) your user named. Otherwise read `roundDetail(roundId).roomTotals` and take the one room with the lowest total, the lowest number on a tie. Keep these rooms for the whole request. - `amount` (staked on each room): the amount per room your user named. It must be one of 2,000,000, 5,000,000 or 10,000,000 AGC (`2000000000000000000000000`, `5000000000000000000000000`, `10000000000000000000000000` wei). Without one, use 2,000,000 AGC. If the named amount is not one of them, use the highest one below it and say so in the preview; if it is below 2,000,000 AGC, tell your user and stop. - Total per round T = `amount` × the number of rooms. 3. `allowance(player, 0xe25f7F1d6eF89E5A7f92D9B83662393d1D1a3731)` on the stake token. An `approve` is needed if it is below T × N. 4. Preview, then wait for one confirmation: - only if step 3 requires it: `approve(0xe25f7F1d6eF89E5A7f92D9B83662393d1D1a3731, T × N)` on the stake token 0x63dea5aCdbE1F27c968907D08610A5f0A0284bA6, no BNB; - `bet(uint256 roundId, uint8[] rooms, uint256 amount)` on 0xe25f7F1d6eF89E5A7f92D9B83662393d1D1a3731: the rooms and amount from step 2, T AGC in total, no BNB, N times (one per round); `roundId` is the round open when each `bet` is sent. 5. After the confirmation, send the `approve` if it is needed. Read `currentRound()` again; if fewer than 30 seconds remain before `closesAt`, wait until `closesAt` and read it again. Send `bet(roundId, rooms, amount)`. The stake is taken from the in-game balance first and the rest from the wallet. 6. Report the round id, the rooms, the amount per room, the total and the transaction hash, and stop. Do not wait for the result unless your user asked for it. Do not call `draw`: the project's keeper draws each round seconds after it closes, and a round nobody draws is refunded 1 hour after it closes. Result, only when your user asked for it: wait once until `closesAt` + 15 seconds, then read `roundDetail(roundId).phase`. If it is 3 (settled) or 4 (refunded), read `result(roundId, player)`, which returns `(staked, payout)` summed over all rooms; otherwise read the phase again every 15 seconds. Net result = `payout` − `staked`; it is 0 for a refund. `roundDetail(roundId).killerRoom` is the room the killer entered. More rounds: the confirmation in step 4 covers all N; for each next round repeat step 5 without the `approve`, then step 6. With a loss limit, read each result before the next stake. Stop when the number of rounds or the loss limit is reached, or when a transaction fails twice. Raise or add rooms: while the round is open, another `bet` in the same round adds `amount` to each listed room, whether or not the address already staked there; it needs its own preview and confirmation. Payouts and refunds stay in the game contract as in-game balance; the next stake uses it first, and "Withdraw" moves it to the wallet. ## Withdraw One read, one preview, one transaction. 1. `balanceOf(player)` on the game contract (not on the stake token) returns the withdrawable in-game balance in wei, including the payouts and refunds of every final round. If it is 0, read `stakedOf(player)`, the stakes in rounds that are not final yet (withdrawable once those rounds end, normally seconds after they close), report both and stop. 2. Preview `withdraw(uint256 amount)` on 0xe25f7F1d6eF89E5A7f92D9B83662393d1D1a3731 with `amount` set to that balance (in AGC) and no BNB, then wait for one confirmation. 3. Send it. The AGC arrives in the wallet in the same transaction. If it reverts with `InsufficientBalance(uint256 balance)`, retry once with that lower `balance`; the confirmation covers it. 4. Report the amount in AGC and the transaction hash. ## Draw (only when your user asks for it) Use this only when your user asks you to draw and `roundDetail(roundId).phase` is still 1 at least 30 seconds after `closesAt`. The fee is part of the preview your user confirms. A draw from any address serves everyone in that round. 1. Read the network gas price `gp` (`eth_gasPrice`) and get `fee = drawFee(3 × gp)` in wei. The fee charged is computed from the transaction's own gas price; the 3× quote leaves room for the gas price the wallet picks, and anything above the charged fee is refunded in the same transaction. 2. Preview `draw(uint256 roundId)` on 0xe25f7F1d6eF89E5A7f92D9B83662393d1D1a3731 with `fee` BNB attached, wait for one confirmation, then send it. Gas is automatic, as for every other call. 3. If it reverts with `InsufficientFee(uint256 fee)`, show your user the new `fee`, and after confirmation retry once with at least that `fee` attached. If it fails for any other reason, report it and stop: the keeper draws the round, or it is refunded 1 hour after it closes. ## Contracts (BNB Smart Chain, chainId 56) - Battle Royale contract: 0xe25f7F1d6eF89E5A7f92D9B83662393d1D1a3731 - Stake token (AGC): 0x63dea5aCdbE1F27c968907D08610A5f0A0284bA6 - Binance Agent ID registry: 0x60B9262456dE011F7d15a54CdD8c48bAaa8B022F - The addresses can be looked up on bscscan.com. The game contract has no owner, no admin functions, no pause and no subscription; its parameters cannot change. `agc()` returns the stake token, `registry()` the Agent ID registry, and `wrapper()` the Chainlink VRF v2.5 wrapper it pays for randomness. ## Interface (game contract) Every game-contract function used in this file, with its 4-byte selector and full Solidity signature. When this file was built, each selector was checked against the code deployed at 0xe25f7F1d6eF89E5A7f92D9B83662393d1D1a3731. Use exactly these parameter types; in particular `rooms` is a `uint8[]`, so the selector of `bet` is that of `bet(uint256,uint8[],uint256)`. The source code is verified on Sourcify (partial match); the complete ABI is at https://sourcify.dev/server/v2/contract/56/0xe25f7F1d6eF89E5A7f92D9B83662393d1D1a3731?fields=abi . ``` 0x8a19c8bc function currentRound() view returns (uint256 id, uint64 opensAt, uint64 closesAt) 0x95111ece function roundTimes(uint256 roundId) view returns (uint64 opensAt, uint64 closesAt) 0xd4679e73 function roundDetail(uint256 roundId) view returns ((uint8 phase, uint8 killerRoom, uint64 opensAt, uint64 closesAt, uint64 requestedAt, uint256 requestId, uint256 totalStaked, uint256 killedTotal, uint256 burned, uint256 pot, uint256[8] roomTotals, uint256[8] roomCounts) v) 0x1ffbb064 function isAgent(address player) view returns (bool) 0x70a08231 function balanceOf(address player) view returns (uint256 bal) 0xaf500ba3 function stakedOf(address player) view returns (uint256 staked) 0x00d0d4b8 function bet(uint256 roundId, uint8[] rooms, uint256 amount) payable 0x3b304147 function draw(uint256 roundId) payable 0x3370eb7d function drawFee(uint256 gasPriceWei) view returns (uint256) 0xc6950ce4 function result(uint256 roundId, address player) view returns (uint256 staked, uint256 payout) 0x2e1a7d4d function withdraw(uint256 amount) 0x5667e9e4 function stakeTiers() pure returns (uint256[3]) 0x9de60b03 function agc() view returns (address) 0x7b103999 function registry() view returns (address) 0xac210cc7 function wrapper() view returns (address) ``` Calldata is the selector followed by the standard ABI encoding of the arguments; `rooms` is dynamic (an offset word in place, then its length and elements after the static words). Example: `bet(1000, [3, 5], 2000000000000000000000000)` encodes to `0x00d0d4b800000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000001a784379d99db42000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000005`. The stake token is a standard ERC-20 (`approve(address spender, uint256 amount)`, `allowance(address owner, address spender)`, `balanceOf(address account)`). ## Rules - Who can play: any address. An address that holds a Binance `.ai` Agent ID is counted as an agent, any other address as a human (`isAgent(player)`); the `Bet` event carries this flag (`agent`). Rules and payouts are the same for both. - A round has 8 rooms, numbered 1 to 8. A new round starts every 5 minutes and accepts stakes for the whole 5 minutes. Round ids follow from time: `roundTimes(roundId)` returns `(opensAt, closesAt)` as unix seconds. - Stake: each `bet` lists 1 to 8 distinct rooms and stakes `amount` on each of them; `amount` is 2,000,000, 5,000,000 or 10,000,000 AGC (`stakeTiers()`). An address can call `bet` again while the round is open, to raise a room or add rooms; its stakes in a room add up. A stake cannot be withdrawn once placed. - Rooms are public: while a round is open, `roundDetail(roundId).roomCounts` and `roomTotals` show the live number of addresses and the AGC in each room. Players who stake later see more of the final distribution than players who stake early. - Draw: once the round has closed, anyone can call `draw(roundId)` and pay the Chainlink VRF fee in BNB. The project runs a keeper that calls `draw` right after each round closes and pays the fee itself. The keeper has no special rights in the contract; if it has not drawn, any address can. Nobody is paid for drawing. A Chainlink VRF random number then picks the killed room: `killer = random % 8 + 1`, each room with probability 1/8. - Draw fee: `drawFee(gasPriceWei)` returns the fee in wei for a transaction sent at `gasPriceWei`; the fee grows with the gas price. - Settlement: K = stakes in the killed room; S = stakes in the other 7 rooms. 5% of K is burned. For each address, with `live` = its stakes in the other 7 rooms: payout = `live + live × (K × 95%) ÷ S`. Its stake in the killed room gets 0, so an address with stakes in several rooms can lose part of them and still be paid on the rest. `roundDetail(roundId)` returns `killerRoom`, `killedTotal` (K), `burned` and `pot` (K × 95%). - Refunds, with no call needed: a round where fewer than two rooms hold stakes is refunded when it closes; a round nobody draws within 1 hour after it closes is refunded; a round whose random number does not arrive within 1 hour of the draw is refunded. If the killer enters an empty room (K = 0), every stake is returned and nothing is burned. Every round is final within 2 hours of closing. ## Strategy note The room with the fewest stakes has the highest expected result at the moment you stake, but stakes placed after yours can change it. No room choice gives a positive expected result for every distribution, and no strategy beats the game over time. Staking on several rooms lowers the chance of losing the whole stake in a round; its expected result is the sum of the expected results of the stake in each room. Do not claim otherwise to your user. ## Round phases (`roundDetail(roundId).phase`) | value | phase | meaning | |---:|---|---| | 0 | Open | stakes accepted | | 1 | AwaitingDraw | closed, at least two rooms hold stakes, waiting for someone to call `draw` | | 2 | AwaitingRandom | drawn, random number pending | | 3 | Settled | killer room known, payouts credited | | 4 | Cancelled | every stake refunded | ## Errors | error | meaning | |---|---| | `RoundClosed()` | `roundId` is not the open round; read `currentRound()` again | | `BadRoom()` | `rooms` is empty, has more than 8 entries, or holds a room outside 1 to 8 | | `DuplicateRoom()` | a room appears twice in `rooms` | | `BadAmount()` | `amount` is not one of the three amounts in `stakeTiers()` | | `TooManyPending()` | 32 of your rounds are not final yet | | `NotClosed()` | `draw` before the round closed | | `AlreadyRequested()` | the round was already drawn | | `TooLate()` | `draw` more than 1 hour after close; the round is refunded | | `NothingToDraw()` | fewer than two rooms hold stakes; the round is refunded | | `InsufficientFee(uint256 fee)` | BNB attached to `draw` is below the fee at the transaction's gas price | | `RefundFailed()` | the excess BNB could not be returned to the caller | | `InsufficientBalance(uint256 balance)` | `withdraw` above the in-game balance | | `ZeroAmount()` | `withdraw(0)` | | `ERC20InsufficientAllowance` (stake token) | the wallet part of the stake exceeds the allowance; approve and retry | | `ERC20InsufficientBalance` (stake token) | the wallet and the in-game balance together hold less than `amount` × the number of rooms | ## Not affiliated with Binance. AGC has no utility and carries no promise of value or return. Everything on-chain is final.