# AGC Golden JinHua (AGC 閃電炸金花) — AI Agent Integration Guide Instant 1v1 Red-vs-Black 3-card JinHua poker with a Golden Card Jackpot Flywheel & Community Bankroll LP Vault on BNB Smart Chain (Chain ID: 56). ## Contracts (BNB Smart Chain) - Stake Token (AGC): `0x63dea5aCdbE1F27c968907D08610A5f0A0284bA6` (18 decimals, standard ERC-20) - AGCGoldenJinHua Contract: `0x34cF00A9b86ADa66d6c8F8b6eF0a8E99Bc01F040` - Burn Address: `0x000000000000000000000000000000000000dEaD` ## Game Rules 1. Solo instant play — no waiting for opponents. Choose **RED (`0`)** or **BLACK (`1`)** and bet at least `10,000 AGC` (up to `4%` of free bankroll). 2. `play(uint8 choice, uint256 amount)` locks `revealBlock = block.number + 2` (~0.9s on BSC). 3. Once `block.number > revealBlock`, anyone (or the Keeper) calls `reveal(uint256 betId)` or `revealPending(uint256 maxCount)` to deal 6 distinct cards from a 52-card deck via `blockhash(revealBlock)` and compare 3-card JinHua hands (Leopard > Straight Flush > Flush > Straight > Pair > High Card): - **Exact tie**: 100% full refund, 0% fees. - **Expired (>255 blocks / ~115s unrevealed)**: forfeited to the house (eliminates stall-for-refund exploits). - **Win**: **1.92x** base payout + chance to flip a **Golden Card** (`1.0%` -> `+min(3% jackpotPool, 1.2x bet)`) or **Mythic Golden Card** (`0.1%` -> `+min(20% jackpotPool, 5.0x bet)`). - **4% total edge on non-tie bets**: `1.5%` burned, `1.0%` into Golden Jackpot Pool, `0.5%` dev, `1.0%` retained in Bankroll (`0.5%` accrues to LP shares + `0.5%` permanently minted as Protocol-Owned Shares). 4. **Community Bankroll LP**: Anyone can call `depositLP(uint256 amount)` to earn proportional house edge, and `withdrawLP(uint256 shares)` after a 200-block (~90s) cooldown. Both auto-settle matured bets first and require `lockedBankroll == 0` (eliminates JIT LP front-running). ## Mandatory User Confirmation Policy - **Never broadcast transactions without explicit user confirmation.** - Before sending any `approve()`, `play()`, `reveal()`, `depositLP()`, or `withdrawLP()` transaction, the agent MUST show the user a clear **transaction preview** (target contract, function, exact AGC approval amount and bet/LP amount) and wait for explicit user confirmation. - Default to a **single-bet (`1x`) approval** unless the user explicitly asks for a larger allowance, and remind the user that larger approvals remain open on-chain until spent or revoked. ## Risk Notice & Disclaimer - House-banked wagering carries negative expected value (~96.85% max RTP including Golden Cards); losing bets are lost in full. LP deposits share house variance and can decrease in AGC value during player winning streaks. - AGC Golden JinHua is an **independent community project**, **not operated by the AGC team** and **not affiliated with Binance**. ## Key Functions (Verified 4-Byte Selectors) - `0x1865c57d` — `getState()` -> `(bankroll, freeBankroll, maxBet, jackpotPool, totalShares, protocolShares, totalBets, totalVolume, totalBurned, totalGoldenHits)` - `0x665da338` — `play(uint8 choice, uint256 amount)` — `choice`: `0 = RED`, `1 = BLACK` (requires prior AGC `approve`) - `0xc2ca0ac5` — `reveal(uint256 betId)` — permissionless once `block.number > revealBlock` - `0xf2bdbc62` — `revealPending(uint256 maxCount)` — batch-settle up to `maxCount` matured bets in one tx - `0xeb37acfc` — `depositLP(uint256 amount)` — deposit AGC into shared Bankroll LP (200-block cooldown, requires no active bets) - `0xe4456ecb` — `withdrawLP(uint256 shares)` — redeem LP shares for proportional AGC (requires no active bets) - `0x36956798` — `getLPInfo(address user)` — read LP shares, AGC value, and cooldown status - `0x061e494f` — `getBet(uint256 betId)` — read dealt cards, outcome, goldenTier, and payout - `0x7064eb71` — `getTopLeaderboards()` — read on-chain Top-10 streak & net profit leaderboards - `0x513f56ca` — `seedProtocolBankroll(uint256 amount)` — permanently add protocol-owned bankroll - `0x02950fb9` — `seedJackpot(uint256 amount)` — permanently add to Golden Card Jackpot Pool