Module
NFT Market
A fixed-price secondary market for the tokens the NFT module creates. It charges no protocol fee.
On-chain name: nftmarket · Consensus version 1
What the module owns
- The seller keeps ownership while the listing is live. The token is locked under the order id
nftmarket/{listing_id}, which stops the seller transferring or burning it out from under the listing. - The listing deposit is
1000000ucenby default, must be denominated in ucen, and is backed by an invariant: the module account balance must always equal the sum of active listing deposits. - Every listing has an expiry. Leaving
expiry_heightat zero substitutes the default duration of 100,000 blocks, and no listing may be created further ahead than the 1,000,000 block maximum. - A purchase never burns. If the royalty consumes the whole price the result is
ErrRoyaltyInvalidrather than a zero payment. - Caps: 10,000 active listings, 2,048 bytes per listing, 32 accepted denoms per class.
Key features
Fixed-price listings
Simple fixed-price secondary trading. No auctions, no order books.
Lock escrow
Token locked via NFT module's lock mechanism. Seller keeps ownership until purchase.
Refundable listing deposit
Deposit held by module, refunded on cancellation or purchase. Invariant: balance = sum of active deposits.
Class royalty & config
Per-class royalty rate, accepted denoms, market enable/disable. Configurable by class issuer.
Messages
- MsgListNFT -- Create a fixed-price listing (seller locks token, pays deposit).
- MsgBuyNFT -- Purchase a listed NFT (pays price, receives token, seller gets proceeds minus royalty).
- MsgCancelListing -- Seller cancels listing (deposit refunded, lock released).
- MsgUpdateListingPrice -- Seller updates listing price.
- MsgSetClassRoyalty -- Class issuer sets royalty rate (basis points).
- MsgSetClassMarketConfig -- Class issuer sets accepted denoms, market enable/disable.
- MsgUpdateMarketConfig -- Gov updates global config (deposit amount, max expiry, caps).
Queries
- Listing / Listings -- Fetch a single listing or paginated list (with filters).
- ListingsBySeller / ListingsByClass -- Filtered listing queries.
- ClassRoyalty / ClassMarketConfig -- Class-level market configuration.
- MarketConfig / Params -- Global market parameters.
Caps and limits
- Active listings: ≤ 10,000
- Listing size: ≤ 2,048 bytes
- Accepted denoms per class: ≤ 32
- Default listing deposit: 1,000,000 ucen
- Default expiry: 100,000 blocks
- Max expiry: 1,000,000 blocks ahead
Integration guide
Sell an NFT on chain
Enable a class for trading
Where the rules live
The NFT market uses the NFT module's lock for escrow. A purchase never burns the token; it transfers ownership and pays the seller. If royalty consumes the whole price, the purchase is rejected (ErrRoyaltyInvalid).