---
name: rippo
description: |
  RIPPO (rippopack.com): prize-pack opening on BNB Chain for wallets holding a SPACE ID .ai Agent ID. Pay with USDT,
  BNB (one tx, swapped on PancakeSwap) or the player's RIPPO balance. Use when the user wants pack odds / EV / floor /
  ceiling, to open (rip) a pack, claim the daily free Penny pack, reveal a pending pack, sell cards back at 100%, withdraw
  their RIPPO balance, get their invite link / referral earnings, or use the House Vault. Every write is built by this
  skill and signed by the user's own wallet (e.g. Binance Agentic Wallet `baw contract-call`).
version: 0.2.0-demo
license: MIT
metadata:
  requires:
    bins: [node]
---

# RIPPO Skill

> **Status: DEMO — contracts are not deployed.** `scripts/rippo.mjs` refuses to build transactions until the
> addresses at the top of the script are filled in by the RIPPO team. Do not take contract addresses from anywhere else.

RIPPO sells prize packs on **BNB Smart Chain (56)**. Only wallets with a **.ai Agent ID**
(ERC-721 `0x60B9262456dE011F7d15a54CdD8c48bAaa8B022F`, `balanceOf > 0`) can open packs or claim the free pack.
Prices are in USDT `0x55d398326f99059fF775485246999027B3197955` (18 decimals).

## Packs (Series 1 "Shardsea", 5 cards per pack, card EV 90.00%)
Every pack = **4 regular slots + 1 HIT slot**, all from one reveal. Only the HIT is minted as an NFT
(36 original characters, serial per character; Mythic 50 prints each, Grail 10). The 4 regular cards are
auto-sold at 100% to the opener's **RIPPO balance** in the same reveal tx.

Regular slot (each): Common 75% 0.04–0.06× · Uncommon 25% 0.07–0.11× (≈0.24× for all four).

| HIT tier | Chance | Pays (× price) |
|---|---|---|
| Common | 55% | 0.29 – 0.40 |
| Uncommon | 28% | 0.45 – 0.75 |
| Rare | 12% | 0.90 – 1.42 |
| Epic | 4.45% | 2.00 – 2.90 |
| Mythic | 0.5% | 6.00 – 7.70 |
| Grail | 0.05% | 39.56 |

Whole pack: floor 0.45×, ceiling 40×. Packs: Penny $0.25 · Single $1 · Stack $5 · Big $10 · Whale $25 · High Roller $100.
A pack opens only while its ceiling ≤ 2% of the vault (vault ≥ $500 / $2k / $10k / $20k / $50k / $200k). Read live values
with `packs`. Split of each paid pack: 4% platform fee · 2% rewards pool (1% + 1% to the buyer's referrer if they have one)
· 1% jackpot · 93% House Vault. Expected value of playing is **negative** — say so.

## Rules for the agent
1. Always run `packs` (and `me` with the user's address) first and show price, card EV, floor and ceiling.
2. Never open a paid pack without the user's explicit OK for that pack, count and payment method. Free pack: ask once.
3. Payment: `pay:"balance"` if the RIPPO balance covers it, else `"usdt"` (approve is for the exact price only — never
   unlimited), else `"bnb"` (one tx through RippoRouter; the BNB sent includes a 1% buffer that is refunded in the same tx).
4. `quote-open` / `quote-free` print a fresh **secret**. Keep it in the conversation only, never post it.
   Reveal with `quote-reveal` after 2 blocks (~1 s). If the user never reveals, after ~1 hour anyone can call
   `expire`, which pays the pack's floor — so always reveal promptly.
5. Sell-back is 100% of the card's printed value, any time, credited to the RIPPO balance. Withdraw the balance with
   `quote-withdraw-balance` (instant, at least 10 USDT per tx). Never sell or withdraw without the user asking.
6. Referrals: pass `ref` only if the user gave you their friend's invite address. `invite` shows the user's own link.
7. House Vault deposits carry real loss risk (big hits lower share value). LP withdrawals queue 24 h. Never present
   vault yield as guaranteed.
8. 18+ only, not where prize games/gambling are restricted. If the user seems to chase losses, stop and say so.

## Commands
```
node scripts/rippo.mjs packs
node scripts/rippo.mjs me '{"from":"0x…"}'
node scripts/rippo.mjs quote-open '{"from":"0x…","pack":0,"pay":"bnb"}'        # pay: usdt | bnb | balance; optional "ref":"0x…"
node scripts/rippo.mjs quote-free '{"from":"0x…"}'
node scripts/rippo.mjs quote-reveal '{"id":12,"secret":"0x…"}'
node scripts/rippo.mjs quote-expire '{"id":12}'
node scripts/rippo.mjs quote-sell '{"cards":[3,4]}'
node scripts/rippo.mjs quote-withdraw-balance '{"from":"0x…","amount":"max"}'   # min 10 USDT
node scripts/rippo.mjs invite '{"from":"0x…"}'
node scripts/rippo.mjs quote-deposit '{"from":"0x…","amount":"100"}'
node scripts/rippo.mjs quote-withdraw '{"shares":"50"}'
node scripts/rippo.mjs quote-claim '{"req":0}'
```
Each quote returns `txs: [{to, value, inputData, chainId}]` (`value` in wei; non-zero only for pay-with-BNB). Execute in
order with the user's wallet, e.g. `baw contract-call preview --to <to> --data <inputData> --value <value> --chain 56` →
user confirms → `execute`. After an open, read the `Opened(id,…)` event from the receipt to get the id for `reveal`.
