Cosmic Bull

Rendered from pearl/r/market/README.md at commit 6a510c665a53 in the project repository. The committed file is the source of truth; this page is a rendering of it.

Marketplace — gno.land/r/g1ut6uspuh73e02yauxpmyt8g3wwddaq8utagvm3/market

Custodial GNOT marketplace: sellers list goods (title, description, price), a buyer pays the EXACT price, the marketplace holds the value until the seller claims proceeds (price minus the fee snapshotted when the seller listed, subject to the seller's own maxFeeBps ceiling).

DISCOVERY / REUSE (full record in commit 19d0e56): fresh 625-package pearl enumeration; three marketplace families inspected — nsmarket/v4 (RELATED: deliberately non-custodial, the opposite architecture of this spec), memba_market_core_v2 (RELATED: NFT royalty split math, subsumed by feeledger), memba_appstore_v2 (RELATED: curated directory). No relevant existing implementation was found in the searched sources for a custodial goods-listing market. Reused: feeledger, coinio, p/nt/markdown/sanitize/v0, p/nt/avl/v0. TWO patterns adopted FROM the inspected candidates: nsmarket's assertNoSend (non-payables refuse accidental -send; note the origin-envelope caveat for realm sellers documented in-source) and appstore's 2-STEP admin handoff. New /p/ packages: none justified.

INVARIANTS: monetary H == U + F + S (listings hold no value — proven by construction: only Buy accepts coins and converts the full envelope to U+F atomically); application: Active -> {Sold, Cancelled} exactly once, Sold ⇔ buyer recorded ∧ proceeds + fee == price at the snapshot. Races closed: listing immutability + exact-price envelope (seller manipulation, both directions), snapshot + seller ceiling (fee races); buyers are structurally fee-indifferent.

AUDIT: fresh-context, 0 RED; Y1 (assertNoSend origin-envelope caveat vs realm sellers) documented + pinned by test; Y2 coverage gaps closed (partial-claim success path, realm fee recipient, boundary acceptances incl. 1ugnot fee-rounds-to-zero sale). 19 tests; 98 workspace.

LIMITATIONS: hot testnet keys; home Render shows latest 20 only (detail pages addressable by id); descriptions byte-bounded; buyer addresses are public by design; goods exchange itself is off-chain trust (escrow-with-disputes is a different product — see escrow_v3).

DEPENDENCY GRAPH: market -> {coinio -> stdlib; feeledger -> avl; avl; sanitize/v0}. Deployment record: pearl/DEPLOYMENT.md §6.