Skip to main content
Xmarket does not care who deployed a contract. If your contract implements the XNS-1 interface, it is tradeable on Xpectrum the moment it is on-chain. There is no allowlist and no registration step.

The minimum surface

Xmarket calls exactly five functions on a collection contract to settle trades and route royalties. Implement these and your contract is marketplace-compatible:
is_approved_or_owner takes token_id first and addr second. Reversing them causes silent auth failures at settlement.
For the full standard (transfers, approvals, events, view returns), see XNS-1.

How a trade settles

  1. The seller approves Xmarket as an operator on the token (approve or set_operator)
  2. The seller lists via list_nft(contract, token_id, price)
  3. A buyer calls buy_nft(listing_id) with OCT attached
  4. Xmarket reads owner_of, checks is_approved_or_owner, reads royalty_of + creator_of, then calls transfer_from and credits proceeds
Royalties are read from your contract’s royalty_of at settlement, then clamped to a 10% ceiling by Xmarket. A contract reporting 50% still pays out 10%. The cap is enforced by the marketplace, not by trusting the collection.

Good practices

  • Bounds-check token_id in every view function and revert on nonexistent tokens. Xmarket and indexers rely on this.
  • Emit Transferred on every ownership change, including mints (from = 0 on mint), so indexers can follow ownership without rescanning.
  • Keep proceeds pull-based. Octra’s AML reverts earlier transfer() calls if a later call() in the same function fails, so pushing funds during settlement is fragile. Credit a balance and let recipients claim.

Reference implementations

Xcollection and XpectrumGenesis both implement XNS-1 in AML and are formally verified. Use them as a reference for the exact event shapes and view return formats. See Contracts.