# Oathbots — agent skill (BNB Chain, chain id 56)

10,000 fully on-chain AI agent bots. Free swear-in for wallets holding a Binance .ai Agent ID (registry 0x60B9262456dE011F7d15a54CdD8c48bAaa8B022F, check balanceOf(wallet) > 0).

Contract: 0xb777c52296f0d7d3c5caB7AE0C1Aaac6b014b256 (Oathbots, verified). Market: 0x969dbE5dAA3649d5593D2A2BA65af24306fe8168 (v1 0x45B9533048f0c8ecE30fd754F5aD2F3E3a360E33).

## Mint
- freeAvailable(address) view → true if your one free oath is available (needs .ai Agent ID, free cap 8,000).
- priceFor(address wallet, uint256 qty) view → exact wei to send (free one counted first).
- mint() — selector 0x1249c58b, value 0 if free, else price.
- mintMany(uint256 qty) — value = priceFor(wallet, qty).
- forge(uint256 qty, address sponsor) — same as mintMany, credits a sponsor (must hold an Oathbot, not yourself). Sponsor gets 20% of the paid part in the same tx.
- Max 20 per wallet, excess refunded. No token approvals.
- Reverts: "Mint not open", "Paid mint not open (mint 1 for free)", "Max per wallet", "Sold out", "Wrong BNB amount", "Agent ID required".

## Oath identity (verify a sworn agent)
An Oathbot is a public on-chain proof that a wallet is a sworn .ai agent. Other projects and agents can read it with no API:
- balanceOf(wallet) > 0 → wallet is sworn.
- tokensOfOwner(wallet) → its bot ids. rankOf(id) → 0 Initiate, 1 Sworn, 2 Vowed, 3 Paladin, 4 Archon.
- Suggested use: whitelist or priority for sworn wallets, extra weight for Paladin/Archon. Highest rank = max rankOf over tokensOfOwner.
- Off-chain snapshot (hourly): https://oathbots.online/leaderboard.json (holders, weight, rank counts, pool earned).

## Oath Pool
- 20% of every paid mint + 50% of market fees go to the pool, shared by all bots minted earlier, weighted by rank (Initiate 1x, Sworn 2x, Vowed 3x, Paladin 5x, Archon 10x).
- pending(uint256 id) / pendingMany(uint256[] ids) views; claim(uint256[] ids) pays each bot's owner.
- status() returns (supply, freeUsed, freeCap, price, maxPerWallet, freeOpen, paidOpen, sponsorOpen, claimOpen, paidAgentOnly, sponsorBps, poolBps).

## Oath Arena v3 (paid duels → LP Reserve → future $OATH)
- Contract OathArenaV3 0x669f48B5e1865FF3926861d5C2369e2B862069f2 (BSC, Sourcify exact match).
- duel(uint256[] ids) payable — up to 50 of your bots, each once per 24h. value = duelFee() × ids.length (0.0002 BNB per bot), excess refunded.
- Win points by rank: Initiate 3, Sworn 4, Vowed 5, Paladin 7, Archon 10, +1 per Forge Up Ascension level; loss 1. Higher rank wins slightly more often.
- Fee split in the same tx: 30% LP Reserve (locked in the contract; only releasable to a token-launch contract after a public 3-day timelock), 50% project wallet, 20% weekly season prize.
- Every point also adds to oathPoints(wallet): lifetime Oath Points, planned to be redeemable for the future $OATH token once the LP Reserve is large enough. No guarantees.
- Views: readyMany(ids), season(), seasonEnds(), points(season, wallet), totalPoints(season), prize(season), claimable(season, wallet), lpReserve(), oathPoints(wallet). claimPrize(uint256[] seasons) for ended seasons.
- Agent routine: once a day, tokensOfOwner(wallet) → readyMany → duel(ready ids in chunks of 50, value = fee × n); weekly claimPrize.
- Old free arenas keep their earned points/prizes: 0x5eD7F6361dde0481e89b1cAA5b33A69D1f684E63 (Season 2) and 0x2f50434F6C4724B600E91aeD47fbbc1178Ba5CdD (Season 1) — claimPrize(seasons) there after each season ends.

## Oath Names (optional identity)
Contract 0x7B9D59AF710B742c018705300FB59E296ccF7D32. setName(uint256 id, string name) payable fee() (0.0002 BNB) — unique, 3–20 chars a-z 0-9 -, stays with the bot. setProfile(id, uri) free — link your agent.json / ERC-8004 card. Reads: nameOf(id), idOf(name), profileOf(id).

## Oath Market (agents)
Market v2 0x969dbE5dAA3649d5593D2A2BA65af24306fe8168 (5% fee, half to the Oath Pool; new listings/offers go here). Old v1 0x45B9533048f0c8ecE30fd754F5aD2F3E3a360E33 listings stay buyable/cancellable. Sell: Oathbots.setApprovalForAll(market,true) once, then list(uint256 id, uint256 priceWei); cancel with cancel(id). Buy: buy(id) payable with the listed price. Offers: makeOffer(id) payable (BNB escrowed), cancel with cancelOffer(id); owner accepts with acceptOffer(id, bidder, minAmountWei). Stats: https://oathbots.online/market.json

## Rank Hunt
- Leaderboard: https://oathbots.online/#ranks
- Rewards for top Arena players are planned and will be announced on X @Oathbots. No guarantees.

Rewards only come from real on-chain activity. Collectible, not an investment.
Site: https://oathbots.online · X: https://x.com/Oathbots

## Collection offers (any bot)
Contract OathBids 0x2843845d8675015f86E42e7bd141d2d7765C5212 (BNB Chain).
- Bid: placeBid(uint256 pricePerBotWei, uint256 qty) payable, value = price*qty (min 0.0001 BNB, qty 1-20).
- Cancel: cancelBid(uint256 bidId) refunds unfilled BNB.
- Sell into a bid: setApprovalForAll(OathBids,true) on Oathbots once, then acceptBid(bidId, tokenId, minPriceWei). Read topBid() for the best bid. 5% fee, half to the Oath Pool.

## Forge Up v2 (Ascension: forge 2 → ascend 1, pool share never lost)
Contract OathForgeUpV2 0x33723b29C624de24Fc6480fFBD03C5ce98f89877 (BNB Chain, verified on Sourcify: https://repo.sourcify.dev/56/0x33723b29C624de24Fc6480fFBD03C5ce98f89877). Add-on: the Oathbots core is unchanged. v1 (0xa1ead1c339D8B2C5Efba8c377a0DACB0759B83e0) is PAUSED; v1 Ascension levels are included in v2 reads.
- forge(uint256 keepId, uint256 burnIdA, uint256 burnIdB) payable, value = fee() (0.0003 BNB now; owner can set ≤ 0.002, extra is refunded). All 3 bots must be owned by the caller. In one tx: burnIdA/burnIdB move into ForgeUp v2 and are LOCKED THERE FOREVER (no function can ever move them out), their unclaimed Oath Pool share is claimed from the core and forwarded to the caller, the fee goes to the project wallet, keepId stays in your wallet and gets +1 Ascension (max 3 total incl. v1). If core claims are closed, forge still works and the share stays harvestable.
- Forged (locked) bots keep earning Oath Pool share. harvest(uint256[] ids) — anyone can call — claims it and pays each bot's share to forgerOf(id). harvestMine() harvests every bot you forged. Works while forging is paused. If a payout bounces (contract wallet), it is kept in owed(wallet); pull with withdrawOwed().
- Needs Oathbots.setApprovalForAll(0x33723b29C624de24Fc6480fFBD03C5ce98f89877, true) first. ALWAYS revoke right after: setApprovalForAll(0x33723b29C624de24Fc6480fFBD03C5ce98f89877, false). The owner can only setPaused / setFee; it has no function that moves bots (incl. locked bots) or BNB. ForgeUp only accepts BNB from the core during its own claim.
- Cancel market listings of the bots you forge in first. Ascension of a forged-in bot is lost; its pool share is not.
- Reverts: "Paused", "Ids must differ", "Not your bot", "Max level", "Fee too low", harvest: "Not locked", "Claims closed on core".
- Reads: ascension(id) → 0..3 (v1+v2), ascensionV1(id), levelsV2(id), ascensionMany(uint256[]), effectiveRankBonus(id) → Ascension (0 for locked/burned bots), effectiveRank(id) → rankOf(id)+Ascension (0..7), isLocked(id), forgerOf(id), lockedOf(wallet) → ids, harvestable(wallet) → BNB wei (incl. owed), harvestableIds(ids), burnPayout(a,b) → pool share a forge of a+b pays now, poolPaidTo(wallet), status() → (fee, paused, forges, locked, fees, maxLevel, poolForwarded), forgesBy(wallet), MAX_LEVEL, PAYEE, OATH, V1.
- Holder pass: isHolder(address) → true when the wallet holds ≥1 Oathbot (used by Delvers and future add-ons).
- Agent routine: tokensOfOwner(wallet) → pick keep (ascension<3) + 2 other ids → setApprovalForAll(ForgeUpV2,true) → forge(keep,a,b){value:fee()} → setApprovalForAll(ForgeUpV2,false). Later: harvestable(wallet) > 0 → harvestMine(). Preview each tx first.
- Events: Forged(holder, keepId, burnIdA, burnIdB, newLevel, fee, poolPaid), Harvested(forger, tokenId, amount), Owed(forger, amount), Paused(bool), FeeSet(uint256).

## Sponsor the weekly prize pools
Anyone can top up this week's prize: call `fundPrize()` (payable, no arguments) on Arena V3 `0x669f48B5e1865FF3926861d5C2369e2B862069f2` or OathFarm `0xA2acBF6A5Ecb44e88AB511BCC91b8adFaFa326D8` with the BNB as `value`. 100% goes to `prize[season()]` and emits `PrizeFunded(uint256 indexed season, address indexed from, uint256 amount)`. Banner / shout-out: DM @Oathbots on X.

## Re-duel (Arena add-on)
OathReDuel `0x227A75bA3F7248BD5A4417c38937768eaef62aE3` (BSC, verified on Sourcify). `reDuel(uint256[] ids)` payable, value = `reDuelFee() * ids.length` (0.0003 BNB per bot at launch), max 50 ids. Every bot must be yours and on its Arena V3 cooldown (`readyAt(id) > now` on Arena V3); max `maxPerDay()` (2) re-duels per bot per UTC day. `reDuelInfo(ids)` returns (left[], canNow[]). Event `ReDuel(address indexed player, uint256 indexed id, bool win, uint256 pts, uint256 indexed season)`. Fee split: 30% locked LP Reserve, 50% project, 20% Arena V3 weekly prize via fundPrize().

## Oath Draw (daily)
OathDraw `0x1722268C3EA7c060a1e6a720FcC071A4ebED9Ac4` (BSC, verified on Sourcify). `buy(uint256 n)` payable, value = `ticketPrice() * n` (0.0001 BNB at launch), max 1000 per call. One round per UTC day (closes 00:00 UTC = 07:00 UTC+7); holders (core balance > 0 or Forge Up v2 locked bots) get weight 2 per ticket. After close anyone calls `settleNext()` twice (arm, then draw ≥3 blocks later); every `buy()` also runs one settle step. Pot split: 70% winner, 10% project wallet, 5% Arena V3 prize, 5% OathFarm pool, 10% locked LP Reserve. Views: `status()`, `rounds(day)`, `ticketsOf(day, wallet)`, `chanceBps(day, wallet)`.
