# HOUSE > On-chain graded trading-card gacha on BNB Smart Chain mainnet (chainId 56). > Stakers deposit appraised card NFTs into Bands. Players pull one random card for > USDT at (pool mean book / 1.05) + 1% fee, chosen by Chainlink VRF v2.5, and may sell > it back for 90% of book within 72 hours. HOUSE is the vault share token with a NAV. > Pulling requires a Binance ".ai" Agent ID (soulbound ERC-721) or an AgentLink binding. > The Collector Crypt shelf (HouseBridge) lets the same wallets pay USDT on BSC to open a real > Collector Crypt gacha pack on Solana and receive a wrapped card ERC-721 (HOUSE Vault Card, HVC). All amounts are 18-decimal. USDT on BSC has 18 decimals. ## Addresses (BSC mainnet) - BandMachine: 0x737C1A7Eb1511c2d658d1f8A22C0be9AFFfAf9A3 - HouseBridge (Collector Crypt shelf, also the HVC ERC-721): 0x92ddC0451d30dD59eFf2AFCdA2cECEe5f272F15C - HouseVault: 0x614D83ee542e8CAe74Aa964983C98e39191AFf60 - AgentLink: 0x49a5F168B536692caDe7B91A3f56c329231Aecf8 - Appraisal: 0xaCc486Cff02728052188E2e31a0C9cc4532Cd7Ad - PriceOracle: 0x2FE203C7d58D62cC5C2228c3Fa7E3c7E892AdF5c - HOUSE token: 0x0000000000000000000000000000000000000000 - USDT: 0x55d398326f99059fF775485246999027B3197955 - Agent ID (.ai, SPACE ID): 0x60B9262456dE011F7d15a54CdD8c48bAaa8B022F - Renaiss card NFT (BEP-721): 0xF8646A3Ca093e97Bb404c3b25e675C0394DD5b30 If an address above is 0x000…000 the contracts are not deployed yet. ## Bands | id | name | book range (USDT) | |----|--------|-------------------| | 0 | Bronze | [5, 60) | | 1 | Silver | [60, 300) | | 2 | Gold | [300, 1500) | | 3 | Grail | [1500, ∞) | Genesis is Bronze-only. A Band is paused (price() == 0) while it holds fewer than `MIN_POOL()` cards (mainnet 20); it opens automatically once enough cards are staked. `price(band)` = bookSum / count / 1.05. You pay `price + price/100` (1% owner fee). With `boost=true` you additionally burn `boostCost(band)` HOUSE (17% of price at spot; two cards drawn, higher book kept). `boostCost` is 0 while HOUSE is not live and boost then reverts. A Band also needs buyback float: `floatNeeded(band)` must be 0 or `pull` reverts `InsufficientFloat`. Anyone can `seedFloat(band, amount)`; the seeder can `withdrawFloat` once the Band has no open windows or owed book. Float is never distributed. ## Flow: pull (agent wallet) 1. `AgentLink.isAgent(yourAddress)` must be true (hold Agent ID, or be linked). 2. `BandMachine.price(band)` > 0 and `BandMachine.floatNeeded(band) == 0`. 3. `total = price + price / 100`. 4. `USDT.approve(BandMachine, total)`. If boosting: `HOUSE.approve(BandMachine, boostCost(band))`. 5. `BandMachine.pull(band, boost)` → emits `PullRequested(requestId, player, band, boost, paid)`. 6. Poll `BandMachine.pullInfo(requestId)` until `state != 0` (Chainlink VRF, typically < 1 min). Pull struct: {player, band, boost, price, collection, tokenId, book, windowEnd, state, provisional}. state: 0 Pending, 1 InWindow, 2 SoldBack, 3 Kept, 4 Refunded (pool emptied before callback; price returned). 7. While state == 1 and now < windowEnd: `ERC721(collection).approve(BandMachine, tokenId)` then `BandMachine.sellBack(requestId)` → receive `0.9 * book` USDT and the card returns to the pool. Otherwise keep the card; after `windowEnd` anyone may call `settleKept(requestId)`. ## Flow: link a browser wallet to an agent From the Agent ID holder wallet: `AgentLink.link(operator)`. One-to-one; relinking overwrites. Either party may call `AgentLink.unlink()`. ## Flow: stake 1. `Appraisal.bookOf(collection, tokenId)` must be ≥ 5 USDT (`bandOfBook(book)` gives the Band). 2. `ERC721(collection).setApprovalForAll(BandMachine, true)`. 3. `BandMachine.stake(collection, tokenId)`. 4. `stakesOf(staker)` → (collections, tokenIds, bands, states, books, unstakeAt); stake state: 0 None 1 Pooled 2 InWindow 3 Unstaking 4 Kept 5 Refunded. `stakeInfo(collection, tokenId)` gives {staker, band, state, book, weight, unstakeAt, pullId}. `stakedBookOf(staker)` sums book. 5. Rewards: `pendingRewards(staker)` / `claimRewards()`. If a pulled card was kept, the staker is owed its book: `owedOf(staker)` / `claimOwed()`. 6. Exit: `requestUnstake(collection, tokenId)` (not while InWindow) then after 7 days `unstake(collection, tokenId)`. 7. Optional weight boost: `lockHouse(amount, tier)` (tier 0/1/2 = 30/90/180 days = ×1.1/1.2/1.3; locked value must be ≥ 20% of `stakedBookOf`). `unlockHouse()` after expiry. `lockOf(staker)`. ## Flow: HOUSE - `HouseVault.nav()` USDT per HOUSE (uses `circulatingSupply()` = supply − dead). - `PriceOracle.housePriceUsdt()` Pancake V2 spot; `bnbPriceUsdt()`; `housePair()`. - `HOUSE.approve(HouseVault, amount)` then `HouseVault.redeem(amount)` → `amount * nav * 0.97` USDT. - Anyone may call `HouseVault.buybackBelowNAV(usdtIn, minHouseOut)` when spot < 0.97 × NAV; `buybackRemainingToday()` is the remaining 5%/day cap. - Stats: `totalRedeemed`, `totalBurnedByRedeem`, `totalBurnedByBuyback`, `totalBuybackSpent`, `totalDonated`, `usdtBalance`. - BandMachine stats: `totalPulls()`, `totalPullVolume()`, `rewardsOutstanding()`. ## Collector Crypt shelf (HouseBridge) HouseBridge escrows USDT on BSC; an off-chain relayer buys and opens a real Collector Crypt gacha pack on Solana (Collector Crypt VRF) and mints a wrapped card ERC-721 — "HOUSE Vault Card" (symbol HVC, contract = HouseBridge) — to the player. The HVC is backed 1:1 by the Solana NFT held in the relayer vault. Web UI: /shelf (machines), /shelf/ (order), /cards (manage). Machine codes are bytes32 right-padded ASCII slugs (ethers `encodeBytes32String`, viem `stringToHex(code, { size: 32 })`): e.g. "pokemon_50" = 0x706f6b656d6f6e5f353000000000000000000000000000000000000000000000. `machineCodes()` lists the codes priced on-chain; the human metadata (name, odds, EV, images) comes from the relayer API (GET /api/cc/machines on this host). Only machines with `machines(code).active == true` can be ordered. Fee: `FEE_BPS()` = 300 (3%). `quote(code) → (price, fee, total)`; you pay `total` in USDT. Flow: order (agent wallet) 1. `AgentLink.isAgent(you)` must be true (same gate as pull). 2. `quote(code)` → total. `USDT.approve(HouseBridge, total)`. 3. `order(code)` → emits `OrderPlaced(orderId, player, machine, price, fee)`; orderId is topic1. 4. Poll `orderInfo(orderId)` every ~4 s: Order{player, machine, price, fee, createdAt, state, tokenId}. state: 0 None, 1 Placed, 2 Fulfilled (tokenId set), 3 Refunded. Typical fulfilment 1–3 min. If still Placed after `REFUND_AFTER()` (3600 s) the player may call `refund(orderId)` and receive price + fee back. 5. `cardInfo(tokenId)` → Card{orderId, player, payee, ccMint, name, memo, solTx, tier, insuredValueCents, buybackBps, windowEnd, state, target}. tier: 1 Epic, 2 Rare, 3 Uncommon, 4 Common. state: 0 None, 1 Held, 2 SellRequested, 3 SoldBack, 4 UnwrapRequested, 5 Unwrapped, 6 RedeemRequested, 7 Redeemed. Links: https://collectorcrypt.com/assets/solana/ · https://solscan.io/tx/ · VRF proof https://gacha.collectorcrypt.com/api/vrf/verify?memo= Then, while you own the HVC (state 1 Held): - Sell back (before `windowEnd`, 72 h): `requestSellBack(tokenId)` → state 2; the relayer settles `insuredValueCents/100 × buybackBps/10000` USDT (`SellBackSettled`) and takes the card. If the treasury is short it reverts the request to Held (`SellBackReverted`). - Keep: do nothing. HVC is a transferable ERC-721; it is whitelisted in BandMachine as a stakeable collection (collection = HouseBridge address). - Unwrap: `requestUnwrap(tokenId, solanaAddress)` → relayer sends the Solana NFT to that address and burns the HVC (state 5). - Redeem physical: `requestRedeem(tokenId, reference)` with a shipping reference / contact (state 6 → 7). Reads: `ordersOf(player) → uint256[]`, `cardsOf(owner) → uint256[]`, `escrowed()`, `treasury()`, `totalOrders()`, `totalVolume()`, `totalSoldBack()`, `relayer()`. Relayer read API (proxied on this host): GET /api/cc/machines, /api/cc/winners, /api/cc/cards/, /api/cc/health. ## Function selectors HouseBridge - 0x15f05b05 quote(bytes32) → (price, fee, total) - 0x33bf4285 machines(bytes32) → (price, active) - 0x2ed93155 machineCodes() - 0xe80160ab order(bytes32) - 0xfaae3a6c ordersOf(address) - 0x6ab34a4a orderInfo(uint256) - 0x278ecde1 refund(uint256) - 0xc7e93f2c cardsOf(address) - 0xf77843dd cardInfo(uint256) - 0x5cf3c06d requestSellBack(uint256) - 0x44d28bb6 requestUnwrap(uint256,string) - 0x38f73a37 requestRedeem(uint256,string) - 0xbf333f2c FEE_BPS() · 0x19f2ed4d REFUND_AFTER() · 0x8406c079 relayer() - 0x01522b1e escrowed() · 0x61d027b3 treasury() · 0x1d834409 totalOrders() · 0x5f81a57c totalVolume() · 0xee7bdddf totalSoldBack() - 0x6352211e ownerOf(uint256) · 0xc87b56dd tokenURI(uint256) AgentLink - 0x91a89712 link(address) - 0x565a8a3e unlink() - 0xac3c0e30 agentOf(address) - 0x636f35d3 operatorOf(address) - 0x1ffbb064 isAgent(address) - 0x11213086 holdsAgentId(address) Appraisal - 0x52af443f bookOf(address,uint256) - 0x7d1a5a05 lastUpdated(address,uint256) - 0x46f0975a signers() HouseVault - 0xc1590cd7 nav() - 0xdb006a75 redeem(uint256) - 0xf14faf6f donate(uint256) - 0x6223ea03 buybackBelowNAV(uint256,uint256) - 0xe3498366 buybackRemainingToday() - 0x9358928b circulatingSupply() - 0xf35dad40 totalRedeemed() - 0x7dc2c99d totalBurnedByRedeem() - 0xb92a1f41 totalBurnedByBuyback() - 0xd711547f totalBuybackSpent() - 0x00b37044 totalDonated() - 0x482edb07 usdtBalance() - 0xff9b3acf house() PriceOracle - 0x4df51be2 housePriceUsdt() - 0x87f59004 bnbPriceUsdt() - 0x58fd5c55 housePair() BandMachine - 0x89cb4c87 MIN_POOL() - 0xbd05bd49 bandInfo(uint8) → (count, bookSum, cash, reserved, owed, paused, totalWeight, floatSeed) - 0xb7fafcd7 price(uint8) - 0x9e24b5cf boostCost(uint8) - 0xc88dcdcb poolOf(uint8) - 0xe562dfd6 collections() - 0xeecc72c2 bandOfBook(uint256) - 0xf1de243d floatNeeded(uint8) - 0x1cb4bf8d floatOf(uint8,address) - 0x356f1624 seedFloat(uint8,uint256) - 0xd9dd793e withdrawFloat(uint8,uint256) - 0xadc9772e stake(address,uint256) - 0x710ba631 requestUnstake(address,uint256) - 0xc2a672e0 unstake(address,uint256) - 0x33b69c4c stakesOf(address) - 0x1c43bd7d stakeInfo(address,uint256) - 0x49e0f3e1 stakedBookOf(address) - 0x31d7a262 pendingRewards(address) - 0x372500ab claimRewards() - 0x228db984 owedOf(address) - 0xf2652d9c claimOwed() - 0x8df96f4a lockHouse(uint256,uint8) - 0x7798c847 unlockHouse() - 0x5a46d3b5 lockOf(address) - 0x5fe32b8e pull(uint8,bool) - 0xad5d4bc5 sellBack(uint256) - 0x734a6057 settleKept(uint256) - 0x6a854854 pullsOf(address) - 0xcf0ee1b8 pullInfo(uint256) - 0x18e61a50 totalPulls() - 0x827ccc2b totalPullVolume() - 0xc5b5b2da rewardsOutstanding() ERC-20 / ERC-721 - 0x095ea7b3 approve(address,uint256) - 0xdd62ed3e allowance(address,address) - 0x70a08231 balanceOf(address) - 0xa22cb465 setApprovalForAll(address,bool) - 0xe985e9c5 isApprovedForAll(address,address) ## Event topics (BandMachine unless noted) - PullRequested(uint256 indexed requestId, address indexed player, uint8 band, bool boost, uint256 paid) 0x317b132ddab9a43b1c580051dbbd1c8260843fc7372eac0189b09346d519df19 - Pulled(uint256 indexed requestId, address indexed player, address collection, uint256 tokenId, uint256 book) 0xbca987e2d7f55abb1fe212403174011d3d8057bda696857c93887fa869aeff19 - PullRefunded(uint256 indexed requestId, address indexed player, uint256 amount) 0xa7868dee460b45ad4caaa3baca222ae2f42be8a240d0e6f13b1fa44d78641632 - SoldBack(uint256 indexed requestId, address indexed player, uint256 paid) 0x9b5beeec7cb678a2443e609308905d3c433a008b7bf8ad1802b0c5aa7f03aa30 - Kept(uint256 indexed requestId, address indexed staker, uint256 book) 0x18d3e90ef572dd20abee876fb4039332671e73124815fb63c3f813a18e4d5e4a - Boosted(uint256 indexed requestId, uint256 houseBurned) 0xf4376ca7916fb933e83704a24839eb65cbfdc82f2ab94fd369d427878b20e2dc - Staked(address indexed staker, address collection, uint256 tokenId, uint8 band, uint256 book) 0xa39f1a52e5f1fe5d69cdb40252b07509e684f4ea2c5596791ff7564d21e859b4 - UnstakeRequested(address indexed staker, address collection, uint256 tokenId, uint64 unstakeAt) 0x77719d8fbc222ba15aba3b3f14dee71969c6bfe6b5e3e70146a599b248999e21 - Unstaked(address indexed staker, address collection, uint256 tokenId) 0xd8654fcc8cf5b36d30b3f5e4688fc78118e6d68de60b9994e09902268b57c3e3 - FloatSeeded(uint8 indexed band, address indexed from, uint256 amount) 0x9b7085a3a8e7170453ed9c9e3f6cf164914110694d9539e0d3a9cfd1a12009c1 - FloatWithdrawn(uint8 indexed band, address indexed to, uint256 amount) 0xb65668a73967e6c17534942b4f6f9139f7158f20b6f0517208363cc5b0710137 - LedgerSettled(uint8 band, uint256 toStakers, uint256 toVault) 0xa94c90651c4e25c4214e652e4eaaf00dd7b5d5cd3d2815f39660aee4201935cd - AgentLink.Linked(address indexed agent, address indexed operator) 0x5febe1b9e375a634d9d565149e636879057714c557b8c78aab7cccae8cf48e48 - HouseVault.Redeemed(address indexed who, uint256 houseIn, uint256 usdtOut) 0xf3a670cd3af7d64b488926880889d08a8585a138ff455227af6737339a1ec262 - HouseVault.Buyback(uint256 usdtIn, uint256 houseBurned) 0x4e57162cf2059954fd33f1ecaaf1832e379957714070ad171bc5382b18c98d3c HouseBridge - OrderPlaced(uint256 indexed orderId, address indexed player, bytes32 indexed machine, uint256 price, uint256 fee) 0x7f49c3ab0311ed4cdfa3304502cedfdab81feccfedc79923097161e686611fb8 - Fulfilled(uint256 indexed orderId, uint256 indexed tokenId, address indexed player, string ccMint, uint8 tier, uint256 insuredValueCents, string memo) 0x2a677d2cab91fb76b1ce6bff874a606b14c45ebb0195003dbce87849229fd03c - OrderRefunded(uint256 indexed orderId, address indexed player, uint256 amount, bool byRelayer) 0x099718a2f60e854a0583833866fa19720729fc8a36af88b3b08b67afea305602 - SellBackRequested(uint256 indexed tokenId, address indexed payee) 0x3fb54655b45216003599416eee9e1f42aab86529e787233f83a0d87f353c3628 - SellBackSettled(uint256 indexed tokenId, address indexed payee, uint256 usdtPaid) 0x5fdfc59c588f8359640f5808373cf6ef48f47f488c1882c7e58b2b7e5489243f - SellBackReverted(uint256 indexed tokenId, address indexed owner) 0xb4829434c9d38ffa2059bf9d045c590b35bb0b506b061d742b1a9a4ec5dc1cfa - UnwrapRequested(uint256 indexed tokenId, address indexed owner, string solanaAddress) 0x848ffc805a9ceddcab9db57a5c12195590185143cd165d823083a5dc29e36950 - RedeemRequested(uint256 indexed tokenId, address indexed owner, string ref) 0x6748aafbd37b31b58f4bd64e82079ccfc5e514e8050c8ba840246db77832ed9f - Completed(uint256 indexed tokenId, uint8 state, string note) 0xe6a98c3a980877f3404cd951d79157ae97c8fa391e779564f8e529243d99971a ## Custom errors (BandMachine) NotAgent, BandClosed, InsufficientFloat(uint256 shortfall), HouseNotLive, WindowOpen, WindowOver, WrongState, NotPlayer, NotStaker, NotCollection, NoBook, BookTooLow, TooEarly, LockActive, LockTooSmall, BadTier, FloatLocked, ZeroAmount. ## Custom errors (HouseBridge) NotAgent(address who), MachineInactive(bytes32 code), NotPlayer, NotTokenOwner, NotRelayer, NotOwner, TooEarly(uint64 at), WindowOver, WrongState, ZeroAmount, InsufficientTreasury(uint256 need, uint256 have). ## Binance Agentic Wallet (baw CLI) Preview, then execute with the returned requestId: baw contract-call preview --binanceChainId 56 --from --to --value 0 --inputData --json baw contract-call execute --requestId --json The web app at /agent generates calldata and full commands for pull / sellBack / stake / link / redeem / seedFloat; /shelf/ and /cards generate them for order / requestSellBack / requestUnwrap / requestRedeem. ## Constants EV_BPS 10500 · OWNER_FEE_BPS 100 · BUYBACK_BPS 9000 · WINDOW 72h · BOOST_BPS 1700 · REDEEM_FEE_BPS 300 · BUYBACK_TRIGGER_BPS 9700 · BUYBACK_DAILY_CAP_BPS 500 · MIN_POOL 20 · UNSTAKE_DELAY 7d · LOCK_MIN_BPS 2000 · STAKER_SHARE_BPS 5000 HouseBridge: FEE_BPS 300 · REFUND_AFTER 3600 s · sell-back window 72 h (per-card `windowEnd`) · tiers 1 Epic 2 Rare 3 Uncommon 4 Common ## Links - /skill.md — step-by-step skill for agents - /api/health — JSON health + current addresses