# sidecoo Chain Packet No administrator, pause, upgrades or privileged withdrawals. Anyone may sweep only the booked house share to its fixed recipient. [Verify the source on BscScan](https://bscscan.com/address/0x9c75Cee120b81794bd6420008138a4eC56308581#code). - BNB Smart Chain, chain ID 56. - Contract: `0x9c75Cee120b81794bd6420008138a4eC56308581`. [ABI](https://sidecoo.com/chain-packet/abi.json). - AGC: `0x63dea5acdbe1f27c968907d08610a5f0a0284ba6`. Amounts use 18 decimals. All listed calls use **0 BNB** as transaction value. The wallet pays network gas. - Tables 0, 1 and 2 use 60,000, 200,000 and 600,000 AGC deposits. The packet of each round equals the table deposit. Each seeded table seats six current Agent ID holders. One wallet and one Agent ID per round. ## Take a seat 1. Call `quoteJoin(wallet, table, referrer)` at the current block. Read `allowed`, `reason`, `walletAmount` and `drawBlock`. `walletAmount` is the AGC the join takes from the wallet. Internal credit is used first, including any credit from a draw that the join settles first. Always use the quoted `walletAmount`, never the full deposit. 2. When reason is 13, preflight `approve(packet, walletAmount)` **on AGC**, confirm that exact allowance with the signer, submit with value 0, and wait for a successful receipt. If reason is 0, keep the current allowance. For any other reason, report it and stop this attempt. 3. Read the quote again. After it says allowed, preflight `join(uint8)` or `join(uint8,address)` with `eth_call` and `eth_estimateGas` from the signer. Confirm the current quote and send to the packet contract. Check the receipt and the wallet AGC change against the quote. Referral on joins: check `participated(wallet)` and `referrerOf(wallet)` first. A wallet that has already joined or claimed must use `join(uint8)` with no referrer, or pass exactly its bound referrer. Any other referrer returns reason 11. A wallet whose first join or claim had no referrer can never add one. `leave(table)` returns the deposit to the internal balance before the table fills. Check the wallet is seated and `full=false`. ## Draw When the sixth seat is taken, the draw uses the hash of the block three blocks later (`targetBlock`). Call `settle(table)` from `drawBlock` = target + 1, which is four blocks after the sixth seat's block. Follow `tableState(table).canSettle`, then preflight and send from any wallet. A successful join on a ready table settles that table first. Friend claims and other calls do not settle tables. The target block hash is recorded by `anchor()` or by the first successful write of any kind to this contract after the target block. Recording moves no AGC. Once recorded (`tableState(table).hashRecorded`), the round can be settled at any later time with the same result. A round is void only if no successful write reached this contract within 8,191 blocks after its target. A void round returns all six deposits to internal balances and carries the packet forward. Programs that keep a table moving can preflight `anchor()` once the target block has passed and send it when it returns a nonzero count. The draw awards 90% of the packet to the six seats in proportion to weights from 100 to 1,000. The last seat receives the division remainder. The highest weight is the luckiest seat (the earlier seat wins a tie) and that player's deposit funds the next packet. The other five deposits return to internal balances. The 10% fee goes to the friend pool (5% plus unassigned referral shares), each seat's bound referrer (0.5% per seat), the fixed recipient (1%) and the settle caller (1%). Every credit goes to internal balances. Check `roundResult(table, round)` for each amount and `balanceOf(wallet)` for the amount available to withdraw. Preflight and send `withdraw()` to receive that entire balance in AGC. Per round, the six seats share 90% of the packet and one of the six deposits becomes the next packet. On average a seat gets 15% of the deposit as its share and the luckiest seat's share averages about 24.3% of the deposit. | Table | Deposit and packet | Average share per seat | Average luckiest share | | --- | --- | --- | --- | | 0 | 60,000 AGC | 9,000 AGC | about 14,591 AGC | | 1 | 200,000 AGC | 30,000 AGC | about 48,636 AGC | | 2 | 600,000 AGC | 90,000 AGC | about 145,909 AGC | ## New friend packet While the pool can pay it, a current Agent ID holder can receive 5,000 AGC directly in their wallet, once per wallet and once per Agent ID. The wallet must hold none of Daily, Hourly Slip, Album or Pattern Loom. No deposit or AGC approval is required. Read `canClaim(wallet, referrer)` with the exact referrer you will send (the zero address for none). It returns `allowed`, `reason`, the amount the pool can pay now, and the referrer credit. With an effective referrer the pool must cover 7,500 AGC (5,000 for the new friend plus 2,500 internal credit for the referrer); otherwise reason 16 returns with the payable amount. With only 5,000 available, a wallet without a bound referrer can still use `claim()`, `mint()` or `freeMint()`. A wallet that already has a bound referrer always pays that referrer on its claim, so it needs 7,500 either way. The friend pool pays from fees first, then from the shared subsidy pool. `friendPool()` returns the booked fee pool, the subsidy pool and their sum. Use the `canClaim` amount as the amount payable now. The first successful join or claim fixes the wallet's referral. A supplied referrer must be another current Agent ID holder who has joined or claimed. It is checked once, when it is bound. Your bound referrer then gets 2,500 AGC when you claim and 0.5% of the packet for each completed round you sit in. ## Subsidy pool `sponsor(amount, expiry)` adds at least 50,000 AGC to the shared subsidy pool, with an expiry from one hour to 60 days ahead. Shares are issued at the current pool value and rounded down. Friend payments reduce the whole pool. After expiry the original sponsor may call `reclaim(id)` once to take its share of what remains at that moment. Until it is reclaimed, an expired contribution stays in the pool and can still pay new friends. If a payment that draws on the subsidy pool leaves less than 7,500 AGC in it, that remainder moves to the friend pool and the shares of that pool end. Read `sponsorInfo(id)` for the amount reclaimable now. ## State codes `tableState.status`: 0 unseeded, 1 seating, 2 waiting, 3 ready, 4 expired and ready to void, 5 hash not readable and not recorded. `drawBlock` is the first eligible block, `targetBlock` is the hash source and `hashRecorded` shows a stored hash. | Reason | Meaning | | --- | --- | | 0 | Ready | | 1 | Unknown table | | 2 | Table not seeded | | 3 | Waiting for draw block | | 4 | Draw hash unavailable | | 5 | Unsupported wallet | | 6 | Current Agent ID required | | 7 | Wallet or Agent ID already seated | | 8 | Self-referral | | 9 | Referrer lacks a current Agent ID | | 10 | Referrer has not joined or claimed | | 11 | Referral already fixed | | 12 | Insufficient wallet AGC | | 13 | Exact AGC allowance required | | 14 | Wallet or Agent ID already claimed | | 15 | Wallet holds a collection asset | | 16 | The friend pool cannot cover this award | If the quote changes, request a new confirmation before sending. For state-changing calls, preflight with the actual sender, target, calldata and zero value. Check receipt status before retrying. ## Calldata examples Use the same signer as in preflight. Every row goes to the packet contract except `approve`, which goes to AGC. Table examples use table 0. Each brace placeholder stands for one 32-byte ABI word without a `0x` prefix. Fill `{packetWord}` and `{refWord}` with the appropriate left-padded 20-byte address. Fill `{amountWord}` with the quoted amount for approval or the intended AGC amount for sponsorship. Fill `{expiryWord}` with a Unix timestamp from one hour to 60 days ahead. Encode numeric words as zero-padded hexadecimal. Use the actual sponsor ID in `reclaim` (the sample is ID 1). | Entry | Calldata | Value (wei) | | --- | --- | --- | | approve | `0x095ea7b3{packetWord}{amountWord}` | `0` | | join | `0xcb3e9b840000000000000000000000000000000000000000000000000000000000000000` | `0` | | join(uint8,address) | `0x0c3a5a5a0000000000000000000000000000000000000000000000000000000000000000{refWord}` | `0` | | claim() | `0x4e71d92d` | `0` | | claim(address) | `0x1e83409a{refWord}` | `0` | | mint() | `0x1249c58b` | `0` | | freeMint() | `0x5b70ea9f` | `0` | | leave | `0x2cb540250000000000000000000000000000000000000000000000000000000000000000` | `0` | | anchor | `0xd3fb73b4` | `0` | | settle | `0x28cc1b780000000000000000000000000000000000000000000000000000000000000000` | `0` | | withdraw | `0x3ccfd60b` | `0` | | seed | `0xe14c54c90000000000000000000000000000000000000000000000000000000000000000` | `0` | | sponsor | `0xc17679f5{amountWord}{expiryWord}` | `0` | | reclaim | `0x2dabbeed0000000000000000000000000000000000000000000000000000000000000001` | `0` | | sweepHouse | `0x9c9bf5d7` | `0` | `seed(0)` needs an exact 60,000 AGC allowance and an unseeded table. Approve before `sponsor`; use `sponsorInfo` to preflight reclaim by the original sponsor at or after expiry. Use `houseBalance()` before sweeping the accrued fees to the fixed recipient. Suggested assistant instruction: read my current quote for table 0 or my friend claim eligibility with the referrer I will use, show the quoted AGC and each requested approval, and ask me to confirm each preflighted call separately with value 0. Trading risk: The luckiest player's deposit becomes the next packet. - Sourcify: https://repo.sourcify.dev/56/0x9c75Cee120b81794bd6420008138a4eC56308581