5.6 KiB
5.6 KiB
Bazaar Scene
Status
Active draft.
Goals
- Provide a trusted in-game economy hub.
- Support player-to-player card marketplace using Origin Points.
- Support first-party store purchases (booster packs, premade decks, Origin Points).
- Support card sacrifice/disenchant flow for Origin Points.
- Ensure full transaction auditability and chain of custody for anti-cheat and bug investigation.
Bazaar Sections (UI)
1) Player Marketplace
- Search/browse listed cards.
- View listing details:
- card identity (definition + variant)
- seller
- price (Origin Points)
- listed-at timestamp
- listing status
- Actions:
- buy listing
- cancel own listing
- create listing from owned inventory
- Filters/sort:
- card name/type/rarity/affinity
- min/max price
- newest/price asc/price desc
2) Official Store
- Buy booster packs.
- Buy premade decks.
- Buy Origin Points (USD purchase flow).
- Payment method display + confirmation modal.
- Show SKU details and pricing in:
- USD (fiat)
- Origin Points (when applicable)
3) Sacrifice / Disenchant
- Select cards from owned inventory.
- Preview Origin Points return before confirm.
- Explicit irreversible warning.
- Confirm action flow:
- cards are removed from active inventory (or flagged destroyed server-side)
- Origin Points credited
4) Ledger / History (Player View)
- Personal transaction history timeline:
- marketplace buys/sells
- store purchases
- sacrifices
- refunds/reversals
- Receipt details with transaction id.
Client Interactions
- Load Bazaar bootstrap on scene open.
- Keep balances (Origin Points) fresh after every economy mutation.
- Use optimistic UI sparingly for economy operations; server response is source of truth.
- Require explicit confirmation modals for:
- listing creation
- purchase
- sacrifice
- USD spend
- Show clear pending/success/failure states for every transaction.
Server Rules and Authority
- Server is fully authoritative for inventory ownership, balances, listing state, and purchase validity.
- Marketplace transactions must be atomic (debit buyer, credit seller, transfer card ownership, write ledger).
- Sacrifice operation must be atomic (mark destroyed/remove ownership, grant points, write ledger).
- All purchases (USD and Origin Points) must write immutable audit records.
- Every item/asset transaction must maintain chain-of-custody links.
Data Contracts (Draft)
Client -> Server (BazaarBootstrapRequest)
requestIdaccountId
Server -> Client (BazaarBootstrapResponse)
requestIdoriginPointsBalancemarketplaceSummarystoreCatalog(boosters, premade decks, point packs)sacrificeRulesrecentTransactions
Marketplace
Client -> Server (MarketplaceSearchRequest)
requestIdfilterssortpagepageSize
Server -> Client (MarketplaceSearchResponse)
requestIdresultstotalCount
Client -> Server (MarketplaceCreateListingRequest)
requestIdcardInstanceIdpriceOriginPoints
Server -> Client (MarketplaceCreateListingResponse)
requestIdsuccesslistingIderrorCode(if failed)
Client -> Server (MarketplaceBuyListingRequest)
requestIdlistingId
Server -> Client (MarketplaceBuyListingResponse)
requestIdsuccesstransactionIdupdatedBalanceerrorCode(if failed)
Client -> Server (MarketplaceCancelListingRequest)
requestIdlistingId
Server -> Client (MarketplaceCancelListingResponse)
requestIdsuccesserrorCode(if failed)
Store Purchases
Client -> Server (StorePurchaseRequest)
requestIdskuIdcurrency(USD|ORIGIN_POINTS)paymentMethodId(required for USD)
Server -> Client (StorePurchaseResponse)
requestIdsuccesstransactionIdreceiptIdupdatedBalancegrantedItemserrorCode(if failed)
Sacrifice / Disenchant
Client -> Server (SacrificeCardsRequest)
requestIdcardInstanceIdsconfirmIrreversible(truerequired)
Server -> Client (SacrificeCardsResponse)
requestIdsuccesstransactionIdoriginPointsGrantedupdatedBalancedestroyedCardRefserrorCode(if failed)
Ledger / Audit
Client -> Server (TransactionHistoryRequest)
requestIdfilterspagepageSize
Server -> Client (TransactionHistoryResponse)
requestIdentriestotalCount
Audit / Chain of Custody Requirements (Critical)
- Every economy event writes an immutable ledger entry with:
transactionIdeventTypeaccountId(s) involved- asset references (
cardInstanceId,skuId, etc.) - balance deltas (before/after)
- timestamp + request correlation (
requestId)
- Every card instance should have a custody trail:
- minted/acquired -> listed -> sold/transferred -> sacrificed/destroyed
- USD purchases must include payment provider reference id(s) and receipt linkage.
- Support admin/internal investigation queries for suspicious activity patterns.
Fraud / Abuse Signals (Planned)
- Repeated rapid buy/sell loops between same accounts.
- Outlier pricing patterns.
- High-frequency sacrifices after suspicious acquisitions.
- Chargeback/refund correlation with asset transfers.
- Multi-account linkage risk indicators.
Open Questions
- Should marketplace fees/taxes apply on player sales?
- Are there listing limits per user or per card rarity?
- Is there a hold/escrow period before purchased cards can be relisted?
- What refund policy exists for Origin Points and digital goods?
- Should sacrifice values be static or dynamic by card metadata?