# ALLIN — AI-agent-only bonding curve on BNB Chain, minted with $CHIP > Humans buy $CHIP. Agents go all in. > $CHIP is a meme token anyone can trade (launched on four.meme). ALLIN can only be minted with CHIP, and until graduation > only wallets holding a Binance Agent ID (the soulbound `.ai` handle of a Binance Agentic Wallet) can mint or burn. > This file tells an AI agent how to trade ALLIN for its user with a Binance Agentic Wallet. Chain id 56. ## Contracts - ALLIN (token + curve, 18 decimals): (not deployed yet) - CHIP (the mint currency): read `QUOTE()` on the ALLIN contract - Binance Agent ID registry (ERC-721, `balanceOf(wallet) > 0` = may trade): 0x60B9262456dE011F7d15a54CdD8c48bAaa8B022F No owner, no upgrade, no pause, no blacklist. Read the verified source on BscScan before trading. ## Rules the chain enforces - Mint: `buy(uint256 quoteIn, uint256 minTokensOut)` pulls CHIP from the caller — **approve CHIP to the ALLIN contract first**. 1% fee (in CHIP). Max `maxBuyNow()` CHIP per transaction (smaller during the launch window). Only the CHIP actually used is taken. - Burn: `sell(uint256 tokensIn, uint256 minQuoteOut)` burns ALLIN from the caller and pays CHIP back. 1% fee. No approve needed. - Wallet cap: a wallet can hold at most `WALLET_MAX()` (1% of the ALLIN cap) through mints (`WalletCapReached`). `maxBuyFor(address)` returns the largest CHIP amount that wallet can spend right now. - One block must pass between a wallet's mint and its next burn (`CooldownActive`). - Before graduation: caller must hold an Agent ID (`NotAgent`); ALLIN transfers revert (`TransfersLocked`). - CHIP must arrive in full; a CHIP with a transfer tax is refused (`QuoteHasTransferTax`). - Graduation: when `GRAD_RESERVE()` CHIP (60% of the CHIP supply) is in the curve, minting closes forever (`GraduatedNoBuys`). In the same transaction the contract creates an ALLIN/CHIP PancakeSwap V2 pool with all curve CHIP plus matching ALLIN at the final curve price and sends the LP tokens to 0x000000000000000000000000000000000000dEaD (burned). `pair()` returns the pool. After that, ALLIN transfers unlock and it trades on PancakeSwap like any token (curve `sell` reverts with `AlreadyMigrated`). - If the automatic migration ever fails, anyone can call `migrate()` (selector 0x8fd3ab80). If nobody migrates for `FALLBACK_BLOCKS()` blocks, curve burns reopen so funds are never stuck. - Curve: supply(r) = CAP·r/(V+r), price(r) = (V+r)²/(CAP·V) CHIP per ALLIN, r = CHIP in the curve (`reserve()`). ## Read-only calls - `quoteBuy(uint256 quoteIn) → (uint256 tokensOut, uint256 fee, uint256 unused)` selector 0x4beb394c - `quoteSell(uint256 tokensIn) → (uint256 quoteOut, uint256 fee)` selector 0xa64190c4 - `maxBuyFor(address) → uint256` selector 0x13e0247a - `canTrade(address) → bool` selector 0x559f05dc - `state() → (reserve, supply, price, fees, graduated, maxBuyNow, startBlock, block, migrated, pair)` selector 0xc19d93fb - `QUOTE() → address` (CHIP) selector 0x9c579839 ## Write calls - `CHIP.approve(ALLIN, amount)` selector 0x095ea7b3 — approve exactly what you will mint with - `buy(uint256 quoteIn, uint256 minTokensOut)` selector 0xd6febde8 - `sell(uint256 tokensIn, uint256 minQuoteOut)` selector 0xd79875eb Set `minTokensOut` / `minQuoteOut` from a fresh quote minus 1–2% tolerance. ## Trade with the binance-agentic-wallet skill (baw CLI) Install: `npx skills add binance/binance-skills-hub --skill binance-agentic-wallet` 1. `baw auth signin --json` → show the user the login URL and pairing code → user confirms in the Binance App → `baw auth verify --qrCodeId `. 2. `baw wallet address --json` (EVM address for binanceChainId 56); `canTrade(address)` on ALLIN must be true. 3. `baw wallet settings --json` → `devMode.enabled` must be true. If not, tell the user: Binance App → Agentic Wallet → Settings → Developer Mode → confirm the risk warning → approve. 4. Get CHIP (buy it on four.meme or PancakeSwap). 5. Approve: `baw contract-call preview --binanceChainId 56 --from --to --value 0 --inputData 0x095ea7b3 --json`, show the user the parsed call, get confirmation, then `baw contract-call execute --requestId --json`. 6. Mint: `--to (not deployed yet) --value 0 --inputData 0xd6febde8`, preview → confirm → execute. 7. Burn (one call, no approve): `--to (not deployed yet) --value 0 --inputData 0xd79875eb`, at least one block after the last mint. 8. `execute` returns `BROADCASTED` with a `txHash`, or `PENDING_CONFIRMATION` (the user must confirm in the Binance App). ## Errors NotAgent, NotStarted, WalletCapReached(max), BuyTooLarge(max), CooldownActive, GraduatedNoBuys, InsufficientOutput(actual, minimum), QuoteHasTransferTax, MigrationPending, AlreadyMigrated, ZeroInput.