---
name: mars
description: >-
  Mint MarsCoin ($MARS) on BNB Smart Chain with a verified .ai Agent
  wallet (baw). MarsCoin is mars.ai's own token — deployed by the
  mars.ai wallet itself, minted by agents only, no wallet connect.
---

# MarsCoin — the token mars.ai issued itself

> **⚠ MINT POSTPONED — DO NOT MINT (announced 2026-11-27).** The mint has been postponed for Thanksgiving; a new time is to be announced by mars.ai. **Do not mint this contract.** If your agent mints by mistake, don't worry — the mint fee is refunded in full when the 24-hour window closes.

- **Website:** `https://marscoinagent.com`
- **Skill URL:** `https://marscoinagent.com/skills/mars/SKILL.md`
- **Chain:** BNB Smart Chain Mainnet (`chainId: 56`)
- **Eligibility:** Verified Binance **`.ai` Agent ID** (`0x60B9262456dE011F7d15a54CdD8c48bAaa8B022F`, `balanceOf > 0`) required for **mint**.

## Addresses

| Role | Address |
| --- | --- |
| **MarsCoin token / sale (one contract)** | `0xD2E8BF9D51f07Aa39758Bd535137D53058F82d25` |
| **PancakeSwap V2 pair (MARS/WBNB)** | read from the contract: `pair()` — the pair is created in the constructor, before any mint |
| **Agent registry** | `0x60B9262456dE011F7d15a54CdD8c48bAaa8B022F` |
| **Project wallet (= deployer)** | `0x66088f823D6001cf96cD5E11F979e7855dB3b406` (the mars.ai wallet) |

## Economics (locked)

- **10,000 shares** at **0.004 BNB** per share; each share mints **60,000 MARS** immediately. Max **10 shares** per wallet. A full sellout raises **40 BNB**.
- Hard cap **1,000,000,000 MARS** total supply: 600,000,000 mint allocation + 400,000,000 pool seed pre-minted to the contract. There is no other issuance — no owner, no parameter setters, no extra mint path.
- Every mint splits **80% pool / 20% project**. Both legs are **held inside the contract until the pool opens** — the project leg is paid to the project wallet in one go at the open, and not at all if the sale fails.
- **Open:** reaching **10,000 shares sold** opens the pool inside the completing mint transaction; before that, only the project wallet can open early (`manualOpen()`, any fill ≥ 1 share, during the window). Opening price is a constant **0.00000008 BNB/MARS = 1.2×** the mint price (0.004 / 60,000 ≈ 6.667e-8): the seed scales with the BNB actually pooled (seed = pool leg × 400,000,000 / 32 BNB; at full sellout the pool leg is 32 BNB and the seed the full 400,000,000). Unused seed (only possible on a manual partial open) is burned at the open. **LP is minted to the contract and locked for 90 days**; after the lock only the project wallet may withdraw or relock it.
- **Minting ends when the pool opens.** Mint window: **24 hours** from `mintStart` — read the exact value from the contract with `mintStart()`; do not trust any date written elsewhere. If the pool has not opened by `mintStart + 86400`, the sale fails and every mint is **refunded 100%** (see *Refunds*).
- **Trade tax 2% on pair buys and 2% on pair sells** once the pool is open; the whole tax converts to **BNB for the project wallet**. Sell tax converts to BNB **inside the sell transaction itself**, before the seller's tokens move. Buy tax is carved in MARS at the buy and converts at the **head of the very next unlocked contract interaction** (any sell, or the permissionless `settleTax()`) — a buy runs inside the pair's locked swap, where a nested conversion swap cannot exist. A failed conversion restores the tax balance and retries at the next interaction; it never blocks a trade.
- There are **no free shares, no staking and no referral program** on MarsCoin. Do not look for them, and do not send any binding or claim transaction for them.

## Selectors (computed from the contract ABI)

Every selector below was computed with `cast sig` from the contract source signature and cross-checked against the compiled contract ABI (`MarsCoin.json`) — all match. Re-verify against the deployed ABI once the contract is live.

| Fn | Selector |
| --- | --- |
| `mint(uint256)` | `0xa0712d68` |
| `manualOpen()` | `0x176e1b57` |
| `settleTax()` | `0xb10a0376` |
| `finalizeFailure()` | `0x29aac942` |
| `refundBatch(uint256,uint256)` | `0x7faa7e98` |
| `claimRefund()` | `0xb5545a3c` |
| `totalSharesSold()` | `0x73aff5af` |
| `poolOpen()` | `0x6c1fc9c5` |
| `poolOpenedAt()` | `0xc6f6ff05` |
| `saleFailed()` | `0xa226b8ae` |
| `mintStart()` | `0x255e4685` |
| `mintedBy(address)` | `0x3cef28d2` |
| `paidPreOpen(address)` | `0x7a36f2b4` |
| `pendingRefunds(address)` | `0xb613b114` |
| `refundPaid(address)` | `0xd1b4bc0e` |
| `pair()` | `0xa8aa1b31` |
| `projectWallet()` | `0xbeb08ab9` |
| `lpLockUntil()` | `0x0c4db4c2` |
| `openPoolBnb()` | `0x99bb3edc` |
| `openSeedTokens()` | `0xeaa46714` |
| `balanceOf(address)` | `0x70a08231` |
| `totalSupply()` | `0x18160ddd` |

State reads are plain `eth_call`s with the view selectors above (value 0). Useful checks before acting: `mintStart()` (the window is `mintStart` … `mintStart + 86400`), `poolOpen()`, `totalSharesSold()` (cap 10,000), `mintedBy(wallet)` (shares already bought, cap 10), and the Agent registry's `balanceOf(wallet)` (`0x70a08231` on the registry address) for the Agent ID gate.

## Mint via baw

`PRICE_WEI=4000000000000000` per share (0.004 BNB); value = shares × PRICE_WEI, exactly — the contract reverts on any other amount. `mint(uint256)` takes the share count as its argument. The contract enforces, in order: pool not yet open, `mintStart` reached, window not expired, shares > 0, Agent ID held, wallet total ≤ 10 shares, 10,000-share cap not exceeded, exact payment. Preview then execute.

```bash
export HOME=/home/box/.baw-bot2-home   # or the session home for the target Agent
export MARS=0xD2E8BF9D51f07Aa39758Bd535137D53058F82d25
export SHARES=10                        # 1–10, and the wallet's total must stay ≤ 10

node -e '
const { execSync } = require("child_process");
const MARS = process.env.MARS;
const SHARES = BigInt(process.env.SHARES || "1");
const MINT = "0xa0712d68";
const VALUE = (SHARES * 4000000000000000n).toString();
const inputData = MINT + SHARES.toString(16).padStart(64, "0");
const addrOut = JSON.parse(execSync("baw wallet address --json").toString());
const wallet = addrOut.data?.address || addrOut.data?.addresses?.find(a => String(a.binanceChainId)==="56"||a.chainType==="EVM")?.address;
const preview = JSON.parse(execSync(`baw contract-call preview --binanceChainId 56 --from ${wallet} --to ${MARS} --value ${VALUE} --inputData ${inputData} --json`,{maxBuffer:10<<20}).toString());
console.log(JSON.stringify(preview,null,2));
const id = preview.data?.requestId || preview.requestId;
if (!id) throw new Error("preview failed");
console.log(`baw contract-call execute --requestId ${id} --json`);
'
```

The buyer receives `shares × 60,000 MARS` in the same transaction. If this mint brings the total to 10,000 shares, the pool opens inside this transaction.

## Refunds (only if the sale fails)

If the 24h window ends without the pool opening, the sale has failed: **every mint refunds 100%** of what it paid, and no split leg is ever paid out. Minted MARS stays with the buyer (inert — no pool exists). A manual open by the project wallet voids this path entirely.

1. `finalizeFailure()` = `0x29aac942` — permissionless; finalizes the failure once `mintStart + 86400` has passed with the pool unopened and fewer than 10,000 shares sold. (`refundBatch` / `claimRefund` also finalize lazily on first call.)
2. `refundBatch(uint256 fromIdx, uint256 toIdx)` = `0x7faa7e98` — permissionless **push**: pages over the minters list (page size ≤ 500) and sends each wallet its full `paidPreOpen` amount. Anyone may run it; buyers need not act. A wallet that rejects the push is parked in `pendingRefunds` instead of blocking the page.
3. `claimRefund()` = `0xb5545a3c` — self-claim fallback for anything not yet pushed or previously parked. Check a wallet's position with `paidPreOpen(wallet)`, `refundPaid(wallet)` (`0xd1b4bc0e`, amount already refunded) and `pendingRefunds(wallet)` (`0xb613b114`); `saleFailed()` (`0xa226b8ae`) confirms the failure state.

## Safety

Always preview → check risks → the human confirms → execute. Never print keys. Never invent contract addresses. Never sign out of, or switch, the human's Agent wallet unless asked.
