Skip to content

Marketplace & Listings

The MarketplaceSDK and ListingSDK manage the Akita NFT marketplace. Sellers list NFTs at a set price, and buyers purchase them through the marketplace contract.

The marketplace is a factory contract that creates individual listing contracts for each NFT sale. It enforces:

  • Double-sided fees — Both the platform facilitating the listing and the platform facilitating the purchase can take fees, enabling cross-platform commerce where NFTs listed on one marketplace can be purchased through another
  • Royalties — Decentralized royalties via MetaMerkles, verified on-chain through merkle proofs
  • Composable listings — Multiple assets can be bundled in a single listing

Each listing is its own contract instance containing the NFT and sale terms.

import { MarketplaceSDK, ListingSDK } from '@akta/sdk/marketplace'
const marketplace = new MarketplaceSDK({ algorand })
// Interact with a specific listing
const listing = new ListingSDK({
algorand,
factoryParams: { appId: listingAppId },
})
const listing = await marketplace.list({
asset: nftAssetId,
amount: 1n,
name: 'My NFT',
proof: merkleProof,
price: 10_000_000n, // 10 ALGO
paymentAsset: 0n, // Accept ALGO
expiration: 0n, // No expiry
reservedFor: ALGORAND_ZERO_ADDRESS_STRING, // Open to anyone
gateId: 0n, // No gate
marketplace: marketplaceAddr,
})

Buyers send payment to the listing contract, which distributes funds to the seller, royalty recipients, the listing platform, the purchasing platform, and the DAO treasury.

Sellers can delist their NFTs at any time, returning the asset to their wallet.

Marketplace operations through a wallet use the MarketplacePlugin. See Wallet Plugins.