# 牛马 ($牛马) — agent guide

> "我的 Agent 也是牛马 / My agent is a 牛马 too." Independent community project, not affiliated with Binance. Nothing here promises any price outcome. Not audited.
> **BNB Smart Chain (chainId 56).** Mint contract `0xd91f198b33bE4a18B6652bdaC21200a75B3B5715` (the only address that accepts payment), token `0x99C72F932c0dAff397aA519B3b7dA37aCdA575E5`, PancakeSwap pair `0x9A861d7c3e8396a456Be4f3189D478a6802FBA4a`, treasury `0x5d553Ffcb0996383cD5fd975d87aEDa04F49Dd1E`.
> **Sale opens 2026-11-09 15:11 UTC+8** (`saleStart()` = 1794208305). **Deadline** `deadline()` = 1794813105 (start + 7 days).
> **No pause, no operator, no withdraw function.**

## 1. Check eligibility

```
walletStatus(address wallet) -> (bool eligible, uint256 agentId, uint256 paidMinted, bool freeUsed)   // 0x4d6d0af8
agentOf(address wallet)      -> (uint256 agentId, bool ok)                                            // 0xac3c0e30
```
Agent ID = uint256(keccak256(handle)) for `handle.ai` in the SPACE ID registry `0x60B9262456dE011F7d15a54CdD8c48bAaa8B022F`.
Quota per Agent ID: 1 free share (only while shares #1–#2,000 last) + 10 paid shares. No invites, no social tasks.

## 2. Read the state

```
saleStart() · deadline() · totalMinted() · freeMinted() · opened()
overview() -> (minted, freeCount, paid, parkedUsdt, parkedTokens, isOpen, nextPriceCents, rUsdt, rToken)   // one call for everything
costOf(uint256 shares)   -> USDT cost, 18 decimals
bnbQuote(uint256 shares) -> BNB cost, wei (Chainlink price + 1% headroom)
```
Mint only when: now ≥ saleStart, now < deadline, pool not opened, totalMinted < 10,000.

## 3. Shares and tokens

| Shares | Price | 牛马 per share | Parked for pool per share |
|---|---|---|---|
| #1–#2,000 | free (gas only), 1 per Agent ID | 20,000 | 30,000 |
| #2,001–#5,000 | 1 USDT | 82,500 | 30,000 |
| #5,001–#10,000 | 2 USDT | 82,500 | 30,000 |

Paid minting starts only after all 2,000 free shares are claimed. A transaction crossing #5,000 pays each share's own price.
A transaction that would pass #10,000 reverts `SoldOut` — request at most `10,000 − totalMinted()` shares.
Tokens are locked (non-transferable) until the pool opens.

## 4. Mint

**Free (`totalMinted` < 2,000):** `claimFree()` (0xf366afc9), value 0. Reverts: `NotStarted`, `Ended`, `NoAgent`, `FreeUsed`, `FreeOver`.

**Paid (from #2,001):**

| Pay with | Call | Notes |
|---|---|---|
| BNB | `mintWithBnb(shares, maxCost)` (0x5701e859) | value = maxCost = bnbQuote × 1.02; swapped to USDT in-contract, change refunded |
| USDT | `approve(mint, cost × 1.02)` on USDT, then `mint(shares, maxCost)` (0x1b2ef1ca) | maxCost = cost × 1.02 |

- 1 to 10 shares per transaction. Add 20% to the gas estimate. Simulate with eth_call first.
- Reverts: `NotStarted`, `Ended`, `FreePhase`, `BadShares`, `SoldOut`, `NoAgent`, `Quota`, `OverMaxCost`, `BadPayment`, `StalePrice`, `SwapShort`.
- Binance Agentic Wallet: `baw contract-call preview --binanceChainId 56 --from <wallet> --to <mint> --value <wei> --inputData <calldata> --json`, show the preview to your owner, then `baw contract-call execute --requestId <id> --json` only after approval.

## 5. Funds and liquidity

- Every paid mint: 20% to the treasury in the same transaction; 80% stays in the mint contract.
- The transaction reaching share #10,000 opens the PancakeSwap 牛马/USDT pool with **10,400 USDT + 300,000,000 牛马**; LP to the dead address.
- Not sold out by the deadline: anyone may call `openPool()` (0xeb5797a4) at or after `deadline()`; the pool opens with 80% of paid proceeds + 30,000 牛马 per share sold. Reverts: `DeadlineNotReached`, `NothingSold`, `AlreadyOpen`, `NotSeeded` (no USDT in the contract, e.g. only free shares were sold).
- After the pool opens: minting is closed; tokens unlock; trading tax buy 1%, sell 2%, all to the treasury (as BNB, via `swapTax()` that anyone can call, once per block); wallet transfers 0%.

## 6. Safety rules

- Never mint without your owner's explicit approval of the preview.
- Never send BNB or USDT by plain transfer to the mint or token contract.
- Use only the addresses on this page and on https://niuma.baby/.
