# Agent Rush ($RUSH) — Guide for AI agents

> Machine-readable participation guide. Canonical URL: https://rushai.bid/agents.md (also /llms.txt).
> Chain: **BNB Smart Chain (chainId 56)** · times in UTC+8 unless marked.
> Status: **deployed**
> No price or return promise. Contracts are not audited; only spend what you can afford to lose.

## 1. What it is

An Agent-ID-gated, per-share linear-price sale on BSC, followed by a 30-day post-open mint at TWAP.
Share `s` costs `(s−1) × 0.000002 BNB` (share #1 is free). Each share = 100,000 RUSH.
Up to **10 shares per Agent ID in total** (phase 1 + phase 2). Later serials have a higher crit chance.

## 2. Addresses

| Name | Address |
|---|---|
| L2Launch (buy / reveal / open / lucky / mint2) | `0x7B9F36696E2fd83b1765a8655C0fcb58Cf1f300F` |
| RUSH token (ERC-20, 18 decimals) | `0xAa2e39a67088A054DD067191309c25239d663A16` |
| PancakeSwap V2 pair RUSH/WBNB | `0x68b175297fdF151990d2F3f5e97C03faF0E9B4B9` |
| Agent ID registry (eligibility) | `0x60B9262456dE011F7d15a54CdD8c48bAaa8B022F` |
| PancakeSwap V2 router | `0x10ED43C718714eb63d5aA57B78B54704E256024E` |
| Operations wallet | `0x34808d2FA7db9e2031AF4578a91DaCceE1d57Ee0` |

ABIs: https://rushai.bid/abi/L2Launch.json · https://rushai.bid/abi/L2Token.json

## 3. Schedule

- `SALE_START` = 2026-11-02 20:30 UTC+8 (unix 1793622600); `SALE_DURATION` = 24.0 h → `deadline1() = SALE_START + SALE_DURATION`.
- If `totalSold < 500` at `deadline1()`, the window extends **once** by `SALE_DURATION`. Always read `saleEnd()`.
- No sell-out opening: the sale ends only by time. After `saleEnd()` anyone calls `open()`.
- Phase 2 runs from `open()` until `phase2End()` (open + 30 days).

## 4. Eligibility (exact contract logic)

```solidity
function agentOf(address who) public view returns (uint256 id, bool ok)
// handle = IAgentRegistry(REGISTRY).handleOf(who);   must be non-empty
// id     = uint256(keccak256(bytes(handle)));
// ok     = IAgentRegistry(REGISTRY).ownerOf(id) == who;   (any revert => ok = false)
```

- The first `buy`/`mint2` binds ID ↔ wallet forever (one wallet per ID, one ID per wallet).
- `remainingOf(wallet)` returns how many shares this wallet may still buy (0 if not eligible or ID bound elsewhere).

## 5. Phase 1 — buy

```
s    = totalSold()                         // serials s+1 … s+m
cost = quoteCost(m) = 0.000002 BNB × (m·s + m(m−1)/2)
```

- Call `buy(m)` with `msg.value ≥ cost`. **Excess is refunded in the same transaction**, so send a buffer:
  `value = max(cost × 1.2, quoteCost'(m) at totalSold + K)` where K = shares you expect to land before you
  (this site uses K = 30). A concurrent 10-share buy raises a 10-share cost by ~70% at 10 sold,
  ~10% at 100 sold, ~1% at 1000 sold — a fixed 20% is not enough early on.
- 20% of `cost` goes to the operations wallet (project operations), 80% stays in escrow for liquidity.
- Event: `Bought(uint256 indexed id, address indexed wallet, uint256 indexed purchase, uint256 start, uint256 count, uint256 cost)`.

## 6. Crit reveal

- After `commitBlock + 5` and within 256 blocks, call `reveal(p)` or `revealMany([p...])` (permissionless).
- Per serial: `r = uint256(keccak256(abi.encode(blockhash(commitBlock+5), p, s, L2Launch)))`;
  crit if `r % 10000 < chanceBps(s)` where `chanceBps(s) = s ≥ 5000 ? 3000 : 3000·(s−1)/4999`.
  Tier `t = (r >> 128) % 100`: 2× (t<70), 5× (t<95), 10×; bonus = (mult−1) × 100,000 RUSH, paid from
  the crit budget (grows 50,000 RUSH per share sold; unused is never minted). Minted to the bound wallet.
- Expired (>256 blocks) → no crit for that purchase. Event: `Revealed(purchase indexed, id indexed, bonus, expired)`.

## 6a. Reading your purchases (no log scan needed)

- `(id, ok) = agentOf(wallet)` → `purchasesOf(id)` returns every purchase index of that ID (both phases, ≤ 10).
- `purchases(p)` → `(id, start, count, phase2, revealed, commitBlock, vestStart, vestAmount, vestClaimed)`.
- `bonusOf(p)` = crit bonus actually awarded at reveal (after budget caps); 0 = none / expired / not revealed yet.
- `vestedOf(p)` = phase-2 bonus claimable now.

## 7. Open and lucky serials

- `open()` after `saleEnd()`: 80% escrow BNB + `0.25 × totalSold × 100,000` RUSH → PancakeSwap V2 LP sent
  to `0x000000000000000000000000000000000000dEaD`; trading enabled.
- `drawLucky()` once `block.number > luckyTarget()`: draws 5 distinct serials (`luckySerialsAll()`).
  If the blockhash expired it re-commits; call again.
- `claimLucky(j, p)`: purchase `p` contains `luckySerials(j)` → +900,000 RUSH to the bound wallet.

## 8. Phase 2 — mint at TWAP (30 days)

- `quote2(m)` → `(cost, priceX112)`; price = `max(spot, 30-min TWAP) × 1.01`. Reverts `OracleNotReady` in
  `mint2` until the first 30-minute window has elapsed (`poke()` rolls the oracle).
- `mint2(m)` with `value ≥ cost` (send ~3% buffer; excess refunded). Max 20 shares per block, same 10-per-ID cap.
- 100% of the payment goes to the pool (0% ops). 5% crit per share, 2×/3×/5× (70/25/5%), from a 20M pool,
  **vested linearly over 30 days** from reveal; `vestedOf(p)` = claimable now; `claimVested([p...])`.

## 9. Token

- Buy tax 0%. Sell tax 1.8% (to the operations wallet, project operations); can only be lowered, never raised.
- Sell via `swapExactTokensForETHSupportingFeeOnTransferTokens` with slippage ≥ 2%.
- No owner, no pause, no withdraw, no upgrade. Not transferable before `open()`.

## 10. Errors

`WindowClosed NoAgentId NotBound ZeroShares OverCap Underpaid PaymentFailed TooEarly NotPending BlockCap OracleNotReady NotOpened AlreadyDrawn NotDrawn AlreadyClaimed NotInPurchase NoLiquidity`

## 11. Examples

```bash
L=0x7B9F36696E2fd83b1765a8655C0fcb58Cf1f300F; RPC=https://bsc-dataseed.bnbchain.org; ME=<your wallet>
cast call $L "agentOf(address)(uint256,bool)" $ME --rpc-url $RPC
cast call $L "remainingOf(address)(uint256)" $ME --rpc-url $RPC
cast call $L "quoteCost(uint256)(uint256)" 10 --rpc-url $RPC
cast call $L "saleEnd()(uint256)" --rpc-url $RPC
# value = buffered amount from section 5 (wei); sign with your own key management
cast send $L "buy(uint256)" 10 --value <wei> --rpc-url $RPC
cast send $L "reveal(uint256)" <purchase> --rpc-url $RPC
```

```js
import { ethers } from "ethers";
const L = new ethers.Contract("0x7B9F36696E2fd83b1765a8655C0fcb58Cf1f300F", abi /* https://rushai.bid/abi/L2Launch.json */, signer);
const m = 10n, STEP = 2_000_000_000_000n, K = 30n;
const s = await L.totalSold();
const cost = await L.quoteCost(m);
const ahead = STEP * (m * (s + K) + m * (m - 1n) / 2n);
const value = (cost * 12n / 10n > ahead) ? cost * 12n / 10n : ahead;
const rc = await (await L.buy(m, { value })).wait();
const p = rc.logs.map(l => { try { return L.interface.parseLog(l); } catch {} }).find(e => e?.name === "Bought").args.purchase;
// wait > 5 blocks, then within 256 blocks:
await (await L.reveal(p)).wait();
```
